Question and answer processing method for data chart, computer equipment, computer readable storage medium and computer program product

By optimizing the interface for displaying data charts in the question-and-answer system and allowing users to edit data filtering conditions, the problem of low efficiency and accuracy in question-and-answer processing caused by unclear user questions has been solved, achieving efficient and accurate question-and-answer processing.

CN121350207APending Publication Date: 2026-01-16KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511499944.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

Existing question-and-answer systems cannot accurately identify the intent of users when their questions are unclear, resulting in low efficiency and accuracy in question-and-answer processing.

Method used

By displaying an optimized interface that generates data charts based on natural language questions, users can edit data filtering criteria, construct and display second natural language questions to obtain accurate answers, avoiding the need to re-enter natural language questions.

Benefits of technology

It improved the efficiency and accuracy of question and answer processing, reduced the number of user interactions, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121350207A_ABST
    Figure CN121350207A_ABST
Patent Text Reader

Abstract

The invention relates to a question and answer processing method for a data chart, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to an optimization request for a first answer result, displaying an optimization interface; the first answer result is generated based on the first natural language question; the optimization interface comprises a first data screening condition of the data chart obtained by analyzing a first natural language question; responding to an editing operation aiming at the first data screening condition in the optimization interface; editing the first data screening condition according to the editing operation to obtain a second data screening condition; according to a second data screening condition, constructing and displaying a second natural language question; and in response to a confirmation operation for the second natural language question, displaying a second answer result corresponding to the second natural language question. By adopting the method, the question and answer processing efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer data processing technology, and in particular to a question-and-answer processing method, apparatus, computer device, computer-readable storage medium, and computer program product for data charts. Background Technology

[0002] With the development of natural language processing (NLP) technology, question-answering (QA) systems based on NLP have emerged. Users can ask questions in natural language within these systems. The systems use machine learning models, such as large-scale models, to identify and parse the natural language of the user's questions. Based on the identification results (such as keywords in the question), the systems search and return the answers corresponding to the user's questions.

[0003] However, because users' questions may be unclear, the relevant technologies cannot accurately answer users when they cannot accurately identify keywords or other clear questions from the natural language of the user's question. This affects the efficiency and accuracy of question-and-answer processing. Summary of the Invention

[0004] Therefore, it is necessary to provide a data chart question-and-answer processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency and accuracy of question-and-answer processing, addressing the aforementioned technical problems.

[0005] Firstly, this application provides a question-and-answer processing method for data charts, the method comprising:

[0006] In response to an optimization request for the first answer result, an optimization interface is displayed; wherein the first answer result is a data chart generated based on a first natural language question; the optimization interface includes a first data filtering condition for the data chart obtained from the analysis of the first natural language question;

[0007] In response to the editing operation on the first data filtering condition in the optimized interface;

[0008] The first data filtering condition is edited according to the editing operation to obtain the second data filtering condition;

[0009] Based on the second data filtering criteria, construct and display a second natural language question;

[0010] In response to the confirmation operation for the second natural language question, a second answer result corresponding to the second natural language question is displayed; the second answer result includes a target data chart obtained by querying according to the second data filtering conditions.

[0011] In one embodiment, the editing operation includes adding an indicator, selecting an indicator, and selecting a dimension member for the data chart; the step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0012] In response to the addition of a new indicator in the optimized interface, selectable data analysis indicators obtained based on the database analysis are displayed.

[0013] In response to the indicator selection operation for the list of optional data indicators, the optimization interface displays the configurable dimensions and dimension member options corresponding to the newly added data analysis indicator specified by the indicator selection operation; the configurable dimensions and dimension member options are obtained by analyzing the database.

[0014] In response to the dimension member selection operation for the configurable dimension and dimension member options corresponding to the newly added data analysis indicator, the newly added dimension member information corresponding to the newly added data analysis indicator is obtained;

[0015] The newly added data analysis indicators and newly added dimension member information are fused with the first data filtering conditions to obtain the second data filtering conditions, and the second data filtering conditions are displayed through the optimized interface.

[0016] In one embodiment, displaying an optimization interface in response to an optimization request for a first answer result includes:

[0017] In response to the optimization request, the first data filtering condition used to generate the first answer result is obtained; the first data filtering condition includes at least one first data analysis indicator and at least one first dimension member corresponding to the first data analysis indicator;

[0018] The optimization interface displays the indicator configuration units corresponding to each of the first data analysis indicators; the indicator configuration units display the first dimension members corresponding to the current first data analysis indicator.

[0019] In one embodiment, the editing operation includes modifying the first data analysis indicator or the first dimension member; the step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0020] In response to the selection operation of the target dimension within the configuration unit, the selector component corresponding to the target dimension is displayed;

[0021] The selector component responds to the modification operation of the dimension member under the target dimension to obtain the updated dimension member information;

[0022] The configuration unit containing the first data filtering condition and the first data analysis indicator corresponding to the target dimension in the optimization interface is updated based on the updated dimension member information.

[0023] In one embodiment, the first dimension member includes a time dimension member; the optimized interface displays a time dimension configuration component; the time dimension configuration component provides multiple time granularity options and time interval selection controls for each time granularity; the editing operation includes adjusting the time dimension member;

[0024] The step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0025] In response to the selection operation of the target time granularity in the time dimension configuration component, the time interval selection control corresponding to the target time granularity and the optional time value are displayed.

[0026] The target time range is received based on the selectable time value through the time interval selection control corresponding to the target time granularity.

[0027] The target time range is mapped to time dimension member values ​​that meet the data query requirements of the database, and the time dimension members in the first data filtering conditions are updated according to the target time range.

[0028] In one embodiment, the first data filtering condition includes at least one first data analysis indicator and first filtering dimension member information corresponding to the first data analysis indicator; before displaying the optimization interface in response to the optimization request for the first answer result, the method includes:

[0029] Semantic recognition is performed on the first natural language question to obtain initial data analysis indicators and the initial screening dimension member information corresponding to the initial data analysis indicators;

[0030] The initial data analysis indicators and the initial screening dimension member information are merged to obtain the first data screening condition.

[0031] In one embodiment, for the dimension members under the same first filtering dimension, deduplication and merging are performed; if the filtering dimension includes a time dimension, the dimension members of the time dimension that constitute a continuous time period are merged into a time range.

[0032] Secondly, this application also provides a question-and-answer processing apparatus, comprising:

[0033] The display module is used to display an optimized interface in response to an optimization request for the first answer result; wherein the first answer result is a data chart generated based on a first natural language question; the optimized interface includes a first data filtering condition for the data chart obtained by analyzing the first natural language question;

[0034] A response module is used to respond to the editing operation on the optimized interface for the first data filtering condition;

[0035] The editing module is used to edit the first data filtering condition according to the editing operation to obtain the second data filtering condition;

[0036] A construction module is used to construct and display a second natural language question based on the second data filtering criteria;

[0037] The query module is used to respond to the confirmation operation for the second natural language question and display the second answer result corresponding to the second natural language question; the second answer result includes the target data chart obtained by querying according to the second data filtering conditions.

[0038] Thirdly, this application also provides a computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps included in any embodiment of the question-and-answer processing method for data charts as described in the first aspect.

