Language model reasoning resource scheduling method and system based on multi-agent cooperation

By adopting a multi-agent collaborative language model reasoning resource scheduling method, the problems of resource waste and latency in multi-step, multi-perspective reasoning tasks of large language models are solved, achieving an efficient and stable reasoning process and optimizing the utilization of computing resources.

CN121979680APending Publication Date: 2026-05-05GUANGDONG SOUTH SMART MEDIA TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG SOUTH SMART MEDIA TECH CO LTD
Filing Date
2026-01-26
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing large language models suffer from problems such as single perspective, knowledge blind spots, redundant computation, resource waste, and extended reasoning time in multi-step and multi-perspective reasoning tasks. They are particularly difficult to achieve efficient and stable multi-step reasoning in resource-constrained or high-concurrency environments.

Method used

A multi-agent collaborative language model reasoning resource scheduling method is adopted. The master agent decomposes the task and distributes it to multiple auxiliary agents for multi-round dynamic collaborative reasoning. The cognitive load index is calculated in real time, the convergence judgment threshold is dynamically adjusted, and the resource optimization and rapid aggregation are achieved by combining cognitive load perception and a dedicated knowledge base.

Benefits of technology

It effectively reduces redundant computation and resource waste, shortens inference latency, improves inference quality and system stability, optimizes the efficiency of computing resource utilization, and supports the efficient and stable deployment of large language models in complex tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121979680A_ABST
    Figure CN121979680A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-agent cooperation-based language model reasoning resource scheduling method and system, and the method achieves the intelligent simulation of multi-view iterative thinking in a complex reasoning task through the construction of a multi-agent system which is clear in division of labor and is provided with a special knowledge base. View limitation and decision deviation of a single model in long-sequence and multi-step reasoning are effectively overcome; depending on the fusion of the general capability of the large language model and the task special knowledge base, the professionality and accuracy of the reasoning result are improved. Meanwhile, the problems of resource waste, redundant calculation and unstable convergence caused by cognitive overload in the cooperation process are solved by combining multi-round dynamic cooperation with a convergence mechanism of cognitive load perception and a dynamic token number limitation and low-confidence branch pruning strategy; therefore, on the premise that the reasoning quality is guaranteed, the utilization efficiency of computing resources is remarkably optimized, peak value occupation is reduced, the overall reasoning time delay is shortened, and reliable technical support is provided for efficient and stable deployment of a large language model in a complex task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, and in particular relates to a method and system for scheduling language model reasoning resources based on multi-agent collaboration. Background Technology

[0002] In complex reasoning tasks (such as multi-step mathematical solving, logical reasoning, and long sequence planning), Large Language Models (LLMs) have demonstrated powerful natural language understanding and generation capabilities. However, traditional single LLM architectures still face significant challenges when handling multi-step, multi-perspective reasoning: First, a single perspective and knowledge blind spots lead to biased reasoning paths or incomplete logic; second, autoregressive generation mechanisms are prone to generating redundant tokens and illusions, resulting in wasted computational resources; third, the lack of dynamic adaptive mechanisms makes them prone to cognitive overload as task complexity increases, leading to reasoning path degradation, unstable convergence, and excessive peak resource consumption; fourth, reasoning latency is relatively long, especially in long contexts or multi-round iteration scenarios, where end-to-end latency increases significantly, limiting practical deployment efficiency.

[0003] In recent years, although some studies have introduced methods such as chain-of-thought prompts, self-consistent sampling, or external tool enhancements to improve the reasoning ability of single models to some extent, these solutions still cannot completely overcome the aforementioned inherent limitations, especially in resource-constrained or high-concurrency environments, where efficient and stable multi-step reasoning is difficult to achieve. Therefore, there is an urgent need for a technical solution that can simulate multi-role collaboration, possess specialized knowledge support, and achieve dynamic resource scheduling and convergence control through cognitive load perception. This solution should significantly reduce redundant computation, optimize peak resource consumption, shorten overall reasoning latency, and improve the deployment feasibility and system stability of large language models in complex tasks while ensuring reasoning quality. Summary of the Invention

[0004] The purpose of this invention is to provide a resource scheduling method and system for language model inference based on multi-agent collaboration, in order to solve the technical problems of excessively high resource peaks, excessive redundant token generation, prolonged inference latency, and insufficient convergence stability in the existing multi-agent collaborative large language model inference process, caused by the uneven cognitive load of each agent.

[0005] To achieve one of the above-mentioned objectives, one embodiment of the present invention provides a method for scheduling language model inference resources based on multi-agent cooperation, the method comprising:

[0006] The system receives task inputs to be processed, and after the main control agent performs preliminary semantic parsing on the task inputs, it decomposes the tasks and distributes them to multiple auxiliary agents.

[0007] The multiple auxiliary intelligent agents are controlled to perform multi-round dynamic collaborative reasoning from different reasoning function perspectives, based on their respective system prompts and dedicated knowledge bases.

