Search

CN-121979975-A - Modularized intelligent question number method, system and computer readable storage medium

CN121979975ACN 121979975 ACN121979975 ACN 121979975ACN-121979975-A

Abstract

The application provides a modularized intelligent question number method, a modularized intelligent question number system and a computer readable storage medium, and belongs to the technical field of computer data processing. The method comprises the steps of decomposing a natural language problem into a plurality of configurable task nodes based on a modularized task arrangement framework and cooperatively executing the task nodes, dynamically determining data entities required by query based on a problem and a domain knowledge base in the executing process, retrieving context information from the domain knowledge base and injecting the context information into a code generation model to generate codes, executing the codes, and operating a closed loop correction mechanism to correct the code generation process based on an executing result. The application improves the flexibility of the system through the modularized design, improves the query accuracy and robustness through dynamic context injection and closed loop correction, forms the end-to-end intelligent data service, effectively reduces the application threshold and maximizes the data value.

Inventors

  • RUI YE
  • WANG ZHIYONG
  • TIAN RUNZE
  • YANG MO

Assignees

  • 上海宝信软件股份有限公司

Dates

Publication Date
20260505
Application Date
20251223

Claims (10)

  1. 1. A modular intelligent question counting method, comprising: Based on a modularized task arrangement frame, decomposing a processing task corresponding to a received natural language problem into a plurality of configurable task nodes, and cooperatively executing the task nodes according to a preset task flow definition; In the process of executing the task flow, a mechanism for dynamically determining the range of the data entities is operated, and the mechanism determines one or more target data entities required by the query based on the natural language questions and knowledge retrieved from a domain knowledge base; Running a dynamic context injection mechanism, retrieving context information related to a current task from the domain knowledge base, and providing the context information to a code generation model to generate code; Executing the SQL codes, running a closed-loop correction mechanism based on the execution result of the SQL codes, and correcting the SQL codes when the preset correction conditions are met.
  2. 2. The modular intelligence query method of claim 1, wherein the modular task orchestration framework orchestrates the task nodes based on directed acyclic graphs, the task nodes being a plurality of full-time artificial intelligence agents.
  3. 3. The modular intelligent question method of claim 1, wherein the domain knowledge base comprises a table name knowledge base for storing table names and descriptions, a table field knowledge base for storing field information, a business knowledge base for storing industry terms, and an assessment knowledge base for storing user feedback.
  4. 4. The modular intelligent question-counting method according to claim 1, wherein the dynamic context injection mechanism is implemented based on a search enhancement generation technique for retrieving the context information from the domain knowledge base.
  5. 5. The method of claim 1, wherein the closed-loop correction mechanism comprises merging the original question and the failure information into a prompt word when the SQL execution failure is detected, and calling a correction module to generate a correct SQL.
  6. 6. The modular intelligence query method of claim 1, further comprising: and after the code is successfully executed and the query result is obtained, calling a large language model to analyze the query result, and automatically generating a structured data analysis report.
  7. 7. The modular intelligence query method of claim 2, wherein the artificial intelligence agent comprises a problem completion agent for optimizing the natural language problem, a tab agent for executing the dynamically determined data entity scope mechanism, an SQL generate agent for invoking the code generation model to generate code, and an SQL execute agent for executing the code.
  8. 8. The modular intelligent question method of claim 1, wherein the preset modification condition comprises receiving a user negative feedback for the query result; And the closed loop correction mechanism comprises the steps of merging new prompt words according to the original problems and negative feedback of the user when the negative feedback of the user is received, and calling a correction agent to execute a correction task flow.
  9. 9. A modular intelligent question-count system, comprising: The task scheduling module is used for decomposing a processing task corresponding to the received natural language problem into a plurality of configurable task nodes and cooperatively executing the task nodes according to a preset task flow definition; the data entity determining module is used for determining one or more target data entities required by the query based on the natural language questions and the knowledge retrieved from the domain knowledge base in the process of executing the task flow; the context generation and injection module is used for retrieving context information related to the current task from the domain knowledge base and providing the context information to the SQL generation model to generate SQL codes; and the closed loop correction module is used for executing the SQL codes and correcting the SQL codes when the preset correction conditions are met based on the execution results of the SQL codes.
  10. 10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the modular smart question method of any of claims 1 to 8.

Description

Modularized intelligent question number method, system and computer readable storage medium Technical Field The invention relates to the technical field of computer data processing, in particular to a modularized intelligent question number method, a modularized intelligent question number system and a computer readable storage medium. Background Currently, intelligent data analysis technology based on a large language model, particularly technology for converting natural language into structured query language, has become an important means for enterprise enabling business personnel to directly acquire insight from data. In order to improve the accuracy of the query, some schemes have been proposed in the prior art, for example, by constructing a database knowledge base and searching when a user problem is received to assist in determining a database table required for the query, or correcting and regenerating according to error information after the execution of the generated structured query language fails. However, several drawbacks remain common to the prior art solutions. First, many systems' core workflows are solid-write dead, exhibiting a "black box" mode, resulting in poor system flexibility. When the service requirement is changed or needs to be migrated to a new service scene, a large amount of development resources are often required to be input for modification and adaptation, the migration cost is high, and service experts without technical background cannot participate in the customization and optimization of the data analysis flow. In an enterprise-level big data environment, the number of data tables is huge and the relationship is complex, and in the prior art, when a user natural language query is processed, it is still difficult to accurately and dynamically screen a target table most relevant to the user intention from a plurality of data tables, so that a table association error or a table with an error is frequently found in a subsequently generated query statement, and the accuracy of an analysis result is seriously affected. In addition, when general large language models process professional terms or complex data indexes of specific industries, semantic understanding capability and query statement generation quality of the general large language models are remarkably reduced due to lack of domain knowledge. Finally, the final output of most data analysis tools is limited to data tables or visual charts, failing to form a complete, automated data service closed loop from problem identification, data query to insight output, the data value failing to be fully mined. In the chinese patent document with publication number CN120540747a, an intelligent data analysis workflow system and method based on ChatBI is disclosed, in which the workflow stage is divided, standardized prompt words are preset for each stage, and feedback adjustment of the user generates a final analysis report. The target table cannot be dynamically screened, so that the table association error rate is high when SQL is generated, in addition, the workflow is in a black box mode, the workflow is realized through codes, a new service scene needs to be migrated at a high cost, a non-developer cannot intervene, and an application party needs to configure maintenance personnel of the product for a long time in order to cope with the data growth characteristic in a big data scene. In the Chinese patent document with publication number of CN120012760A, a question-answering method and ChatBI system based on a thinking chain and an agent are disclosed, the document proposes a ChatBI question-answering method based on the thinking chain, and the accuracy and efficiency of data analysis are improved through task decomposition, dynamic adjustment and agent cooperation, but the problem of dynamic screening of a table range is not solved, the accuracy of complex query is affected, the thinking chain is realized based on codes, and the system cannot be flexibly configured through modularized operation. Disclosure of Invention In view of the drawbacks of the prior art, an object of the present invention is to provide a modular intelligent question counting method, system and computer readable storage medium. The invention provides a modularized intelligent question number method, which comprises the following steps: Based on a modularized task arrangement frame, decomposing a processing task corresponding to a received natural language problem into a plurality of configurable task nodes, and cooperatively executing the task nodes according to a preset task flow definition; In the process of executing the task flow, a mechanism for dynamically determining the range of the data entities is operated, and the mechanism determines one or more target data entities required by the query based on the natural language questions and knowledge retrieved from a domain knowledge base; Running a dynamic context injection mechanism, retrieving c