[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps included in any embodiment of the question-and-answer processing method for data charts as described in the first aspect.

[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps included in any embodiment of the question-and-answer processing method for data charts as described in the first aspect.

[0041] The aforementioned question-and-answer processing method, apparatus, computer device, computer-readable storage medium, and computer program product for data charts, in response to an optimization request for a first answer result, displays an optimized interface; wherein, the first answer result is a data chart generated based on a first natural language question; the optimized interface includes a first data filtering condition for the data chart obtained by analyzing the first natural language question; in response to an editing operation on the first data filtering condition in the optimized interface; the first data filtering condition is edited according to the editing operation to obtain a second data filtering condition; a second natural language question is constructed and displayed according to the second data filtering condition; in response to a confirmation operation on the second natural language question, a second answer result corresponding to the second natural language question is displayed; the second answer result includes a target data chart obtained by querying according to the second data filtering condition. This invention differs from related technologies that fail to accurately identify the user's question intent, leading to low accuracy in question-and-answer processing or requiring the user to re-edit the question and input a new natural language question. The parsing and recognition of new natural language questions consumes significant computing power, thus impacting efficiency. This invention generates a first answer result in the form of a data chart based on the first natural language question and displays it to the user. In response to optimization requests for this data chart, it directly displays first data filtering conditions derived from the analysis of the first natural language question, allowing the user to edit them. A second data filtering condition, more accurately representing the user's question intent, is constructed at a lower level. Without requiring the user to re-input a new natural language question, the second answer result, including the target data chart retrieved based on the second data filtering condition, is obtained, significantly improving the efficiency and accuracy of question-and-answer processing. Attached Figure Description

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

[0043] Figure 1 This is an application environment diagram of a question-and-answer processing method for data charts in one embodiment;

[0044] Figure 2 This is a flowchart illustrating a question-and-answer processing method for data charts in one embodiment;

[0045] Figure 3 This is a flowchart illustrating the question-and-answer processing method for data charts in another embodiment;

[0046] Figure 4 This is a flowchart illustrating the question-and-answer processing method for data charts in another embodiment;

[0047] Figure 5 This is a schematic diagram of the query results corresponding to the first natural language question in one embodiment;

[0048] Figure 6 This is a schematic diagram of the fine-tuning interface for editing the first data filtering criteria in one embodiment;

[0049] Figure 7 This is a schematic diagram illustrating the addition of data filtering conditions based on the result fine-tuning interface in one embodiment;

[0050] Figure 8 This is a schematic diagram illustrating the time-dimensional member configuration operation based on the result fine-tuning interface in one embodiment;

[0051] Figure 9 This is a schematic diagram illustrating the process of selecting time dimension members of component configuration based on multi-dimensional period in one embodiment;

[0052] Figure 10 This is a flowchart illustrating the re-query front-end component's processing flow in one embodiment;

[0053] Figure 11 This is a timing diagram of the re-questioning process in one embodiment;

[0054] Figure 12 This is a schematic diagram of the second data filtering conditions obtained after editing in one embodiment;

[0055] Figure 13 This is a schematic diagram illustrating the generation of a second natural language file in one embodiment.

[0056] Figure 14 This is a schematic diagram showing the comparison between the question-and-answer processing flow of the data chart in one embodiment of the present invention and the traditional question-and-answer processing flow.

[0057] Figure 15 This is a structural block diagram of a question-and-answer processing device in one embodiment;

[0058] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0061] Related terms: Dimension: Dimension is an abstract collective term for a category of things that share common characteristics or independent attributes. It is used to describe the multi-level, multi-directional, or multi-degree-of-freedom features of things, systems, or phenomena. It is widely used to represent classification criteria, analytical perspectives, or quantitative indicators.

[0062] Dimension member: A specific category instance within a dimension, representing an independent value or category within that dimension. It is the concrete manifestation of a dimension in real-world applications, used for detailed analysis, filtering, or data aggregation.

[0063] Large models: Large models are neural network models containing an extremely large number of parameters (potentially over a billion). These models are trained using deep learning techniques, leveraging massive amounts of data and computational resources to achieve optimal performance across a wide range of tasks.

[0064] GPT prompts: GPT prompts are text entered by the user when interacting with the GPT (Generative Pretrained Transformer) model, used to guide the model in generating appropriate responses. These prompts can be questions, instructions, descriptions, etc., and they play a key role in guiding the model to understand the user's needs and produce appropriate answers.

[0065] Before describing the embodiments of the present invention, the related technologies and their problems will be explained:

[0066] Question-answering systems based on related technologies are generally complex, employing natural language interaction mechanisms. They rely on large language models to extract information from user-input natural language and combine this with vector retrieval technology to generate corresponding answers and return them to the user. Furthermore, when users are dissatisfied with the returned answers, they need to interactively clarify based on the information extracted from the large model; that is, users adjust the language of their questions and re-enter the revised natural language question. The question-answering solutions of the aforementioned technologies suffer from at least the following problems: 1. Information extraction accuracy issues: When user queries involve multi-dimensional information and are semantically ambiguous, the model's ability to identify dimensions and dimension members is insufficient, resulting in poor extraction effects and affecting the accuracy of question-answering processing. 2. Low interaction efficiency: Users need to repeatedly adjust their query statements, resulting in a lengthy process, low hit rate, and response delay, impacting the efficiency of question-answering processing and user experience.

[0067] Therefore, a question-answering solution with better efficiency and accuracy is needed.

[0068] The question-and-answer processing method for data charts provided in this application can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. In response to an optimization request for a first answer result, terminal 102 displays an optimization interface; the first answer result is a data chart generated based on a first natural language question; the optimization interface includes first data filtering conditions for the data chart obtained from the analysis of the first natural language question; in response to an editing operation on the first data filtering conditions in the optimization interface; the first data filtering conditions are edited according to the editing operation to obtain second data filtering conditions; a second natural language question is constructed and displayed based on the second data filtering conditions; in response to a confirmation operation on the second natural language question, a second answer result corresponding to the second natural language question is displayed; the second answer result is obtained by server 104 querying data in the database according to the second data filtering conditions. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0069] In one exemplary embodiment, such as Figure 2 As shown, a question-and-answer processing method for data charts is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:

[0070] Step 202: In response to the optimization request for the first answer result, display the optimization interface; wherein the first answer result is a data chart generated based on the first natural language question; the optimization interface includes a first data filtering condition for the data chart obtained by analyzing the first natural language question.

[0071] The optimization request is used to request adjustments to the initial answer (i.e., the first response result) obtained based on the initial question (i.e., the first natural language question), so that the adjusted answer is more accurate and meets the user's data query intent. Specifically, the optimization request can be triggered by: the user clicking a specific graphical control associated with the first response result (such as a "request" or "fine-tune" button), or by receiving a specific voice command in a voice interaction scenario.

