A multi-level large model scheduling and knowledge base adaptive optimization method and system

By calculating the dynamic scheduling model of task complexity and maturity, small models and knowledge bases are optimized, the problem of waste of computing resources is solved and the system's response efficiency and processing capabilities are improved.

CN120216149BActive Publication Date: 2025-08-19BEIJING FUTONG DONGFANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510680266.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-19
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

The existing technology cannot dynamically schedule models of different sizes according to task complexity, resulting in waste of computing resources and increased computing costs, and the knowledge base cannot be optimized in coordination with the model scheduling mechanism, increasing the call frequency of super-large models.

Method used

By calculating the complexity of the task to be processed and the maturity of the test processing results, dynamically select models of appropriate scale, and optimize small models or knowledge bases based on the processing results, reducing calls to super-large models and improving system response efficiency.

Benefits of technology

It realizes that while ensuring processing quality, save computing resources, improve system response efficiency, optimize processing capabilities of small models and knowledge bases, and reduce duplicate calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216149B_ABST
    Figure CN120216149B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and discloses a multi-level large model scheduling and knowledge base adaptive optimization method and system. The method includes: obtaining tasks to be processed, and calculating the complexity of the tasks to be processed after pre-processing the tasks to be processed; using small models to process the tasks to be processed, obtaining test processing results, and calculating the maturity of the test processing results; determining the scheduling strategy of the large model based on the complexity and maturity, and using the scheduling strategy to process the tasks to be processed to obtain processing results; and optimizing the small models or knowledge bases related to the scheduling strategy based on the processing results. By calculating the complexity of the tasks to be processed and the maturity of the test processing results, models of different sizes are selected accordingly, reducing the call to the super-large model, reducing computing costs, and improving system response efficiency. The small models or knowledge bases are optimized using historical processing results, improving the processing capabilities of the small models and knowledge bases, continuously accumulating knowledge, and reducing repeated calculations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-level large model scheduling and knowledge base adaptive optimization method and system. Background Art

[0002] Currently, ultra-large AI models (such as those with 671B parameters) demonstrate remarkable capabilities in handling complex tasks, but they place extremely high demands on computing resources, significantly increasing computational costs and energy consumption. In practice, not all tasks require such large models. Smaller models (such as those with 7B, 13B, or 30B parameters) can provide sufficiently accurate answers in many common scenarios. Existing research has proposed methods such as model compression, knowledge distillation, and mixture of experts (MoE) models to optimize model computational efficiency and reduce resource consumption.

[0003] Relying on extremely large models for computation not only wastes computing resources but also violates the requirements of economic efficiency and sustainable development. Existing solutions fail to effectively address how to dynamically schedule models of varying sizes based on task complexity to achieve optimal computational efficiency. Furthermore, current knowledge bases typically employ static storage and retrieval methods, failing to coordinate optimization with model scheduling mechanisms. This makes it difficult to effectively reduce the frequency of calls to extremely large models, further exacerbating the computational burden. Summary of the Invention

[0004] In view of this, the present invention provides a multi-level large model scheduling and knowledge base adaptive optimization method and system to solve the problem of being unable to dynamically schedule models of different scales according to task complexity.

[0005] In a first aspect, the present invention provides a multi-level large model scheduling and knowledge base adaptive optimization method, the method comprising:

[0006] Obtain pending tasks, pre-process them, and then calculate their complexity;

[0007] Use the small model to process the pending tasks, obtain the test processing results, and calculate the maturity of the test processing results;

[0008] Determine the scheduling strategy for large models based on complexity and maturity, and use the scheduling strategy to process pending tasks and obtain processing results;

[0009] Based on the processing results, the small model or knowledge base related to the scheduling strategy is optimized.

[0010] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention calculates the complexity of the tasks to be processed and the maturity of the test processing results, and selects models of different sizes accordingly, reducing the call to super-large models, reducing computing costs, saving computing resources, and improving system response efficiency. It uses historical processing results to optimize small models or knowledge bases, improves the processing capabilities of small models and knowledge bases, continuously accumulates knowledge, and reduces repeated calculations.

[0011] In an optional implementation, calculating the complexity of the task to be processed after preprocessing the task to be processed includes:

[0012] Perform semantic analysis on the tasks to be processed, and perform multi-category classification based on the semantic analysis results to determine the type of the tasks to be processed;

[0013] Obtain the first dynamic factor of computational complexity, which includes: text length, proportion of proper nouns, knowledge base matching degree, number of inference steps, context span, data complexity, and uncertainty;

[0014] Analyzing the tasks to be processed based on the types of the tasks to be processed and the first dynamic factors, and determining the values of the first dynamic factors of the tasks to be processed;

[0015] The complexity of the task to be processed is calculated based on the values of the first dynamic factors of the task to be processed and the corresponding preset weights.

[0016] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention selects the first dynamic factor related to the large model scheduling based on experience and historical data, and assigns a reasonable weight to each first dynamic factor based on historical data, so as to more scientifically reflect the actual contribution of each factor in the complexity calculation, thereby making the complexity calculation results more in line with the actual situation and providing more reliable data support for subsequent decision-making.

[0017] In an optional embodiment, using a small model to process a task to be processed, obtaining a test processing result, and calculating the maturity of the test processing result include:

[0018] Obtain the second dynamic factor of computing maturity, which includes: quality, relevance to the problem, stability, user feedback score, context coherence, information completeness, and degree of uncertainty;

