Information generation method and device, electronic equipment, storage medium and program product

By constructing semantic indexes for processing units using the RAG technology framework and optimizing the tool selection process, the problem of insufficient information processing efficiency and accuracy in large language models is solved, achieving efficient and accurate information generation and adapting to diverse query needs in different scenarios.

CN122019583APending Publication Date: 2026-05-12HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
Filing Date
2025-12-04
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In intelligent applications based on large language models, existing technologies suffer from insufficient information processing efficiency and accuracy. In particular, as the number of tools increases, the length of prompt words exceeds the model's processing limit, causing the model to confuse tools with similar functions and affecting the accuracy and efficiency of the generated results.

Method used

By adopting the RAG (Retrieval Augmented Generation) technical framework, a semantic index of processing units is constructed. The most relevant candidate processing units are first retrieved from external knowledge sources and provided as accurate context to the large language model, thus optimizing the tool selection process.

Benefits of technology

It effectively solves the problems of prompt word inflation and model confusion, improves the efficiency and accuracy of information generation, reduces computational burden and resource consumption, realizes efficient end-to-end information processing, and enhances the practicality and reliability of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019583A_ABST
    Figure CN122019583A_ABST
Patent Text Reader

Abstract

The invention discloses an information generation method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of computers.The method comprises the steps that in response to an information query request triggered by a target object, at least one candidate processing unit matched with the information query request is determined; retrieving a target processing unit from the at least one candidate processing unit based on attribute description information corresponding to the candidate processing unit and the information query request; and in response to the target processing unit retrieved from the at least one candidate processing unit, calling the target processing unit to execute an information query process, and generating target information matched with the information query request. By implementing the technical scheme of the application, accurate and efficient retrieval and calling of the processing unit can be realized, so that accurate information is generated according to the information query request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to information generation methods, apparatus, electronic devices, storage media, and program products. Background Technology

[0002] Currently, in the implementation of intelligent applications based on Large Language Models (LLMs), a common practice is to provide the model with the definition information of all integrated tools or services at once to support tool invocation when processing user requests. However, as the number of tools integrated into the application continues to increase, simultaneously feeding all tool information as context input to the model can easily lead to the prompt word length exceeding the model's processing limit, thus affecting processing efficiency. Furthermore, when multiple tools with similar functions exist in the system, differing only in details, loading too much tool information at once may also interfere with the model's judgment, increasing the difficulty of its selection and matching, and posing challenges to the accuracy and reliability of the generated results. Summary of the Invention

[0003] In view of this, this application provides an information generation method, apparatus, electronic device, storage medium, and program product to solve the problems of insufficient information processing efficiency and accuracy in related technologies.

[0004] In a first aspect, this application provides an information generation method, comprising: in response to an information query request triggered by a target object, determining at least one candidate processing unit that matches the information query request; retrieving a target processing unit from the at least one candidate processing unit based on the attribute description information corresponding to the candidate processing unit and the information query request; and in response to retrieving the target processing unit from the at least one candidate processing unit, invoking the target processing unit to execute an information query process and generating target information that matches the information query request.

[0005] In one optional implementation, in response to an information query request triggered by a target object, determining at least one candidate processing unit that matches the information query request includes: in response to the information query request triggered by the target object, converting the information query request into a vector representation to obtain an information query vector; obtaining index information pre-built based on a model context protocol, the index information including multiple index vectors; and determining at least one candidate processing unit based on the semantic similarity between the information query vector and each index vector.

[0006] In one optional implementation, obtaining index information pre-built based on the model context protocol includes: obtaining metadata information of the first processing unit based on the model context protocol, the metadata information including data processing description information; converting the data processing description information into a vector representation to obtain data processing description vectors corresponding to each first processing unit; associating the data processing description vectors with the corresponding metadata information to generate index information.

[0007] In one optional implementation, the metadata information includes information classification tags; in response to an information query request triggered by a target object, determining at least one candidate processing unit that matches the information query request further includes: obtaining the target classification tag corresponding to the information query request; determining the matching degree between the target classification tag and each information classification tag; determining the semantic similarity between the information query vector corresponding to the information query request and each index vector in the index information; and selecting at least one second processing unit from the index information based on the semantic similarity and the matching degree, and determining the second processing unit as a candidate processing unit.

[0008] In one alternative implementation, the process of generating information classification tags includes: generating information classification tags corresponding to the metadata information in response to a classification editing operation on the metadata information.