[0072] The first natural language question is the initial query text entered by the user, such as "Show X Technology's overseas sales last year." Understandably, the first natural language question may contain semantically ambiguous or unclear expressions. The first answer result is a preliminary data chart generated based on the first natural language question, after semantic parsing and intent recognition by a natural language processing model. The first data filtering criteria are a set of structured query elements extracted from the first natural language question. The first data filtering criteria consist of at least one first data analysis indicator and first filtering dimension member information under each first data analysis indicator. The first data analysis indicator refers to the core data metric of the user's intended query, such as "sales revenue," "profit margin," and "composition percentage." A data analysis indicator can correspond to one or more aggregateable numerical fields in the database. The first filtering dimension member information is used to limit the specific scope or classification method of the data analysis indicator, and it contains two levels: the first filtering dimension and the dimension members under each first filtering dimension. The first filtering dimension defines different observation perspectives or classification criteria for the data, such as "time," "organization," "region," and "product." The relationship between dimensions and metrics is as follows: metrics are the "values" that need to be measured, while dimensions are the "axes" used to group and filter these "values." For example, for the metric "sales revenue," its changing trend can be observed through the "time" dimension, and its distribution can be analyzed through the "region" dimension. The dimensional components under each first filtering dimension are specific values ​​within that particular dimension. For example, members of the time dimension could be "2023" or "Q1 2024"; members of the region dimension could be "China" or "North America." These components are parsed from the first natural language question or generated through inference mapping using pre-defined inference rules.

[0073] The optimized interface is a graphical user interface used to visually present the first data filtering criteria corresponding to the data charts and provide interactive means to modify them. The specific implementation of the optimized interface may include dynamically rendering a corresponding number of configuration areas (e.g., collapsible panels) based on the number of data analysis indicators included in the first data filtering criteria. Each configuration area corresponds to one data analysis indicator. Within each configuration area, the indicator's identifier (such as its name) is displayed, and its associated dimensions and currently selected dimension members are listed in a structured manner (e.g., a tree list or label group).

[0074] For different types of dimension members, different types of interactive controls can be provided for editing. For example, for regular dimensions (such as organization and product), a searchable multi-select drop-down list or member selector pop-up can be provided, allowing users to select or deselect from a predefined set of dimension members. For the time dimension, considering the continuity and multi-granularity of the dimension members, this embodiment of the invention provides a dedicated time range selection component for the time dimension in the optimized interface. This component allows users to first select the time granularity (such as year, quarter, month), and then define a continuous time range by setting the start and end points of the dimension members under that time granularity. The component automatically maps this range to discrete period values. By parsing natural language questions into structured data filtering conditions and visually displaying them, the user's vague intent is transformed into clear and actionable query elements, laying the technical foundation for subsequent precise adjustments.

[0075] Before displaying the optimized interface, preprocessing can be performed to visualize and make transparent the question-answering system's recognition results of the initial model, providing a clearer starting point for user interactive clarification. Specifically, preprocessing may include semantic recognition of the first natural language question, extraction of initial indicators and dimension members, and merging processing (such as deduplication of members under the same dimension or merging consecutive time periods) to generate structured first data filtering conditions. By parsing and structuring the fuzzy natural language into first data filtering conditions and displaying them on the optimized interface, it facilitates subsequent interactive clarification by users, solving the black-box problem in question-answering processing where users are unaware of the question-answering processing logic.

[0076] Step 204: Respond to the editing operation for the first data filtering condition in the optimized interface.

[0077] The editing operation refers to the specific modification instructions initiated by the user on the first data filtering criteria through various interactive controls in the optimized interface. Specifically, the editing operation can include indicator configuration operations and / or dimension member configuration operations. The indicator configuration operation is used to modify, add, or delete indicators based on the first data analysis indicators included in the first data filtering criteria. The dimension member configuration operation is used to configure the dimensions and dimension member information under a specified indicator. For example, the indicator configuration operation can be a new indicator operation. In response to the interaction with the "Add Indicator" control displayed on the optimized interface, the optimized interface displays a list of optional indicators that can be obtained from the database. Furthermore, in response to the selection of a new indicator based on the list of optional indicators, a separate dimension member configuration interface corresponding to the new indicator is provided for the user to configure the dimensions and members for that new indicator.

[0078] The dimension member configuration interface can include dimension member information editing controls corresponding to the dimension. Taking the modification of dimension members as an example, in response to a click operation on a displayed dimension member or the editing control next to it, a dedicated selector for that dimension type (such as a pop-up selection window) is invoked and displayed. Then, in response to the selection operation of the selector, the dimension member information corresponding to the selection operation is received and applied to complete the change of the dimension member information.

[0079] Optionally, the dimension may include a time dimension. Considering that the time dimension has continuity and multiple division granularities (year, quarter, month, day, hour, etc.), the dimension member configuration operation may also include a time range adjustment operation. The optimized interface displays a time range selection component dedicated to the time dimension. In response to the selection operation on the time dimension selection component, the selection operation is used to change the time granularity or adjust the start / end point. The corresponding time dimension member is updated in real time according to the selection operation. The configuration of complex time ranges is simplified through the multi-dimensional time selection component, which improves the configuration efficiency and accuracy of dimension members.

[0080] Step 206: Edit the first data filtering condition according to the editing operation to obtain the second data filtering condition.

[0081] In this process, based on the specific editing instructions received in the preceding steps, the data structure of the first data filtering condition stored in memory is updated accordingly. For example, a new indicator and its configuration may be added, or the member list under a certain dimension may be replaced. After these updates, a new, more precise structured query condition—the second data filtering condition—is formed, reflecting the user's final intent. For instance, if the user adds a "profit margin" indicator and sets its dimension member to "X Technology," this new {indicator: profit margin, organization: [X Technology]} key-value pair is integrated into the existing filtering condition structure. Finally, a complete and precise second data filtering condition is generated. This condition fully reflects the user's final query intent after visual and interactive adjustments.

[0082] This invention provides a dynamically scalable interaction mechanism by optimizing the interface, allowing users to add, delete, and modify data query conditions in an intuitive way such as clicking and selecting. This greatly improves the flexibility and efficiency of the interaction and overcomes the drawback of traditional methods that require users to repeatedly modify text questions to obtain more satisfactory answers.

[0083] Step 208: Construct and display a second natural language question based on the second data filtering criteria.

[0084] Natural language generation technology can be used to convert structured second data filtering conditions back into natural language form, i.e., second natural language questions. For example, if the second data filtering conditions are {Indicator: [Sales Revenue, Profit Margin], Organization: [X Technology], Time: [2023Q1, 2023Q2], Country: [United States, Japan]}, the generated second natural language question could be "Query X Technology's sales revenue and profit margin in the United States and Japan for the first and second quarters of 2023". By optimizing the interface to display the second natural language question, users are given the opportunity to confirm, ensuring that the question-and-answer processing system of this embodiment can accurately understand its adjusted intent. At the same time, after editing the structured data filtering conditions, displaying an intuitive, easier-to-understand, and easier-to-confirm second natural language question makes it easier for users to confirm whether the question is clear and unambiguous. This improves the accuracy and efficiency of question adjustment and optimization, while enhancing the user's question-and-answer experience.

[0085] Step 210: In response to the confirmation operation for the second natural language question, display the second answer result corresponding to the second natural language question; the second answer result includes the target data chart obtained by querying according to the second data filtering conditions.

