Interface adaptive accurate analysis AI intelligent number asking system and method

The AI-powered intelligent data query system, which uses an interface-adaptive and precise analysis method, solves the challenges of data access control, dynamic data adaptability, and API change maintenance in enterprise-level information systems. It enables efficient and accurate data query and analysis and is applicable to fields such as finance, retail, telecommunications, government affairs, and enterprise ERP.

CN121901377APending Publication Date: 2026-04-21山东三未信安信息科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610092926.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing intelligent data query systems face challenges in enterprise-level information systems, including data access control difficulties, insufficient adaptability to dynamic data, bottlenecks in processing massive amounts of data, and challenges in API change and maintenance, leading to data leakage risks, inaccurate analysis results, and complex system maintenance.

Method used

The AI-powered intelligent data query system employs interface adaptive precision analysis. It monitors API changes in real time through an interface awareness module, converts interface metadata into vector data using large models and text embedding models, and combines vector databases and HTTP tools for dynamic data querying and analysis. This enables automatic API change awareness, data access control, and massive data processing.

Benefits of technology

It achieves automated API change detection, precise data access control, and dynamic data adaptive coverage, ensuring the accuracy of massive data processing and efficient system maintenance. It is suitable for high-security, high-precision data query scenarios such as finance, retail, telecommunications, government affairs, and enterprise ERP.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901377A_ABST
    Figure CN121901377A_ABST
Patent Text Reader

Abstract

The invention discloses an interface adaptive accurate analysis AI intelligent question system and method, and belongs to the technical field of artificial intelligence. The method is a comprehensive solution based on user Token dynamic authentication, a Webhook-driven API metadata adaptive mechanism, a large language model and execution environment cooperative computing. The system automatically synchronizes and semantically enhances interface description by monitoring a change event of the API management platform, and stores the interface description into a vector database; when the user asks questions, semantic retrieval and API selection are carried out in combination with the identity Token of the user, and permission verification is carried out based on the Token; and when the returned data volume is relatively large, the Python sandbox is automatically triggered to execute the statistical code generated by the LLM, so that the accuracy of numerical calculation is ensured. According to the invention, the integrated intelligent number asking capability with controllable authority, accurate result and self-adaptive interface is realized, and the safety, reliability, maintainability and the like of an enterprise-level information system can be remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically to an interface-adaptive, precise analysis AI intelligent question-and-answer system and method. Background Technology

[0002] Currently, large-scale artificial intelligence (AI) modeling technology is developing rapidly, and many enterprises are integrating AI capabilities into their information systems to achieve intelligent data analysis based on natural language interaction. This means users can conveniently query and analyze data of interest by conversing with AI. However, in practical applications, existing solutions still face the following key technical challenges: Data access control challenges: In existing intelligent data retrieval systems, data is typically obtained by generating SQL statements from large models and executing them directly in the database. This approach faces serious data access permission issues in enterprise-level information systems, meaning that ordinary users may obtain data they are not authorized to access through AI interaction, leading to the risk of data leakage.

[0003] Insufficient adaptability to dynamic data: Some intelligent query systems can only analyze based on existing query results, lacking the ability to proactively obtain information from the original data source. While this approach avoids data access issues, it leads to incomplete analysis results, failing to cope with dynamic changes in business scenarios and limiting the effectiveness of AI in complex tasks.

[0004] Bottlenecks in massive data processing: Considering the limitations of computing resources, enterprises need to balance factors such as computing costs, response time, and memory usage when deploying large models, and set a reasonable model context length. However, faced with the massive amount of data in enterprise information systems, a single analysis task can involve tens of thousands to millions of data records. Directly inputting this data into the model can easily cause context overflow, affecting the success rate and accuracy of the analysis task.

[0005] Data analysis accuracy deficiency: Large models, as language models, do not have precise numerical calculation capabilities. Although they can simulate the calculation process (such as formulas or steps), they are prone to errors in complex numerical calculations, which may lead to seemingly reasonable but actually wrong analytical conclusions.

[0006] Maintenance challenges arising from API changes: When an enterprise information system's API is updated, the intelligent query system needs to be adjusted accordingly to ensure compatibility with the new API. This process increases the system's maintenance workload and reduces overall operational efficiency.

[0007] Therefore, there is an urgent need for a new intelligent data architecture to solve problems such as data security, analysis accuracy and system maintainability, so as to support enterprise-level large-scale applications. Summary of the Invention

[0008] In view of this, in order to address or at least partially address the shortcomings of the prior art, the present invention provides an AI intelligent question-and-answer system and method with adaptive and precise analysis interface, aiming to achieve the following objectives: Automated API change detection; Precise control over data access permissions; Comprehensive coverage of dynamic data adaptability; Ensuring accuracy in massive data processing.