[0009] In one optional implementation, retrieving a target processing unit from at least one candidate processing unit based on the attribute description information corresponding to the candidate processing unit and the information query request includes: converting the attribute description information corresponding to each candidate processing unit into a target calling format to obtain target attribute description information; determining the target processing unit from at least one candidate processing unit based on the target attribute description information and the information query request; wherein the target calling format includes at least one of processing unit name, processing unit description, and parameter mode.

[0010] In one alternative implementation, in response to the failure to retrieve the target processing unit from at least one candidate processing unit, the retrieval of the target processing unit is abandoned, and a prompt message is generated to indicate that the target processing unit has not been retrieved.

[0011] Secondly, this application provides an information generation apparatus, comprising: a determining module, configured to determine at least one candidate processing unit matching the information query request in response to an information query request triggered by a target object; a retrieval module, configured to retrieve a target processing unit from the at least one candidate processing unit based on attribute description information corresponding to the candidate processing unit and the information query request; and a generating module, configured to, in response to retrieving the target processing unit from the at least one candidate processing unit, invoke the target processing unit to execute the information query process, and generate target information matching the information query request.

[0012] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the information generation method described in the first aspect or any corresponding embodiment.

[0013] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to perform the information generation method described in the first aspect or any corresponding embodiment.

[0014] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the information generation method described in the first aspect or any corresponding embodiment thereof.

[0015] The information generation method provided in this application, in response to an information query request triggered by a target object, first identifies at least one candidate processing unit that matches the request, effectively achieving preliminary screening of processing units, reducing the computational burden and resource consumption of subsequent processing, and improving overall query efficiency. The retrieval of target processing units based on the attribute description information corresponding to the candidate processing units and the information query request ensures a high degree of targeting and accuracy in the retrieval process, dynamically adapting to query needs and avoiding interference from irrelevant or redundant processing units, thereby improving the accuracy and relevance of information generation. By calling the retrieved target processing unit to execute the information query process, target information matching the query request is directly generated, achieving efficient end-to-end information processing, enhancing the practicality and reliability of the method, and providing flexibility for system expansion, enabling adaptation to diverse query needs in different scenarios. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies 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 from these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application; Figure 2 This is a schematic flowchart of a first method for generating information according to an embodiment of this application; Figure 3 This is a schematic diagram of a second process for an information generation method according to an embodiment of this application; Figure 4This is a structural block diagram of an information generation apparatus according to an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0020] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0021] As one optional application scenario in this application embodiment, Figure 1 This diagram illustrates an application scenario of an information generation system. For example... Figure 1 As shown, the system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.

[0022] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.

[0023] Taking a smart assistant application as an example, a terminal device has a smart assistant application installed. By running this application, users can input natural language queries, such as "recommend a song" or "check the weather information." Based on the user's query, the smart assistant retrieves relevant tools and services from the backend server to process the request and generates accurate and personalized responses to display to the user. For example, in a music recommendation scenario, users can query via voice or text input, and the smart assistant will invoke the corresponding song search, favorites, or playback tools to perform the operation.

[0024] Currently, some intelligent assistant implementations typically load all available tool definitions into the context of a Large Language Model (LLM) at once to process user queries. As the number of tools increases, the length of the prompts in this approach expands dramatically, potentially exceeding the model's contextual limitations and causing the model to confuse tools with similar functions, reducing the accuracy of tool selection and response efficiency. For example, when a user queries "play songs by a certain artist," the model may see multiple song-related tools (such as search, play, and favorites). However, due to the excessive tool descriptions, the model may fail to accurately select the most suitable tool or even generate incorrect calls.

[0025] The fundamental problem with the aforementioned technical solutions lies in their inability to effectively manage and utilize the context of a large toolset. To overcome this limitation, this application introduces the RAG (Retrieval Augmented Generation) framework to optimize the tool selection process. RAG is an artificial intelligence technology that combines external knowledge retrieval with the generative capabilities of a large language model. Its core principle is: before processing information query requests and generating answers, the most relevant information fragments to the query are first retrieved from an external knowledge source (in this application, this refers to the descriptive information base of the processing unit). Then, this retrieved information is injected as additional context into the large language model, thereby guiding the model to generate more accurate and relevant output.

[0026] Based on the core idea of ​​RAG, this application constructs a semantic index of processing units as an external knowledge source. By prioritizing the retrieval of a few candidate processing units that are most relevant to the user query and defining them as precise context for the large language model, it effectively solves the problems of prompt word inflation and model confusion.