[0086] The confirmation operation represents the assessment of the accuracy of the second natural language question, which can be achieved by the user clicking a "Confirm Question" button or a similar button. Unlike processing the initial question, which requires re-invoking the large model for semantic parsing and vector retrieval, in this embodiment of the invention, since the second data filtering conditions are already structured and explicit query instructions, a database query statement (such as SQL) can be directly generated based on the indicators, dimensions, and dimension member information in the second data filtering conditions to be executed directly in the database. The data results obtained from the query can be calculated and formatted, and then displayed to the user as target data charts or tables. Because the query conditions have been intuitively and accurately confirmed by the user, the hit rate of the second answer result can be significantly improved, and the response speed can be faster than the natural language-based retrieval process in related technologies. Furthermore, the display in the form of target data charts makes the question-and-answer processing results more intuitive and easier to understand.

[0087] This invention, through a technical path of "structured parsing - visual interactive editing - confirmation - precise query," transforms the traditional process, which relies on multiple trial-and-error interactions with natural language, into a deterministic process of one-time parsing and multiple graphical fine-tuning. This effectively overcomes the recognition errors caused by the ambiguity of natural language and ensures that the final result matches the user's true intention. Figure 1 It exhibits high consistency and effectively addresses the issues of poor accuracy in extracting information from questions and low interaction efficiency in related technologies. Furthermore, by optimizing the interface and user interaction, it transforms the traditional, lengthy "trial-and-error" text adjustment paradigm into a highly efficient "guided" graphical interaction. This reduces the number of times users need to repeatedly adjust the interface, allowing for structured queries based directly on the data filtering conditions after user editing and confirmation. This avoids repetitive and time-consuming model reasoning and vector retrieval, thereby improving the overall accuracy and response efficiency of question-and-answer processing. The entire process aligns with users' question-and-answer and adjustment habits, offering simple and intuitive operation and enhancing the user experience.

[0088] In one embodiment, the editing operation includes an indicator addition operation, an indicator selection operation, and a dimension member selection operation; the step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0089] In response to the addition of a new indicator in the optimized interface, selectable data analysis indicators obtained based on the database analysis are displayed.

[0090] In response to the indicator selection operation for the list of optional data indicators, the optimization interface displays the configurable dimensions and dimension member options corresponding to the newly added data analysis indicator specified by the indicator selection operation; the configurable dimensions and dimension member options are obtained by analyzing the database.

[0091] In response to the dimension member selection operation for the configurable dimension and dimension member options corresponding to the newly added data analysis indicator, the newly added dimension member information corresponding to the newly added data analysis indicator is obtained;

[0092] The newly added data analysis indicators and newly added dimension member information are fused with the first data filtering conditions to obtain the second data filtering conditions, and the second data filtering conditions are displayed through the optimized interface.

[0093] The "Add Indicator" operation refers to a user's instruction on the optimization interface to add a new analytical indicator. In response to clicks or hovering interactions with graphical buttons such as "Add Indicator" or "Add Metric" (i.e., the "Add Control") on the optimization interface, the database's metadata or a predefined indicator library is accessed. The metadata contains all valid fields in the database that can be used for querying and measurement, along with their semantic definitions. To ensure the legitimacy and usability of the newly added data query indicator, the metadata is analyzed in this embodiment to filter out data analysis indicators available for user selection, forming a list of optional data analysis indicators. Each item in the optional data analysis indicator list may contain an indicator identifier (e.g., indicator ID) and a descriptive name (e.g., "Net Profit Margin," "Inventory Turnover Days"). The optional data analysis indicator list is displayed on the optimization interface in the form of drop-down lists, pop-up selection windows, or tiled lists. The "Indicator Selection" operation refers to the user's action of selecting one or more target indicators from the list of optional data analysis indicators, such as clicking to select "Net Profit Margin." In response to the user's selection operation on the optional data analysis indicator list, it is necessary to determine which dimensions can be used to filter this new indicator. The database's metadata or a predefined data model is analyzed again. This data model defines the relationships between different data tables and the dimensions applicable to each indicator (for example, the "net profit margin" indicator can be associated with dimensions such as "time," "organizational structure," and "product line"). Based on this analysis, the configurable dimensions and dimension member options corresponding to the newly added data analysis indicator are obtained and dynamically generated. Subsequently, in the optimization interface, a new configuration area (or configuration unit) is created for the newly added indicator, and these configurable dimensions (such as displaying dimension labels "time" and "organization") and the selectable dimension member options under each dimension are displayed in this area (for example, under the "organization" dimension, a list of selectable members including "X Technology" and "X Electronics" is provided).

[0094] The dimension member selection operation refers to the user's behavior of specifying specific filtering conditions for each dimension within a newly created indicator configuration area. For example, the user selects "2023" as the time dimension member and "X Technology" as the organizational dimension member for the "Net Profit Margin" indicator. Upon receiving these selection operations, the system records the dimensions selected by the user for the new indicator and their corresponding member values, forming the new dimension member information. This information, along with the new indicator itself, constitutes a complete unit of query conditions to be added.

[0095] Data fusion refers to the integration operation performed at the backend data structure level. Specifically, it involves adding or merging the key-value pair `{new data analysis indicator, new dimension member information}` obtained in the previous steps into the existing data structure of the first data filtering condition (e.g., a JSON object or a specific query condition object). After fusion, an updated second data filtering condition is generated. This condition not only includes all elements parsed from the initial question but also the user-added indicator and its filtering conditions. Simultaneously, the interface display is updated and optimized to reflect this change, such as dynamically rendering a configuration area representing the new indicator and displaying the user-selected dimension member information in that area. This allows users to clearly understand that the second data filtering condition now includes the new query elements. By combining data fusion with real-time interface updates, consistency between the backend data conditions and the frontend interface display is ensured, guaranteeing real-time synchronization of data status: providing users with immediate operational feedback and improving the smoothness of the interactive experience.

[0096] This invention, by accessing database metadata and providing a list of optional metrics, breaks the limitation of traditional solutions where the query scope is confined to the initial question parsing results. It allows users to independently introduce other analytical perspectives of interest, greatly enhancing flexibility and practicality. It automatically associates and displays the dimensions and member options supported by the newly added metrics, achieving guided and precise configuration. This avoids users entering invalid conditions due to unfamiliarity with the data structure, ensuring the accuracy and success rate of subsequent queries. The complex intent of "adding a metric" is broken down into simple, linear steps of "selecting a metric -> configuring dimensions," completed through a graphical control. Compared to repeatedly modifying natural language questions, the operation path is clearer, and the interaction cost is significantly reduced.

[0097] In one embodiment, displaying an optimization interface in response to an optimization request for a first answer result includes:

[0098] In response to the optimization request, the first data filtering condition used to generate the first answer result is obtained; the first data filtering condition includes at least one first data analysis indicator and at least one first dimension member corresponding to the first data analysis indicator;

[0099] The optimization interface displays the indicator configuration units corresponding to each of the first data analysis indicators; the indicator configuration units display the first dimension members corresponding to the current first data analysis indicator.

[0100] Specifically, based on the optimization request, the structured query conditions generated and stored during the previous processing of the first natural language question are retrieved from persistent storage or cache; these are the first data filtering conditions. The first data filtering conditions are obtained based on semantic parsing and structured processing of the first natural language question, and their content includes at least one first data analysis indicator and at least one first dimension member corresponding to each first data analysis indicator. The first data analysis indicator is the core metric to be queried, such as "sales revenue". The first dimension member is a specific condition used to filter and limit the data range of the indicator. For example, for the indicator "sales revenue", its corresponding first dimension member may include the time dimension member "2023" and the organization dimension member "X Technology".