[0008] After each round of inference, the cognitive load index of each auxiliary agent is calculated in real time, and the convergence judgment threshold is dynamically adjusted according to the cognitive load index.

[0009] When the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, the master control agent summarizes the intermediate results of multiple inference rounds and the trajectory of quantitative index changes, executes the final aggregation decision, and outputs the optimized inference result sequence.

[0010] As a further improvement to one embodiment of the present invention, the method further includes, before executing the method, an initialization configuration step, the initialization configuration step including,

[0011] Configure a master control agent and multiple auxiliary agents. The master control agent is responsible for global task decomposition, resource coordination and final result aggregation. The multiple auxiliary agents correspond to different reasoning function perspectives.

[0012] System prompts are constructed for the main control agent and each auxiliary agent. The system prompts include at least the function positioning, mandatory structured output format constraints, prohibition of fabricating facts and mandatory reference to verifiable intermediate representation rules, and self-reflection mechanism.

[0013] Collect historical reasoning logs and build a dedicated knowledge base, including structuring the historical reasoning logs, vectorizing them using a text embedding model, and storing them in a vector database;

[0014] A standardized interface with the large language model inference engine is established through the model context protocol, supporting precise retrieval of intermediate representation vectors, semantic similarity retrieval, and hybrid retrieval with configurable weights.

[0015] As a further improvement to one embodiment of the present invention, the method further includes, the multi-round dynamic collaborative reasoning comprising,

[0016] The master control agent distributes the subtasks and related contexts after the task is decomposed to each auxiliary agent;

[0017] Each auxiliary agent generates its own intermediate reasoning results based on its own system prompts and dedicated knowledge base;

[0018] After each auxiliary agent completes its round of reasoning, the system sequentially calculates the cognitive load index, group reasoning divergence, information entropy value, and weighted average confidence level for each agent.

[0019] Based on the cognitive load index calculated in this round, the divergence threshold, entropy threshold, and confidence threshold are adjusted in real time.

[0020] When the preset strategy switching conditions are met, the system switches to the fast aggregation mode, where the master control agent executes a weighted aggregation mechanism based on function weights and confidence weights to determine the stage-by-stage reasoning conclusion; otherwise, the system continues to execute multi-agent deep collaborative reasoning until the next round.

[0021] As a further improvement to one embodiment of the present invention, the method further includes that the formula for calculating the cognitive load index is:

[0022] ;

[0023] in, This represents the current CPU or memory usage of the intelligent agent. Set a preset resource limit for the system. For the current response delay, The historical average response time To score the decision complexity, a predefined quantization rule based on the number of cue tokens, the depth of the output structure, and the complexity of branch decisions is used. To maximize decision complexity, The current interaction frequency, The historical average interaction frequency, These are empirical coefficients determined in advance through regression fitting of historical collaborative log data.

[0024] As a further improvement to one embodiment of the present invention, the method further includes, in which the step of dynamically adjusting the convergence judgment threshold based on the cognitive load index includes,

[0025] Based on the Cognitive Load Index (CLI) calculated in this round, several thresholds used to determine the convergence of group reasoning opinions are dynamically adjusted, including the divergence threshold, entropy threshold, and confidence threshold; the dynamic adjustment includes,

[0026] The divergence threshold and entropy threshold are adjusted to increase accordingly with the increase of cognitive load index in order to control the tolerance level of reasoning uncertainty and avoid premature truncation.

[0027] The confidence threshold is adjusted to decrease accordingly as the cognitive load index increases, in order to adaptively accelerate the reasoning process and reduce invalid rounds;

[0028] Each dynamically adjusted threshold is compared with the actual divergence, entropy, and weighted average confidence obtained in this round of calculation to determine whether the current inference round meets the convergence condition.

[0029] As a further improvement of one embodiment of the present invention, the method further includes dynamically limiting the maximum number of tokens that each auxiliary agent is allowed to generate in this round of inference, based on the cognitive load index CLI.

[0030] When the group information entropy exceeds the dynamically adjusted entropy threshold, the main control agent is triggered to forcibly prune low-confidence inference branches, thereby reducing invalid inference paths.

[0031] As a further improvement to one embodiment of the present invention, the method further includes, wherein the output optimized inference result sequence comprises:

[0032] The main control agent summarizes the intermediate results of each round of inference, the trajectory of changes in quantitative indicators, and the final convergence state.

[0033] A predefined weighted aggregation model is used to perform the final selection or fusion of candidate result sequences output by multiple agents;

[0034] Output the final inference result sequence after resource optimization, and record the resource consumption index of the corresponding inference path.

[0035] To achieve one of the above-mentioned objectives, an embodiment of the present invention also provides a language model inference resource scheduling system based on multi-agent collaboration, the system comprising a task decomposition module, a multi-agent collaborative inference module, a threshold adaptive module, and a decision output module;

[0036] The task decomposition module is used to receive the task input to be processed, and after the main control agent performs preliminary semantic parsing on the task input, it decomposes the task and distributes it to multiple auxiliary agents.

