A multi-model API docking management method and system based on deep learning

CN122653780APending Publication Date: 2026-08-28BEIJING LEKAIHUA FILM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610816991.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0003]目前,在实际的多模型API对接管理过程中,存在以下问题:不同模型API的调用方式、参数格式、认证机制、速率限制等各不相同,开发者需要为每个模型单独编写适配代码,导致系统集成复杂度高、开发周期长

Benefits of technology

[0056]1. This invention achieves standardized accumulation of AI prompt word templates and skill assets by constructing a unified cloud storage space. Combined with quantum heuristic template selection and context reconstruction based on maximum boundary relevance, it significantly reduces the complexity of multi-model API integration and improves resource reuse. At the same time, dynamic status evaluation and intelligent distribution, along with closed-loop feedback of execution results and performance indicators, can continuously optimize the template library and asset library. Thus, based on clear skill asset management and automated integration process, it achieves high efficiency, low cost, and adaptive optimization of multi-business model calls, and has good scalability and practical value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122653780A_ABST
    Figure CN122653780A_ABST
Patent Text Reader

Abstract

The application provides a kind of multi-model API docking management method and system based on deep learning, it is related to artificial intelligence and cloud computing technology field, including the following steps: collect and standardize all the AI prompt word templates and skill assets generated in workflow storage, to generate AI prompt word template library and skill asset library;Request data is optimized;The state of the multi-business model is evaluated in combination with the optimized request data to determine the target business model, and the optimized request data is distributed to the target business model to perform inference operations;Real-time acquisition of inference results and performance indicators generated during the execution of the target business model, and the inference results and performance indicators are returned to the cloud storage space;The AI prompt word template library and skill asset library are updated to realize the docking optimization of multi-business model.The application realizes the efficient, low-cost and adaptive optimization of multi-business model call, with good scalability and practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and cloud computing technology, and more specifically, to a multi-model API integration management method and system based on deep learning. Background Technology

[0002] With the rapid development of AI technologies such as large language models and multimodal generative models, enterprises and developers need to simultaneously interface with multiple model APIs from different vendors or of different types in various business applications, such as text generation, image generation, code understanding, and speech recognition. In the actual implementation of AI applications, a complete business process often requires the sequential invocation of multiple models: first, an image understanding model identifies objects in the input image; then, a text generation model is used to write a description; and finally, a translation model is used to output multilingual versions. While this multi-model collaborative working mode can fully leverage the strengths of each model, it also brings significant challenges in integration and management.

[0003] Currently, the following problems exist in the actual management of multi-model API integration: Different model APIs have different calling methods, parameter formats, authentication mechanisms, and rate limits, requiring developers to write separate adaptation code for each model, resulting in high system integration complexity and long development cycles. Similar AI prompt templates and processing logic (skill assets) are frequently needed in the same or different workflows, but due to the lack of a unified management and retrieval mechanism, these assets are often repeatedly written or buried in historical logs, making them difficult to reuse effectively and resulting in a waste of human and computing resources.

[0004] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention

[0005] In view of this, the present invention provides a multi-model API integration management method and system based on deep learning to solve the aforementioned problems.

[0006] To solve the above problems, the specific technical solution adopted by the present invention is as follows:

[0007] According to one aspect of the present invention, a multi-model API integration management method based on deep learning is provided, comprising the following steps:

[0008] S1. Based on pre-built cloud storage space, collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows to generate an AI prompt word template library and a skill asset library;

[0009] S2. Obtain the request data sent by the business application, and use the AI ​​prompt word template library and skill asset library to optimize the request data to obtain optimized request data; wherein, the optimization process is an optimization of template selection and context reconstruction based on the maximum boundary relevance quantum heuristic.

[0010] S3. Based on the deep reinforcement learning routing model and combined with the optimized request data, perform state evaluation of multiple business models to determine the target business model, and distribute the optimized request data to the target business model to perform inference operations.

[0011] S4. Obtain the inference results and performance metrics generated during the execution of the target business model in real time, and send the inference results and performance metrics back to the cloud storage space;

[0012] S5. Utilize the returned inference results and performance metrics to evaluate the execution effect of the target business model, and update the AI ​​prompt word template library and skill asset library based on the effect evaluation results to achieve the integration and optimization of multiple business models.

[0013] Preferably, the step of acquiring the request data sent by the business application and optimizing the request data using the AI ​​prompt word template library and skill asset library to obtain optimized request data includes the following steps:

[0014] S21. Based on the pre-deployed API gateway, obtain the request data sent by the business application, and obtain the request semantic vector by parsing and semantically encoding the request data;

[0015] S22. Based on the request semantic vector and combined with quantum heuristic search, select several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and the skill asset library, respectively.

[0016] S23. Based on the maximum boundary relevance algorithm, perform multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and the candidate skill asset set to obtain the optimal AI prompt word template set and associated skill asset set.

[0017] S24. Using the optimal set of AI prompt word templates and the set of associated skill assets, the request data is reconstructed and parameters are injected to obtain optimized request data.

[0018] Preferably, the step of selecting several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and the skill asset library respectively based on the request semantic vector and combined with quantum heuristic search includes the following steps:

[0019] S221. Perform intent decomposition on the request semantic vector, identify all subtasks contained in the request and the dependencies between subtasks, and construct a user intent interaction graph based on the dependencies.

[0020] S222. Based on the pre-built template function graph and skill function graph, and combined with quantum heuristic search, search for the maximum embedding subgraph that matches the user intent interaction graph, and calculate the comprehensive matching score for each matching maximum embedding subgraph.

[0021] S223. Based on the comprehensive matching score, select the AI ​​prompt word templates and skill assets corresponding to the largest embedded subgraph in descending order to form an initial set of candidate AI prompt word templates and an initial set of candidate skill assets.

[0022] S224. Perform subtask coverage detection on the initial candidate AI prompt word template set and the initial candidate skill asset set respectively. If the detection is qualified, the initial candidate AI prompt word template set and the initial candidate skill asset set are used as the candidate AI prompt word template set and the candidate skill asset set. Otherwise, adopt the mapping completion strategy to complete the initial candidate AI prompt word template set and the initial candidate skill asset set to obtain the candidate AI prompt word template set and the candidate skill asset set.

[0023] Preferably, the step of searching for the maximum embedding subgraph that matches the user intent interaction graph based on the pre-constructed template function graph and skill function graph, combined with quantum heuristic search, and calculating the comprehensive matching score for each matching maximum embedding subgraph includes the following steps:

[0024] S2221. Perform node semantic association preprocessing on the user intent interaction graph, template function graph, and skill function graph, and bind corresponding semantic vectors to each subtask node and functional unit node;

[0025] S2222. Based on the bound semantic vector, a quantum heuristic search algorithm is used to search in parallel the maximum embedding subgraph isomorphic to the user intent interaction graph in the template function graph and the skill function graph.

[0026] S2223. For each maximum embedding subgraph found, calculate the comprehensive matching score of each maximum embedding subgraph using semantic vector cosine similarity.

[0027] Preferably, the method of using a quantum heuristic search algorithm based on bound semantic vectors to search in parallel within the template function graph and skill function graph for the largest embedding subgraph isomorphic to the user intent interaction graph includes the following steps:

[0028] S22221. Initialize the matching state and quantum heuristic search parameters, identify the subtask node with the highest connectivity in the user intent interaction graph, and use it as the starting point for matching;

[0029] S22222: Using the matching starting point as the center, a quantum superposition state expansion strategy is adopted to generate multiple candidate matching branches;

[0030] S22223. For each candidate matching branch, the cost value of the current partial matching scheme is calculated using a quantum heuristic cost evaluation function;

[0031] S22224. Based on the cost value of the current partial matching scheme, perform branch filtering and pruning to find the largest embedded subgraph that satisfies the nearest neighbor coupling constraint.

[0032] Preferably, the step of performing multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and candidate skill asset set based on the maximum boundary relevance algorithm to obtain the optimal AI prompt word template set and associated skill asset set includes the following steps:

[0033] S231. Construct a multi-dimensional feature scoring system, calculate the comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set, and calculate the function adaptation score for each skill asset in the candidate skill asset set.

[0034] S232. Calculate the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets, respectively.

[0035] S233. Based on the maximum boundary relevance algorithm, and combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy and cross-type complementarity, the optimal set of AI prompt word templates and the set of associated skill assets are selected iteratively.

[0036] Preferably, the construction of the multi-dimensional feature scoring system, which calculates a comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set, and calculates a function adaptation score for each skill asset in the candidate skill asset set, includes the following steps:

[0037] S2311. Extract the multidimensional original features of all candidate AI prompt word templates and candidate skill assets, and obtain normalized AI prompt word template features and normalized skill asset features by normalizing the multidimensional original features.

[0038] S2312. For each candidate AI prompt word template, use the normalized AI prompt word template features to calculate the semantic matching degree, historical success rate and resource efficiency respectively, and obtain the comprehensive relevance score by weighted summation based on preset weights.

[0039] S2313. For each candidate skill asset, use normalized skill asset characteristics to calculate functional coverage, resource utilization rate and collaborative compatibility respectively, and obtain the functional adaptation score by weighted summation based on preset weights.

[0040] Preferably, the steps of calculating the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets include the following steps:

[0041] S2321. For any two AI prompt word templates in the candidate AI prompt word template set, obtain their functional description embedding vectors respectively, and calculate the cosine similarity between the two as semantic redundancy.

[0042] S2322. For any two skill assets in the candidate skill asset set, obtain their semantic embedding vectors with input and output specifications respectively, and calculate the cosine similarity between the two as the functional redundancy.

[0043] S2323. For any candidate AI prompt word template and any candidate skill asset, obtain the output requirement embedding vector of the candidate AI prompt word template and the output capability embedding vector of the candidate skill asset, respectively, and calculate the cross-type complementarity between the candidate AI prompt word template and the candidate skill asset.

[0044] Preferably, the step of iteratively selecting the optimal AI prompt word template set and associated skill asset set based on the maximum boundary relevance algorithm, combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy, and cross-type complementarity, includes the following steps:

[0045] S2331. Initialize the selected template set and the skill asset set respectively, and configure the maximum number of iterations;

[0046] S2332. In each iteration, the maximum boundary relevance score of each unselected candidate AI prompt word template is calculated using the comprehensive relevance score, semantic redundancy, and cross-type complementarity; the maximum boundary relevance score of each unselected candidate skill asset is calculated using the functional adaptation score, functional redundancy, and cross-type complementarity.

[0047] S2333. Compare the maximum boundary relevance scores of all candidate AI prompt word templates and candidate skill assets, and select the element with the highest score; if the element is an AI prompt word template, add it to the selected template set, otherwise add it to the selected skill asset set and remove the element from the corresponding candidate set;

[0048] S2334. Determine whether the current iteration count has reached the maximum iteration count. If not, return to step S2332; otherwise, terminate the iteration. The final set of selected templates is taken as the optimal AI prompt word template set, and the set of selected skill assets is taken as the associated skill asset set.

[0049] According to another aspect of the present invention, a deep learning-based multi-model API integration management system is provided, the system comprising:

[0050] The data collection module is used to collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows based on pre-built cloud storage space, in order to generate an AI prompt word template library and a skill asset library.

[0051] The data optimization module is used to acquire request data sent by business applications and optimize the request data using an AI prompt word template library and a skill asset library to obtain optimized request data; wherein, the optimization process is an optimization based on the maximum boundary relevance of the execution quantum heuristic template selection and context reconstruction.

[0052] The data inference module is used to evaluate the state of multiple business models based on a deep reinforcement learning routing model and combined with optimized request data, in order to determine the target business model and distribute the optimized request data to the target business model to perform inference operations.

[0053] The data feedback module is used to acquire the inference results and performance indicators generated during the execution of the target business model in real time, and to send the inference results and performance indicators back to the cloud storage space.

[0054] The data update module is used to evaluate the execution effect of the target business model using the returned inference results and performance indicators, and to update the AI ​​prompt word template library and skill asset library based on the effect evaluation results, so as to achieve the integration and optimization of multiple business models.

[0055] The beneficial effects of this invention are as follows:

[0056] 1. This invention achieves standardized accumulation of AI prompt word templates and skill assets by constructing a unified cloud storage space. Combined with quantum heuristic template selection and context reconstruction based on maximum boundary relevance, it significantly reduces the complexity of multi-model API integration and improves resource reuse. At the same time, dynamic status evaluation and intelligent distribution, along with closed-loop feedback of execution results and performance indicators, can continuously optimize the template library and asset library. Thus, based on clear skill asset management and automated integration process, it achieves high efficiency, low cost, and adaptive optimization of multi-business model calls, and has good scalability and practical value.

[0057] 2. This invention parses request data into semantic vectors and combines them with quantum heuristic search to quickly filter out candidate resources that match user intent from massive templates and assets. Then, it uses the maximum boundary relevance algorithm to perform multi-dimensional feature scoring and redundancy elimination. Through iterative selection, it generates the optimal AI prompt word template and associated skill asset set, realizing the automated and intelligent combination and optimization of AI prompt word template and skill assets. This significantly reduces the workload of manually writing prompt words and arranging skills, improves resource reuse, avoids functional duplication or conflict, and ensures that the generated request data not only matches user intent but also has good execution efficiency and scalability. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0059] Figure 1 This is a flowchart of a multi-model API integration management method based on deep learning according to an embodiment of the present invention;

[0060] Figure 2 This is a principle block diagram of a deep learning-based multi-model API interface management system according to an embodiment of the present invention.

[0061] In the picture:

[0062] 1. Data collection module; 2. Data optimization module; 3. Data inference module; 4. Data feedback module; 5. Data update module. Detailed Implementation

[0063] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0064] According to an embodiment of the present invention, a method and system for managing multi-model API integration based on deep learning is provided.

[0065] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, according to an embodiment of the present invention, a multi-model API integration management method based on deep learning is provided, comprising the following steps:

[0066] S1. Based on pre-built cloud storage space, collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows to generate an AI prompt word template library and a skill asset library;

[0067] It should be noted that building a cloud storage space requires creating an independent storage namespace in a public or private cloud environment. This storage space should have the following characteristics: adopting a distributed object storage architecture, supporting horizontal scaling, and dynamically increasing capacity according to business needs, meeting initial asset storage requirements of at least 2TB. Logical folders should be created according to asset type (AI prompt word templates, skill assets), workflow ID, creation time, and other dimensions.

