Method for searching structured data based on natural language driven by large model

By generating interface files and combining semantic analysis of agent tool chain and large model, the problem of inconsistent interfaces and complex analysis in traditional data search methods is solved, standardized and personalized query of data interfaces is realized, and data query efficiency and accuracy are improved.

CN120429345APending Publication Date: 2025-08-05SHIJIAZHUANG IRON & STEEL +1

Patent Information

Application Number
CN202510307739.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

Traditional data search methods have problems such as inconsistent data interfaces, complex business analysis processes, and poor parallelism of multi-dimensional indicator data processing, resulting in inconvenient use of internal users and low data query efficiency.

Method used

The interface file is generated through openAPI preprocessing interface parameters and added to the agent tool chain. The big model uses semantic analysis and conversion of keyword parameters input in natural language, and combines the agent tool call data to output results that meet user needs.

Benefits of technology

It realizes standardized processing of data interfaces, simplifies the data query process, improves data relevance and query efficiency, and meets personalized data query needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429345A_ABST
    Figure CN120429345A_ABST
Patent Text Reader

Abstract

The invention provides a method for searching structured data based on natural language driven by a large model, which comprises the following steps of: preprocessing interface parameters through a data interface of an openAPI (Application Program Interface) to generate an interface file, and adding the preprocessed interface parameters into an agent tool chain; the large model extracts keyword parameters from a question input by a user through a natural language and performs semantic analysis on the extracted keyword parameters, so that the keyword parameters are converted into interface fields or table fields in an interface file; the large model adapts an analyzed result to a tool name in the agent tool chain; calling an adaptive interface name by the large model, and calling a corresponding tool to query a data result; the large model outputs the result according to the form of the user demand, standardization processing is performed on the interface of the traditional data, the agent tool is added, the large model is used, different data search requirements are met, and the personalized data query requirement is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for searching structured data using natural language driven by a large model. Background Art

[0002] As enterprises continue to deepen their digital transformation, efficient and accurate big data management and query analysis have become key to enhancing their core competitiveness. However, the widely used traditional data search methods have many pain points:

[0003] 1. The data interface is not unified and lacks a standardized system. Data needs to be queried across multiple systems and multiple pages, which makes it inconvenient for internal users of the enterprise.

[0004] 5. The business analysis process is complex, and the correlation between data needs to be manually derived, and then the data needs to be merged, calculated, and counted;

[0005] 6. When the business scenario changes, manual comparison of different results is required;

[0006] 7. When processing multi-dimensional, dynamically evolving indicator data, the parallelism and global summarization are poor, and the ability to call tools is insufficient. Summary of the Invention

[0007] The present invention discloses a method for searching structured data using natural language driven by a large model, which solves the problems existing in traditional data search methods, standardizes the interface of traditional data, adds agent tools and enables the use of large models, adapts to different data search needs, and meets personalized data query needs.

[0008] To achieve the above object, the technical solution of the present invention is specifically implemented as follows:

[0009] The present invention discloses a method for searching structured data using natural language driven by a large model, which is characterized by comprising the following steps: S1: preprocessing interface parameters through an openAPI data interface, generating an interface file, and adding the preprocessed interface parameters to an agent tool chain; S2: the large model extracts keyword parameters from questions input by a user through natural language, and performs semantic analysis on the extracted keyword parameters, thereby converting the keyword parameters into interface fields or table fields in the interface file; S3: the large model adapts the parsed results to the tool names in the agent tool chain; S4: the large model calls the adapted interface name and calls the corresponding tool to query data results; S5: the large model outputs the results in a form according to user requirements.

[0010] Furthermore, the large model is based on the Transformer architecture.

[0011] Furthermore, the interface file includes interface address information, parameter information and their corresponding Chinese meaning comparison information.

[0012] Furthermore, the output of large models may be in the form of charts, lists, and pictures.

[0013] Beneficial technical effects:

[0014] 1. The present invention discloses a method for searching structured data using natural language driven by a large model, including preprocessing interface parameters through an openAPI data interface, standardizing the interface of traditional data, and adapting to different data search requirements;

[0015] 2. The method for searching structured data using natural language driven by a large model disclosed in the present invention includes extracting keyword parameters from a user's natural language input question by the large model, performing semantic parsing on the extracted keyword parameters, thereby converting the keyword parameters into interface fields or table fields in an interface file, and converting key information into structured table fields and parameters for calling a standardized interface and retrieving data.

[0016] 3. The method for searching structured data using natural language driven by a large model disclosed in the present invention includes adding and using an agent tool. Adding the tool and letting the large model use the agent tool can better extract parameters and process the returned results.

[0017] 4. The present invention discloses a method for searching structured data using natural language driven by a large model. The large model can output results in the form of user requirements, thereby meeting the user's personalized needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for describing the embodiments.

[0019] Figure 1 This is a flowchart of the specific steps of the method for searching structured data using natural language driven by a large model described in the present invention. DETAILED DESCRIPTION

[0020] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention and are not to be construed as limiting the present invention.

[0021] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] The present invention discloses a method for searching structured data based on natural language driven by a large model, see Figure 1 , the method specifically comprises the following steps:

[0023] S1: Preprocess interface parameters through the openAPI data interface, generate interface files, and add the preprocessed interface parameters to the agent tool chain;

[0024] The traditional search method is to query data across multiple systems and multiple pages. The correlation between the data needs to be manually exported, and then the data needs to be merged and calculated and counted, which is time-consuming and labor-intensive.