[0019] Analyzing the test processing results based on the second dynamic factors to obtain values of each second dynamic factor of the test processing results;

[0020] The maturity of the test processing result is determined based on the value of the second dynamic factor of the test processing result and the corresponding preset weight.

[0021] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention uses a small model for trial processing, which can quickly complete the calculation and reduce the operating cost. By selecting a second dynamic factor related to maturity and calculating the maturity of the test processing result based on the second dynamic factor, the cost-effectiveness advantage of the small model is fully utilized while ensuring a certain processing quality, and computing resources are saved.

[0022] In an optional embodiment, determining a scheduling strategy for a large model based on complexity and maturity includes:

[0023] If the complexity is less than the preset complexity threshold and the maturity is not less than the preset maturity threshold, the small model is selected to process the pending task;

[0024] If the complexity is not less than the preset complexity threshold, and the maturity is not less than the preset maturity threshold, the small model + knowledge base is selected to process the pending task;

[0025] If the complexity is not less than the preset complexity threshold and the maturity is less than the preset maturity threshold, the large model is selected to process the pending task.

[0026] In an optional embodiment, determining a scheduling strategy for a large model based on complexity and maturity further includes:

[0027] If the complexity is less than the preset complexity threshold, and the maturity is less than the preset maturity threshold, then the type of the task to be processed is obtained, and it is determined whether there is a corresponding knowledge base according to the type of the task to be processed;

[0028] If there is a corresponding knowledge base, select the small model + knowledge base to process the pending tasks;

[0029] If there is no corresponding knowledge base, the large model is selected to process the pending tasks.

[0030] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention accurately selects the most appropriate large model according to the complexity of the task to be processed and the maturity of the test processing results, saving computing resources and improving response efficiency while ensuring processing quality.

[0031] In an optional embodiment, optimizing a small model or knowledge base related to the scheduling strategy based on the processing results includes:

[0032] From the processing results, the large model processing results obtained by processing using the large model are screened out;

[0033] Obtain user feedback and problem-solving rates for large model processing results, and determine high-quality processing results based on these user feedback and problem-solving rates;

[0034] The high-quality processing results are cached or stored in the corresponding knowledge base to optimize the knowledge base.

[0035] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention optimizes small models or knowledge bases by analyzing and processing results, improves scheduling strategies, makes scheduling strategies better adapt to the needs of different types of tasks, allocates resources more accurately, avoids waste or shortage of resources, enables the system to process more tasks with limited resources, and improves the overall performance and stability of the system.

[0036] In an optional embodiment, adaptively optimizing a small model or a knowledge base related to the scheduling strategy based on the processing results further includes:

[0037] If the data in the knowledge base is larger than the preset capacity threshold, the data in the knowledge base is used to construct a fine-tuning dataset;

[0038] Use the fine-tuning dataset to optimize the corresponding small model.

[0039] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present invention optimizes the small model by combining short-term memory, long-term memory and knowledge solidification, thereby improving the reasoning ability of the small model, making it close to the performance of the large model in specific tasks, and saving computing resources while ensuring processing quality.

[0040] In a second aspect, the present invention provides a multi-level large model scheduling and knowledge base adaptive optimization system, the system comprising:

[0041] The complexity calculation module is used to obtain tasks to be processed, and calculate the complexity of the tasks to be processed after preprocessing them;

[0042] A maturity calculation module is used to process pending tasks using a small model, obtain test processing results, and calculate the maturity of the test processing results;

[0043] The large model scheduling module is used to determine the scheduling strategy of the large model based on complexity and maturity, and use the scheduling strategy to process pending tasks and obtain processing results;

[0044] The knowledge base optimization module is used to optimize the small model or knowledge base related to the scheduling strategy based on the processing results.

[0045] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 1 is a flow chart of a multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention;

[0049] Figure 2 2. It is a schematic diagram of the system architecture of the multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention;

[0050] Figure 3 is a flow chart of another multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention;

[0051] Figure 4 1. It is a schematic diagram of a scheduling process of a multi-level large model scheduling strategy in a multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention;

[0052] Figure 5 1. It is a flowchart of high-quality answer storage in a multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention;

[0053] Figure 6 is a structural block diagram of a multi-level large model scheduling and knowledge base adaptive optimization system according to an embodiment of the present invention;

[0054] Figure 7 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0056] An embodiment of the present invention provides a multi-level large model scheduling and knowledge base adaptive optimization method. By calculating the complexity of the task to be processed and the maturity of the test processing results, models of different sizes are selected accordingly. At the same time, the knowledge base or small model is optimized based on the processing results to achieve the effect of improving the processing capabilities of the small model and the knowledge base and enhancing the system response efficiency.

[0057] According to an embodiment of the present invention, an embodiment of a multi-level large model scheduling and knowledge base adaptive optimization method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0058] In this embodiment, a multi-level large model scheduling and knowledge base adaptive optimization method is provided, which can be used in the above-mentioned computer system. Figure 1 Flowchart of the multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0059] Step S101 , obtaining tasks to be processed, performing pre-processing on the tasks to be processed, and then calculating the complexity of the tasks to be processed.

[0060] Specifically, the task to be processed may be the question text input by the user, and the question text input by the user is cleaned, including removing stop words, word segmentation, grammatical analysis, etc., to improve the understanding accuracy.