[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides an interface-adaptive, precise analysis AI intelligent questioning system, which is integrated with an information system. The intelligent questioning system includes: a program application layer, a model layer, and an external tool layer, wherein: The application layer includes an interface awareness module, an intelligent query module, and a data analysis module; the model layer includes a large model and a text embedding model; the external tool layer includes a vector database, an HTTP tool, and a Python execution tool. When this intelligent question-and-answer system interacts with the information system, it executes an API intelligent sensing process and a user question-and-answer process; among which: In the API intelligent perception process, the interface perception module monitors interface change events in the API management tool of the information system in real time, obtains the latest API interface metadata, converts the interface metadata into vector data through large model and text embedding model, and stores it in the vector database. In the user question-and-answer process, the intelligent query module receives user questions and user tokens for authentication from the AI ​​dialogue entry point on the information system side. The big model performs intent recognition on the user questions. If it is recognized as a non-business dialogue, the big model directly generates a natural language response. If it is recognized as a business dialogue, it enters the intelligent query process and intelligent analysis process. Through the collaborative processing of the intelligent query module, text embedding model, vector database, big model, HTTP tool, data analysis module and Python execution tool, the processing results are finally fed back to the user in the form of structured natural language.

[0010] In one specific implementation, the API intelligent perception process when the intelligent query system interacts with the information system adopts a Webhook → Interface Awareness Program → Large Model Semantic Enhancement → Text Embedding → Vector Database API Change Automatic Perception Mechanism. The specific process includes: By listening for interface change events in the API management tool through Webhook, the API awareness module is notified of the behavior of changes in interface metadata. The interface awareness module initiates a query request for the latest interface metadata to the API management tool based on the interface ID, obtains the interface metadata, and parses it. The large model performs semantic enhancement on the original interface description in the interface metadata based on a pre-set prompt word template. The text embedding model is used to convert the semantically enhanced interface description into a semantic vector; The semantic vectors and interface metadata are assembled into a vector data object and stored or updated in the vector database.

[0011] In one specific implementation, the vector data object adopts a bimodal structure design, comprising: The text section includes the interface URL, input parameters and descriptions, output parameters and descriptions, and the enhanced interface description; The vector part refers to the semantic vector generated by the text embedding model.

[0012] In one specific implementation, the intelligent data query system uses the user token to dynamically verify data access permissions. The user token embeds user identity information, including role ID and department code.

[0013] In one specific implementation, the user question-and-answer process during the interaction between the intelligent query system and the information system adopts an intelligent query execution architecture of text embedding model → vector database → large model → HTTP tool. The specific process includes: User queries are converted into vectors using a text embedding model, and the Top K candidate interfaces are retrieved based on semantic similarity in a vector database that stores interface metadata. The large model determines the specific business interface and parameters to be called based on prompt words, Top K candidate interfaces, user questions, and user tokens, and generates a calling instruction to instruct the HTTP tool to perform business data query operations. The instruction includes the interface URL, interface parameters, interface request method, and user token. The HTTP tool initiates a request to the information system according to the instructions, and carries the user token for authentication; when the amount of data returned by the information system is less than a preset threshold, the large model directly generates a natural language response; when it is greater than the preset threshold, the intelligent analysis process is triggered.

[0014] In one specific implementation, the intelligent analysis process in the user question-and-answer process when the intelligent question-and-answer system interacts with the information system specifically includes: The data analysis module receives raw data and user questions, performs structural parsing on the raw data and truncates the data, and then sends the data structure information, data examples, user questions and preset prompt word templates to the large model. The large model generates Python statistical code that meets business requirements based on the input content, and sends it to the Python execution tool to instruct it to perform statistical analysis tasks; Python execution tools execute statistical code, perform structured statistical calculations on the raw data, and return the statistical results to the large model; The large model generates business responses in natural language based on statistical results and returns them to the user.

[0015] In one specific implementation, in this intelligent data analysis system, the data analysis module performs structural parsing on the raw data, including extracting field names and data types.

[0016] In one specific implementation, in this intelligent data collection system, the Python execution tool executes statistical code in a secure sandbox environment.

[0017] Secondly, the present invention also provides an interface-adaptive and precise analysis AI intelligent query method, which uses the aforementioned intelligent query system to perform data query.

[0018] Compared with the prior art, the present invention has at least the following beneficial technical effects: This invention provides an AI-powered intelligent data query system and method with an adaptive and precise interface analysis, which can effectively solve the problems of complex API maintenance, large workload, data access violation risks, and inaccurate data analysis results in existing technologies. It is applicable to high-security and high-precision data query scenarios such as finance, retail, telecommunications, government affairs, and enterprise ERP, and facilitates intelligent, continuous, and dynamic decision support for complex business scenarios.

[0019] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

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

[0022] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0023] Figure 1 This is a schematic diagram of the module architecture of an interface-adaptive precision analysis AI intelligent question-answering system provided in an embodiment of the present invention.