[0027] The information generation method provided in this application, in response to an information query request triggered by a target object, determines at least one candidate processing unit that matches the information query request; then, based on the attribute description information corresponding to the candidate processing unit and the information query request, it retrieves a target processing unit from the candidate processing units; when a target processing unit is retrieved, it calls the target processing unit to execute the information query process, generating target information that matches the information query request. This processing method does not require loading information from all processing units, which not only reduces the dependence on system processing resources but also automatically achieves fast and accurate selection of processing units, improving the efficiency and reliability of information generation.

[0028] According to an embodiment of this application, an information generation method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] This embodiment provides an information generation method that can be used in electronic devices, such as server 103. Figure 2 This is a flowchart of an information generation method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps: Step S201: In response to an information query request triggered by the target object, at least one candidate processing unit that matches the information query request is determined.

[0030] The target object refers to the entity that triggers the information query request, typically a user or a client application. In specific applications, the target object can be a user who enters a query through an interface (such as a chatbot, search box, etc.) or a system component that automatically initiates the request. An information query request refers to a query or request initiated by the target object, aimed at obtaining specific information or performing a task. For example, a text query entered by a user, such as "recommend a song" or "check the weather".

[0031] Candidate processing units refer to the initial screening of candidate units from a set of external functional units (such as tools, APIs, services, or callable program modules). A processing unit could be, for example, an MCP (Model Context Protocol) tool. Each candidate processing unit represents an external resource with a specific function that may be used to process the current query. Specifically, when an electronic device receives an information query request initiated by a target object, it first initiates a preliminary matching process. This process aims to quickly and intelligently filter out a small subset of processing units from a large, predefined set that may be relevant to the intent and purpose of the current query request—these are the candidate processing units. The core principle is that the electronic device does not blindly enumerate all available units, but rather performs a preliminary, coarse-grained association and screening at the functional level based on an understanding of the meaning of the query request itself. This forms a smaller, more relevant candidate set, laying the foundation for subsequent precise selection.

[0032] Step S202: Based on the attribute description information corresponding to the candidate processing unit and the information query request, retrieve the target processing unit from at least one candidate processing unit.

[0033] Attribute description information refers to the metadata or characteristic information describing candidate processing units, such as processing unit name, description, parameter description, etc. The target processing unit refers to one or more processing units ultimately selected from the candidate processing units, used to directly process the information query request. Specifically, after obtaining an initial set of candidate processing units, the electronic device enters a more refined decision-making stage. At this stage, the electronic device comprehensively considers the original query request and the attribute description information corresponding to each candidate processing unit. This attribute description information is essentially metadata or characteristic information used to detail the function, capabilities, and applicable scenarios of each unit. By comparing and analyzing the specific requirements of the query request with these detailed attribute descriptions, the electronic device conducts an in-depth evaluation and comparison of all candidate processing units, ultimately identifying and retrieving one or more processing units that are functionally most suitable and best meet the essential purpose of the current query request—the target processing unit.

[0034] Step S203: In response to retrieving the target processing unit from at least one candidate processing unit, the target processing unit is invoked to execute the information query process and generate target information that matches the information query request.

[0035] The information query process refers to the processing flow that calls the target processing unit to execute specific operations. Target information refers to the result or response generated after executing the information query process, i.e., the output content that matches the information query request, such as a song list, playback status, or collection confirmation. Target information is the final answer returned to the target object. Specifically, once the target processing unit is successfully identified, the execution flow is automatically triggered. The electronic device formally calls this selected target processing unit, initiating its internal information query and processing logic, i.e., the information query process. This target processing unit will perform its specific functions based on the specific information and requirements contained in the query request, such as data retrieval, calculation, or calling external services. After this process is completed, the electronic device receives the output result generated by the unit, integrates, encapsulates, or directly uses it as the final response content, thereby generating target information that highly matches the initial information query request, meets the needs of the target object, and completes the response loop for this request.

[0036] The information generation method provided in this application, in response to an information query request triggered by a target object, first identifies at least one candidate processing unit that matches the request, effectively achieving preliminary screening of processing units, reducing the computational burden and resource consumption of subsequent processing, and improving overall query efficiency. The retrieval of target processing units based on the attribute description information corresponding to the candidate processing units and the information query request ensures a high degree of targeting and accuracy in the retrieval process, dynamically adapting to query needs and avoiding interference from irrelevant or redundant processing units, thereby improving the accuracy and relevance of information generation. By calling the retrieved target processing unit to execute the information query process, target information matching the query request is directly generated, achieving efficient end-to-end information processing, enhancing the practicality and reliability of the method, and providing flexibility for system expansion, enabling adaptation to diverse query needs in different scenarios.