[0101] Based on the number of first data analysis indicators included in the first data filtering criteria, a corresponding number of indicator configuration units are dynamically created in the optimization interface. An indicator configuration unit is a visual container in the interface used to independently manage all relevant information for a single data analysis indicator. Its form can be a collapsible panel, a card, or a region with clearly defined boundaries. Each configuration unit uniquely corresponds to a specific first data analysis indicator. The first data analysis indicator corresponding to this unit is clearly identified, for example, by displaying the indicator name (e.g., "Full Indicator") or an icon. All currently configured first dimension member information for this indicator is displayed. The display method can include: presenting it as a group of tags; presenting it as a key-value pair list of "Dimension Name: Member Value"; or directly pre-selecting the corresponding values ​​in an embedded selector, for example, displaying "Period: January 2024 - April 2024" and "Country: China, United States" within the unit. This embodiment of the invention does not limit this.

[0102] In the optimized interface, for each of the first data analysis indicators included in the first data filtering conditions, an independent indicator configuration unit is rendered and displayed. The indicator configuration unit is the basic unit for visual editing within the interface, and its form can be a collapsible panel, a card, or a defined area. Inside each indicator configuration unit, the corresponding first data analysis indicator is identified (e.g., displaying the indicator name "Sales Revenue"), and the first dimension member information currently configured for that indicator is displayed. The first dimension member information can be presented in the form of labels, lists, or structured text. For example, within the configuration unit for the "Sales Revenue" indicator, the text "Time: 2023" and "Organization: X Technology" can be displayed, or 2023 and X Technology can be displayed as more visually appealing labels.

[0103] This invention transforms the structured data (first data filtering condition) used in the background to generate the initial answer into the indicator configuration unit in the front end and displays the specific dimension members, so that users can clearly and intuitively understand the understanding result of their initial question. This breaks the "black box" state of the natural language parsing process and realizes the visualization and transparency of the query intent.

[0104] By creating an independent configuration unit for each data analysis indicator and centrally displaying the relevant dimension member information within that unit, a clear and structured interactive target is provided for users' subsequent modification, deletion, or addition operations. This organizational approach provides a clear operational object for precise control, making complex multi-indicator and multi-dimensional query conditions clear, organized, and easy to manage.

[0105] After opening the optimized interface, users no longer need to build query conditions from scratch. Instead, they can operate directly on a pre-filled, adjustable query framework. This significantly reduces the user's cognitive load and operational steps, improves the initial efficiency of the interaction, and lays a solid foundation for quickly and accurately optimizing the query intent.

[0106] In one embodiment, the editing operation includes modifying the first data analysis indicator or the first dimension member; the step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0107] In response to the selection operation of the target dimension within the configuration unit, the selector component corresponding to the target dimension is displayed;

[0108] The selector component responds to the modification operation of the dimension member under the target dimension to obtain the updated dimension member information;

[0109] The configuration unit containing the first data filtering condition and the first data analysis indicator corresponding to the target dimension in the optimization interface is updated based on the updated dimension member information.

[0110] The selection operation refers to the interactive command initiated by the user within a certain indicator configuration unit, targeting a specific dimension that they wish to modify. This operation can be triggered by clicking the currently displayed dimension member label, clicking the edit icon next to the dimension name, or directly clicking the UI area representing that dimension. The target dimension is the specific dimension that the user intends to modify, such as the "country," "region," or "time" dimension. The selector component is a dedicated interactive control predefined or dynamically generated for different types of dimensions. In response to the selection operation, the selector component that matches the target dimension is invoked. For example, for a common dimension like "country," a modal dialog box or drop-down list supporting search and multi-selection is displayed; for the "time" dimension, a dedicated time range selector with different granularity selection functions such as year, month, and quarter is displayed. This selector component preloads all available dimension members under the target dimension. The modification operation refers to the user's behavior of reselecting members of the target dimension within the displayed selector component. For example, in the dimension member selector corresponding to the "Country" dimension, the dimension member "Japan" can be deselected, and the dimension member "Germany" can be added; or in the time selector, the time range can be adjusted from "2023" to "First Quarter of 2024". The user's final confirmation result is received through the interaction logic of the selector component. This result is the set of all dimension members that the user has reselected for the target dimension, which is the updated dimension member information.

[0111] Based on the updated dimension member information, the data structure of the first data filtering condition stored in memory or a temporary state is modified. Specifically, the original member information of the target dimension under the first data analysis indicator corresponding to the configuration unit is located and replaced with the new updated dimension member information. This generates the updated second data filtering condition.

[0112] Simultaneously, the interface display is updated and optimized based on user editing operations. For example, within the configuration unit corresponding to the first data analysis indicator of the target dimension, the member information of that target dimension is refreshed and displayed. For instance, the previously displayed "Country: China, USA, Japan" is updated to "Country: China, USA, Germany," or "Time: 2023" is updated to "Time: Q1 2024." This real-time update provides users with immediate operational feedback.

[0113] This invention provides customized selector components (such as multi-select dialog boxes and time range selectors) for each dimension type, making modifications to dimension members highly precise and intuitive. This avoids the error-prone drawbacks of modifying free text, significantly improving operational efficiency. Atomic updates between backend data conditions and the frontend interface ensure that users see results immediately after their actions, creating a smooth and responsive user experience and enhancing operational certainty and satisfaction. Modal selector components focus the complex member selection process within an independent interactive context, avoiding interference with other parts of the main interface. This allows users to concentrate on adjusting the current dimension, improving the user experience of optimizing data filtering conditions.

[0114] In one embodiment, the first dimension member includes a time dimension member; the optimized interface displays a time dimension configuration component; the time dimension configuration component provides multiple time granularity options and time interval selection controls for each time granularity; the editing operation includes adjusting the time dimension member. The step of editing the first data filtering condition according to the editing operation to obtain the second data filtering condition includes:

[0115] In response to the selection operation of the target time granularity in the time dimension configuration component, the time interval selection control corresponding to the target time granularity and the optional time value are displayed.

[0116] The target time range is received based on the selectable time value through the time interval selection control corresponding to the target time granularity.

[0117] The target time range is mapped to time dimension member values ​​that meet the data query requirements of the database, and the time dimension members in the first data filtering conditions are updated according to the target time range.

[0118] The selection of the target time granularity refers to the user's action in the time dimension configuration component, where they choose a specific granularity level from various provided options (such as "year", "quarter", "month", "half-month"). This can be accomplished through user interface controls such as drop-down menus, button groups, or tabs. In response to the selection of the target time granularity (such as "quarter"), a time interval selection control matching that granularity is dynamically loaded and displayed. This control can contain selectors for start and end points, and its form can be two linked drop-down lists or a visual calendar range selector.