[0024] Figure 2 This is a simplified schematic diagram of the API intelligent sensing process provided in an embodiment of the present invention.

[0025] Figure 3 This is a simplified schematic diagram of the user question-and-answer process provided in an embodiment of the present invention.

[0026] Figure 4 This is a schematic diagram of the API intelligent sensing workflow provided in an embodiment of the present invention.

[0027] Figure 5 This is a schematic diagram of the intelligent query workflow provided in an embodiment of the present invention.

[0028] Figure 6 This is a schematic diagram of the intelligent analysis workflow provided in an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0030] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0031] First, the technical abbreviations and key terms involved in this invention will be defined as follows: Enterprise Information System (Information System): Information systems are functional systems that provide information management services to enterprises, aiming to support their daily operations and management. Core types include CRM (Customer Relationship Management) systems and project management systems (PM), which are key supports for modern enterprises to achieve refined operations. Hereinafter referred to as information systems.

[0032] Large Language Model (LLM): LLM (Large-Scale Learning Model) is a natural language processing model based on a deep learning architecture. It boasts a massive number of parameters and can perform multimodal understanding, complex reasoning, and content generation tasks. Current mainstream models include OpenAI (GPT series), Anthropic (Claude series), Google (Gemini series), and Alibaba Qwen series. These are referred to below as large-scale models.

[0033] Text Embedding Model (Embedding Model): Text embedding models are machine learning models that convert natural language text (such as words, sentences, or paragraphs) into fixed-dimensional numerical vectors (i.e., "embedding"). These vectors capture the semantic information of the text, so that semantically similar texts are placed closer together in the vector space, while texts with significant semantic differences are placed further apart.

[0034] Intelligent data analysis (intelligent data analysis agent, intelligent data analysis system): This is an AI agent that utilizes an innovative data query method based on Natural Language Processing (NLP) and Large Language Modeling (LLM) technologies. It allows users to directly obtain structured data query results by asking questions in natural language. The intelligent data query agent represents a revolution in data querying, transforming data acquisition from "requiring professional knowledge" to "as natural as conversing with a person," and is an important application of artificial intelligence technology in the field of data processing.

[0035] The fields in which this invention can be applied include: 1. Enterprise Business Intelligence (BI) System: In business intelligence platforms across industries such as finance, retail, and telecommunications, this invention allows business personnel to directly query key business metrics such as sales data, customer behavior characteristics, and market trends using natural language, without relying on professional data analysts, significantly improving decision-making efficiency. The system incorporates a fine-grained access control mechanism, ensuring that users can only access data within their authorized scope, effectively mitigating the risk of unauthorized access and safeguarding enterprise data security.

[0036] 2. Enterprise Information System Integration Platform: In the integration process of enterprise-level information systems (such as CRM, ERP, project management systems, etc.), this invention provides an adaptive interface adaptation mechanism that can automatically detect and be compatible with version changes or structural evolution of backend APIs. It can maintain interface consistency with various business systems without manual intervention, significantly reducing system maintenance costs and improving integration flexibility and stability.

[0037] 3. A unified intelligent data portal that integrates across systems: Addressing the issue of enterprise data being scattered across multiple heterogeneous subsystems such as CRM, project management, and financial systems, this invention constructs a unified intelligent data access portal. This portal enables cross-system data query and analysis capabilities with a "one-time query, full-domain response" approach, without migrating or copying original data. Access control policies are applied separately for each data source system to ensure compliance. Simultaneously, a precise statistical calculation mechanism guarantees the accuracy and reliability of cross-system aggregated analysis results (e.g., "a customer's total cumulative expenditure across all systems").

[0038] 4. Intelligent data analysis services: For SaaS vendors providing intelligent data analytics services, this invention can be embedded as a core functional module into their product systems, providing customers in various industries with secure, reliable, and high-precision natural language data query and analysis capabilities. This solution supports flexible customization, helping customers achieve data-driven, refined operations and intelligent decision-making.