[0037] The multi-agent collaborative reasoning module is used to control the multiple auxiliary agents to perform multiple rounds of dynamic collaborative reasoning from different reasoning function perspectives based on their respective system prompts and dedicated knowledge bases.

[0038] The threshold adaptive module is used to calculate the cognitive load index of each auxiliary agent in real time after each round of inference, and dynamically adjust the convergence judgment threshold according to the cognitive load index.

[0039] The decision output module is used to, when the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, have the main control agent summarize the intermediate results of multiple inference rounds and the trajectory of quantitative indicator changes, execute the final aggregation decision, and output the optimized inference result sequence.

[0040] To achieve one of the above-mentioned objectives, an embodiment of the present invention also provides an electronic device, including a memory and a processor, characterized in that the memory stores a computer program that can run on the processor, and when the program is executed on the processor, it implements the steps in the language model inference resource scheduling method based on multi-agent cooperation as described above.

[0041] To achieve one of the above-mentioned objectives, an embodiment of the present invention also provides a storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps in the language model inference resource scheduling method based on multi-agent cooperation as described above.

[0042] Compared with existing technologies, this invention provides a language model reasoning resource scheduling method and system based on multi-agent collaboration. By constructing a multi-agent collaborative system with clear division of labor and a dedicated knowledge base, it realizes intelligent simulation of multi-perspective and iterative thinking processes in complex reasoning tasks, effectively reducing the perspective limitations and decision biases of a single model in long-sequence, multi-step reasoning scenarios. Simultaneously, relying on the deep integration of the general knowledge capabilities of a large language model and a task-specific knowledge base, it improves the professionalism and accuracy of intermediate reasoning results. Furthermore, the multi-agent, multi-round dynamic collaboration combined with a cognitive load perception convergence mechanism, as well as dynamic token quantity limits and low-confidence branch pruning strategies, overcomes resource waste, redundant computation, and convergence instability caused by cognitive overload during collaboration. Thus, while ensuring reasoning quality, it significantly optimizes computational resource utilization efficiency, reduces peak resource consumption, and shortens overall reasoning latency, providing reliable technical support for the efficient and stable deployment of large language models in complex tasks. Attached Figure Description

[0043] Figure 1 This is an overall flowchart of the language model inference resource scheduling method based on multi-agent collaboration described in this invention.

[0044] Figure 2 This is a schematic diagram of the architecture of the language model inference resource scheduling system based on multi-agent collaboration described in this invention. Detailed Implementation

[0045] The present invention will now be described in detail with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.

[0046] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0047] In Embodiment 1 of the present invention, the present invention provides a method for scheduling language model inference resources based on multi-agent cooperation, such as... Figure 1 As shown, the method includes,

[0048] S1: Receive the task input to be processed, and after the main control agent performs preliminary semantic parsing on the task input, decompose the task and distribute it to multiple auxiliary agents;

[0049] S2: Control the multiple auxiliary intelligent agents to perform multi-round dynamic collaborative reasoning from different reasoning function perspectives based on their respective system prompts and dedicated knowledge bases;

[0050] S3: After each round of inference, the cognitive load index of each auxiliary agent is calculated in real time, and the convergence judgment threshold is dynamically adjusted according to the cognitive load index.

[0051] S4: When the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, the main control agent summarizes the intermediate results of multiple inference rounds and the trajectory of quantitative index changes, executes the final aggregation decision, and outputs the optimized inference result sequence.

[0052] In one specific embodiment of the present invention, before executing the method, an initialization configuration step is further included, wherein the initialization configuration step specifically comprises:

[0053] Configure a master control agent and multiple auxiliary agents. The master control agent is responsible for global task decomposition, resource coordination and final result aggregation. The multiple auxiliary agents correspond to different reasoning function perspectives.

[0054] System prompts are constructed for the main control agent and each auxiliary agent. The system prompts include at least the function positioning, mandatory structured output format constraints, prohibition of fabricating facts and mandatory reference to verifiable intermediate representation rules, and self-reflection mechanism.

[0055] Collect historical reasoning logs and build a dedicated knowledge base, including structuring the historical reasoning logs, vectorizing them using a text embedding model, and storing them in a vector database;

[0056] A standardized interface with the large language model inference engine is established through the model context protocol, supporting precise retrieval of intermediate representation vectors, semantic similarity retrieval, and hybrid retrieval with configurable weights.

[0057] It should be noted that the initial configuration aims to provide a stable, controllable, and highly specialized agent operating environment for subsequent multi-agent dynamic collaborative reasoning. By completing the definition of agent roles, behavioral constraints, knowledge support, and retrieval channels in one go, a set of reusable "virtual collaborative reasoning team" infrastructure suitable for complex reasoning tasks is formed, thereby ensuring that the entire reasoning process can reach or exceed the level of a single model in terms of accuracy, consistency, resource efficiency, and convergence stability.