[0025] The method disclosed in the present invention uniformly processes the interfaces of all data and systems, adds production code to the generated interface file to identify the correspondence between the server address and parameters and fields, so as to achieve more accurate identification. The automatically generated interface file contains interface address information, parameter information and their respective corresponding Chinese meaning comparison information. The interface file is transmitted to the large model for understanding and parsing, and the Chinese meaning is matched with the parameter meaning to generate a structured parameter file. The large model matches the corresponding interface address and requests the interface from the system through tool calls and obtains the corresponding data.

[0026] Specifically, the implementation of the above method includes:

[0027] S11: prompt word project settings;

[0028] Specifically, prompts are specialized terminology for large models, serving as the foundation for them to understand natural language. Prompts are crucial for large models to understand and invoke agent tools. Prompts require the following: comparing parameters with their Chinese meanings; comparing interface addresses with their Chinese meanings; and adding a custom toolchain. Preferably, the custom toolchain includes a date / time tool, a chart tool, and a custom tool. Custom tools are key tools for invoking interfaces and contain code files with interface addresses and Chinese meanings, generated using the OpenAPI standard format.

[0029] S12: Add custom tools to the agent.

[0030] Specifically, the custom tool is added to the call chain of the large model. The large model calls the interface of the custom tool to obtain structured data, and returns and generates list data, charts, statistical charts, etc. through prompt word settings and multi-round dialogues.

[0031] S2: The large model extracts keyword parameters from the user's natural language input questions and performs semantic analysis on the extracted keyword parameters, thereby converting the keyword parameters into interface fields or table fields in the interface file;

[0032] Specifically, the big model is based on the Transformer architecture, including but not limited to the existing open source big models qwen2.5-72b and deepseek-r1. The big model, which has been fine-tuned with domain knowledge, receives users' natural language inquiries, so users do not need to master complex query syntax and can obtain the required results directly through natural language conversations.

[0033] It should be noted here that the fixed parameter names written in the prompt word project must be consistent with the Chinese names, otherwise the large model will not be recognized.

[0034] S3: The large model adapts the parsed results to the tool names in the agent tool chain;

[0035] Agent tools include but are not limited to time format conversion, table data beautification, chart data display and other data processing related tools.

[0036] It should be noted here that the tool name in the custom tool must be consistent with the Chinese counterpart, and must also be consistent with the file generated by openAPI.

[0037] S4: The large model calls the adapted interface name and calls the corresponding tool to query the data results;

[0038] S5: The large model outputs results in the form required by the user.

[0039] Specifically, the large model outputs results based on the user's prompt word requirements. The output results can be output in the form of charts, lists, and pictures to meet the user's personalized data query needs.

[0040] The following is an example of a specific implementation to illustrate this method. For example, the user enters in the system window: What is the production qualification rate of steel grade GCr15 from March 1 to March 30, 2024?

[0041] After the user submits the information, the big model parses the keyword information. The time period is from March 1 to March 30, 2024, the steel type is GCr15, and the query is about the pass rate. This is the big model understanding and parsing the fields corresponding to the keywords. The keywords and parameter fields are defined in the prompt word template with corresponding prompt word descriptions, including the start time, end time and parameter fields corresponding to the steel type, and generates the json format data required by the interface; the big model starts to call the interface with the pass rate in the agent tool list. The interface needs to be added to the tool call chain of the big model through the tool, so that the big model can understand the interface with the pass rate in the list and match the keyword entered by the user, so that the big model can call the interface. It should be noted that the prerequisite for such execution must be that the meaning and tool of this interface must be clearly stated in the prompt word. This tool contains the necessary instructions such as the interface address and parameter format. The large model calls the interface from the agent tool and returns data. The data return value needs to define the format of the data to be returned in the prompt word template, such as list format, chart format and statistical table. Different requirements require different tools to be added. Currently, there are time tools, date tools, and chart tools for parsing time. These tools need to be added to the call chain of the large model in advance, otherwise they cannot be called and produce the desired results.

[0042] This paper invents a method for natural language search of structured data driven by a large model based on the Transformer architecture, organically integrating the data interface with the large model. Through a unified data interface entry and semantic understanding and association analysis based on the Transformer large model, semantic understanding, parameters are converted into table fields, and the data interface is called through an agent tool. The large model finally queries the desired structured data according to the prompt word requirements, such as data lists, data charts, data calculation statistics, etc., to meet the data search needs of enterprise personnel, and the comparative analysis and graphical analysis of the query results provide favorable assistance to the final decision-making efficiency, thereby maximizing the value of the data.

[0043] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0044] The above embodiments are merely descriptions of preferred implementations of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary engineers and technicians in this field should fall within the scope of protection determined by the claims of the present invention.

Claims

1. A method for searching structured data based on natural language driven by a large model, characterized in that: The following steps are involved: S1: Preprocess interface parameters through the openAPI data interface, generate interface files, and add the preprocessed interface parameters to the agent tool chain; S2: The large model extracts keyword parameters from the user's natural language input questions and performs semantic analysis on the extracted keyword parameters, thereby converting the keyword parameters into interface fields or table fields in the interface file; S3: The large model adapts the parsed results to the tool names in the agent tool chain; S4: The large model calls the adapted interface name and calls the corresponding tool to query the data results; S5: The large model outputs results in the form required by the user.

2. The method for searching structured data based on natural language driven by a large model according to claim 1, characterized in that: The large model is based on the Transformer architecture.

3. The method for searching structured data based on natural language driven by a large model according to claim 1, characterized in that: The interface file includes interface address information, parameter information and their corresponding Chinese meaning comparison information.

4. The method for searching structured data based on natural language driven by a large model according to claim 1, characterized in that: The output of large models includes charts, lists and pictures.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN117540805A

  • Interaction method and device based on large language model, medium and computing equipment

    CN117556008A

Cited By

  • Long-time-history large model processing method based on asynchronous reinforcement learning

    CN121859951A