[0039] The technical architecture and working principle of the present invention will be described in detail below with reference to the accompanying drawings: I. System Overall Architecture: See Figure 1 As shown, this embodiment of the invention provides an interface-adaptive, precise analysis AI intelligent query system, which includes several key components and modules. Specifically, the intelligent query system comprises a program application layer, a model layer, and an external tool layer. The program application layer includes an interface awareness module, an intelligent query module, and a data analysis module; the model layer includes a large model (large language model) and a text embedding model; and the external tool layer includes a vector database, an HTTP tool, and a Python execution tool. Figure 1 The term "information system side" as used in this diagram broadly refers to the business systems integrated with the intelligent question-and-answer system of this invention. The integration interface includes API management tools and AI dialogue entry points. When the intelligent question-and-answer system interacts with the information system, its main process can be divided into two processes: API intelligent perception and user question-and-answer.

[0040] In the API intelligent sensing process, the vector database stores API metadata for the information system, including structured information such as interface addresses, function descriptions, and parameter specifications. The interface sensing module monitors interface change events in API management tools, including but not limited to platforms like YAPI and APIFOX. Real-time notifications of interface changes are achieved through a configured webhook mechanism. Upon receiving a change notification, the interface sensing module retrieves the latest API metadata and executes a preset processing flow, ultimately completing the synchronous update of the vector database. For a simplified overview of the API intelligent sensing process, please refer to [link to API intelligent sensing process documentation]. Figure 2 As shown.

[0041] In the user Q&A process, users can initiate questions through the AI ​​dialogue entry point on the information system side. The system first uses a large model to identify the user's intent in the question. If the intent is identified as non-business-related, the model directly generates a natural language response. If the intent is identified as a query request involving information system data analysis (such as a business query like "What is the status of signed contracts in the past week?"), the question will undergo two main steps: intelligent query and intelligent analysis. Finally, the analysis results will be fed back to the user in structured natural language. For a simplified overview of the user Q&A process, please refer to [link to relevant documentation]. Figure 3 As shown.

[0042] II. System Working Principle: 2.1 Working principle of API intelligent sensing: See Figure 4 As shown, the API intelligent sensing workflow of the intelligent data query system involves the following entities: R&D and operations personnel: R&D and operations personnel on the information system side are responsible for maintaining interface metadata in the API management tool.

[0043] API management tools: Platforms that provide API design and management functions, such as YAPI and APIFOX.

[0044] Interface-aware program (interface-aware module): In this invention, it is a middleware program used to detect API changes and perform a series of data processing operations.

[0045] Large models: Large language models that perform natural language processing, such as mainstream large models like Claude and Qwen.

[0046] Text embedding model: A machine learning model that converts text into a vector representation.

[0047] Vector database: A database system that stores API metadata and its vector representation.

[0048] Combination Figure 4 As shown, in a specific embodiment of the present invention, the API intelligent awareness workflow mainly adopts a Webhook → Interface Awareness Program → Large Model Semantic Enhancement → Text Embedding → Vector Database API Change Automatic Awareness Mechanism. The specific steps are as follows: S1. When the API interface of an information system program changes, the R&D and maintenance personnel perform API addition or modification operations in the API management tool.

[0049] S2. After completing the API change, the API management tool will send a success notification to the R&D and operations personnel.

[0050] The S3 API management tool automatically triggers interface change notifications to the interface awareness program through the configured Webhook mechanism. The notification includes the interface ID that has changed.

[0051] S4. The interface-aware program initiates a query request for the latest interface metadata to the API management tool based on the interface ID.

[0052] S5. The API management tool returns complete metadata including the interface URL, input parameters and descriptions, output parameters and descriptions, and interface function descriptions.

[0053] S6. The interface-aware program parses the obtained interface metadata and extracts key information elements.

[0054] S7. The large model performs semantic enhancement processing on the original interface description based on the preset prompt word template.

[0055] S8. The large model returns the enhanced interface description to the interface-aware program.

[0056] S9. The text embedding model converts the enhanced interface description into a high-dimensional vector representation.

[0057] S10. The text embedding model returns the generated vector data to the interface-aware program.

[0058] S11. The interface-aware program assembles a vector data object, which contains two parts: (1) the text part, including the interface URL, input parameters and descriptions, output parameters and descriptions, and the enhanced interface description; and (2) the vector part, namely the vector representation generated by the text embedding model.

[0059] S12. The interface-aware program stores the assembled vector data object into the vector database or updates existing records.

[0060] S13. After the vector database performs the storage operation, it returns the operation result to the interface-aware program.

[0061] S14. The interface awareness program sends a confirmation notification to the R&D and operations personnel that the interface information has been successfully synchronized, completing the entire API intelligent awareness process.

[0062] In this embodiment, the above-mentioned processes are explained as follows: Original interface descriptions often suffer from incomplete information and insufficient semantic expression, making it difficult to meet the semantic understanding requirements of complex business scenarios. In step S7 of this invention, a pre-set prompt word template guides the large model, and based on the complete metadata of the interface (including structured information such as the interface URL, input parameters and descriptions, and output parameters and descriptions), semantic enhancement and content supplementation are performed on the original interface description to generate a detailed description that conforms to natural language expression habits, enabling the system to more accurately understand the interface function and business meaning.