[0058] Furthermore, configuring a master intelligent agent and multiple auxiliary intelligent agents is about establishing the organizational structure and division of labor of a multi-agent system. The master intelligent agent undertakes the core responsibilities of global task decomposition, context distribution, conflict coordination, and final result aggregation; each auxiliary intelligent agent corresponds to a different reasoning functional perspective (such as planning perspective, verification perspective, exploration perspective, etc.), and its division of labor design directly simulates the multi-dimensional thinking paths required in complex reasoning tasks.

[0059] Furthermore, constructing system prompts for each agent is designed to strictly constrain the output behavior of the large language model, preventing common problems in general models such as illusions, off-topic statements, and logical deviations. The mandatory elements included in the prompts (functional positioning, structured output constraints, prohibition of fabricated facts and intermediate representation citation rules, and self-reflection mechanisms) collectively ensure that: the output of each agent is highly controllable and consistent; all intermediate inference results have traceable evidence; and the final aggregated result is optimized in terms of logical rigor and resource consumption control.

[0060] Furthermore, collecting historical reasoning logs and building a dedicated knowledge base provides long-term, task-related knowledge support for each agent, compensating for the lack of depth in general-purpose models regarding specific reasoning patterns or historical experience. Through structured processing of historical reasoning trajectories, success / failure cases, and intermediate representations, text embedding vectorization, and vector database storage, an efficient "reasoning memory" is constructed.

[0061] Furthermore, establishing a standardized interface through the model context protocol enables a real-time, efficient interaction channel between the agent and the large language model inference engine. Supported multiple retrieval methods ensure that the agent can quickly and accurately locate relevant context within massive intermediate representations or historical trajectories, thereby reducing redundant computation.

[0062] In one specific embodiment of the present invention, multi-round dynamic collaborative reasoning specifically refers to...

[0063] The master control agent distributes the subtasks and related contexts after the task is decomposed to each auxiliary agent;

[0064] Each auxiliary agent generates its own intermediate reasoning results based on its own system prompts and dedicated knowledge base;

[0065] After each auxiliary agent completes its round of reasoning, the system sequentially calculates the cognitive load index, group reasoning divergence, information entropy value, and weighted average confidence level for each agent.

[0066] Based on the cognitive load index calculated in this round, the divergence threshold, entropy threshold, and confidence threshold are adjusted in real time.

[0067] When the preset strategy switching conditions are met, the system switches to the fast aggregation mode, where the master control agent executes a weighted aggregation mechanism based on function weights and confidence weights to determine the stage-by-stage reasoning conclusion; otherwise, the system continues to execute multi-agent deep collaborative reasoning until the next round.

[0068] It should be noted that multi-round dynamic collaborative reasoning aims to simulate the multi-perspective, iterative thinking process in complex reasoning tasks. Through structured collaboration between agents, it achieves efficient coverage of the task from multi-dimensional in-depth analysis to gradual convergence. This step effectively overcomes the limitations of a single model perspective, knowledge blind spots, and inefficient reasoning paths. Furthermore, by introducing a cognitive load perception mechanism, the collaborative process becomes adaptive, achieving a dynamic balance between computational resources, inference latency, and analysis depth. This significantly improves overall resource utilization efficiency while ensuring high-quality reasoning results.

[0069] Furthermore, the master agent distributes the sub-tasks and related contexts after the task is decomposed to each auxiliary agent to unify information input and ensure that all auxiliary agents work on the same objective and reliable context in the same round of reasoning, thereby avoiding reasoning bias caused by information asymmetry.

[0070] Furthermore, each auxiliary agent generates independent intermediate reasoning results from its own reasoning function perspective based on its own system prompts and dedicated knowledge base, thereby enabling parallel and diversified reasoning path exploration from multiple perspectives.

[0071] Furthermore, the system sequentially calculates the cognitive load index, group reasoning divergence degree, information entropy value, and weighted average confidence score for each agent, aiming to provide a comprehensive and quantitative assessment of the collaborative state in the current round. Specifically: the cognitive load index reflects the resource pressure and processing complexity of a single agent; the group divergence degree and information entropy value quantify the dispersion and uncertainty of the overall reasoning path; and the weighted average confidence score assesses the overall reliability of the intermediate result set.

[0072] Furthermore, based on the cognitive load index calculated in this round, the divergence threshold, entropy threshold, and confidence threshold are adjusted in real time to dynamically adjust the strictness of the convergence judgment according to the actual load state of the current system. When the system load is low, a higher threshold is maintained to pursue a more sufficient inference depth; when the load is high, the threshold is appropriately relaxed to accelerate convergence and avoid the system from getting stuck in an excessively long loop or excessive resource consumption.

[0073] Furthermore, when the preset strategy switching conditions are met, the system switches to the fast aggregation mode. This is based on the aforementioned dynamically adjusted threshold and the current load status to achieve intelligent switching of the collaboration strategy: when the load is high or the inference has matured, the system enters the fast aggregation mode, where the master control agent leads the weighted aggregation to quickly form a phased conclusion; otherwise, the system maintains the deep collaboration mode and continues to iterate in multiple rounds to pursue higher inference quality.

[0074] In a specific implementation of this invention, the strategy switching condition is implemented using the following pseudocode:

[0075] if CLI > 0.7 and current_round > 2:

[0076] switch_mode = 'fast_decision'

[0077] priority_agent = leader_agent # The master agent has the highest priority

[0078] max_rounds = 3

[0079] else:

[0080] switch_mode = 'deep_discussion'

[0081] priority_agent = None”

[0082] The weighted voting mechanism is implemented using the following pseudocode:

[0083] def weighted_vote(agents):

[0084] votes = {}

[0085] for agent in agents:

[0086] votes[agent] = confidence_score[agent] * agent_weight[agent]

[0087] return max(votes, key=votes.get)

[0088] Furthermore, the formula for calculating the cognitive load index is:

[0089] ;

[0090] in, This represents the current CPU or memory usage of the intelligent agent. Set a preset resource limit for the system. For the current response delay, The historical average response time To score the decision complexity, a predefined quantization rule based on the number of cue tokens, the depth of the output structure, and the complexity of branch decisions is used. To maximize decision complexity, The current interaction frequency, The historical average interaction frequency, These are empirical coefficients determined in advance through regression fitting of historical collaborative log data.

[0091] It should be noted that the calculation of the Cognitive Load Index (CLI) is the core quantitative method for realizing the dynamic collaborative adaptive control of multiple agents in this invention. Its fundamental purpose is to objectively assess the computational and cognitive pressure borne by each agent in the current round of collaboration in real time, thereby providing a reliable numerical basis for subsequent adjustments to the convergence threshold, token quantity limits, and decision strategy switching. Through this index, the system can proactively take protective measures (such as accelerating convergence, reducing discussion depth, and pruning inefficient paths) when resources are scarce or task complexity surges, effectively avoiding system overload, response lag, or invalid loops while ensuring inference quality, thus enabling the entire multi-agent collaboration process to have engineering-level controllability and stability.

[0092] Furthermore, employing predefined quantification rules to calculate the decision complexity score transforms the originally difficult-to-quantify decision complexity into a numerical indicator that can be used for computation. By comprehensively scoring based on predefined rules of the number of cue tokens, the depth of the output structure, and the complexity of branch decisions, this ensures that the indicator can objectively reflect the actual cognitive burden faced by the agent in this round of task.

[0093] Furthermore, the weighted linear combination of empirical coefficients determined by pre-regression fitting aims to rationally integrate the above four types of normalized indicators according to their actual impact on the overall system stability and inference efficiency, forming a single comprehensive cognitive load index (CLI).

[0094] In one specific embodiment of the present invention, the convergence judgment threshold is dynamically adjusted based on the cognitive load index, specifically as follows:

[0095] Based on the Cognitive Load Index (CLI) calculated in this round, several thresholds used to determine the convergence of group reasoning opinions are dynamically adjusted, including the divergence threshold, entropy threshold, and confidence threshold; the dynamic adjustment includes,

[0096] The divergence threshold and entropy threshold are adjusted to increase accordingly with the increase of cognitive load index in order to control the tolerance level of reasoning uncertainty and avoid premature truncation.

[0097] The confidence threshold is adjusted to decrease accordingly as the cognitive load index increases, in order to adaptively accelerate the reasoning process and reduce invalid rounds;

[0098] Each dynamically adjusted threshold is compared with the actual divergence, entropy, and weighted average confidence obtained in this round of calculation to determine whether the current inference round meets the convergence condition.

[0099] It should be noted that dynamically adjusting the convergence threshold based on the cognitive load index aims to flexibly regulate the convergence standard of group reasoning opinions according to the real-time cognitive load status of the system, thereby achieving a dynamic balance between collaborative efficiency and resource consumption while maintaining the quality of reasoning.

[0100] Furthermore, based on the cognitive load index calculated in this round, multiple thresholds are dynamically adjusted. This involves using CLI as the core input parameter to perform real-time, targeted modifications to the divergence threshold, entropy threshold, and confidence threshold used to determine the convergence of group opinions. This adjustment process directly responds to the current system load level, ensuring that the threshold settings match the actual operating environment.

[0101] Furthermore, the specific adjustment rules for implementing the thresholds involve defining precise directional rules for the thresholds as they change with the cognitive load index. These rules include increasing the divergence threshold and entropy threshold accordingly with the increase of the cognitive load index to moderately control the system's tolerance level to uncertainty; and decreasing the confidence threshold accordingly with the increase of the cognitive load index to promote adaptive acceleration of the decision-making process.

[0102] Furthermore, the dynamically adjusted thresholds are compared with the actual calculated values ​​to determine the convergence condition. This involves applying the adjusted thresholds to the actual data in this round, thereby objectively determining whether the current inference round has reached convergence. The comparison result can trigger mode switching or continued iteration, ensuring the timely termination or continuation of the collaboration process.

[0103] In a specific embodiment of the present invention, based on the CLI value obtained in this round of calculation, the following are calculated sequentially:

[0104] Calculate the divergence threshold The degree of disagreement among the agents is determined, and a negotiation mechanism is triggered when the degree of disagreement exceeds a certain threshold. This threshold is the degree of disagreement. The calculation formula is:

[0105] ;

[0106] Wherein, 0.25 is the basic divergence threshold, corresponding to the default setting under low system load CLI ≤ 0.5, and 0.1 is the dynamic adjustment coefficient for the divergence threshold. To adjust the trigger, ensure that the threshold begins to increase linearly only when the cognitive load index (CLI) exceeds the baseline value of 0.5;

[0107] Calculate the entropy threshold The entropy threshold is used to measure and control the upper limit of the system's tolerance to uncertainty in the task or environment. The calculation formula is:

[0108] ;

[0109] Wherein, 0.4 is the basic entropy threshold, representing the level of uncertainty that the system can accept under normal load, and 0.1 is the dynamic adjustment coefficient of the entropy threshold, which changes synchronously with the divergence threshold to ensure that the system's tolerance strategy for fuzzy information is consistent;

[0110] Calculate the confidence threshold The confidence level of an individual agent's output is constrained; only outputs not lower than a certain threshold are accepted. The calculation formula is:

[0111] ;

[0112] Among them, 0.85 is the basic confidence threshold, which ensures the high accuracy of the system's decision-making under normal conditions. 0.05 is the dynamic adjustment coefficient of the confidence threshold. This coefficient is negative and has a small value, indicating that the confidence requirement is only cautiously and limitedly relaxed under high load.

[0113] In one specific embodiment of the present invention, the maximum number of tokens that each auxiliary agent is allowed to generate in this round of inference is dynamically limited according to the cognitive load index CLI.

[0114] When the group information entropy exceeds the dynamically adjusted entropy threshold, the main control agent is triggered to forcibly prune low-confidence inference branches, thereby reducing invalid inference paths.

[0115] It should be noted that dynamically limiting the maximum number of tokens based on the cognitive load index and triggering a forced pruning mechanism aims to achieve proactive resource protection and computational efficiency optimization during multi-agent collaborative inference. When a single agent or the entire system faces cognitive overload, the above two mechanisms directly intervene in the depth and breadth of the inference process, thereby significantly reducing the peak total number of tokens generated, reducing low-value computational paths, alleviating GPU / memory pressure, and shortening end-to-end inference latency overall. This mechanism enables the system to maintain stable operation under high-load scenarios, while allowing for more thorough exploration when resources are abundant, thus achieving an engineering-grade balance between inference quality and computational cost.

[0116] Furthermore, based on the cognitive load index (CLI), the maximum number of tokens that each auxiliary agent is allowed to generate in this round is dynamically limited, specifically including the following adjustment logic:

[0117] Maintain a higher token limit when CLI is in a low load range (e.g., CLI ≤ 0.4);

[0118] When CLI enters the medium-to-high load range (e.g., 0.4 < CLI ≤ 0.7), the token limit is gradually tightened using a linear or piecewise function, for example, max_tokens = base_max × (1 - 0.6 × (CLI - 0.4) / 0.3);

[0119] When CLI exceeds a high-load threshold (e.g., CLI > 0.7), further strict limits are imposed, such as forcing max_tokens down to 40%–60% of the base value, and prioritizing token allocation for high-confidence agents. This dynamic limit directly affects the generation and sampling phase of the large language model, ensuring that resource consumption matches the current system pressure and avoiding queue blocking or memory overflow caused by over-generation.

[0120] Furthermore, when the group information entropy exceeds the dynamically adjusted entropy threshold, forced pruning of low-confidence inference branches is triggered. The specific process is as follows:

[0121] The master control agent monitors the information entropy values ​​output by all auxiliary agents in this round in real time;

[0122] If the average or maximum entropy of the population exceeds the H_th threshold dynamically adjusted by CLI, the master agent sorts the candidate inference paths according to the confidence scores of each branch.

[0123] Then, branches with confidence levels below a preset pruning threshold (e.g., 0.65) are forcibly discarded, or only the top k high-confidence paths are retained; the intermediate results corresponding to the pruned branches no longer participate in the context passing and aggregation of subsequent rounds, thereby significantly reducing the computational load and token consumption in the next round.

[0124] In one specific embodiment of the present invention, the optimized inference result sequence is output, specifically,

[0125] The main control agent summarizes the intermediate results of each round of inference, the trajectory of changes in quantitative indicators, and the final convergence state.

[0126] A predefined weighted aggregation model is used to perform the final selection or fusion of candidate result sequences output by multiple agents;

[0127] Output the final inference result sequence after resource optimization, and record the resource consumption index of the corresponding inference path.

[0128] It should be noted that the optimized inference result sequence aims to transform the dispersed intermediate results of multi-agent collaborative inference into a high-quality, low-resource-consumption final output. This step ensures that inference decisions shift from multi-round discussions to a practically usable result sequence. Simultaneously, by recording quantitative metrics and tracing paths, the auditability and reproducibility of the output are improved, thereby achieving closed-loop optimization of the entire inference resource scheduling method.