[0037] This embodiment provides an information generation method that can be used in electronic devices, such as server 103. Figure 3 This is a flowchart of an information generation method according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps: Step S301: In response to an information query request triggered by the target object, at least one candidate processing unit that matches the information query request is determined.

[0038] Specifically, step S301 includes: Step S3011: In response to the information query request triggered by the target object, the information query request is converted into a vector representation to obtain the information query vector.

[0039] An information query vector is a numerical vector representation of the original text query request from a target object, transformed through an embedding model. It converts the semantic information of the query into a form that a computer can directly perform mathematical calculations and comparisons. Specifically, upon receiving an information query request from a target object, a vectorization transformation process is initiated. This process utilizes a pre-trained embedding model (such as bge-large-zh-v1.5) to transform the semantic content of the query request, expressed in natural language, into a numerical vector representation—the information query vector. Essentially, this transformation maps the semantic information of the text into a high-dimensional vector space, ensuring that queries with similar semantics are also positioned close to each other in the vector space. Through this transformation, the originally unstructured text query becomes a structured data form that a computer can directly perform mathematical calculations and comparisons, laying the foundation for subsequent semantic similarity retrieval.

[0040] Step S3012: Obtain the index information pre-built based on the model context protocol. The index information includes multiple index vectors.

[0041] Index information refers to a pre-built structured database or index library of an electronic device. It systematically stores metadata information of all available processing units and their corresponding vectorized descriptions, forming the basis for fast semantic retrieval. Index vectors refer to numerical vectors pre-existing in the index information and corresponding to each processing unit. Specifically, the electronic device reads the required index information from a pre-built and persistently stored index library. This index information is constructed based on the model context protocol, after pre-processing and organizing all available first processing units during the electronic device's initialization or dynamic update phase. The core component of this index information is multiple index vectors, each corresponding to a first processing unit and representing its key semantic description information (such as tool function descriptions) in a vectorized form. Obtaining this index information typically means that the electronic device loads these pre-calculated index vectors and their associated metadata from a specified database or vector storage engine, preparing for the upcoming semantic matching retrieval.

[0042] Step S3013: Based on the semantic similarity between the information query vector and each index vector, at least one candidate processing unit is determined.

[0043] Semantic similarity refers to the distance metric between the query vector and the index vector in the vector space, such as cosine similarity. A higher similarity indicates a better match between the query intent and the function of the processing unit. Specifically, after obtaining the query vector and loading the index information containing multiple index vectors, a semantic similarity calculation and sorting process is performed. The electronic device calculates the similarity between the query vector and each index vector in the index information in the vector space, for example, by calculating cosine similarity. Based on the calculated similarity scores, all potential processing units are sorted, and the top K processing units with the highest similarity are selected. These selected processing units, which are semantically most relevant to the user's query, are identified as candidate processing units, serving as a backup set for subsequent precise filtering and invocation.

[0044] For example, Elasticsearch can be used as a vector retrieval engine. By calculating the cosine similarity between the information query vector and the index vector, and supporting filtering based on category tags, the top k most relevant candidate processing units can be accurately selected. Tag filtering can be flexibly configured during the retrieval process to further narrow down the search scope.

[0045] The information generation method provided in this application transforms information query requests triggered by a target object into vector representations, enabling a deep semantic understanding of the query intent and laying the foundation for subsequent accurate matching. Utilizing pre-built model context protocol index information containing multiple index vectors, it provides structured and efficient data support for semantic retrieval. By calculating the semantic similarity between the information query vector and each index vector to determine candidate processing units, this application can quickly and accurately filter out the candidates most semantically relevant to the query from a massive pool of options, greatly improving the intelligence level and retrieval efficiency of candidate set determination. Simultaneously, it avoids the ambiguity or limitations that may arise from simple keyword matching, making the candidate processing unit determination process more aligned with the understanding logic of natural language.

[0046] In some optional implementations, step S3012 above includes: Step a1: Obtain metadata information of the first processing unit based on the model context protocol. The metadata information includes data processing description information.