[0063] In this embodiment, the vector data object in step S11 adopts a bimodal structure design. The core technical principle of this design is that: identifying information such as interface URLs belongs to non-semantic content in the semantic space. If it is included in the vector representation, it will lead to redundancy in the vector space dimension and introduce noise, interfering with the retrieval accuracy based on semantic similarity. For example, "GET / api / v1 / orders" and "GET / api / v1 / users" are similar in URL structure, but their actual business semantics are significantly different. If the URL is vectorized, it will incorrectly shorten the semantic distance between the two. Therefore, this embodiment adopts the following storage mechanism for the vector data object: The vector portion retains only the core semantic content (enhanced interface description) to ensure that the vector database can accurately match the user's business intent when performing semantic retrieval; The text section retains all metadata, providing the necessary structured information for subsequent API call assembly (such as the API URL used to construct the API request and parameter descriptions used to populate the request body).

[0064] 2.2 How User Question and Answer System Works: In a specific embodiment of the present invention, the user question-and-answer processing flow of the intelligent question-and-answer system is as follows: Figure 3 As shown, users submit natural language questions through the AI ​​dialogue portal on the information system side. The system first calls a large model to perform intent recognition on the user input based on pre-set prompt word templates. This intent recognition module divides user questions into two categories: non-business dialogues or business dialogues.

[0065] If the recognition result is a non-business dialogue (such as casual conversation, general knowledge consultation, etc.), the large model will directly generate a natural language response. This process falls under the category of regular dialogue interaction and will not be described in detail here.

[0066] If the identification result is a business dialogue (i.e., involving data query, status acquisition, or business analysis within the information system, such as "What is the status of signed contracts in the past week?"), the system enters the intelligent query and intelligent analysis processing flow. The working principle of the intelligent query and intelligent analysis flow will be explained in detail below.

[0067] 2.2.1 Working principle of intelligent query: See Figure 5 As shown, this embodiment provides specific steps of the intelligent query workflow, which involves the following entities: Intelligent Query Program (Intelligent Query Module): The core coordination module, responsible for driving the entire intelligent query process.

[0068] Text embedding model: A machine learning model that converts text into vector representations for subsequent similarity matching using vector databases.

[0069] Vector database: A database system that stores API metadata and its vector representation, supporting efficient semantic retrieval based on vector similarity.

[0070] Large Model: A large language model that performs natural language processing.

[0071] HTTP tools: Tool modules that encapsulate HTTP request functionality, used to call the actual API interfaces of information systems based on large model instructions.

[0072] Information systems: The actual business systems that operate within an enterprise, providing interfaces for real business data and responding to data query requests initiated by HTTP tools.

[0073] Combination Figure 5 As shown, in a specific embodiment of the present invention, the intelligent query workflow mainly adopts an intelligent query execution architecture of text embedding model → vector database → large model → HTTP tool, and the specific steps are as follows: S1. The intelligent query program receives the query content (business dialogue, such as "How is the order status in the past week?") and the user token (used for authentication).

[0074] S2. The intelligent query program sends the user's dialogue content to the text embedding model, requesting that it be converted into a semantic vector representation.

[0075] S3. The text embedding model completes the vectorization process and returns the corresponding vector.

[0076] S4. The intelligent query program initiates a semantic retrieval request to the vector database.

[0077] Note: The retrieval is based on the vector generated in S3.

[0078] S5. The vector database calculates based on vector similarity and returns the top K API metadata recall results with the highest scores (including interface URL, parameter description, enhanced semantic description, etc.).

[0079] S6. The intelligent query program combines the following four parts and sends them to the large model: Pre-defined prompt templates (used to guide the behavior of large models); Recall results in S5; Original user conversation content; User Token.

[0080] In this invention, what is input to the large model is actually a prompt word filled with data, for example: The preset prompt template includes placeholders for parameter 1 (recall result) and parameter 2 (original user dialogue content).

[0081] Filling in parameters 1, 2, ... creates a complete set of prompts carrying data, which will be directly input into the large model. This guides the large model's behavior and provides data that the large model might use when calling tools. The large model decides which interface to call or not call based on the "original user dialogue" and the "recall results, i.e., the interface metadata list".

[0082] As for the user token, it instructs the large model to use it as an input parameter for the HTTP tool when invoking it.

[0083] S7. The large model performs a comprehensive analysis of the above inputs to understand the user's intent and determine the specific business interfaces and parameters to be called.