[0119] Simultaneously, based on the actual time range of data existing in the database, all valid optional time values ​​within the target time granularity are generated and displayed for users to select from in the interval selection control. For example, when a user selects the "quarter" granularity, the drop-down list may display optional values ​​such as "2023Q1", "2023Q2", "2023Q3", and "2024Q1". This allows users to select a start value and an end value from the optional time values ​​based on the time interval selection control displayed in the previous step (for example, selecting "2023Q1" as the start value and "2023Q3" as the end value), thereby setting a continuous target time range.

[0120] The interaction logic of this control receives and confirms the user-defined time range. The specific process of obtaining the defined time range can include the following: Mapping process: The user-defined, interface-oriented continuous time range (e.g., "2023Q1 to 2023Q3") is converted into one or more discrete time dimension member values ​​that can be recognized by the backend database query. This process is performed according to the target time granularity. For example, "2023Q1 to 2023Q3" is mapped to a value list ['2023Q1', '2023Q2', '2023Q3'], where these values ​​correspond to specific codes or field values ​​in the time dimension table of the database.

[0121] The mapped list of time dimension member values ​​is used to replace the original time dimension member information in the first data filtering condition, thus updating the first data filtering condition. For example, the original condition's time: ['2023Q1'] is updated to time: ['2023Q1', '2023Q2', '2023Q3'], thereby obtaining a second data filtering condition that includes the new time range.

[0122] This invention simplifies the configuration of complex time ranges by providing a dedicated time configuration component, greatly simplifying the process. Through a two-step guided interaction of "selecting granularity first, then defining the range," the complex task of configuring continuous time periods is transformed into a simple and intuitive operation. Users no longer need to manually select multiple discrete periods one by one, significantly reducing operational complexity and the risk of errors. Furthermore, in terms of interaction, users only need to understand and operate the concept of a continuous time range, while the system automatically performs the precise mapping to the discrete database query values. This shields the technical details of backend data storage, enhancing the naturalness and ease of use of the interaction. Multiple granularity options meet the differentiated time accuracy requirements of various analysis scenarios; and the selectable time values ​​generated based on real data ensure that the range set by the user is valid and searchable, guaranteeing the accuracy of the query from the source of the interaction.

[0123] In one embodiment, the first data filtering condition includes at least one first data analysis indicator and first filtering dimension member information corresponding to the first data analysis indicator; before displaying the optimization interface in response to the optimization request for the first answer result, the method includes:

[0124] Semantic recognition is performed on the first natural language question to obtain initial data analysis indicators and the initial screening dimension member information corresponding to the initial data analysis indicators;

[0125] The initial data analysis indicators and the initial screening dimension member information are merged to obtain the first data screening condition.

[0126] The semantic recognition process utilizes natural language processing techniques, such as the semantic parsing capabilities based on large language models, to perform deep semantic analysis on the first natural language question input by the user, thereby extracting structured query elements from unstructured text.

[0127] The identification results can include: Initial data analysis metrics: these are the core data items identified from the user's intent query in the question. For example, from the natural language question "The composition percentage of X Technology's total metrics in China and the United States from January to April 2024," the initial data analysis metric can be identified as "total metrics." A question may contain multiple metrics, such as "sales revenue and profit." And initial filtering dimension member information: these are the conditions associated with each metric used to filter data. This information can further include: Dimension identification: identifying the dimension categories involved in the question, such as "organization," "time," and "country." Member extraction: identifying the specific values ​​under each dimension. For example, from the above question, we can extract: Organization: ["X Technology"], Time: ["January 2024", "February 2024", "March 2024", "April 2024"], Country: ["China", "United States"]. These members may be mentioned directly (e.g., "China", "United States") or obtained through model reasoning mapping (e.g., breaking down "January-April" into a specific list of months).

[0128] The initial data analysis indicators and the initial screening dimension member information are merged to obtain the first data screening conditions. The merging process is used to clean, integrate, and optimize the initial results obtained from semantic recognition, which may contain duplicates or redundancies, to form concise, standardized, and efficient first data screening conditions, laying the foundation for subsequent display and editing.

[0129] In one embodiment, the step of merging the initial data analysis indicators and the initial screening dimension member information to obtain the first data screening condition further includes:

[0130] For the dimension members under the same first filtering dimension, deduplication and merging are performed; if the filtering dimension includes a time dimension, the dimension members of the time dimension that constitute a continuous time period are merged into a time range.

[0131] This involves deduplicating and merging dimension members within the same dimension. For example, under the dimension "Country," the members "China" and "United States" are merged to form a single dimension member combination under the same "Country" dimension. Optionally, for the same dimension under the same initial data analysis indicator, its dimension member list is checked, and completely duplicate members are removed. For instance, if an imprecise question results in two instances of "January 2024" in the time dimension member, they are merged into one.

[0132] Considering the unique nature of the time dimension, the merging process can also include merging consecutive time periods within the time dimension. Specifically, this can include: arranging all members under the time dimension in chronological order; sequentially determining whether adjacent time members constitute consecutive time periods. The determination rule depends on the time granularity. For example, for a "month" granularity, "January 2024" and "February 2024" are consecutive; for a "quarter" granularity, "Q1 2023" and "Q2 2023" are consecutive. If consecutive time periods are detected, multiple consecutive members are merged into a single time range expression. For example, ["January 2024", "February 2024", "March 2024", "April 2024"] are merged into "January 2024 - April 2024". This range expression will serve as the merged time dimension member. After the above merging process, the initially potentially loose and redundant data is integrated into a clearly structured and more efficient first data filtering condition. For example, the processed conditions might be formatted as: { Metric: "Full Metrics", Organization: ["X Technology"], Time: ["January 2024 - April 2024"], Country: ["China", "United States"]}. Combining a series of consecutive time points into a single time range for display to the user (e.g., displaying "January 2024 - April 2024" instead of four separate months) aligns better with user perception, avoids information redundancy on the optimized interface, and makes key information immediately apparent.

[0133] This invention discloses that by performing operations such as "duplicate merging" and "time range merging", redundant information that may exist in the original parsing results is eliminated, making the generated first data filtering conditions more concise and standardized. While making the content displayed on the optimized interface clearer, it also optimizes the condition structure for subsequent possible direct queries, improves processing efficiency, and enhances the quality and efficiency of the initial query conditions.

[0134] The merging process ensures the consistency, accuracy, and simplicity of the dimension members under each data analysis indicator, so that all subsequent editing operations by users are based on a high-quality, unambiguous starting point, reducing the possibility of errors in subsequent operations due to chaotic initial data.

[0135] In one embodiment, after editing the first data filtering criteria according to the editing operation to obtain the second data filtering criteria, and before constructing and displaying the second natural language question, the method further includes:

[0136] In response to the user's confirmation of the edited second data filtering condition, a semantic integrity check is performed on the data query specifications of the database that constitute the second data filtering condition;

[0137] If the verification passes, proceed with the step of constructing and displaying the second natural language question;

[0138] If the verification fails, the optimization interface will display the missing element information corresponding to the second natural language question based on the semantic integrity verification result.

[0139] To ensure the validity and completeness of the generated query conditions, in response to the user's confirmation of the edited second data filtering conditions, a semantic integrity check is performed on the data query specifications of the database that constitute the second data filtering conditions. The confirmation operation refers to the instruction triggered when the user intends to submit the currently edited query conditions after completing the editing of the optimized interface. This operation can be initiated by the user clicking the "Confirm Question," "Generate Question," or similar buttons on the interface.