[0061] Perform semantic analysis on the cleaned text and classify the questions into multiple categories based on the business. Calculate the complexity of the task to be processed based on the classified question text. For example, longer texts have higher complexity, so text length can be used as an influencing factor in calculating complexity. Additionally, multiple influencing factors can be determined based on historical experience or experimental data, and the values of each influencing factor can be determined based on the question to be processed. Finally, the complexity of the question to be processed is calculated based on the values of each influencing factor. This is for example only and is not intended to be limiting.

[0062] Step S102: Use the small model to process the task to be processed, obtain a test processing result, and calculate the maturity of the test processing result.

[0063] Specifically, based on the type of task being processed, an appropriate small model is selected to handle the task and attempt to answer the user's question. There are many types of small models, covering specialized models in multiple fields such as natural language processing, computer vision, and data analysis. Before processing the task, it is necessary to select an appropriate small model based on the task type, data characteristics, and performance requirements. For example, for text classification tasks, a lightweight model based on the Transformer architecture, such as DistilBERT, can be selected. For image recognition tasks, the MobileNet series of models can be selected, which offer efficient computing power and a smaller model size.

[0064] After receiving pre-processed task data, the adapted mini-model performs calculations based on its internal algorithmic logic and trained parameters. During this process, the mini-model extracts, analyzes, and maps data features, and then outputs processing results. For example, in a sentiment analysis task in natural language processing, the mini-model performs semantic understanding and emotional analysis on the input text, outputting a sentiment classification result of positive, negative, or neutral. This is just an example, but not limited to this.

[0065] Based on historical experience or experimental data, multiple influencing factors that affect the maturity of the processing results are determined, and the values of each influencing factor are determined based on the test processing results. Finally, the maturity of the test processing results is calculated based on the values of each influencing factor.

[0066] Step S103: determine the scheduling strategy of the large model according to the complexity and maturity, and use the scheduling strategy to process the tasks to be processed to obtain the processing results.

[0067] Specifically, the complexity of the problem to be processed determines the difficulty and resources required for large-model processing tasks. If a simple scheduling strategy is used for high-complexity tasks, the maturity of the processing results may be reduced. For example, in multimodal sentiment analysis tasks, the fusion of text, image, and audio data is highly complex. If the large model is only allocated computing resources in the conventional way, it may not be able to fully extract features due to insufficient resources, resulting in a decline in maturity indicators such as the accuracy and recall rate of sentiment classification. The maturity assessment results can reversely guide the accuracy of the complexity analysis. If the maturity of the large model processing results does not meet expectations, analysis shows that the complexity was underestimated. The text summarization task that was originally thought to be simple is actually more complex because it involves professional domain knowledge. In this case, the complexity calculation needs to be reviewed and the subsequent scheduling strategy needs to be adjusted.

[0068] Based on the above analysis, the complexity of the problems to be processed can be divided into multiple levels, and the maturity threshold of the test processing results can be set. When performing multi-level large model scheduling, large models of different sizes can be dynamically scheduled based on the relationship between the complexity level of the problems to be processed, the maturity of the test processing results, and the maturity threshold to achieve optimal task processing efficiency. For low-complexity tasks, such as basic text keyword extraction, smaller-scale large models or multiple small models can be assigned for parallel processing, making full use of edge computing resources and reducing the pressure on core computing nodes. For low-complexity tasks, if the maturity of the test processing results is not lower than the maturity threshold, it means that when using a small model to process the task, the processing effect can meet expectations, and the small model can be directly used to process low-complexity tasks. This is only an example, but not limited to this.

[0069] The scheduling strategy for large models may include: small model, small model + knowledge base, large model, and super large model. The difference between small model, large model, and super large model mainly lies in the different parameter scales and required computing resources. This is only an example, but not limited to this.

[0070] Step S104: Optimize the small model or knowledge base related to the scheduling strategy based on the processing result.

[0071] Specifically, the processing results include high-quality processing results that meet user needs and general processing results that do not meet user needs. For high-quality processing results, it can be considered that the corresponding large model has better performance. The high-quality processing results and the corresponding tasks to be processed can be added to the knowledge base as new knowledge or used as optimization samples to optimize the parameters of the small model. For example, through hyperparameter tuning techniques such as grid search, random search or Bayesian optimization, the optimal hyperparameter combination is found to improve the training effect and prediction accuracy of the model; as the knowledge base continues to expand, knowledge redundancy or duplication may occur, and the knowledge base needs to be integrated and optimized, duplicate knowledge is merged, and the expression is simplified to improve the readability and maintainability of the knowledge. At the same time, based on the feedback from the processing results, the priority of the knowledge is adjusted, and commonly used and important knowledge is given higher priority to facilitate the rapid acquisition of small models and improve the efficiency of processing tasks.

[0072] like Figure 2 As shown, this is a schematic diagram of the system architecture of this embodiment. After the user inputs a question, it is first classified, then the large model is scheduled, and the knowledge base or model is called. If the large model is called to answer the question, knowledge memory is generated to optimize the knowledge base or small model, and the optimized knowledge base or small model is used to feed back to the large model scheduling. When a new question input by the user is received again, the result of the small model and / or knowledge base trying to answer will be improved, thus realizing a dynamic scheduling strategy for multi-level large models.