[0084] S8. Generate call instructions for the large model, instructing the HTTP tool to perform business data query operations. The instructions include the interface URL, interface parameters, interface request method, and user token.

[0085] S9. The HTTP tool, according to the instructions, initiates a specific HTTP request to the information system (such as GET / api / orders?status=signed), and carries the user token for authentication.

[0086] S10. After processing the request, the information system returns the actual business data as the response result.

[0087] S11. The HTTP tool determines the amount of data received to decide on the subsequent processing path.

[0088] - If the data volume is lower than the preset threshold (e.g., number of records ≤ 100): - S12. The HTTP tool directly sends the raw business data back to the large model.

[0089] - S13. The large model performs semantic analysis on the data and generates responses in natural language.

[0090] - S14. The large model returns the final answer to the user (the user Q&A process ends).

[0091] - If the data volume exceeds the preset threshold (e.g., number of records > 100): - S15. Trigger entry into the "Intelligent Analysis Process".

[0092] In this embodiment, the above-mentioned processes are explained as follows: The recall results are based on semantic similarity calculation, accurately returning API metadata (including structured information such as interface URL and parameter description) that highly match the user's question. The big model uses this to deeply analyze the semantic intent of the user's question and, combined with the interface features in the recall results, accurately determines the target API interface and its required parameter configuration.

[0093] When HTTP tools call information system interfaces, they carry a user token. The information system rigorously verifies the token in step S9 (e.g., JWT signature verification) to ensure all API calls originate from authenticated users. Furthermore, the token embeds user identity information (such as role ID and department code), and the information system dynamically parses the user's permission scope during request processing. For example, when the user token carries the role "Sales Department - Manager," the information system's returned result (S10) only contains business data within the user's authorized scope, preventing unauthorized data leakage and meeting data compliance requirements such as GDPR.

[0094] S15. When the data volume exceeds a preset threshold, directly submitting a large amount of raw data to a large model for analysis will lead to inaccurate results. This is because large models are essentially generative models based on semantic pattern matching and do not actually perform numerical calculations, making them unable to effectively handle large-scale structured data. Therefore, the system automatically transfers the data to an intelligent analysis process for professional processing to ensure the accuracy of the analysis results.

[0095] 2.2.2 Working principle of intelligent analysis: See Figure 6 As shown, this embodiment provides specific steps of the intelligent analysis workflow, which involves the following entities: Intelligent Analysis Program (Data Analysis Module): The core coordination module, responsible for handling the analysis process of large-scale data.

[0096] Large Model: A large language model that performs natural language processing.

[0097] Python Execution Tools: A utility module that encapsulates the Python execution environment for securely executing statistical code and returning structured analysis results.

[0098] Combination Figure 6As shown in the specific embodiment of the present invention, the intelligent analysis workflow mainly adopts an intelligent analysis execution architecture of large model → Python sandbox execution tool → structured result return, and the specific steps are as follows: S1. The intelligent analysis program receives raw data and user questions.

[0099] S2. The intelligent analysis program performs structural parsing on the raw data (extracting field names, data types, etc.) and truncates the data (keeping only the first N sample data entries).

[0100] In this embodiment of the invention, the original data is obtained by calling the API of the information system. In most cases, it is a JSON string containing a List. The size (length) of this List will be very large (because it is large-scale data that will flow to the intelligent analysis process). To parse this large-scale data, it is only necessary to extract the first N data from the List. By traversing the key of a certain data, the field name structure can be obtained. The extracted first N data are the "first N sample data".

[0101] S3. The intelligent analysis program combines data structure information, data examples, original user questions, and preset prompt word templates and sends them to the large model.

[0102] S4. The large model generates Python statistical code (such as data aggregation, trend analysis, etc.) that meets business needs based on the input content, ensuring that the code is highly consistent with the user's query intent.

[0103] S5. The large model sends the generated Python statistical code to the Python execution tool, instructing it to perform statistical analysis tasks.

[0104] S6. Python execution tools execute statistical code in a secure sandbox environment, performing structured statistical calculations on raw data (such as generating averages and trend charts).

[0105] S7. The Python execution tool returns the statistical results to the large model.

[0106] S8. The large model generates business responses in natural language based on statistical results and returns them to the user.

[0107] In this embodiment, the above-mentioned processes are explained as follows: In step S3, the intelligent analysis program sends the data structure information (field names, data types, etc.), data examples (the first N sample data), the user's original question, and the preset prompt word template to the large model. This effectively avoids two major problems when the large model directly processes massive amounts of data: first, it avoids data truncation or loss of key information due to context length limitations; second, it avoids the inherent defects of the large model in numerical statistical analysis (such as lack of accurate calculation capabilities and inaccurate statistical results), ensuring that the subsequent statistical analysis process completed by the Python execution tool has high precision and executability, and significantly improves the reliability and business adaptability of analysis in large-scale data scenarios.