[0068] The collection of AI prompt templates involves the front-end calling the asset upload API when users save or export prompts in the visual workflow editor. This submits the prompt text and its metadata, such as creator, project, usage count, and performance rating, to cloud storage. An interceptor is embedded in the workflow engine's execution nodes. Whenever an AI model API is called, the actual prompt content used is automatically recorded and stored as a candidate template in a temporary buffer. After deduplication and anonymization, administrators or an automated review mechanism decide whether to include it as a standard template.

[0069] Skill assets include reusable code functions, prompt chains, and external service call configurations. Each skill asset describes its input parameters, output format, dependencies, and call examples in JSON format. Skill assets are collected by prompting the user to save a new skill operation as a reusable skill asset when it is temporarily defined during workflow execution, and suggesting its addition to the skill asset repository.

[0070] Furthermore, both AI prompt templates and skill assets undergo standardization before being stored in cloud storage, forming a unified internal representation. AI prompt templates use Mustache or Liquid template syntax, employing double curly braces {{variable name}} to identify placeholders. They also include a functional description, applicable AI model types, maximum token limit, and recommended parameters. Skill assets use JSON Schema to define input and output and OpenAPI specifications to describe the calling method. They also include metadata such as the skill's execution timeout, concurrency limits, and required permissions.

[0071] In addition, for each AI prompt word template, its functional description text, such as the template's annotation, is taken as input; for each skill asset, its interface description is taken as input. A pre-trained Sentence-BERT (an AI model for understanding the overall meaning of sentences) is invoked to generate fixed-dimensional semantic embedding vectors, which are stored in a dedicated vector database to support subsequent semantic retrieval and clustering.

[0072] S2. Obtain the request data sent by the business application, and use the AI ​​prompt word template library and skill asset library to optimize the request data to obtain optimized request data; wherein, the optimization process is an optimization of template selection and context reconstruction based on the maximum boundary relevance quantum heuristic.

[0073] In a preferred embodiment, the step of acquiring the request data sent by the business application and optimizing the request data using the AI ​​prompt word template library and skill asset library to obtain optimized request data includes the following steps:

[0074] S21. Based on the pre-deployed API gateway, obtain the request data sent by the business application, and obtain the request semantic vector by parsing and semantically encoding the request data;

[0075] It's important to note that the API gateway, serving as the unified entry point for all business applications to access multi-model APIs, is deployed between the business layer and the model layer. When business applications, such as intelligent customer service or content generation platforms, send HTTP / gRPC requests, the API gateway first parses the request headers, request body, and query parameters, extracting core content such as the user's original text, image URLs, or audio streams. It can also perform format checks on the extracted content, such as removing whitespace characters, truncating excessively long text, Base64 decoding images, or validating URLs. If the request contains a session ID, the gateway reads the historical interaction records of that session from the cache and appends them to the current request to form a complete dialogue context.

[0076] The parsed request data is typically in text format. Multimodal requests are first converted into text descriptions and then fed into the semantic encoding module. The core of this module is a pre-trained deep semantic encoder, which generates a request semantic vector through semantic encoding. This process includes the following steps: The request text is segmented, stop words are removed, and lowercase letters are standardized, then truncated to the maximum length supported by the encoder. The pre-processed text is mapped to a dense vector of fixed dimensions, such as 384 or 768 dimensions. Each dimension of this vector represents the strength of a certain semantic feature, capturing high-level semantic information such as the request's intent, topic, and sentiment. The generated original embedding vector is then L2 normalized to ensure a vector magnitude of 1. For identical or highly similar requests, such as repeated queries within the same session, the generated semantic vector can be cached with a TTL (e.g., 5 minutes). Subsequent identical requests will directly hit the cache, avoiding repeated encoding and reducing latency. Finally, the request semantic vector is output.

[0077] S22. Based on the request semantic vector and combined with quantum heuristic search, select several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and the skill asset library, respectively.

[0078] As a preferred implementation, the step of selecting several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and the skill asset library respectively based on request semantic vectors and combined with quantum heuristic search includes the following steps:

[0079] S221. Perform intent decomposition on the request semantic vector, identify all subtasks contained in the request and the dependencies between subtasks, and construct a user intent interaction graph based on the dependencies.

[0080] It should be noted that the request semantic vector already contains the overall semantics of the user's needs, but in order to match the fine-grained components in the function graph, it needs to be broken down into sub-tasks. A predefined vector prototype library of common task types is used, such as text generation, translation, summarization, image generation, and code analysis. The cosine similarity between the semantic vector and each prototype is calculated, and task types with similarity exceeding a threshold (e.g., exceeding 0.6) are selected as initial candidates. The original request text and the candidate task list are received, and an adjacency matrix is ​​output. This adjacency matrix indicates whether there is a dependency between each task pair. Using sub-tasks as nodes and dependencies as directed edges, a directed acyclic graph is constructed as the user intent interaction graph, and a semantic embedding vector is attached to each node.

[0081] S222. Based on the pre-built template function graph and skill function graph, and combined with quantum heuristic search, search for the maximum embedding subgraph that matches the user intent interaction graph, and calculate the comprehensive matching score for each matching maximum embedding subgraph.

[0082] In a preferred embodiment, the step of searching for the maximum embedding subgraph that matches the user intent interaction graph based on the pre-constructed template function graph and skill function graph, combined with quantum heuristic search, and calculating the comprehensive matching score for each matching maximum embedding subgraph includes the following steps:

[0083] S2221. Perform node semantic association preprocessing on the user intent interaction graph, template function graph, and skill function graph, and bind corresponding semantic vectors to each subtask node and functional unit node;

[0084] It should be noted that the nodes of the template function graph are AI prompt word templates. Node attributes include a function description embedding vector and a comprehensive relevance score. This function description embedding vector is obtained by Sentence-BERT encoding of the function description text of the AI ​​prompt word template. Edges represent whether two AI prompt word templates are frequently used sequentially or in combination in historical workflows; the edge weights are co-occurrence frequency or mutual information. The nodes of the skill function graph are skill assets, with attributes including input / output type embedding vectors and resource utilization. Edges represent data flow dependencies or call sequence relationships. Both graphs are stored in a database that supports graph structures and vector retrieval.

[0085] Specifically, node semantic association preprocessing involves establishing candidate mapping relationships between intent nodes and functional nodes before the formal search. For each subtask node in the user intent interaction graph, semantic matching is performed with all nodes in the template functional graph, cosine similarity is calculated, and only node pairs with similarity higher than a threshold are retained, for example, a threshold of 0.65. These matched node pairs constitute the candidate physical node set of the intent node in the template graph.

[0086] When binding a corresponding semantic vector to each subtask node and functional unit node, the semantic vector can be an embedding of its functional description text.

[0087] S2222. Based on the bound semantic vector, a quantum heuristic search algorithm is used to search in parallel the maximum embedding subgraph isomorphic to the user intent interaction graph in the template function graph and the skill function graph.

[0088] As a preferred embodiment, the method of using a quantum heuristic search algorithm based on bound semantic vectors to search in parallel within the template function graph and the skill function graph for the largest embedding subgraph isomorphic to the user intent interaction graph includes the following steps:

[0089] S22221. Initialize the matching state and quantum heuristic search parameters, identify the subtask node with the highest connectivity in the user intent interaction graph, and use it as the starting point for matching;

[0090] It should be noted that before starting the search, independent search contexts are established for the template function graph and the skill function graph, respectively. Each context contains a partial matching state, which records the currently matched set of user intent nodes, the corresponding set of function nodes, the node mapping table, and the set of matched edges. Simultaneously, a set of quantum heuristic search parameters is initialized: the initial temperature of simulated annealing. (Typically 1.0-10.0, adjustable according to search space size), Termination temperature (e.g., 0.01), cooling rate (e.g., 0.95-0.99), number of iterations at each temperature (e.g., 20-50), beam width (usually set to 4-8), and the weighting coefficients of each component in the cost function.

[0091] To reduce the search space, the nodes in the user intent interaction graph are pre-sorted, and the degree of each node is calculated (the sum of in-degree and out-degree in a directed graph). The node with the highest degree is selected as the starting node. If multiple nodes have the same highest degree, the average semantic similarity between these nodes and their candidate functional node set is further calculated, and the node with the highest average similarity is selected as the starting point. After the starting point is determined, all functional nodes with a semantic similarity exceeding a preset threshold (e.g., 0.65) with the starting node are identified from both the template functional graph and the skill functional graph. An independent initial branch is created for each such candidate functional node, and the initial partial matching state of each branch contains only single-element mapping pairs from the starting node to that candidate functional node. If the number of candidate nodes is too large, only the nodes with the highest similarity are retained. Select 1 candidate, prune the rest. At this point, the initialization phase is complete, and the process moves to the expansion iteration centered on the matching starting point.

[0092] S22222: Using the matching starting point as the center, a quantum superposition state expansion strategy is adopted to generate multiple candidate matching branches;

[0093] It should be noted that the core idea of ​​the quantum superposition expansion strategy is to simulate the superposition property in quantum computing, that is, to explore multiple possible matching expansion paths in parallel at the same time. Specifically, in this invention, a branch set, i.e., the current superposition state, is maintained, and each branch represents a partial node mapping scheme from the user intent interaction graph to the functional graph. In each round of expansion, for each branch in the current branch set, all intent nodes that are adjacent to the currently matched intent nodes but have not yet been matched are identified, forming a set of nodes to be expanded. For each node in the set of nodes to be expanded, candidate functional nodes that can form reasonable edge mappings with the functional nodes that are matched in the current branch are selected from the candidate mapping table generated by preprocessing.

[0094] Here, "reasonable edge mapping" refers to the following: if an edge exists in the intent graph from a matched node to the current node, then there must be a direct edge or a path of no more than a preset length (e.g., 2 hops) between the candidate functional nodes of the current node and the corresponding functional nodes of the matched node in the functional graph; if an edge exists in the intent graph from the current node to a matched node, then there must also be a direct edge or a short path between the candidate functional nodes of the current node and the corresponding functional nodes of the matched node. For each candidate functional node that meets the conditions, a new branch is generated, which adds the mapping from the current node to the candidate functional node and the corresponding edge mapping to the parent branch. This process is similar to the splitting of a quantum superposition state: a branch can split into multiple sub-branches simultaneously, corresponding to multiple possible expansion choices. At the same time, in order to prevent the number of branches from exponentially exponentially increasing, only the top few candidates with the highest semantic similarity (e.g., 3-5) need to be retained when each node is expanded. In this way, each current branch can generate multiple sub-branches, all branches are expanded simultaneously, and all the sub-branches obtained after expansion are gathered together to form a new round of iterative superposition state, that is, multiple candidate matching branches are generated. Ultimately, all the new branches generated by the splits come together to form a new superposition state.

[0095] S22223. For each candidate matching branch, the cost value of the current partial matching scheme is calculated using a quantum heuristic cost evaluation function;

[0096] Specifically, the cost function includes: the sum of semantic cosine distances between matched nodes and their corresponding subtasks, the structural consistency loss between matched edges and corresponding edges in the user intent interaction graph, and the estimated minimum matching cost for unmatched subtask nodes; the lower the cost value, the closer the matching scheme is to the ideal solution. The expression is:

[0097] ;

[0098] In the formula, For the preset weighting coefficients, satisfy The value can be 1. It can also be dynamically adjusted according to the actual scenario. This is the sum of the semantic cosine distances between the matched nodes and their corresponding subtasks. The structural consistency loss is defined as the loss between the matched edges and the corresponding edges in the user intent interaction graph. The estimated minimum matching cost for unmatched subtask nodes.

[0099] S22224. Based on the cost value of the current partial matching scheme, perform branch filtering and pruning to find the largest embedded subgraph that satisfies the nearest neighbor coupling constraint.

[0100] Specifically, after completing the cost calculation, the cost values ​​for each of the current branches are obtained. Sort all branches in ascending order of cost; lower cost indicates higher matching quality. Then, use a beam search strategy to prune the branches, retaining only the branches with the lowest cost. One branch, The preset beam width is typically 4-8, and other branches are discarded. This pruning operation limits the search space to the most promising region, avoiding exponential explosion and allowing the algorithm to complete the search in polynomial time.

[0101] Among these, the nearest-neighbor coupling constraint ensures that the actual coupling distance between the finally selected AI prompt word templates and skill assets on the functional graph does not exceed a preset threshold, thereby guaranteeing their ability to work collaboratively. Specifically, in each round of screening and pruning, a constraint check must be performed on each branch:

[0102] For any edge that has been matched in the user intent interaction graph, the shortest path length of its corresponding functional node pair in the functional graph is the coupling distance. The requirement is to determine the coupling distance for all matched edges. ,in, The maximum allowed coupling distance is preset, usually taken as 2 or 3; if there is any matched edge in a branch such that If a branch violates the nearest neighbor coupling constraint, it is immediately marked as invalid and pruned. For branches that are not yet fully matched, if all matched edges satisfy the constraints, but future violations may occur due to the addition of new nodes, the system does not prune them prematurely, but postpones constraint checks to subsequent expansions. However, to accelerate pruning, a lower bound estimation can be used: for unmatched neighbor nodes, calculate the minimum possible coupling distance between all their candidate functional nodes and the currently matched nodes; if this minimum distance exceeds... Then you can prune the branches in advance.

[0103] It should be noted that the search process repeats the expansion, evaluation, and filtering steps described above until one of the following termination conditions is met: the cost value of the optimal branch no longer decreases over multiple consecutive rounds (e.g., 5 rounds); all branches have completely matched all nodes in the user intent interaction graph, i.e., a fully covered subgraph has been found. When the search terminates, the subgraph that satisfies the following conditions is selected as the final result from all historical branches: it covers the largest number of user intent nodes; if the number of covered nodes is the same, the subgraph with the smallest cost value is selected; and the nearest neighbor coupling constraint must be satisfied.

[0104] S2223. For each maximum embedding subgraph found, calculate the comprehensive matching score of each maximum embedding subgraph using semantic vector cosine similarity.