[0129] Furthermore, summarizing the intermediate results of each round of inference, the trajectory of changes in quantitative indicators, and the final convergence state is crucial for centrally organizing the output of multi-round dynamic collaborative inference, including the intermediate results of each auxiliary agent, the evolution trajectory of key indicators, and the overall convergence flag. This summarization process is uniformly executed by the master agent to ensure information integrity and consistency.

[0130] Furthermore, the use of a predefined weighted aggregation model to select or fuse candidate result sequences is based on functional weights and confidence levels to objectively fuse or select multi-perspective outputs, ensuring the optimal balance between accuracy and resource efficiency in the final result.

[0131] Furthermore, outputting the final inference result sequence after resource optimization and recording resource consumption indicators provides output that can be directly used for downstream tasks, while accumulating data for subsequent system optimization and supporting quantitative evaluation of key performance indicators such as token generation, peak resource usage, and total latency.

[0132] In a second embodiment of the present invention, the present invention provides a language model inference resource scheduling system based on multi-agent cooperation, such as... Figure 2 As shown, the system includes a task decomposition module 1, a multi-agent collaborative reasoning module 2, a threshold adaptive module 3, and a decision output module 4;

[0133] The task decomposition module 1 is used to receive the task input to be processed, and after the main control agent performs preliminary semantic parsing on the task input, it decomposes the task and distributes it to multiple auxiliary agents.

[0134] The multi-agent collaborative reasoning module 2 is used to control the multiple auxiliary agents to perform multiple rounds of dynamic collaborative reasoning from different reasoning function perspectives based on their respective system prompts and dedicated knowledge bases.

[0135] The threshold adaptive module 3 is used to calculate the cognitive load index of each auxiliary agent in real time after each round of inference, and dynamically adjust the convergence judgment threshold according to the cognitive load index.

[0136] The decision output module 4 is used to, when the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, have the main control agent summarize the intermediate results of multiple inference rounds and the trajectory of quantitative indicator changes, execute the final aggregation decision, and output the optimized inference result sequence.

[0137] In a third embodiment of the present invention, the present invention provides an electronic device, including a memory and a processor, characterized in that the memory stores a computer program that can run on the processor, and when the program is executed on the processor, it implements the steps in the language model inference resource scheduling method based on multi-agent cooperation as described above.

[0138] In a fourth embodiment of the present invention, the present invention provides a storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps in the language model inference resource scheduling method based on multi-agent cooperation as described above.

[0139] In summary, this invention provides a method and system for scheduling language model reasoning resources based on multi-agent collaboration. By constructing a multi-agent collaborative system with clear division of labor and a dedicated knowledge base, it achieves intelligent simulation of multi-perspective, iterative thinking processes in complex reasoning tasks, effectively reducing the perspective limitations and decision biases of a single model in long-sequence, multi-step reasoning scenarios. Simultaneously, the deep integration of the general knowledge capabilities of a large language model with a task-specific knowledge base enhances the professionalism and accuracy of intermediate reasoning results. Furthermore, the multi-agent, multi-round dynamic collaboration combined with a cognitive load perception convergence mechanism, dynamic token quantity limits, and low-confidence branch pruning strategies overcome resource waste, redundant computation, and convergence instability caused by cognitive overload during collaboration. Thus, while ensuring reasoning quality, it significantly optimizes computational resource utilization efficiency, reduces peak resource consumption, and shortens overall reasoning latency, providing reliable technical support for the efficient and stable deployment of large language models in complex tasks.

[0140] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the modules described above can be referred to the corresponding process in the aforementioned method implementation, and will not be repeated here.

[0141] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0142] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in a combination of hardware and software functional modules.