[0108] III. Specific Application Examples: The intelligent data query system of this invention can integrate various types of information systems. The following example uses a customer relationship management system (CRM).

[0109] Scenario: CRM system order signing status analysis: Detailed implementation process: 1) Intent recognition process: A user initiates a natural language question through the AI ​​dialogue portal on the information system's end: "What is the order performance of Department A in the past week?". The system first uses a large-scale model to identify the user's intent in the question, determining whether it is an analytical query request targeting internal information system data. The system identifies that the question clearly involves a business data query related to contracts and orders, and contains key semantic elements (such as department "A" and the time range "the past week"). Therefore, it is determined to be a valid data analysis intent and automatically triggers the subsequent intelligent query process.

[0110] 2) The intelligent query process is shown in Table 1 below: Table 1 Intelligent Query Process

[0111] In this embodiment, the above-mentioned processes are explained as follows: The system automatically includes the user's token when calling the API and dynamically verifies data access permissions throughout the process to ensure that users can only access business data within their authorized scope. The process is as follows: 1. Users obtain a token after logging into the information system; 2. Users need to carry a token to access the AI ​​dialogue (intelligent question dialogue) portal (i.e., without logging into the information system, they do not have permission to use the AI ​​dialogue portal). 3. Users can ask questions in the AI ​​dialogue (a token is required to ask a question); 4. The intelligent query system interacts with the information system using a token. The information system only returns data authorized by that token (which contains the user's information). If the token is incorrect, the information system will not return any valid data.

[0112] Treating the intelligent data query system as a black box, the "end-to-end" verification here actually consists of two parts: ① the dialogue entry point between the information system and the intelligent data query system; ② the API between the intelligent data query system and the information system. "Dynamic" means that each user's token is different, and the returned data is also different.

[0113] 3) The intelligent analysis process is shown in Table 2 below: Table 2 Intelligent Analysis Process

[0114] In this invention, the large model serves as the core decision-making unit, responsible for generating precise data processing logic (Python code in this example), while the actual data computation is performed in a secure sandbox environment. This mechanism effectively avoids the inherent defects of large models directly processing large-scale data (including the overflow risk caused by context length limitations and the accuracy problems caused by the lack of numerical computation capabilities), ensuring the reliability and accuracy of analysis results in massive data scenarios.

[0115] From the description of the above embodiments, those skilled in the art will understand that the present invention provides an interface-adaptive and precise analysis AI intelligent question-answering system and method, the specific advantages of which include: 1. Automated API change detection: This invention innovatively integrates interface metadata management with a vector database to build an automated API awareness mechanism. When an API changes, the system automatically triggers an awareness program to retrieve metadata. After semantic enhancement by a large model, vectors are generated and stored by a text embedding model. This mechanism allows the system to automatically adapt to interface changes without modifying core logic or rewriting code, significantly reducing maintenance complexity and providing seamless technical support for the evolution of business systems.

[0116] 2. Precise control of data access permissions: This invention constructs a dynamic permission verification closed loop throughout the entire intelligent query process through a user token mechanism, achieving fine-grained data access control. After logging into the information system, users can initiate questions through the AI ​​dialogue portal. The system automatically carries the user token when calling the interface, dynamically verifying data access permissions throughout the process to ensure that users can only access business data within their authorized scope. This mechanism can completely eliminate the risk of unauthorized access (unless the information system itself has a data unauthorization defect).

[0117] 3. Comprehensive coverage of dynamic data adaptability: This invention innovatively stores interface metadata in a vector database, constructing a multi-candidate interface mechanism based on semantic retrieval. The system first retrieves a list of candidate interfaces that semantically match the user's query from the vector database, forming a multi-dimensional list of interface options. Then, a large model performs a final match based on the deep association between the user's query semantics and the interface description, accurately selecting the most suitable interface to obtain real-time business data. This mechanism breaks through the traditional static query model, ensuring that the analysis process is always based on the current business data source, providing continuous and dynamic decision support for complex business scenarios.

[0118] 4. Guaranteeing accuracy in massive data processing: This invention innovatively constructs an intelligent analysis mechanism, in which a large model serves as the core decision-making unit, responsible for generating precise data processing logic, while the actual data computation is performed in a secure sandbox environment. This mechanism effectively avoids the inherent defects of large models directly processing massive amounts of data, ensuring the reliability and accuracy of analysis results in scenarios with massive amounts of data.