[0105] Specifically, for each candidate maximum embedding subgraph found through quantum heuristic search, a comprehensive matching score needs to be calculated to measure the overall coverage and matching quality of the user intent. This score is obtained by weighted summation of three sub-items: the first is the node semantic matching degree, which calculates the cosine similarity of the semantic vectors of each matched intent node and its corresponding functional node in the subgraph, and then takes the average of all nodes. This value reflects the degree to which the subgraph fits the user's subtask at the functional description level; the second is the edge structure matching degree, which checks whether there is a direct edge between corresponding node pairs in the functional graph for each matched intent edge in the subgraph. If there is, the score is 1; otherwise, a direct edge of no more than a preset length is required. The score for a path is reduced by its length; if there is no path or the path length exceeds the threshold, the score is 0. Then, the average score of all matched edges is calculated. The third item is the subgraph size score, which is the proportion of intent nodes covered by the subgraph to the total number of nodes in the user intent interaction graph. This value encourages the selection of subgraphs with more comprehensive coverage. When weighted and summed, the three sub-items can take values ​​of 0.5, 0.3, and 0.2 respectively.

[0106] S223. Based on the comprehensive matching score, select the AI ​​prompt word templates and skill assets corresponding to the largest embedded subgraph in descending order to form an initial set of candidate AI prompt word templates and an initial set of candidate skill assets.

[0107] It should be noted that the preset number of filters can be set to 5 or 10, etc. For each selected subgraph, the AI ​​prompt word templates and skill assets contained in its node mapping are extracted and stored in two temporary sets respectively. Since different subgraphs may contain the same templates or assets, deduplication is required during merging. Finally, the initial candidate AI prompt word template set and the initial candidate skill asset set are obtained.

[0108] S224. Perform subtask coverage detection on the initial candidate AI prompt word template set and the initial candidate skill asset set respectively. If the detection is qualified, the initial candidate AI prompt word template set and the initial candidate skill asset set are used as the candidate AI prompt word template set and the candidate skill asset set. Otherwise, adopt the mapping completion strategy to complete the initial candidate AI prompt word template set and the initial candidate skill asset set to obtain the candidate AI prompt word template set and the candidate skill asset set.

[0109] It should be noted that for each subtask node, if at least one candidate template or asset corresponding to it exists in the initial candidate AI prompt word template set and the initial candidate skill asset set, then the node is considered to have been covered. If all nodes are covered, the detection is successful, and the initial candidate AI prompt word template set and the initial candidate skill asset set are directly output as the final candidate set. If there are uncovered subtask nodes, a mapping completion strategy is initiated. This strategy draws on the completion idea in qubit mapping: starting from the uncovered nodes, the weighted semantic distance between each uncovered node and the elements in the selected set is calculated. Each time, the uncovered node that minimizes the weighted distance and its best-matching functional node are selected and added to the candidate set. This process is repeated until all subtask nodes are covered; finally, a candidate AI prompt word template set and a candidate skill asset set that completely cover all subtasks are obtained.

[0110] S23. Based on the maximum boundary relevance algorithm, perform multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and the candidate skill asset set to obtain the optimal AI prompt word template set and associated skill asset set.

[0111] As a preferred implementation, the step of performing multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and candidate skill asset set based on the maximum boundary relevance algorithm to obtain the optimal AI prompt word template set and associated skill asset set includes the following steps:

[0112] S231. Construct a multi-dimensional feature scoring system, calculate a comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set, and calculate a function adaptation score for each skill asset in the candidate skill asset set; the comprehensive relevance score includes a weighted sum of three dimensions: semantic matching degree, historical success rate, and resource efficiency; the function adaptation score includes a weighted sum of three dimensions: function coverage, resource utilization rate, and collaborative compatibility.

[0113] As a preferred implementation, the construction of a multi-dimensional feature scoring system, which calculates a comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set and a function adaptation score for each skill asset in the candidate skill asset set, includes the following steps:

[0114] S2311. Extract the multidimensional original features of all candidate AI prompt word templates and candidate skill assets, and obtain normalized AI prompt word template features and normalized skill asset features by normalizing the multidimensional original features.

[0115] It should be noted that the multidimensional original features of candidate AI prompt word templates include, but are not limited to: the functional description embedding vector of the candidate AI prompt word template, historical call success rate, historical average response latency, historical average token consumption, template length, and template complexity score. The multidimensional original features of candidate skill assets include: the input / output type embedding vector of the skill asset, resource utilization rate, historical call success rate, average execution latency, the number of external services the asset depends on, and compatibility tags between the asset and common task types.

[0116] Among them, the normalization process is preferably minimum-maximum normalization: for a certain feature Calculate its minimum value among all candidate elements. and maximum value Then, for each candidate element, this feature value... calculate This maps the values ​​to the [0,1] interval.

[0117] S2312. For each candidate AI prompt word template, use the normalized AI prompt word template features to calculate the semantic matching degree, historical success rate and resource efficiency respectively, and obtain the comprehensive relevance score by weighted summation based on preset weights.

[0118] It should be noted that the semantic matching score directly uses the cosine similarity between the embedded vector and the requested semantic vector, which is a functional description of the candidate AI prompt word template. Since the embedded vector has not undergone minimum-maximum scaling in normalization, this similarity is directly used as the semantic matching score, with a value ranging from [value missing]. However, in practical applications, it is usually a positive value. The historical success rate is read from the template's metadata; this value already falls within the [0,1] range and requires no further processing. Resource efficiency comprehensively considers the historical average response latency and average token consumption of the candidate AI prompt word template. The resource efficiency score also ranges from [0,1]. After obtaining the scores of the three dimensions, they are weighted and summed according to preset weights, such as 0.5; 0.3; 0.2.

[0119] S2313. For each candidate skill asset, use normalized skill asset characteristics to calculate functional coverage, resource utilization rate and collaborative compatibility respectively, and obtain the functional adaptation score by weighted summation based on preset weights.

[0120] It should be noted that functional coverage measures which subtasks in the user intent interaction graph the output capability of a skill asset can cover that are not yet covered by other assets. Specifically, the cosine similarity is calculated between the asset's output capability description embedding vector and the functional description embedding vector of each uncovered subtask, and the maximum value is taken as the functional coverage score. If an asset can cover multiple subtasks, only the highest score is used. Resource utilization comprehensively considers the computational resources required for asset execution and the expected execution time. These original features have been normalized in S2311, but since resource utilization is a cost-based indicator (lower is better), the resource utilization score is taken as... ,in, The normalized comprehensive value represents resource consumption. Collaborative compatibility measures the degree of integration between the skill asset and the selected template set (during MMR iteration) or other assets. During calculation, the input interface embedding vector of the skill asset is matched with the output requirement embedding vector of the selected AI prompt word templates, while also considering data flow compatibility between assets. The collaborative compatibility score can be obtained by: traversing the selected AI prompt word template set, calculating the cosine similarity between the output requirement of each AI prompt word template and the current asset input, and taking the average; then combining this with the interface matching degree between the asset and selected assets, such as the semantic similarity of output / input types. A higher final score indicates that the skill asset is more easily integrated into the currently selected workflow. After obtaining the scores in the three dimensions, a weighted sum is performed according to preset weight values, such as 0.5, 0.3, and 0.2.

[0121] S232. Calculate the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets, respectively.

[0122] As a preferred embodiment, the steps of calculating the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets include the following steps:

[0123] S2321. For any two AI prompt word templates in the candidate AI prompt word template set, obtain their functional description embedding vectors respectively, and calculate the cosine similarity between the two as semantic redundancy.