[0140] In response to this confirmation operation, a natural language question is not immediately generated. Instead, the structured second data filtering conditions are first validated for validity. This validation is based on the database's data query specifications and is used to determine whether the current combination of conditions constitutes a semantically complete and valid query that can be successfully executed by the database. Validation may include: determining whether certain key indicators must be associated with specific dimensions to produce a meaningful query. For example, for indicators like "composition percentage," one or more "grouping dimensions" (such as "by country" or "by product") must be specified; otherwise, the query results are meaningless. If the second data filtering conditions include the "composition percentage" indicator but no dimension is configured for grouping statistics, the validation fails. Dimension member validity checks are used to determine whether the dimension member values ​​specified in the conditions exist in the corresponding dimension tables in the database, preventing query failures due to incorrect member coding or non-existence. Condition conflict checks are used to determine whether there are logically contradictory conditions, such as setting the time range to future dates but querying historical data indicators.

[0141] If the verification passes, the step of constructing and displaying the second natural language question is executed. When the second data filtering condition is determined to meet all preset semantic integrity rules, the verification passes, and the second natural language question is constructed and displayed based on the valid second data filtering condition, awaiting the user's final submission. If the verification fails, the missing element information corresponding to the second natural language question is displayed in the optimized interface based on the semantic integrity verification result.

[0142] If any of the above-mentioned completeness issues are found in the second data filtering condition, the verification fails. The process is then interrupted, and clear feedback is provided to the user in the optimization interface. This feedback can take the form of indicating the missing element information based on the semantic completeness verification result. For example, if the "Composition Percentage" indicator is found to lack a grouping dimension, the prompt might be "Please select at least one analysis dimension (such as country or product) for the 'Composition Percentage' indicator"; if an invalid time member is detected, the prompt might be "The selected time 'December 2025' does not exist, please modify it." The prompt will pinpoint the specific indicator and the type of missing element, guiding the user to make targeted additions and corrections.

[0143] This embodiment improves interaction efficiency by introducing a pre-emptive semantic integrity verification step to intercept errors. When verification fails, instead of simply displaying an error message, it clearly informs the user of the missing information. This guided error message allows users to clearly understand the problem and quickly correct it, greatly reducing user confusion and operational difficulty. Through mandatory verification, it ensures that the second data filtering conditions used to generate the final query statement are semantically sound, thereby minimizing the failure rate of subsequent database queries and improving the robustness and reliability of the entire question-and-answer processing flow.

[0144] In one exemplary embodiment, such as Figure 3 The question-and-answer process can include:

[0145] Users initiate interaction on the pre-defined interface of the question-and-answer system. The question-and-answer processing model within the system analyzes the first natural language question, extracting key analytical elements including core analytical indicators and their grouping relationships, relevant dimensions and dimension members, statistical dimensions, analytical methods, visualization display types, and data constraints. This clarifies the user's question intent and outputs the corresponding query results to the user. When a user initiates a re-questioning request (i.e., an optimization request) based on these query results, a pre-defined re-questioning page (i.e., the optimization interface) is displayed based on the context information of the query results (such as prior query conditions and returned results), the query indicators and query dimension information on which the query results are based (i.e., the first data filtering conditions). Users select the indicators and dimension information to be edited and configured on this interface, thereby obtaining more precise information query data reflecting the user's query intent (i.e., the second data filtering conditions). This precise information query data is then used to query the database, and the data query results are returned.

[0146] Specifically, the flowchart for question-and-answer processing can be found in [reference]. Figure 4 ,like Figure 4 As shown, when a user initiates a question-and-answer interaction, such as sending a first natural language question to the question-and-answer processing system, the system's large language processing model analyzes the question, extracting key analytical elements including core analytical indicators and their grouping relationships, relevant dimensions and dimension members, statistical dimensions, analytical methods, visualization display types, and data constraints. The extracted indicator information and analytical methods are then structured and stored to establish a traceable data source. Simultaneously, query efficiency is optimized by intelligently merging dimension members with the same indicator and dimension, and simplifying duplicate indicators. Intelligent mapping and merging of dimensions during the query process is also supported, thus constructing a complete closed loop of analytical element extraction, storage, and optimization, significantly improving the accuracy and execution efficiency of subsequent queries. The persistent data source refers to storing indicator dimension data and key analytical element data based on the information extracted from the large model.

[0147] The following example illustrates the parsing process of the natural language question "What is the composition percentage of X Technology's total indicators in China and the United States from January to April 2024?" Intelligent indicator merging involves retrieving stored indicator dimension information when a user initiates a new query (i.e., optimization). Dimension members with the same dimension are merged. For example, "Query the composition percentage of X Technology's total indicators in each country in April 2024" will be merged into data like "Total Indicators": {Organization: ["X Technology"], Period: ["April 2024"], Country: ["China", "United States", "Japan"]}. After merging the dimension members, the period dimension is sorted and its values ​​are checked for continuity; continuous periods are merged. For example, periods April 2024, March 2024, February 2024, and January 2024 are merged into January 2024 - April 2024. The merged result shows that the "Period" and "Country" dimensions are combined into the value of a single array object.

[0148] After the above steps, we obtained information on metrics, dimensions, dimension members, and key analytical elements. In this section, the user initiates a new query, first retrieving the corresponding metric / dimensional information and key analytical elements based on the previous clarification results. For example... Figure 5 As shown, the clarification results are displayed on the optimization interface. The n indicators correspond to the n selection forms, mapping the controls from the backend analysis period to the frontend selection period.

[0149] Users can Figure 5 A re-questioning request is triggered in the preset space, such as by clicking. Figure 5 The "pencil" button in the lower right corner allows editing of data filtering criteria. In response to this re-question request, it retrieves the previous clarification results and the dimension members of the indicator configuration dimensions. Based on the retrieved data, such as... Figure 6 The optimized interface displays metrics, dimension member information, and generates questions based on metric dimensions and key analysis elements. Figure 5 It performs historical data retrieval, intelligently retrieves the complete clarification results of the last interaction (indicator configuration and dimension members); dynamically renders the interface to adaptively display the indicator tree and dimension member matrix; and automatically constructs optimized query questions based on indicator association rules and key analysis elements.

[0150] In summary, after a user initiates a question and outputs a result, the clarification result is fine-tuned by clicking [the relevant button]. Figure 5 The preset controls in the middle initiate an optimization request and invoke, such as Figure 6 The results shown are from the fine-tuning operation panel (i.e., the optimization interface).

[0151] like Figure 7As shown, in the results fine-tuning panel, the parameters of the previous clarification result are obtained and intelligently displayed in the panel. Multiple indicators can be dynamically added to the panel, each with different dimensions and dimension members. Multi-dimensional time period visualization configuration can be selected to improve the flexibility of interaction.

[0152] like Figure 8 As shown, the results fine-tuning panel can be configured with a multi-dimensional period selection component design component: the component adopts a dual-module linkage architecture, supports parallel configuration of multiple time periods, visualizes the relationship between time periods, has a three-level linkage selector (year → granularity → dynamic value range), real-time response to granularity switching (automatic matching of value range for month / quarter / half-year / year), real-time synchronization between the controller and the period, and forced verification of time logic (start ≤ end).