[0143] The integrated modules implemented as software functional modules described above can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer system (which may be a personal computer, server, or network system, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A resource scheduling method for language model inference based on multi-agent cooperation, characterized in that: include, The system receives task inputs to be processed, and after the main control agent performs preliminary semantic parsing on the task inputs, it decomposes the tasks and distributes them to multiple auxiliary agents. The multiple auxiliary intelligent agents are controlled to perform multi-round dynamic collaborative reasoning from different reasoning function perspectives, based on their respective system prompts and dedicated knowledge bases. After each round of inference, the cognitive load index of each auxiliary agent is calculated in real time, and the convergence judgment threshold is dynamically adjusted according to the cognitive load index. When the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, the master control agent summarizes the intermediate results of multiple inference rounds and the trajectory of quantitative index changes, executes the final aggregation decision, and outputs the optimized inference result sequence.

2. The language model inference resource scheduling method based on multi-agent cooperation according to claim 1, characterized in that: Before executing the method, an initialization configuration step is also included, which includes: Configure a master control agent and multiple auxiliary agents. The master control agent is responsible for global task decomposition, resource coordination and final result aggregation. The multiple auxiliary agents correspond to different reasoning function perspectives. System prompts are constructed for the main control agent and each auxiliary agent. The system prompts include at least the function positioning, mandatory structured output format constraints, prohibition of fabricating facts and mandatory reference to verifiable intermediate representation rules, and self-reflection mechanism. Collect historical reasoning logs and build a dedicated knowledge base, including structuring the historical reasoning logs, vectorizing them using a text embedding model, and storing them in a vector database; A standardized interface with the large language model inference engine is established through the model context protocol, supporting precise retrieval of intermediate representation vectors, semantic similarity retrieval, and hybrid retrieval with configurable weights.

3. The language model inference resource scheduling method based on multi-agent cooperation according to claim 2, characterized in that: The multi-round dynamic collaborative reasoning includes, The master control agent distributes the subtasks and related contexts after the task is decomposed to each auxiliary agent; Each auxiliary agent generates its own intermediate reasoning results based on its own system prompts and dedicated knowledge base; After each auxiliary agent completes its round of reasoning, the system sequentially calculates the cognitive load index, group reasoning divergence, information entropy value, and weighted average confidence level for each agent. Based on the cognitive load index calculated in this round, the divergence threshold, entropy threshold, and confidence threshold are adjusted in real time. When the preset strategy switching conditions are met, the system switches to the fast aggregation mode, where the master control agent executes a weighted aggregation mechanism based on function weights and confidence weights to determine the stage-by-stage reasoning conclusion; otherwise, the system continues to execute multi-agent deep collaborative reasoning until the next round.

4. The language model inference resource scheduling method based on multi-agent cooperation according to claim 3, characterized in that: The formula for calculating the cognitive load index is as follows: ; in, This represents the current CPU or memory usage of the intelligent agent. Set a preset resource limit for the system. For the current response delay, The historical average response time To score the decision complexity, a predefined quantization rule based on the number of cue tokens, the depth of the output structure, and the complexity of branch decisions is used. To maximize decision complexity, The current interaction frequency, The historical average interaction frequency, These are empirical coefficients determined in advance through regression fitting of historical collaborative log data.

5. The language model inference resource scheduling method based on multi-agent cooperation according to claim 4, characterized in that: The dynamic adjustment of the convergence judgment threshold based on the cognitive load index includes: Based on the Cognitive Load Index (CLI) calculated in this round, several thresholds used to determine the convergence of group reasoning opinions are dynamically adjusted, including the divergence threshold, entropy threshold, and confidence threshold; the dynamic adjustment includes, The divergence threshold and entropy threshold are adjusted to increase accordingly with the increase of cognitive load index in order to control the tolerance level of reasoning uncertainty and avoid premature truncation. The confidence threshold is adjusted to decrease accordingly as the cognitive load index increases, in order to adaptively accelerate the reasoning process and reduce invalid rounds; Each dynamically adjusted threshold is compared with the actual divergence, entropy, and weighted average confidence obtained in this round of calculation to determine whether the current inference round meets the convergence condition.

6. The language model inference resource scheduling method based on multi-agent cooperation according to claim 1, characterized in that: It also includes, Based on the cognitive load index CLI, the maximum number of tokens that each auxiliary agent is allowed to generate in this round of inference is dynamically limited. When the group information entropy exceeds the dynamically adjusted entropy threshold, the main control agent is triggered to forcibly prune low-confidence inference branches, thereby reducing invalid inference paths.

7. The language model inference resource scheduling method based on multi-agent cooperation according to claim 6, characterized in that: The optimized inference result sequence includes, The main control agent summarizes the intermediate results of each round of inference, the trajectory of changes in quantitative indicators, and the final convergence state. A predefined weighted aggregation model is used to perform the final selection or fusion of candidate result sequences output by multiple agents; Output the final inference result sequence after resource optimization, and record the resource consumption index of the corresponding inference path.

8. A language model inference resource scheduling system based on multi-agent cooperation, characterized in that: It includes a task decomposition module, a multi-agent collaborative reasoning module, a threshold adaptive module, and a decision output module; The task decomposition module is used to receive the task input to be processed, and after the main control agent performs preliminary semantic parsing on the task input, it decomposes the task and distributes it to multiple auxiliary agents. The multi-agent collaborative reasoning module is used to control the multiple auxiliary agents to perform multiple rounds of dynamic collaborative reasoning from different reasoning function perspectives based on their respective system prompts and dedicated knowledge bases. The threshold adaptive module is used to calculate the cognitive load index of each auxiliary agent in real time after each round of inference, and dynamically adjust the convergence judgment threshold according to the cognitive load index. The decision output module is used to, when the dynamically adjusted convergence condition is met or the preset maximum inference rounds are reached, have the main control agent summarize the intermediate results of multiple rounds of inference and the trajectory of changes in quantitative indicators, execute the final aggregation decision, and output the optimized inference result sequence.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can run on the processor, and when the program is executed on the processor, it implements the steps of the language model inference resource scheduling method based on multi-agent cooperation as described in any one of claims 1-7.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the steps in the language model inference resource scheduling method based on multi-agent cooperation as described in any one of claims 1-7.

Citation Information

Cited By

  • A multi-agent thinking optimization method and system based on dynamic adjustment and a medium

    CN122133818A