[0073] The multi-level large model scheduling and knowledge base adaptive optimization method provided in this embodiment calculates the complexity of the tasks to be processed and the maturity of the test processing results, and selects models of different sizes accordingly, reducing the call to super-large models, reducing computing costs, saving computing resources, and improving system response efficiency. It uses historical processing results to optimize small models or knowledge bases, improves the processing capabilities of small models and knowledge bases, continuously accumulates knowledge, and reduces repeated calculations.

[0074] In this embodiment, a multi-level large model scheduling and knowledge base adaptive optimization method is provided, which can be used in the above-mentioned computer system. Figure 3 Flowchart of the multi-level large model scheduling and knowledge base adaptive optimization method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0075] Step S201 , obtaining tasks to be processed, and calculating the complexity of the tasks to be processed after pre-processing the tasks to be processed.

[0076] Specifically, the above step S201 includes:

[0077] Step S2011 , performing semantic analysis on the task to be processed, and performing multi-category classification based on the semantic analysis result to determine the type of the task to be processed.

[0078] Specifically, a multimodal semantic analysis module (including BERT sentence vector encoding, domain keyword matching, and grammatical dependency parsing) can be used to perform semantic analysis and deep understanding of user questions. Based on a three-level business classification system: ① domain affiliation (e.g., medical, finance, or law), ② task type (e.g., diagnosis, contract review, or knowledge question answering), and ③ computational complexity (based on semantic entropy and inference step size quantization), structured classification labels are generated to drive dynamic scheduling decisions for downstream heterogeneous models. For example, categorizing "liver cancer targeted drug efficacy analysis" as "Medical - Treatment Plan Evaluation - High Complexity" allows for intelligent matching to a specialized 30B tumor combination therapy model, rather than a general-purpose model with a processing capacity of hundreds of billions of data points. This is an example, but not limited to this.

[0079] Step S2012: Obtain a first dynamic factor of computational complexity, the first dynamic factor including: text length, proper noun ratio, knowledge base matching degree, number of reasoning steps, context span, data complexity, and uncertainty.

[0080] Specifically, the calculation formula for computational complexity is:

[0081] (1)

[0082] Among them, C represents the problem complexity score, L represents the text length of the problem, T represents the proportion of proper nouns (calculated by the proportion of words in the existing knowledge base), K represents the degree of knowledge base matching (the more existing knowledge, the lower the complexity), R represents the need for multi-step reasoning (if the problem requires multiple logical steps to solve, the complexity increases), S represents the context span involved in the problem (if multiple knowledge fields intersect, the complexity increases), D represents the data dimension complexity (if it involves multidimensional tables, graph data, etc., the complexity increases), and P represents the uncertainty of the problem (if the problem has high semantic ambiguity, the complexity increases).

[0083] w1-w7 represent the first weighting factors (preset weights, adjustable) for each first dynamic factor. The first weighting factors can be determined using least squares fitting based on historical data. This process is well-established and will not be further elaborated here. The magnitude of the first weighting factor indicates the impact of the first dynamic factor on complexity. A larger first weighting factor indicates a greater impact on complexity, while a smaller first weighting factor indicates a smaller impact on complexity.

[0084] Step S2013 : analyzing the tasks to be processed based on the types of the tasks to be processed and the first dynamic factors, and determining the values of the first dynamic factors of the tasks to be processed.

[0085] Specifically, according to the type and other characteristics of the task to be processed, the value of each first dynamic factor is determined, which specifically includes: obtaining the text length of the task to be processed, and normalizing the text length to obtain the value of the text length, that is, L=the number of text characters of the task to be processed / the maximum allowed number of characters; calculating the ratio of the number of proper nouns in the task to be processed to the total number of words in the corresponding knowledge base as the proper noun ratio, that is, T=the number of proper nouns / the total number of times in the corresponding knowledge base; using the relevance scoring and vector similarity matching results of the information recalled from the knowledge base search to determine the knowledge base matching degree K (specifically including: a knowledge retrieval: recalling relevant entries of related questions from the knowledge base, through vector retrieval (FAISS / Annoy) or a) Use the inverted index of keywords to obtain a set of candidate knowledge fragments; b) Semantic matching: Use BERT / SimCSE vector cosine similarity to calculate the similarity between the question and the candidate knowledge to obtain a list of relevance scores; c) Score normalization: Use Softmax / Min-Max normalization to convert the matching score into a standardized K value to obtain the top-k best results); If the question contains "causality" or "multi-level logic", determine the number of reasoning steps as the reasoning requirement R; Determine the number of knowledge domains based on the type of task to be processed, and determine the context span S based on the number of knowledge domains; Determine the data complexity D by judging whether it involves large-scale data sets or multiple data structures; Use Neuro-Linguistic Programming to calculate semantic uncertainty P (such as by analyzing the degree of ambiguity through syntactic trees).

[0086] Step S2014: Calculate the complexity of the task to be processed based on the values of the first dynamic factors of the task to be processed and the corresponding preset weights.

[0087] Specifically, the value of the first dynamic factor of the task to be processed and the corresponding preset weight are substituted into formula (1) and weighted calculation is performed to obtain the complexity of the task to be processed.

[0088] The multi-level large model scheduling and knowledge base adaptive optimization method provided in this embodiment selects the first dynamic factor related to the large model scheduling based on experience and historical data, and assigns a reasonable weight to each first dynamic factor based on historical data, so as to more scientifically reflect the actual contribution of each factor in the complexity calculation, thereby making the complexity calculation results more in line with the actual situation and providing more reliable data support for subsequent decision-making.