[0124] It should be noted that the pre-calculated functional description embedding vector for each candidate AI prompt word template is retrieved from cloud storage or cache. This embedding vector is obtained by encoding the functional description text of the template using a deep semantic encoder such as Sentence-BERT and is stored in the template's metadata. For any two different AI prompt word templates in the candidate set, their embedding vectors are obtained separately, and then their cosine similarity is calculated.

[0125] S2322. For any two skill assets in the candidate skill asset set, obtain their semantic embedding vectors with input and output specifications respectively, and calculate the cosine similarity between the two as the functional redundancy.

[0126] It should be noted that each skill asset, such as a code function, a Prompt chain, or an external service call, has already had a semantic embedding vector describing its input and output specifications generated during registration. This embedding vector can be obtained by encoding the asset's interface description text, or by separately encoding the input parameter types and output return value types and then concatenating them. For any two different assets in the candidate skill asset set, their respective input and output specification embedding vectors are obtained, and then cosine similarity is calculated.

[0127] S2323. For any candidate AI prompt word template and any candidate skill asset, obtain the output requirement embedding vector of the candidate AI prompt word template and the output capability embedding vector of the candidate skill asset respectively, and calculate the cross-type complementarity between the candidate AI prompt word template and the candidate skill asset.

[0128] Specifically, AI prompt word templates and skill assets belong to different types of resources. There is no redundancy between them; rather, they are complementary. An AI prompt word template often requires certain input data or intermediate results, while a skill asset can generate these data or results. Only through their combined use can a complete task be accomplished. Therefore, this invention defines a cross-type complementarity to quantify the degree of fit of this collaboration. For any candidate AI prompt word template and any candidate skill asset, two types of embedding vectors are obtained: first, the output requirement embedding vector of the AI ​​prompt word template, which describes what kind of output the template expects after execution or what format of input data it requires; and second, the output capability embedding vector of the skill asset, which describes what kind of output result the asset can provide after execution. The cosine similarity between the two is then calculated as the cross-type complementarity.

[0129] S233. Based on the maximum boundary relevance algorithm, and combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy and cross-type complementarity, the optimal set of AI prompt word templates and the set of associated skill assets are selected iteratively.

[0130] As a preferred implementation, the step of iteratively selecting the optimal AI prompt word template set and associated skill asset set based on the maximum boundary relevance algorithm, combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy, and cross-type complementarity, includes the following steps:

[0131] S2331. Initialize the selected template set and the skill asset set respectively, and configure the maximum number of iterations;

[0132] It should be noted that before starting the Maximum Boundary Relevance (MMR) iterative selection, two empty sets need to be created: a set of selected templates and a set of selected skill assets. These sets will be used to store the optimal AI prompt word template and associated skill asset selected in this iteration, respectively. Additionally, a maximum number of iterations should be set. This parameter controls the upper limit of the selection process, preventing infinite loops when it is impossible to cover all subtasks or when resources are insufficient. The value range is 5-20, and it can be dynamically adjusted according to the size of the candidate set and business needs. For example, when the number of candidate templates is 10, It can be set to 5-8.

[0133] In addition, a subtask coverage termination condition can be optionally configured: if the number of subtask nodes in the user intent interaction graph covered by the selected template and asset has reached a certain proportion of the total number of nodes, such as 90%, the iteration can be terminated early.

[0134] S2332. In each iteration, the maximum boundary relevance score of each unselected candidate AI prompt word template is calculated using the comprehensive relevance score, semantic redundancy, and cross-type complementarity; the maximum boundary relevance score of each unselected candidate skill asset is calculated using the functional adaptation score, functional redundancy, and cross-type complementarity.

[0135] Specifically, for each candidate AI prompt word template that has not yet been selected, its own comprehensive relevance score is considered first. The AI ​​prompt word template is then compared with all elements in the current selected set one by one: if compared with selected templates, the cosine similarity of the two functional description embedding vectors is calculated as semantic redundancy; if compared with selected skill assets, the inverse value of the complementarity between the output demand of the AI ​​prompt word template and the output capability of the asset is calculated. By taking the maximum redundancy penalty value obtained from the above comparisons, and using a preset balance coefficient to weight and combine the comprehensive relevance score and the maximum redundancy penalty, and then adding the sum of the cross-type complementarity between the AI ​​prompt word template and all selected skill assets multiplied by a reward coefficient, the maximum boundary relevance score of the candidate template in this round of iteration is finally obtained.

[0136] Similarly, for each unselected candidate skill asset, its functional fit score is first used as a positive term to calculate the redundancy of the candidate skill asset with all elements in the selected set: when compared with selected assets, the functional redundancy is taken; when compared with selected AI prompt word templates, the inverse value of the complementarity between the skill asset's output capability and the AI ​​prompt word template's output requirement is taken, and the maximum value is taken as the redundancy penalty in the same way. Then, the functional fit score and redundancy penalty are weighted by a balancing coefficient, and the sum of the cross-type complementarity between the skill asset and all selected AI prompt word templates is multiplied by the reward coefficient to obtain the maximum boundary relevance score of the candidate skill asset. In each iteration, all candidate AI prompt word templates and candidate skill assets will obtain a maximum boundary relevance score that integrates their own quality, the degree of overlap with selected resources, and the ability to collaborate with dissimilar resources.

[0137] S2333. Compare the maximum boundary relevance scores of all candidate AI prompt word templates and candidate skill assets, and select the element with the highest score; if the element is an AI prompt word template, add it to the selected template set, otherwise add it to the selected skill asset set and remove the element from the corresponding candidate set;

[0138] Specifically, the maximum boundary relevance scores of all candidate AI prompt word templates calculated in this round are compared with the maximum boundary relevance scores of all candidate skill assets to identify the element with the highest score. If the element is an AI prompt word template, it is removed from the candidate template set and added to the selected template set; if the element is a skill asset, it is removed from the candidate skill asset set and added to the selected skill asset set. By selecting only one optimal resource in each round, the highest quality AI prompt word template and skill asset combination with the least internal redundancy is gradually constructed.

[0139] S2334. Determine whether the current iteration count has reached the maximum iteration count. If not, return to step S2332; otherwise, terminate the iteration. The final set of selected templates is taken as the optimal AI prompt word template set, and the set of selected skill assets is taken as the associated skill asset set.

[0140] Specifically, after each successful selection of an element, the current iteration count is incremented by one and then compared with the preset maximum iteration count. If the current count has not yet reached the maximum value, the process returns to step S2332 to continue the next round of calculating and selecting the maximum boundary relevance score for the remaining candidate resources; if the maximum value has been reached, the iteration process terminates. After the iteration is complete, the currently selected AI prompt word template set is output as the optimal AI prompt word template set, and the currently selected skill asset set is output as the associated skill asset set, for use in subsequent context reconstruction and parameter injection steps.

[0141] S24. Using the optimal set of AI prompt word templates and the set of associated skill assets, the request data is reconstructed and parameters are injected to obtain optimized request data.

[0142] Specifically, the selected optimal AI prompt word template is filled with the corresponding content extracted from the original request data and the output of the associated skill assets according to the placeholders defined by it. At the same time, the calling method of the associated skill assets is injected into the request context according to the parameter format required by the AI ​​prompt word template, forming standardized request data containing complete prompt words and executable skill instructions. This data can be directly used for subsequent routing model distribution to specific large model APIs for execution.