[0047] The first processing unit refers to any unit in the complete set of original processing units involved in the preliminary stage of index building, which has not yet undergone any filtering. It is the original component of all available functions. Metadata information refers to data describing the basic attributes and characteristics of a processing unit. As shown in Table 1, it typically includes the tool name, detailed functional description, required input parameters and their descriptions, etc., and is the core basis for understanding and retrieving the processing unit. Data processing description information refers to the text portion of the metadata information that specifically describes the core function and role of the processing unit, such as "This tool is used to search for a list of songs by artist name". Specifically, the metadata information of all available first processing units can be obtained by accessing the processing unit repository registered and managed based on the model context protocol. This metadata information is a structured description of the function and attributes of each processing unit, and the crucial part is the data processing description information, which usually clearly explains the core function, purpose, and data operations that the processing unit can perform in text form. For example, when the processing unit is an MCP tool, the metadata information includes, but is not limited to, the fields shown in Table 1. The way to obtain this metadata information can be by querying a centralized MCP server registry or by reading from a persistent storage (such as a database or file system) that maintains all registered tool definition information; no specific limitation is made here.

[0048] Table 1

[0049] Step a2: Convert the data processing description information into a vector representation to obtain the data processing description vector corresponding to each first processing unit.

[0050] The data processing description vector refers to the numerical vector obtained by transforming the text describing data processing information through an embedding model. Specifically, using the same pre-trained embedding model as when processing user queries, the data processing description text for each first processing unit is vectorized. This process converts a segment of natural language text describing a function into a fixed-dimensional, numerical vector. This generated vector, the data processing description vector, captures and preserves the deep semantic features of the original description text. Through this step, the functional descriptions of all first processing units are uniformly mapped to the same semantic vector space, allowing their functional semantics to be quantitatively measured and compared.

[0051] Step a3: Associate the data processing description vector with the corresponding metadata information to generate index information.

[0052] After generating a data processing description vector for each first processing unit, the electronic device performs an association and persistence operation. Specifically, each data processing description vector, as a core retrieval field, is bound to its source's complete metadata information (such as tool name, parameter description, category tags, etc.) to form a complete record. Subsequently, this set of bound records is systematically stored or indexed into a database or vector indexing engine designed for efficient similarity search. Ultimately, this structured collection containing the vectorized representations of all processing units and their complete metadata generates the index information required by the electronic device.

[0053] In the above implementation, by acquiring the metadata information of the first processing unit based on the model context protocol and extracting data processing description information from it, a structured and content-rich semantic foundation is provided for subsequent vectorized representation and index construction. By converting the text-based data processing description information into vector representation, deep quantization and encoding of the functional semantics of the processing unit are achieved, enabling it to participate in efficient mathematical calculations and similarity comparisons. By associating and integrating the generated data processing description vectors with the corresponding metadata information, structured index information is finally generated. This process not only realizes the vectorized encapsulation and systematic organization of massive processing unit information, but also constructs a core data foundation that supports efficient semantic retrieval, providing crucial underlying support for the accurate and rapid tool discovery and invocation of this application.

[0054] In some optional implementations, the metadata information includes information classification tags; step S301 above further includes: Step b1: Obtain the target category label corresponding to the information query request.

[0055] Target category labels refer to one or more category labels identified or derived from the current information query request. Specifically, the target category labels are obtained by analyzing the content characteristics of the information query request. This process can be based on keyword matching using preset rule templates, or it can utilize natural language processing technology to automatically identify and classify the query intent; no specific limitations are made here. For example, an electronic device maintains a classification system, automatically mapping information queries containing domain-specific terms to the corresponding categories. Another implementation method is to use machine learning models to perform multi-label classification on the query text, outputting one or more category identifiers. Ultimately, the electronic device assigns one or more category identifiers to the current query that reflect its core needs and applicable scenarios, serving as the basis for subsequent filtering and processing units.

[0056] Step b2: Determine the matching degree between the target category label and each information category label.

[0057] Information classification tags refer to labels, manually or automatically assigned, used to identify the category or application scenario of a processing unit, such as music, weather, and database. They serve as a filtering condition, helping to narrow the search scope from a category perspective. Specifically, comparison logic determines the degree of match between the target classification tag and the information classification tags pre-set in the metadata of each processing unit. This matching degree calculation can be based on simple string matching or more complex semantic similarity calculations. For example, if the classification system is hierarchical, the electronic device will calculate the path distance between categories. The output of the matching degree can be a Boolean value (complete match or no match) or a continuous probability score representing the semantic strength of the association between two categories. This matching degree metric provides an important measure of relevance at the category level for subsequent comprehensive filtering.

[0058] Step b3: Determine the semantic similarity between the information query vector corresponding to the information query request and each index vector in the index information.

[0059] The semantic similarity between the information query vector and each index vector is determined using a distance metric algorithm in a vector space model. Specifically, this process involves mathematically comparing two high-dimensional vectors; common methods include calculating cosine similarity, Euclidean distance, or dot product. Through this calculation, electronic devices can quantify the degree of association between the semantic intent of the information query and the functional description of each processing unit. The calculated similarity scores form a ranking criterion, allowing processing units that are semantically closest to the information query to be prioritized for identification.