[0089] Step S202: Use the small model to process the task to be processed, obtain a test processing result, and calculate the maturity of the test processing result.

[0090] Specifically, the above step S202 includes:

[0091] Step S2021, obtaining a second dynamic factor of computing maturity, the second dynamic factor including: quality, relevance to the problem, stability, user feedback score, context coherence, information completeness, and degree of uncertainty.

[0092] Specifically, use a suitable small model to try to process the task to be processed and obtain the test processing result. The maturity calculation formula of the test processing result is:

[0093] (2)

[0094] Among them, M represents the answer maturity score, Q represents the answer quality, E represents the relevance of the answer to the question, V represents the stability of the answer, U represents user feedback, B represents context coherence (whether the answer is consistent with the existing knowledge base content), I represents information completeness (whether the answer covers all the key points of the question), and A represents ambiguous expression (the degree of ambiguity or uncertainty in the question or answer).

[0095] v1-v7 represent the second weighting factors (preset and adjustable) corresponding to the second dynamic factors. The second weighting factors can be determined using least squares fitting based on historical data. This process is well-established and will not be further elaborated here. The magnitude of the second weighting factor indicates the impact of the second dynamic factor on complexity. A larger second weighting factor indicates a greater impact on complexity, while a smaller second weighting factor indicates a smaller impact on complexity.

[0096] Step S2022: Analyze the test processing result based on the second dynamic factor to obtain the value of each second dynamic factor of the test processing result.

[0097] Specifically, natural language processing (NLP) technology can be used to automatically score text content, and the quality of the answer can be calculated based on NLP scores, such as BLEU, ROUGE, and BERTScore. ,in, Indicates that the similarity between the generated text and the reference text is evaluated based on the overlap ratio of word-level matching. It represents the degree of phrase overlap between the generated text and the reference text based on the recall rate. Indicates that the similarity between the generated text and the reference text is evaluated at the semantic level based on the pre-trained language model. 、 、 Respectively 、 、 The weight of the answer; the relevance of the answer to the question can be determined by vector similarity calculation ,in The semantic vector representing the question, Represents the semantic vector of the answer; through multiple sampling, the same question is input into the model N times (e.g., 5 times), and the mean semantic similarity of the multiple answers is calculated as the stability V of the answer; based on user feedback, such as whether the user adopts the answer as user feedback U; and compared with the consistency score of the knowledge base answer , as contextual coherence B, where represents the answer generated by the system, The standard answers in the knowledge base; the information completeness I is determined by keyword coverage or expert annotation; the ambiguous expression A is determined by counting the number of vague expressions, unclear references, and ambiguous words in the answers.

[0098] Step S2023: Determine the maturity of the test processing result based on the value of the second dynamic factor of the test processing result and the corresponding preset weight.

[0099] Specifically, the value of the second dynamic factor of the test processing result and the corresponding preset weight are substituted into formula (2) and weighted calculation is performed to obtain the maturity of the test processing result.

[0100] The multi-level large model scheduling and knowledge base adaptive optimization method provided in this embodiment uses a small model for trial processing, which can quickly complete the calculation and reduce the operating cost. By selecting a second dynamic factor related to maturity and calculating the maturity of the test processing results based on the second dynamic factor, the cost-effectiveness advantage of the small model is fully utilized while ensuring a certain processing quality, saving computing resources.

[0101] Step S203: determine the scheduling strategy of the large model according to the complexity and maturity, and use the scheduling strategy to process the tasks to be processed to obtain the processing results.

[0102] Specifically, the scheduling strategy for the large model is determined based on the complexity and maturity in step S203, including:

[0103] Step S2031: If the complexity is less than the preset complexity threshold and the maturity is not less than the preset maturity threshold, a small model is selected to process the task to be processed.

[0104] Step S2032: If the complexity is not less than the preset complexity threshold, and the maturity is not less than the preset maturity threshold, the small model + knowledge base is selected to process the pending task.

[0105] Step S2033: If the complexity is not less than the preset complexity threshold and the maturity is less than the preset maturity threshold, the large model is selected to process the task to be processed.

[0106] Specifically, the scheduling strategy of the large model is selected according to the problem complexity C and the answer maturity M, such as Figure 4 The following is a schematic diagram of the scheduling process of the multi-level large model scheduling strategy, which specifically includes:

[0107] Set the preset complexity threshold and preset maturity threshold based on experience. If the complexity is less than the preset complexity threshold and the maturity is not less than the preset maturity threshold, it means the complexity is low and the maturity is high, and the small model is used directly to answer the question; if the complexity is not less than the preset complexity threshold and the maturity is not less than the preset maturity threshold, it means the complexity is high and the maturity is high, and the small model + knowledge base is selected to answer the question; if the complexity is not less than the preset complexity threshold and the maturity is less than the preset maturity threshold, it means the complexity is high and the maturity is low, and the large model (such as 671B) is selected to answer the question.

[0108] The scheduling strategy of the large model is expressed as: D = f(C, M), where D represents the model scheduling strategy and f(C, M) can be a decision tree or a scheduling model based on deep learning. This is a mature existing technology and will not be described in detail here.

[0109] In some optional implementations, determining a scheduling strategy for a large model based on complexity and maturity further includes:

[0110] Step S2034: If the complexity is less than the preset complexity threshold and the maturity is less than the preset maturity threshold, the type of the task to be processed is obtained, and it is determined whether there is a corresponding knowledge base according to the type of the task to be processed.

[0111] Step S2035: If there is a corresponding knowledge base, select the small model + knowledge base to process the pending task.

[0112] Step S2036: If there is no corresponding knowledge base, the large model is selected to process the task to be processed.

[0113] Specifically, if Figure 4 As shown in the figure, if the complexity is less than the preset complexity threshold and the maturity is less than the preset maturity threshold, it means that the complexity and maturity are low, then we will try to use a small model + knowledge base to answer the question first. If there is no corresponding knowledge base, we will call a larger model to answer the question.

[0114] The multi-level large model scheduling and knowledge base adaptive optimization method provided by the present embodiment accurately selects the most appropriate large model according to the complexity of the task to be processed and the maturity of the test processing results, saves computing resources and improves response efficiency while ensuring processing quality.

[0115] Step S204: Optimize the small model or knowledge base related to the scheduling strategy based on the processing result.

[0116] Specifically, the above step S204 includes:

[0117] Step S2041: Filter out the large model processing results obtained by processing using the large model from the processing results.

[0118] Step S2042: Obtain user feedback and problem-solving rate of the large model processing result, and determine high-quality processing results based on the user feedback and problem-solving rate.

[0119] Specifically, the processing results obtained by using the large model to process the task are very accurate, so the large model processing results obtained by using the large model are screened out from the processing results, and the high-quality processing results are determined through user feedback and problem-solving rate. Generally speaking, the feedback U given by the user on the large model processing results is used to judge whether the user adopts the answer, user satisfaction and whether the problem is solved. The large model processing results that are adopted by the user and solve the problem can be regarded as high-quality processing results.

[0120] Step S2043: Cache the high-quality processing results or store them in the corresponding knowledge base to optimize the knowledge base.

[0121] Specifically, the high-quality processing results are stored in the knowledge base corresponding to the type of task to be processed, such as Figure 5 The figure shows a flow chart of high-quality answer storage, which includes short-term memory, long-term memory, and knowledge consolidation.

[0122] Short-term memory is used to cache answers to recent high-frequency questions to improve call efficiency. You can use the Remote Dictionary Server (Redis) to store answers to recent high-frequency questions (such as the TOP100 frequency). The key is the question fingerprint (MD5 hash), and the value is the answer + metadata (such as the number of calls and the last update time).

[0123] Long-term memory uses clustering algorithms to summarize and integrate knowledge based on the knowledge accumulated over long-term usage, forming a knowledge theme tree, which is stored in the knowledge base in the form of data vectors. This solves problems such as repeated and scattered knowledge and achieves more organized knowledge classification.

[0124] The multi-level large model scheduling and knowledge base adaptive optimization method provided in this embodiment optimizes small models or knowledge bases by analyzing and processing results, improves scheduling strategies, makes scheduling strategies better adapt to the needs of different types of tasks, allocates resources more accurately, avoids waste or shortage of resources, enables the system to process more tasks with limited resources, and improves the overall performance and stability of the system.

[0125] In some optional implementations, adaptively optimizing a small model or knowledge base related to the scheduling strategy based on the processing results further includes:

[0126] If the data in the knowledge base is larger than the preset capacity threshold, the data in the knowledge base is used to construct a fine-tuning dataset.

[0127] Use the fine-tuning dataset to optimize the corresponding small model.

[0128] Specifically, the capacity of a knowledge base is capped. When the data stored in the knowledge base via long-term memory reaches a preset threshold, the knowledge base can no longer store new knowledge in the form of long-term memory. This requires extracting high-frequency, high-confidence question-and-answer pairs (questions and their corresponding answers) from the knowledge base to construct a fine-tuning dataset. This dataset is then used to fine-tune the corresponding small-scale model (e.g., LLaMA-7B) to enhance its reasoning capabilities in a specific domain, thereby forming a small-scale model expert in a specific vertical domain. During the fine-tuning process, the knowledge content is judged for its rationality, compliance, and correctness to ensure its credibility.

[0129] In a specific example, when upgrading the liver cancer targeted therapy knowledge base, the large model (671B model) was frequently asked during liver cancer medication consultations, "What to do if drug resistance occurs?" The internal processing process for answering this question includes:

[0130] Short-term memory cache: This cache searches for the same question in the short-term, high-frequency Q&A database. If so, it returns the cached answer. If no corresponding record is found in the short-term cache, the model generates the answer.

[0131] Screening high-quality answers: Calculate the maturity M of the answer based on factors such as user feedback results U. Use a preset threshold, such as 0.8, to determine whether the maturity is greater than 0.8, and decide whether to classify it as a high-quality answer and store it in the relevant knowledge base.

[0132] Long-term memory clustering: Similar questions, such as "What to do if liver cancer targeted drugs fail", "Post-sorafenib resistance plan", "Regorafenib applicable conditions", etc., are integrated and summarized into a theme "Subsequent treatment of liver cancer resistance" through clustering, and knowledge integration of questions and answers is carried out.

[0133] Knowledge-based fine-tuning: A similar set of question-answer pairs is organized into a fine-tuning dataset, for example, {"instruction": "What treatment options are available for patients with liver cancer who become resistant to sorafenib?", "output": "According to the RESORCE trial, regorafenib is recommended..."}. Then, a small model of the same type is fine-tuned to adapt to the pattern of this type of question, resulting in a specialized small model for a specific domain.