[0119] Those skilled in the art will understand that embodiments of the present invention can be provided as products such as software systems, methods, or electronic devices. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0120] It should be noted that the word "comprising" does not exclude the presence of components or steps not listed in the claims. The words "a" or "an" preceding a component do not exclude the presence of a plurality of such components. This invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer.

[0121] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0122] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An interface-adaptive, precise analysis AI intelligent question-and-answer system, characterized in that, This intelligent data query system is integrated with the information system and includes: a program application layer, a model layer, and an external tool layer, wherein: The application layer includes an interface-aware module, an intelligent query module, and a data analysis module; the model layer includes a large model and a text embedding model; the external tool layer includes a vector database, an HTTP tool, and a Python execution tool. When this intelligent question-and-answer system interacts with the information system, it executes an API intelligent sensing process and a user question-and-answer process; among which: In the API intelligent perception process, the interface perception module monitors interface change events in the API management tool of the information system in real time, obtains the latest API interface metadata, converts the interface metadata into vector data through large model and text embedding model, and stores it in the vector database. In the user question-and-answer process, the intelligent query module receives user questions and user tokens for authentication from the AI ​​dialogue entry point on the information system side. The big model performs intent recognition on the user questions. If it is recognized as a non-business dialogue, the big model directly generates a natural language response. If it is recognized as a business dialogue, it enters the intelligent query process and intelligent analysis process. Through the collaborative processing of the intelligent query module, text embedding model, vector database, big model, HTTP tool, data analysis module and Python execution tool, it provides feedback to the user in the form of structured natural language.

2. The intelligent questioning system according to claim 1, characterized in that, The API intelligent perception process during the interaction between this intelligent query system and the information system employs a Webhook → Interface Awareness Program → Large Model Semantic Enhancement → Text Embedding → Vector Database API Change Automatic Perception Mechanism. The specific process includes: By listening for interface change events in the API management tool through Webhook, the API awareness module is notified of the behavior of changes in interface metadata. The interface awareness module initiates a query request for the latest interface metadata to the API management tool based on the interface ID, obtains the interface metadata, and parses it. The large model performs semantic enhancement on the original interface description in the interface metadata based on a pre-set prompt word template. The text embedding model is used to convert the semantically enhanced interface description into a semantic vector; The semantic vectors and interface metadata are assembled into a vector data object and stored or updated in the vector database.

3. The intelligent questioning system according to claim 2, characterized in that, The vector data object adopts a dual-modal structure design, including: The text section includes the interface URL, input parameters and descriptions, output parameters and descriptions, and the enhanced interface description; The vector part refers to the semantic vector generated by the text embedding model.

4. The intelligent questioning system according to claim 1, characterized in that, The intelligent data query system uses the user token to dynamically verify data access permissions. The user token embeds user identity information, including role ID and department code.

5. The intelligent questioning system according to claim 1, characterized in that, In the user question-and-answer process when this intelligent query system interacts with the information system, the intelligent query process adopts an intelligent query execution architecture of text embedding model → vector database → large model → HTTP tool. The specific process includes: User queries are converted into vectors using a text embedding model, and the Top K candidate interfaces are retrieved based on semantic similarity in a vector database that stores interface metadata. The large model determines the specific business interface and parameters to be called based on prompt words, Top K candidate interfaces, user questions, and user tokens, and generates a calling instruction to instruct the HTTP tool to perform business data query operations. The instruction includes the interface URL, interface parameters, interface request method, and user token. The HTTP tool initiates a request to the information system according to the instructions, and carries the user token for authentication; when the amount of data returned by the information system is less than a preset threshold, the large model directly generates a natural language response; when it is greater than the preset threshold, the intelligent analysis process is triggered.

6. The intelligent questioning system according to claim 5, characterized in that, In the user question-and-answer process when the intelligent question-and-answer system interacts with the information system, the intelligent analysis process specifically includes: The data analysis module receives raw data and user questions, performs structural parsing on the raw data and truncates the data, and then sends the data structure information, data examples, user questions and preset prompt word templates to the large model. The large model generates Python statistical code that meets business requirements based on the input content, and sends it to the Python execution tool to instruct it to perform statistical analysis tasks; Python execution tools execute statistical code, perform structured statistical calculations on the raw data, and return the statistical results to the large model; The large model generates business responses in natural language based on statistical results and returns them to the user.

7. The intelligent questioning system according to claim 6, characterized in that, In this intelligent data analysis system, the data analysis module performs structural parsing on the raw data, including extracting field names and data types.

8. The intelligent questioning system according to claim 6, characterized in that, In this intelligent data analysis system, the Python execution tool executes statistical code in a secure sandbox environment.

9. A method for precise analysis of AI-powered intelligent questioning through interface adaptation, characterized in that, The intelligent data query system as described in any one of claims 1–8 is used to perform data queries.