[0060] Step b4: Based on semantic similarity and matching degree, select at least one second processing unit from the index information and determine the second processing unit as a candidate processing unit.

[0061] Matching degree refers to the degree of consistency or conformity between the target category label and the information category label of the processing unit. It can be a Boolean value (yes / no match) or a confidence score, used for result filtering or weighting based on semantic retrieval. The second processing unit refers to the candidate processing unit finally determined after further filtering based on category label matching degree, building upon the initial semantic retrieval. Specifically, a multi-factor comprehensive decision-making method can be adopted, combining information from both semantic similarity and category matching degree dimensions to select second processing units from the index information. For example, a weighted scoring formula can be designed to combine semantic similarity scores and category matching degree scores into a comprehensive score according to certain weights. Then, all processing units are ranked according to this comprehensive score, and one or more of the top-ranked units are selected as second processing units. This filtering mechanism, which integrates semantic and classification information, can more accurately find processing units that both match the user's query intent and are suitable for the current application scenario, and formally determine these finally selected units as candidate processing units.

[0062] In the above embodiments, by introducing information classification tags as part of the metadata, clear category attributes are provided for the processing units, enriching the dimensions and organizational hierarchy of the metadata information. When determining candidate processing units, the target classification tags corresponding to the information query request are obtained, and the matching degree between them and the information classification tags of each processing unit is calculated, achieving preliminary screening based on a clear classification system. This application combines the matching degree of classification tags with the similarity of semantic vectors as the basis for selecting candidate processing units from the index information. This dual screening mechanism not only utilizes deep semantic understanding but also takes into account the preset category logic, making the final set of candidate processing units not only semantically similar to the query intent but also more consistent in functional classification, thereby significantly improving the quality, accuracy, and relevance of the candidate set to the business scenario.

[0063] In some optional implementations, the process of generating information classification labels includes: generating information classification labels corresponding to the metadata information in response to a classification editing operation on the metadata information.

[0064] Category editing refers to the act of system administrators or users modifying or assigning information category tags through manual intervention (such as manual labeling). Specifically, a front-end management interface is provided to receive category editing operations on metadata information from users or administrators, thereby generating or updating corresponding information category tags. When a user selects or enters a category identifier in the management interface and confirms submission, the electronic device captures this editing instruction and associates it with the metadata of a specific processing unit. Subsequently, this newly assigned category identifier is persistently stored in the metadata of that processing unit as its official information category tag. This process allows for the flexible and accurate construction and maintenance of the processing unit's classification system through manual intervention.

[0065] In the above embodiments, corresponding information classification tags are generated in response to classification and editing operations on metadata information. This makes the tag creation process highly controllable and flexible, fully combining professional human judgment with specific business scenario requirements. This interactive tag generation mechanism ensures that information classification tags accurately and appropriately reflect the functional attributes or application scope of the processing unit, avoiding semantic biases or coarse classification problems that may exist in purely automated tag generation. Simultaneously, this application provides a direct and operable management entry point for the construction and maintenance of the information classification system, enabling classification tags to be dynamically adjusted and optimized as business develops or understanding deepens. This ensures the adaptability and vitality of the entire system's classification capabilities, laying a solid and reliable foundation for subsequent accurate classification-based retrieval.

[0066] Step S302: Based on the attribute description information corresponding to the candidate processing unit and the information query request, retrieve the target processing unit from at least one candidate processing unit.

[0067] Specifically, step S302 includes: Step S3021: Convert the attribute description information corresponding to each candidate processing unit into the target calling format to obtain the target attribute description information.

[0068] The target calling format refers to the standard tool calling format that a large language model can recognize and use. For example, the standard function calling format for a large language model includes structured fields such as processing unit name, description, and input parameter patterns to ensure that the LLM can correctly parse and call the function. Target attribute description information refers to the description information of candidate processing units that conforms to the target calling format after format conversion. Specifically, the original attribute description information of candidate processing units is reorganized and standardized into the target calling format through a format conversion engine. This conversion process is usually based on predefined templates or mapping rules, extracting key fields from the original metadata, such as processing unit name, function description, and parameter definitions, and assembling them according to the standard structure expected by the large language model. The converted target attribute description information retains complete semantic content but is presented in a more structured and standardized form, ensuring that it can be correctly parsed and utilized by the downstream large language model.