[0143] S3. Based on the deep reinforcement learning routing model and combined with the optimized request data, perform state evaluation of multiple business models to determine the target business model, and distribute the optimized request data to the target business model to perform inference operations.

[0144] It should be noted that the generated optimized request data is input into a pre-trained deep reinforcement learning routing model. This deep reinforcement learning routing model comprehensively considers the current real-time performance profile of each available business model API, including response latency, call cost, load, and the historical performance of the business model on similar tasks. It scores and ranks the expected performance of each business model in executing the request, and selects one or more models with the highest comprehensive score as the target model. Subsequently, the unified API adaptation layer automatically completes key switching, parameter format conversion, and retry degradation operations, and securely and efficiently distributes the optimized request data to the selected target business model for inference execution. At the same time, the routing decision information of this call is recorded for subsequent feedback.

[0145] The pre-trained deep reinforcement learning routing model employs a policy network-based value function architecture. Its input features include: the semantic embedding vector of the optimized request data; the real-time performance profile of each candidate business model API; and the constraints of the request itself, including maximum budget, longest waiting time, and minimum quality requirements. The deep reinforcement learning routing model internally incorporates an interpretable attention mechanism that outputs the contribution weight of each input feature to the final routing decision. During the training phase, historical request-routing-feedback data is used for offline training via a proximal policy optimization algorithm, and online fine-tuning is performed during continuous operation using the reward value from step S5.

[0146] Business models refer to the APIs of various third-party or self-developed AI models, such as large language models, image generation models, and multimodal models. Each business model provides services to the outside world through a standardized RESTful API or gRPC interface. Its input and output formats, authentication methods, rate limits, and other metadata have been pre-registered in the API gateway.

[0147] S4. Obtain the inference results and performance metrics generated during the execution of the target business model in real time, and send the inference results and performance metrics back to the cloud storage space;

[0148] It should be noted that during the inference process of the target business model, the generated results returned by the model and the performance metrics of this call are captured in real time through asynchronous listening or callback mechanisms. Performance metrics include total time consumption, token consumption, and whether rate limiting or errors are triggered. After the call is completed, the inference results, performance metrics, and metadata such as the AI ​​prompt word template ID, skill asset ID, and routing decision information associated with this request are encapsulated together and written to the corresponding asset record in the cloud storage space through a unified storage interface. At the same time, the usage frequency, average latency, success rate, and other statistical fields of the AI ​​prompt word template and skill asset are updated to provide a data foundation for subsequent scoring and optimization.

[0149] S5. Utilize the returned inference results and performance metrics to evaluate the execution effect of the target business model, and update the AI ​​prompt word template library and skill asset library based on the effect evaluation results to achieve the integration and optimization of multiple business models.

[0150] It should be noted that the inference results and performance metrics are periodically or in real-time retrieved from cloud storage to quantify and score the execution results. A comprehensive reward value is generated by combining cost and latency data from the performance metrics. This comprehensive reward value serves two purposes: firstly, it updates the policy network of the deep reinforcement learning routing model through incremental learning, enabling it to make better routing choices in the future; secondly, it adjusts the comprehensive relevance score of the corresponding AI prompt word template and the functional adaptation score of the skill asset based on the reward value. For example, it increases the weight of historical success rates for templates with good performance and triggers updates to the metadata in the AI ​​prompt word template library and skill asset library. Furthermore, high-performing prompt word fragments or skill invocation patterns from the current execution are extracted as new AI prompt word templates or skill asset candidates, and added to the library after review. This enables the continuous evolution of the AI ​​prompt word template library and skill asset library, and the self-optimization of multi-model integration solutions.

[0151] like Figure 2 As shown, according to an embodiment of the present invention, a multi-model API integration management system based on deep learning is provided, the system comprising:

[0152] Data collection module 1 is used to collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows based on pre-built cloud storage space, in order to generate an AI prompt word template library and a skill asset library;

[0153] Data optimization module 2 is used to acquire request data sent by business applications and optimize the request data using AI prompt word template library and skill asset library to obtain optimized request data; wherein, the optimization process is an optimization based on the maximum boundary relevance of the execution quantum heuristic template selection and context reconstruction.

[0154] Data inference module 3 is used to evaluate the status of multiple business models based on a deep reinforcement learning routing model and combined with optimized request data, so as to determine the target business model and distribute the optimized request data to the target business model to perform inference operations.

[0155] Data feedback module 4 is used to obtain the inference results and performance indicators generated during the execution of the target business model in real time, and to send the inference results and performance indicators back to the cloud storage space.

[0156] Data update module 5 is used to evaluate the execution effect of the target business model using the returned inference results and performance indicators, and update the AI ​​prompt word template library and skill asset library based on the effect evaluation results to achieve the integration and optimization of multiple business models.

[0157] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. 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, optical storage, etc.) containing computer-usable program code.

[0158] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A multi-model API integration management method based on deep learning, characterized in that, Includes the following steps: S1. Based on pre-built cloud storage space, collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows to generate an AI prompt word template library and a skill asset library; S2. Obtain the request data sent by the business application, and use the AI ​​prompt word template library and skill asset library to optimize the request data to obtain optimized request data; wherein, the optimization process is an optimization based on the quantum heuristic template selection and context reconstruction based on the maximum boundary relevance. S3. Based on the deep reinforcement learning routing model and combined with the optimized request data, perform state evaluation of multiple business models to determine the target business model, and distribute the optimized request data to the target business model to perform inference operations. S4. Obtain the inference results and performance metrics generated during the execution of the target business model in real time, and send the inference results and performance metrics back to the cloud storage space; S5. Utilize the returned inference results and performance metrics to evaluate the execution effect of the target business model, and update the AI ​​prompt word template library and skill asset library based on the effect evaluation results to achieve the integration and optimization of multiple business models.

2. The method for managing multi-model API integration based on deep learning according to claim 1, characterized in that, The process of acquiring request data sent by business applications and optimizing the request data using an AI prompt word template library and a skill asset library to obtain optimized request data includes the following steps: S21. Based on the pre-deployed API gateway, obtain the request data sent by the business application, and obtain the request semantic vector by parsing and semantically encoding the request data; S22. Based on the request semantic vector and combined with quantum heuristic search, select several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and the skill asset library, respectively. S23. Based on the maximum boundary relevance algorithm, perform multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and the candidate skill asset set to obtain the optimal AI prompt word template set and associated skill asset set. S24. Using the optimal set of AI prompt word templates and the set of associated skill assets, the request data is reconstructed and parameters are injected to obtain optimized request data.