[0134] The multi-level large model scheduling and knowledge base adaptive optimization method provided in this embodiment optimizes the small model by combining short-term memory, long-term memory and knowledge solidification, thereby improving the reasoning ability of the small model, making it close to the performance of the large model in specific tasks, and saving computing resources while ensuring processing quality.

[0135] In this embodiment, a multi-level large model scheduling and knowledge base adaptive optimization system is also provided. The system is used to implement the above-mentioned embodiments and preferred embodiments, and the details that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0136] This embodiment provides a multi-level large model scheduling and knowledge base adaptive optimization system, such as Figure 6 Shown, including:

[0137] The complexity calculation module 601 is used to obtain tasks to be processed, and calculate the complexity of the tasks to be processed after pre-processing the tasks to be processed.

[0138] The maturity calculation module 602 is used to process the task to be processed using the small model, obtain the test processing result, and calculate the maturity of the test processing result.

[0139] The large model scheduling module 603 is used to determine the scheduling strategy of the large model according to the complexity and maturity, and use the scheduling strategy to process the tasks to be processed to obtain the processing results.

[0140] The knowledge base optimization module 604 is used to optimize the small model or knowledge base related to the scheduling strategy based on the processing results.

[0141] In some optional implementations, the complexity calculation module 601 includes:

[0142] The task classification unit is used to perform semantic analysis on the tasks to be processed, and to perform multi-category classification based on the semantic analysis results to determine the type of the tasks to be processed.

[0143] The first dynamic factor determination unit is used to obtain the first dynamic factor of the computational complexity, where the first dynamic factor includes: text length, proper noun ratio, knowledge base matching degree, number of reasoning steps, context span, data complexity, and uncertainty.

[0144] The first dynamic factor value determining unit is configured to analyze the tasks to be processed based on the types of the tasks to be processed and the first dynamic factors, and determine the values of the first dynamic factors of the tasks to be processed.

[0145] The complexity calculation unit is used to calculate the complexity of the task to be processed based on the values of each first dynamic factor of the task to be processed and the corresponding preset weights.

[0146] In some optional implementations, the maturity calculation module 602 includes:

[0147] The second dynamic factor determination unit is used to obtain the second dynamic factor of computing maturity, where the second dynamic factor includes: quality, relevance to the problem, stability, user feedback score, context coherence, information completeness, and degree of uncertainty.

[0148] The second dynamic factor value calculation unit is used to analyze the test processing result based on the second dynamic factor to obtain the value of each second dynamic factor of the test processing result.

[0149] The maturity calculation unit is used to determine the maturity of the test processing result based on the value of the second dynamic factor of the test processing result and the corresponding preset weight.

[0150] In some optional implementations, the large model scheduling module 603 includes:

[0151] The first scheduling unit is used to select a small model to process the task to be processed if the complexity is less than a preset complexity threshold and the maturity is not less than a preset maturity threshold.

[0152] The second scheduling unit is used to select the small model + knowledge base to process the pending task if the complexity is not less than a preset complexity threshold and the maturity is not less than a preset maturity threshold.

[0153] The third scheduling unit is used to select the large model to process the task to be processed if the complexity is not less than a preset complexity threshold and the maturity is less than a preset maturity threshold.

[0154] The fourth scheduling unit is used to obtain the type of the task to be processed if the complexity is less than a preset complexity threshold and the maturity is less than a preset maturity threshold, and determine whether there is a corresponding knowledge base according to the type of the task to be processed.

[0155] The first scheduling subunit is used to select the small model + knowledge base to process the pending task if a corresponding knowledge base exists.

[0156] The second scheduling subunit is used to select a large model to process the pending task if there is no corresponding knowledge base.

[0157] In some optional implementations, the knowledge base optimization module 604 includes:

[0158] The processing result screening unit is used to screen out the large model processing results obtained by processing using the large model from the processing results.

[0159] The high-quality processing result determination unit is used to obtain user feedback and problem-solving rate of large model processing results, and determine high-quality processing results based on user feedback and problem-solving rate.

[0160] The knowledge base optimization unit is used to cache or store high-quality processing results in the corresponding knowledge base to optimize the knowledge base.

[0161] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0162] The multi-level large model scheduling and knowledge base adaptive optimization system in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0163] The embodiment of the present invention also provides a computer device having the above Figure 6 The multi-level large model scheduling and knowledge base adaptive optimization system shown.