[0069] Step S3022: Based on the target attribute description information and the information query request, determine the target processing unit from at least one candidate processing unit.

[0070] The target invocation format includes at least one of the following: processing unit name, processing unit description, and parameter mode.

[0071] By submitting formatted target attribute descriptions along with the original information query request to a large language model, its advanced reasoning capabilities are leveraged to determine the final target processing unit. The large language model comprehensively analyzes the specific requirements of the information query request and the standard functional descriptions of each candidate processing unit, evaluating which unit best satisfies the current request. Based on its understanding of natural language and functional descriptions, the model makes a selection decision and typically returns the identifier of the selected processing unit in a specified output format. Essentially, this process utilizes the intelligent judgment of the large language model to make the final optimal choice from a small, carefully selected pool of candidate units.

[0072] The information generation method provided in this application converts the attribute description information corresponding to candidate processing units into a target calling format that includes elements such as processing unit name, processing unit description, and parameter mode. This transforms attribute information into a standardized and structured form, enabling downstream large language models or execution engines to understand and process the information more efficiently and unambiguously. This format conversion process effectively refines and organizes the original information, generating more concise target attribute description information that is interface-oriented, greatly improving the efficiency of information utilization. Based on this, and combined with the information query request, the standardized target attribute description information is used to determine the final target processing unit from the candidate processing units. This allows the decision-making process to be based on a unified and standardized semantic framework, thereby significantly improving the accuracy, reliability, and interoperability with downstream systems in target processing unit selection.

[0073] Step S303: In response to retrieving the target processing unit from at least one candidate processing unit, the target processing unit is invoked to execute the information query process, generating target information matching the information query request. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.

[0074] In some alternative implementations, in response to the failure to retrieve the target processing unit from at least one candidate processing unit, the retrieval of the target processing unit is abandoned, and a prompt message is generated to indicate that the target processing unit has not been retrieved.

[0075] The prompt message refers to the feedback message returned to the target user when the target processing unit cannot be successfully retrieved from the candidate processing units, such as "Sorry, no function to process your request was found." Specifically, when feedback is received from the large language model indicating that none of the provided candidate processing units have been selected as the target processing unit, the electronic device triggers a specific processing logic. First, the current tool retrieval and selection process is terminated, explicitly abandoning further attempts to find the target processing unit. Next, the information generation module is invoked to generate a user-friendly natural language prompt message. The core content of this prompt message is to inform the user that no suitable function or tool to process their request can currently be found. Finally, this prompt message is returned to the user interface, completing the response to this query, thereby ensuring the integrity of the user experience and the robustness of the system.

[0076] In the above embodiments, by explicitly defining the processing flow when the target processing unit is not found from the candidate processing units—that is, abandoning further retrieval and generating corresponding prompt information—a clear and definite exception handling mechanism is provided for the system. This effectively avoids invalid retries, resource idleness, or process blocking problems that may occur when suitable tools are unavailable, ensuring the stability and efficiency of system operation. Simultaneously, by proactively generating and returning prompt information, this application can promptly and clearly inform the user or upstream system of the status of not finding the target processing unit, greatly improving system observability and user interaction experience. It avoids user confusion caused by long waiting times or lack of feedback, reflecting the rigor of system design and comprehensive consideration of user experience.

[0077] This embodiment also provides an information generation device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0078] This embodiment provides an information generation device, such as... Figure 4 As shown, it includes: The determination module 401 is used to determine at least one candidate processing unit that matches the information query request in response to the information query request triggered by the target object. The retrieval module 402 is used to retrieve the target processing unit from at least one candidate processing unit based on the attribute description information corresponding to the candidate processing unit and the information query request. The generation module 403 is used to, in response to retrieving a target processing unit from at least one candidate processing unit, invoke the target processing unit to execute an information query process, and generate target information that matches the information query request.

[0079] In some alternative implementations, the determining module 401 includes: The first transformation submodule is used to respond to the information query request triggered by the target object, and transform the information query request into a vector representation to obtain the information query vector; The first acquisition submodule is used to acquire index information pre-built based on the model context protocol, which includes multiple index vectors; The first determining submodule is used to determine at least one candidate processing unit based on the semantic similarity between the information query vector and each index vector.

[0080] In some optional implementations, the acquisition submodule includes: The acquisition unit is used to acquire metadata information of the first processing unit based on the model context protocol. The metadata information includes data processing description information.

[0081] The transformation unit is used to convert the data processing description information into a vector representation to obtain the data processing description vector corresponding to each first processing unit.