[0153] like Figure 9 As shown, the processing of time dimension members configured by users based on multi-dimensional period selection components can include: mapping backend analysis period: according to the definition of "period", the period corresponding to each indicator in the clarification results is obtained and converted into preset formats such as [[{ id: '202510000', name: 'First half of 2025'},{ id: '202620000', name: 'Second half of 2026'}]], and matched to the multi-dimensional period selection component.

[0154] In summary, the processing flowchart for the re-questioning front-end components can be as follows: Figure 10 As shown, the corresponding timing diagram for re-question processing can be as follows: Figure 11 As shown.

[0155] The final user-edited second data filtering criteria can be obtained through, for example... Figure 12 The results are then displayed on the fine-tuned interface.

[0156] Based on users Figure 12 The confirmation in the middle can generate such as Figure 13 The second natural language question shown is a preview of the question before the user asks it again.

[0157] The differences and advantages of the question-and-answer processing flow of this invention compared to the traditional method are as follows: Figure 14 As shown, unlike systems that require precise configuration of metrics and parameters, this system automatically generates optimized questions that users can directly submit. The backend receives a request containing clearly defined query elements (metrics, parameters, dimensions, etc.), allowing for direct data querying and result calculation, eliminating intermediate steps such as model parsing, feature extraction, and vector retrieval. This approach not only improves query hit rate but also reduces response latency, significantly enhancing overall query efficiency and providing users with a smoother analytical experience.

[0158] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0159] Based on the same inventive concept, this application also provides a question-and-answer processing device for data charts to implement the question-and-answer processing method for data charts described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more question-and-answer processing device embodiments provided below can be found in the limitations of the question-and-answer processing method for data charts above, and will not be repeated here.

[0160] In one exemplary embodiment, such as Figure 15 As shown, a question-and-answer processing device for data charts is provided, comprising:

[0161] The display module 302 is used to display an optimization interface in response to an optimization request for the first answer result; wherein the first answer result is a data chart generated based on a first natural language question; the optimization interface includes a first data filtering condition for the data chart obtained by analyzing the first natural language question;

[0162] The response module 304 is used to respond to the editing operation of the first data filtering condition in the optimization interface;

[0163] Editing module 306 is used to edit the first data filtering condition according to the editing operation to obtain the second data filtering condition;

[0164] Module 308 is used to construct and display a second natural language question based on the second data filtering conditions;

[0165] The query module 310 is used to respond to the confirmation operation for the second natural language question and display the second answer result corresponding to the second natural language question; the second answer result includes the target data chart obtained by querying according to the second data filtering conditions.

[0166] The modules in the question-and-answer processing described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0167] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 16 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a question-and-answer processing method for data charts. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0168] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0169] In one exemplary embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of any of the embodiments included in the aforementioned question-and-answer processing method for data graphs.

[0170] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the embodiments included in the aforementioned question-and-answer processing method for data graphs.

[0171] In one embodiment, a computer program product is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the embodiments included in the aforementioned question-and-answer processing method for data graphs.

[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0173] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0174] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0175] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data chart question-and-answer processing method of a data chart, characterized by, The method comprises: in response to an optimization request for a first answer result, displaying an optimization interface; wherein the first answer result is a data chart generated based on a first natural language question; the optimization interface includes a first data filtering condition of the data chart analyzed according to the first natural language question; in response to an editing operation in the optimization interface for the first data filtering condition; editing the first data filtering condition according to the editing operation to obtain a second data filtering condition; constructing and displaying a second natural language question according to the second data filtering condition; in response to a confirmation operation for the second natural language question, displaying a second answer result corresponding to the second natural language question; the second answer result includes a target data chart queried according to the second data filtering condition.

2. The method of claim 1, wherein, The editing operation includes an index adding operation, an index selection operation, and a dimension member selection operation for the data chart; and the editing of the first data filtering condition according to the editing operation to obtain a second data filtering condition comprises: in response to the index adding operation in the optimization interface, displaying selectable data analysis indexes obtained based on database analysis; in response to the index selection operation for the list of selectable data indexes, displaying configurable dimensions and dimension member options corresponding to the newly added data analysis index specified by the index selection operation in the optimization interface; the configurable dimensions and dimension member options are obtained by analyzing the database; in response to the dimension member selection operation for the configurable dimensions and dimension member options corresponding to the newly added data analysis index, obtaining new dimension member information corresponding to the newly added data analysis index; data fusion of the newly added data analysis index, new dimension member information, and the first data filtering condition to obtain the second data filtering condition, and display of the second data filtering condition through the optimization interface.

3. The method of claim 1, wherein, The response to the optimization request for the first answer result comprises: in response to the optimization request, obtaining the first data filtering condition used when generating the first answer result; the first data filtering condition includes at least one first data analysis index and at least one first dimension member corresponding to the first data analysis index; in the optimization interface, display the index configuration unit corresponding to each first data analysis index; the index configuration unit displays the first dimension member corresponding to the current first data analysis index.

4. The method of claim 3, wherein, The editing operation includes a modification operation on the first data analysis index or the first dimension member; and the editing of the first data filtering condition according to the editing operation to obtain a second data filtering condition comprises: in response to the selection operation of the target dimension in the configuration unit, displaying a selector component corresponding to the target dimension; through the selector component, in response to the modification operation of the dimension member under the target dimension, obtaining updated dimension member information; According to the updated dimension member information, the first data filtering condition and the configuration unit in which the target dimension corresponds to the first data analysis indicator in the optimization interface are updated.

5. The method of claim 3, wherein, The first dimension member includes a time dimension member; the optimization interface displays a time dimension configuration component; the time dimension configuration component provides multiple time granularity options and time interval selection controls under each time granularity; and the editing operation includes an adjustment operation on the time dimension member. According to the editing operation, the first data filtering condition is edited to obtain a second data filtering condition, including: In response to a selection operation of a target time granularity in the time dimension configuration component, the time interval selection control corresponding to the target time granularity and a selectable time value are displayed; Through the time interval selection control corresponding to the target time granularity, a target time range is received based on the selectable time value; The target time range is mapped to a time dimension member value that meets the data query requirements of the database, and the time dimension member in the first data filtering condition is updated according to the target time range.

6. The method of claim 1, wherein, The first data filtering condition includes at least one first data analysis indicator and first filtering dimension member information corresponding to the first data analysis indicator; before the optimization interface is displayed in response to the optimization request for the first answer result, the method includes: Performing semantic recognition on the first natural language question to obtain an initial data analysis indicator and initial filtering dimension member information corresponding to the initial data analysis indicator; Performing merging processing on the initial data analysis indicator and the initial filtering dimension member information to obtain the first data filtering condition.

7. The method of claim 6, wherein, The merging processing on the initial data analysis indicator and the initial filtering dimension member information to obtain the first data filtering condition includes: For the same dimension member under the first filtering dimension, de-duplication is performed; wherein, if the filtering dimension includes a time dimension, the dimension members of the time dimension that constitute a continuous time period are merged into a time range.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 7.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 7.

Citation Information

Cited By

  • Content processing method and device, equipment, storage medium and program product

    CN122131950A