[0164] See also Figure 7 , Figure 7 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0165] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0166] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0167] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0168] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0169] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0170] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0171] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A multi-level large model scheduling and knowledge base adaptive optimization method, characterized by: The method comprises: Obtain a task to be processed, and calculate the complexity of the task to be processed after preprocessing the task to be processed, including: performing semantic analysis on the task to be processed, and performing multi-category classification based on the semantic analysis results to determine the type of the task to be processed; obtaining a first dynamic factor of the calculation complexity, the first dynamic factor including: text length, proper noun ratio, knowledge base matching degree, number of reasoning steps, context span, data complexity, and uncertainty; analyzing the task to be processed based on the type of the task to be processed and the first dynamic factor to determine the value of each first dynamic factor of the task to be processed; calculating the complexity of the task to be processed based on the value of each first dynamic factor of the task to be processed and the corresponding preset weight, the calculation formula is: , where C represents the problem complexity score, L represents the text length of the problem, T represents the proportion of proper nouns, K represents the degree of knowledge base matching, R represents the multi-step reasoning requirement, S represents the context span involved in the problem, D represents the complexity of the data dimension, P represents the uncertainty of the problem, and w1-w7 represent the first weighting factors of each first dynamic factor; Processing the task to be processed using the small model to obtain a test processing result, and calculating the maturity of the test processing result, including: obtaining a second dynamic factor for calculating maturity, the second dynamic factor including: quality, relevance to the problem, stability, user feedback score, context coherence, information completeness, and degree of uncertainty; analyzing the test processing result based on the second dynamic factor to obtain values of each second dynamic factor of the test processing result; determining the maturity of the test processing result based on the values of the second dynamic factors of the test processing result and corresponding preset weights, and the calculation formula is: , where M represents the answer maturity score, Q represents the answer quality, E represents the relevance of the answer to the question, V represents the stability of the answer, U represents user feedback, B represents context coherence, I represents information completeness, A represents ambiguous expression, and v1-v7 represent the second weighting factors corresponding to each second dynamic factor; Determining a scheduling strategy for a large model according to the complexity and the maturity, and processing the pending tasks using the scheduling strategy to obtain a processing result; The small model or knowledge base related to the scheduling strategy is optimized based on the processing result.

2. The method according to claim 1, characterized in that Determining a scheduling strategy for a large model according to the complexity and the maturity includes: If the complexity is less than a preset complexity threshold, and the maturity is not less than a preset maturity threshold, then a small model is selected to process the task to be processed; If the complexity is not less than the preset complexity threshold, and the maturity is not less than the preset maturity threshold, then the small model + knowledge base is selected to process the pending task; If the complexity is not less than a preset complexity threshold, and the maturity is less than a preset maturity threshold, a large model is selected to process the task to be processed.

3. The method according to claim 2, characterized in that Determining a scheduling strategy for a large model according to the complexity and the maturity also includes: If the complexity is less than a preset complexity threshold, and the maturity is less than a preset maturity threshold, obtaining the type of the task to be processed, and determining whether there is a corresponding knowledge base according to the type of the task to be processed; If there is a corresponding knowledge base, select the small model + knowledge base to process the pending task; If there is no corresponding knowledge base, the large model is selected to process the task to be processed.

4. The method according to claim 1, wherein Optimizing a small model or knowledge base related to the scheduling strategy based on the processing results, including: From the processing results, filter out the large model processing results obtained by processing using the large model; Obtaining user feedback and problem-solving rates of the large model processing results, and determining high-quality processing results based on the user feedback and problem-solving rates; The high-quality processing results are cached or stored in a corresponding knowledge base to optimize the knowledge base.

5. The method according to claim 4, characterized in that Adaptively optimizing a small model or knowledge base related to the scheduling strategy based on the processing results, further comprising: If the data in the knowledge base is larger than a preset capacity threshold, constructing a fine-tuning data set using the data in the knowledge base; The corresponding small model is optimized using the fine-tuning dataset.

6. A multi-level large model scheduling and knowledge base adaptive optimization system, characterized by: The system comprises: The complexity calculation module is used to obtain the task to be processed, and calculate the complexity of the task to be processed after pre-processing the task to be processed, including: performing semantic analysis on the task to be processed, and performing multi-category classification based on the semantic analysis results to determine the type of the task to be processed; obtaining the first dynamic factor of the calculation complexity, the first dynamic factor including: text length, proportion of proper nouns, knowledge base matching degree, number of reasoning steps, context span, data complexity, and uncertainty; analyzing the task to be processed based on the type of the task to be processed and the first dynamic factor to determine the value of each first dynamic factor of the task to be processed; calculating the complexity of the task to be processed based on the value of each first dynamic factor of the task to be processed and the corresponding preset weight, and the calculation formula is: , where C represents the problem complexity score, L represents the text length of the problem, T represents the proportion of proper nouns, K represents the degree of knowledge base matching, R represents the multi-step reasoning requirement, S represents the context span involved in the problem, D represents the complexity of the data dimension, P represents the uncertainty of the problem, and w1-w7 represent the first weighting factors of each first dynamic factor; The maturity calculation module is used to process the pending task using the small model to obtain a test processing result and calculate the maturity of the test processing result, including: obtaining a second dynamic factor for calculating maturity, the second dynamic factor including: quality, relevance to the problem, stability, user feedback score, context coherence, information completeness, and degree of uncertainty; analyzing the test processing result based on the second dynamic factor to obtain the value of each second dynamic factor of the test processing result; and determining the maturity of the test processing result based on the value of the second dynamic factor of the test processing result and the corresponding preset weight. The calculation formula is: , where M represents the answer maturity score, Q represents the answer quality, E represents the relevance of the answer to the question, V represents the stability of the answer, U represents user feedback, B represents context coherence, I represents information completeness, A represents ambiguous expression, and v1-v7 represent the second weighting factors corresponding to each second dynamic factor; A large model scheduling module is used to determine a scheduling strategy for the large model according to the complexity and the maturity, and process the pending tasks using the scheduling strategy to obtain a processing result; The knowledge base optimization module is used to optimize the small model or knowledge base related to the scheduling strategy based on the processing results.

7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 5 by executing the computer instructions.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Task management method and related system

    CN118656179A

  • Electric power scene complex task arrangement decision-making method and system based on large semantic model

    CN118735222A