[0082] The association unit is used to associate the data processing description vector with the corresponding metadata information to generate index information.

[0083] In some optional implementations, the metadata information includes information classification tags; the determining module 401 further includes: The second acquisition submodule is used to acquire the target category label corresponding to the information query request; The second determination submodule is used to determine the matching degree between the target classification label and each information classification label; The third determination submodule is used to determine the semantic similarity between the information query vector corresponding to the information query request and each index vector in the index information; The selection submodule is used to select at least one second processing unit from the index information based on semantic similarity and matching degree, and to determine the second processing unit as a candidate processing unit.

[0084] In some optional implementations, the second determining submodule includes: The generation unit is used to generate information classification tags corresponding to the metadata information in response to the classification and editing operations on the metadata information.

[0085] In some alternative implementations, the retrieval module 402 includes: The second conversion submodule is used to convert the attribute description information corresponding to each candidate processing unit into the target calling format to obtain the target attribute description information. The fourth determination submodule is used to determine the target processing unit from at least one candidate processing unit based on the target attribute description information and information query request. The target invocation format includes at least one of the following: processing unit name, processing unit description, and parameter mode.

[0086] In some alternative implementations, the information generation apparatus further includes: The abandon submodule is configured to abandon the search for the target processing unit in response to the failure to retrieve the target processing unit from at least one candidate processing unit, and generate a prompt message indicating that the target processing unit has not been retrieved.

[0087] The information generation apparatus provided in this application can execute the information generation method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0088] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0089] The following is a detailed reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0090] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0091] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the information generation method of embodiments of this application.

[0092] Figure 5The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0093] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the information generation method shown in the above embodiments is implemented.

[0094] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0095] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. An information generation method, characterized in that, The method includes: In response to an information query request triggered by a target object, at least one candidate processing unit that matches the information query request is identified; Based on the attribute description information corresponding to the candidate processing unit and the information query request, the target processing unit is retrieved from the at least one candidate processing unit; In response to retrieving the target processing unit from the at least one candidate processing unit, the target processing unit is invoked to execute an information query process to generate target information that matches the information query request.

2. The method according to claim 1, characterized in that, The step of determining at least one candidate processing unit that matches the information query request in response to the information query request includes: In response to the information query request triggered by the target object, the information query request is converted into a vector representation to obtain the information query vector; Obtain index information pre-built based on the model context protocol, wherein the index information includes multiple index vectors; Based on the semantic similarity between the information query vector and each of the index vectors, at least one candidate processing unit is determined.

3. The method according to claim 2, characterized in that, The process of obtaining index information pre-built based on the model context protocol includes: Obtain metadata information of the first processing unit based on the model context protocol, the metadata information including data processing description information; The data processing description information is converted into a vector representation to obtain the data processing description vector corresponding to each of the first processing units; The data processing description vector is associated with the corresponding metadata information to generate the index information.

4. The method according to claim 3, characterized in that, The metadata information includes information classification tags; The step of determining at least one candidate processing unit that matches the information query request in response to the information query request triggered by the target object further includes: Obtain the target category label corresponding to the information query request; Determine the matching degree between the target classification label and each of the information classification labels; Determine the semantic similarity between the information query vector corresponding to the information query request and each of the index vectors in the index information; Based on the semantic similarity and the matching degree, at least one second processing unit is selected from the index information, and the second processing unit is determined as the candidate processing unit.

5. The method according to claim 4, characterized in that, The process of generating the information classification tags includes: In response to the classification and editing operation of the metadata information, information classification tags corresponding to the metadata information are generated.

6. The method according to claim 1, characterized in that, The step of retrieving the target processing unit from the at least one candidate processing unit based on the attribute description information corresponding to the candidate processing unit and the information query request includes: The attribute description information corresponding to each candidate processing unit is converted into the target calling format to obtain the target attribute description information; Based on the target attribute description information and the information query request, a target processing unit is determined from the at least one candidate processing unit; The target invocation format includes at least one of the following: processing unit name, processing unit description, and parameter mode.

7. An information generation device, characterized in that, The device includes: The determination module is used to determine at least one candidate processing unit that matches the information query request in response to an information query request triggered by a target object. The retrieval module is used to retrieve the target processing unit from the at least one candidate processing unit based on the attribute description information corresponding to the candidate processing unit and the information query request. A generation module is configured to, in response to retrieving the target processing unit from the at least one candidate processing unit, invoke the target processing unit to execute an information query process, and generate target information that matches the information query request.

8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the information generation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the information generation method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the information generation method according to any one of claims 1 to 6.