3. The method for managing multi-model API integration based on deep learning according to claim 2, characterized in that, The process of selecting several candidate AI prompt word template sets and candidate skill asset sets from the AI ​​prompt word template library and skill asset library respectively, based on request semantic vectors and combined with quantum heuristic search, includes the following steps: S221. Perform intent decomposition on the request semantic vector, identify all subtasks contained in the request and the dependencies between subtasks, and construct a user intent interaction graph based on the dependencies. S222. Based on the pre-built template function graph and skill function graph, and combined with quantum heuristic search, search for the maximum embedding subgraph that matches the user intent interaction graph, and calculate the comprehensive matching score for each matching maximum embedding subgraph. S223. Based on the comprehensive matching score, select the AI ​​prompt word templates and skill assets corresponding to the largest embedded subgraph in descending order to form an initial set of candidate AI prompt word templates and an initial set of candidate skill assets. S224. Perform subtask coverage detection on the initial candidate AI prompt word template set and the initial candidate skill asset set respectively. If the detection is qualified, the initial candidate AI prompt word template set and the initial candidate skill asset set are used as the candidate AI prompt word template set and the candidate skill asset set. Otherwise, adopt the mapping completion strategy to complete the initial candidate AI prompt word template set and the initial candidate skill asset set to obtain the candidate AI prompt word template set and the candidate skill asset set.

4. The method for managing multi-model API integration based on deep learning according to claim 3, characterized in that, The process of searching for the maximum embedding subgraph that matches the user intent interaction graph based on the pre-built template function graph and skill function graph, combined with quantum heuristic search, and calculating the comprehensive matching score for each matching maximum embedding subgraph includes the following steps: S2221. Perform node semantic association preprocessing on the user intent interaction graph, template function graph, and skill function graph, and bind corresponding semantic vectors to each subtask node and functional unit node; S2222. Based on the bound semantic vector, a quantum heuristic search algorithm is used to search in parallel the maximum embedding subgraph isomorphic to the user intent interaction graph in the template function graph and the skill function graph. S2223. For each maximum embedding subgraph found, calculate the comprehensive matching score of each maximum embedding subgraph using semantic vector cosine similarity.

5. The method for managing multi-model API integration based on deep learning according to claim 4, characterized in that, The method of using a quantum heuristic search algorithm based on bound semantic vectors to search in parallel within the template function graph and skill function graph for the largest embedding subgraph isomorphic to the user intent interaction graph includes the following steps: S22221. Initialize the matching state and quantum heuristic search parameters, identify the subtask node with the highest connectivity in the user intent interaction graph, and use it as the starting point for matching; S22222: Using the matching starting point as the center, a quantum superposition state expansion strategy is adopted to generate multiple candidate matching branches; S22223. For each candidate matching branch, the cost value of the current partial matching scheme is calculated using a quantum heuristic cost evaluation function; S22224. Based on the cost value of the current partial matching scheme, perform branch filtering and pruning to find the largest embedded subgraph that satisfies the nearest neighbor coupling constraint.

6. The method for managing multi-model API integration based on deep learning according to claim 4, characterized in that, The method of performing multi-dimensional feature scoring and redundancy removal optimization on the candidate AI prompt word template set and candidate skill asset set based on the maximum boundary relevance algorithm to obtain the optimal AI prompt word template set and associated skill asset set includes the following steps: S231. Construct a multi-dimensional feature scoring system, calculate the comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set, and calculate the function adaptation score for each skill asset in the candidate skill asset set. S232. Calculate the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets, respectively. S233. Based on the maximum boundary relevance algorithm, and combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy and cross-type complementarity, the optimal set of AI prompt word templates and the set of associated skill assets are selected iteratively.

7. The method for managing multi-model API integration based on deep learning according to claim 6, characterized in that, The construction of the multi-dimensional feature scoring system, which calculates a comprehensive relevance score for each AI prompt word template in the candidate AI prompt word template set and a function adaptation score for each skill asset in the candidate skill asset set, includes the following steps: S2311. Extract the multidimensional original features of all candidate AI prompt word templates and candidate skill assets, and obtain normalized AI prompt word template features and normalized skill asset features by normalizing the multidimensional original features. S2312. For each candidate AI prompt word template, use the normalized AI prompt word template features to calculate the semantic matching degree, historical success rate and resource efficiency respectively, and obtain the comprehensive relevance score by weighted summation based on preset weights. S2313. For each candidate skill asset, use normalized skill asset characteristics to calculate functional coverage, resource utilization rate and collaborative compatibility respectively, and obtain the functional adaptation score by weighted summation based on preset weights.

8. The method for managing multi-model API integration based on deep learning according to claim 6, characterized in that, The steps of calculating the semantic redundancy between any two AI prompt word templates in the candidate AI prompt word template set, the functional redundancy between any two skill assets in the candidate skill asset set, and the cross-type complementarity between candidate AI prompt word templates and candidate skill assets include the following: S2321. For any two AI prompt word templates in the candidate AI prompt word template set, obtain their functional description embedding vectors respectively, and calculate the cosine similarity between the two as semantic redundancy. S2322. For any two skill assets in the candidate skill asset set, obtain their semantic embedding vectors with input and output specifications respectively, and calculate the cosine similarity between the two as the functional redundancy. S2323. For any candidate AI prompt word template and any candidate skill asset, obtain the output requirement embedding vector of the candidate AI prompt word template and the output capability embedding vector of the candidate skill asset, respectively, and calculate the cross-type complementarity between the candidate AI prompt word template and the candidate skill asset.

9. A multi-model API integration management method based on deep learning according to claim 6, characterized in that, The method based on the maximum boundary relevance algorithm, combined with comprehensive relevance score, functional adaptation score, semantic redundancy, functional redundancy, and cross-type complementarity, iteratively selects the optimal AI prompt word template set and associated skill asset set, including the following steps: S2331. Initialize the selected template set and the skill asset set respectively, and configure the maximum number of iterations; S2332. In each iteration, the maximum boundary relevance score of each unselected candidate AI prompt word template is calculated using the comprehensive relevance score, semantic redundancy, and cross-type complementarity; the maximum boundary relevance score of each unselected candidate skill asset is calculated using the functional adaptation score, functional redundancy, and cross-type complementarity. S2333. Compare the maximum boundary relevance scores of all candidate AI prompt word templates and candidate skill assets, and select the element with the highest score; if the element is an AI prompt word template, add it to the selected template set, otherwise add it to the selected skill asset set and remove the element from the corresponding candidate set; S2334. Determine whether the current iteration count has reached the maximum iteration count. If not, return to step S2332; otherwise, terminate the iteration. The final set of selected templates is taken as the optimal AI prompt word template set, and the set of selected skill assets is taken as the associated skill asset set.

10. A deep learning-based multi-model API integration management system, used to implement the deep learning-based multi-model API integration management method according to any one of claims 1-9, characterized in that, The system includes: The data collection module is used to collect and standardize the storage of AI prompt word templates and skill assets generated in all workflows based on pre-built cloud storage space, in order to generate an AI prompt word template library and a skill asset library. The data optimization module is used to acquire request data sent by business applications and optimize the request data using an AI prompt word template library and a skill asset library to obtain optimized request data; wherein, the optimization process is an optimization based on the quantum heuristic template selection and context reconstruction based on the maximum boundary relevance. The data inference module is used to evaluate the status of multiple business models based on a deep reinforcement learning routing model and combined with optimized request data, in order to determine the target business model and distribute the optimized request data to the target business model to perform inference operations. The data feedback module is used to acquire inference results and performance metrics generated during the execution of the target business model in real time, and to send the inference results and performance metrics back to the cloud storage space. The data update module is used to evaluate the execution effect of the target business model using the returned inference results and performance indicators, and to update the AI ​​prompt word template library and skill asset library based on the effect evaluation results, so as to achieve the integration and optimization of multiple business models.