A task processing method and related apparatus

By generating arbitration results in a multi-agent system to terminate unnecessary agent execution, the problems of wasted computing resources and context management are solved, achieving efficient utilization of computing resources and accurate intent perception.

CN123157368APending Publication Date: 2026-11-24LENOVO SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611316676.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In multi-agent systems, existing technologies cannot effectively solve the problems of wasted computing resources and context management under concurrent response mechanisms, resulting in high-value agents being mistakenly terminated and computing resources being unable to be recovered.

Method used

By identifying multiple agents that execute the target task in parallel, obtaining their intermediate state information, generating arbitration results based on the relationships between them, terminating the execution of unnecessary agents, and retaining valuable agents to continue execution.

Benefits of technology

It reduces computational resource consumption, improves the accuracy of intent perception, and ensures task integrity and effective utilization of computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157368A_ABST
    Figure CN123157368A_ABST
Patent Text Reader

Abstract

The application discloses a task processing method and related device, and relates to the technical field of task processing, and comprises the following steps: determining a plurality of intelligent agents for executing a target task in parallel; obtaining intermediate state information generated by each intelligent agent in the process of executing the target task; generating arbitration results corresponding to each intelligent agent according to the correlation between the intermediate state information corresponding to each intelligent agent, wherein the arbitration result indicates termination or continuous execution of the target task; and terminating the execution of the target task by a first intelligent agent, wherein the first intelligent agent comprises an intelligent agent whose arbitration result indicates termination of the execution of the target task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a task processing method and related apparatus. Background Technology

[0002] In a multi-agent system's concurrent response mechanism, multiple agents respond concurrently to the same task. For example, in a group chat scenario, multiple agents simultaneously receive the same user message and each determines whether a response is needed; in an automated workflow scenario, multiple agents are triggered by the same event and execute their respective processing logic in parallel; and in a collaborative office scenario, multiple agents collaboratively process the same document. While the concurrent response mechanism preserves the ability of each agent to proactively intervene, it suffers from wasted computational resources and context management issues. Summary of the Invention

[0003] In view of the above problems, this application provides a task processing method and related apparatus. The specific solution is as follows:

[0004] The first aspect of this application provides a task processing method, including:

[0005] Identify multiple agents that will execute the target task in parallel;

[0006] Obtain intermediate state information generated by each of the intelligent agents during the execution of the target task, and generate an arbitration result corresponding to each of the intelligent agents based on the correlation between the intermediate state information of each intelligent agent. The arbitration result indicates whether to terminate or continue the execution of the target task.

[0007] The execution of the target task by the first intelligent agent is terminated, wherein the first intelligent agent includes an intelligent agent whose arbitration result indicates that the execution of the target task is terminated.

[0008] In one possible implementation, the multiple agents that perform the target task in parallel include:

[0009] Receive the target task;

[0010] In response to the target task, a plurality of initial agents are determined to perform the target task;

[0011] Multiple initial agents are caused to enter an invisible reasoning phase in response to the target task, and the invisible reasoning phase does not output information to the outside world.

[0012] Identify multiple agents that are in the invisible reasoning phase and are executing the target task in parallel.

[0013] In one possible implementation, intermediate state information generated by multiple agents during the execution of the target task is obtained, including:

[0014] For each agent, obtain the intermediate representation of the agent in the current sampling round, the intermediate representation including deep semantic features and / or attention pattern features;

[0015] Based on the intermediate representation, the latent state features of the agent in the current sampling round are obtained;

[0016] The intermediate state information includes the latent state features.

[0017] In one possible implementation, identifying multiple agents in the invisible reasoning phase who are executing the target task in parallel includes:

[0018] In response to the arrival of a sampling period, multiple agents in the invisible inference phase and performing the target task in parallel are identified, wherein the sampling period includes at least one of a time period or a decoding step period.

[0019] In one possible implementation, obtaining the latent state features of the agent in the current sampling round based on the intermediate representation includes:

[0020] Obtain the progress difference feature of the agent in the current sampling round. The progress difference feature is used to characterize the deviation of the decoding time of the agent from the decoding time of other agents and / or the deviation of the number of decoding steps from the number of decoding steps of other agents in the current sampling round.

[0021] Based on the intermediate representation and the progress difference feature, the latent state feature of the agent in the current sampling round is obtained.

[0022] In one possible implementation, based on the intermediate representation and the progress difference feature, the latent state features of the agent in the current sampling round are obtained, including:

[0023] Obtain the derived features of the agent in the current sampling round. The derived features include at least one of the following: key-value cache attention pooling result, character probability distribution entropy, end character prediction probability, tool call tendency score, and number of generated characters.

[0024] Based on the intermediate representation, the progress difference feature, and the derived feature, the latent state feature of the agent in the current sampling round is obtained.

[0025] In one possible implementation, an arbitration result corresponding to each intelligent agent is generated based on the correlation between the intermediate state information corresponding to each agent, including:

[0026] Based on the correlation between the latent features of each agent, the first type of index of each agent is obtained.

[0027] The arbitration result of each agent is determined based on a set of arbitration indicators, wherein the set of arbitration indicators includes a first type of indicator for each agent.

[0028] In one possible implementation, the first type of metric includes independent increments and / or latent state similarity with other agents; wherein the latent state similarity is used to characterize the degree of similarity of the latent state features of different agents in the current sampling round, and the independent increments are used to characterize the differentiated contributions provided relative to other agents.

[0029] In one possible implementation, an arbitration result corresponding to each intelligent agent is generated based on the correlation between the intermediate state information corresponding to each agent, including:

[0030] The latent feature trajectories corresponding to each of the aforementioned agents are input into the arbitration model. The arbitration model outputs an arbitration result sequence based on the correlation between the intermediate state information corresponding to each of the aforementioned agents. The arbitration result sequence includes the arbitration results of each agent. The latent feature trajectories include latent features under each sampling round arranged in time sequence.

[0031] A second aspect of this application provides a task processing apparatus, comprising:

[0032] The arbitration object determination unit is used to determine multiple intelligent agents that execute the target task in parallel.

[0033] The arbitration result generation unit is used to obtain intermediate state information generated by each of the intelligent agents during the execution of the target task, and generate an arbitration result corresponding to each of the intelligent agents according to the correlation between the intermediate state information of each intelligent agent. The arbitration result indicates whether to terminate or continue the execution of the target task.

[0034] An arbitration result response unit is used to terminate the execution of the target task by a first intelligent agent, the first intelligent agent including an intelligent agent whose arbitration result indicates termination of the execution of the target task.

[0035] A third aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0036] The memory is used to store computer programs;

[0037] The processor is used to execute the computer program so that the electronic device can implement the task processing method of the first aspect or any implementation thereof.

[0038] By means of the above technical solution, this application provides a task processing method and related apparatus, comprising: determining multiple intelligent agents that execute a target task in parallel; obtaining intermediate state information generated by each of the intelligent agents during the execution of the target task; generating an arbitration result corresponding to each of the intelligent agents based on the correlation between the intermediate state information corresponding to each of the intelligent agents, wherein the arbitration result indicates termination or continuation of the execution of the target task; terminating the execution of the target task by a first intelligent agent, wherein the first intelligent agent includes the intelligent agent whose execution of the target task is indicated by the arbitration result. Attached Figure Description

[0039] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0040] Figure 1 A flowchart illustrating a task processing method provided in an embodiment of this application;

[0041] Figure 2 A flowchart illustrating yet another task processing method provided in an embodiment of this application;

[0042] Figure 3 A flowchart illustrating yet another task processing method provided in an embodiment of this application;

[0043] Figure 4 A flowchart illustrating yet another task processing method provided in an embodiment of this application;

[0044] Figure 5 A flowchart illustrating yet another task processing method provided in an embodiment of this application;

[0045] Figure 6 This is a schematic diagram of the structure of a task processing system provided in an embodiment of this application;

[0046] Figure 7 This is a schematic diagram of the structure of a task processing device provided in an embodiment of this application;

[0047] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0049] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0050] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0051] When multiple agents concurrently respond to the same task, if agent scheduling decisions are made based solely on static information before inference begins, the true processing intent formed by the agents after initial inference cannot be perceived. This can lead to high-value agents being prematurely eliminated, while irrelevant agents continue to occupy subsequent decoding and scheduling resources. If scheduling decisions are made after inference is complete, all token generation, key-value cache growth, and scheduling overhead become irrecoverable, and inconsistencies can easily arise between the hidden output and the shared context, affecting subsequent inference logic. Therefore, there is an urgent need for a scheme that can perform joint judgments based on the actual internal states generated by agents during inference and make agent scheduling decisions before a complete answer is formed, in order to reduce computational resource consumption and improve the accuracy of intent perception.

[0052] Based on this, embodiments of this application provide a task processing method. The task processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0053] Reference Figure 1 , Figure 1 This is a flowchart illustrating a task processing method provided in an embodiment of this application, such as... Figure 1 As shown in the embodiment of this application, a task processing method may include steps S101 to S103, which are described in detail below.

[0054] S101. Identify multiple intelligent agents that will execute the target task in parallel.

[0055] In this embodiment, the target task includes a reasoning task to be performed, and the multiple intelligent agents that execute the target task in parallel include artificial intelligence entities with different or the same functional roles, such as a legal review intelligent agent, a financial analysis intelligent agent, and a compliance inspection intelligent agent.

[0056] In this embodiment, during the execution of the target task, multiple agents currently executing the target task in parallel are identified. For example, when the execution time of the target task reaches a first duration threshold, or when the target task reaches a preset stage, multiple agents currently in an active state and executing the target task are identified. Alternatively, this step can be triggered from the start time of the target task at a certain sampling frequency to begin a round of arbitration, thereby adapting to the dynamic changes in the state of the agents during the inference process.

[0057] S102. Obtain the intermediate state information generated by each agent during the execution of the target task, and generate the arbitration result corresponding to each agent based on the correlation between the intermediate state information of each agent.

[0058] In this embodiment, after receiving the target task, each agent is submitted to the inference engine for pre-filling and early decoding. Each agent's corresponding generated sequence produces inference data during the inference process. The intermediate state information includes feature data obtained directly or indirectly based on the inference data, representing latent features that characterize the current inference direction and content tendency of each agent. Optionally, the intermediate state information includes at least one of the following: the intermediate layer hidden state of the generated sequence during model inference, attention distribution features, and token probability distribution.

[0059] In this embodiment, after obtaining the intermediate state information of each agent, joint analysis is performed based on the correlation between the intermediate state information of each agent to determine the correlation between the intermediate state information of each agent. The correlation is used to characterize the mutual relationship between the agents in the latent state feature space. For example, the correlation includes the degree of correlation between the intermediate state information of each agent or the degree of independent contribution provided by each agent relative to other agents. Based on the correlation, an arbitration result corresponding to each agent is generated, and the arbitration result indicates whether the corresponding agent should continue to execute the target task.

[0060] For example, if the intermediate state information of two agents is highly similar, it indicates that the two agents are forming mutually repetitive response directions. Based on this association, an arbitration result is generated instructing one of the agents to terminate the execution. If the intermediate state information of one agent is highly different from that of other agents, that is, the degree of independent contribution is high relative to the contributions provided by other agents, it indicates that the agent is providing complementary analysis content. Based on this association, an arbitration result is generated instructing the agent to continue the execution.

[0061] S103, terminate the execution of the target task by the first intelligent agent.

[0062] In this embodiment, the first intelligent agent includes an intelligent agent whose arbitration result indicates termination of the execution of the target task. Specifically, for the intelligent agent whose arbitration result indicates termination of the execution of the target task, the intelligent agent is controlled to stop continuing to execute the target task.

[0063] Optionally, for agents whose arbitration results indicate termination of the target task, the generated sequence of that agent is removed from the scheduling queue. The agent no longer participates in the subsequent decoding process, and its generated but not yet output content is cleared. The terminated agent no longer participates in the subsequent processing of the target task, and its generated intermediate data is neither output nor written to the shared context. For example, in a scenario where multiple agents execute the target task in parallel, if the arbitration result indicates that the response direction of one agent is highly redundant with that of another agent, the system terminates that agent's continued execution of the target task, and its generated content is not output.

[0064] As can be seen from the above technical solution, the task processing method provided in this application identifies multiple intelligent agents that execute a target task in parallel. It obtains intermediate state information generated by each intelligent agent during the execution of the target task, and generates an arbitration result corresponding to each intelligent agent based on the correlation between the intermediate state information of each agent. The arbitration result indicates whether to terminate or continue executing the target task. The execution of the target task by a first intelligent agent is terminated. The first intelligent agent includes the agent whose execution of the target task is indicated by the arbitration result to be terminated. Therefore, this solution can achieve joint arbitration decision-making by multiple intelligent agents based on the correlation between the intermediate state information of multiple intelligent agents during the inference process, terminating intelligent agents that do not need to continue execution, thereby reducing computational resource consumption and improving the accuracy of intent perception.

[0065] It should be noted that for agents whose arbitration results instruct them to continue executing the target task—that is, the second agent—they are allowed to continue the subsequent processing of the target task. For example, if the arbitration results instruct an agent to provide complementary analysis, that agent is allowed to continue executing the target task, and the final complete answer is written into the shared context. This preserves agents that need to continue executing, avoids the unintended termination of valuable content, and ensures the integrity of the answer while reducing computational resource consumption.

[0066] In one alternative embodiment, Figure 2 This is a flowchart illustrating yet another task processing method provided in an embodiment of this application. Figure 2 S101 is shown, which is the specific implementation process for determining multiple agents that execute the target task in parallel, such as... Figure 2 As shown, this method includes:

[0067] S201, Receive target task.

[0068] In this embodiment, the target task includes a reasoning task to be executed. Optionally, the target task can be obtained by receiving input messages, uploaded files, or workflow trigger signals through a message queue, application programming interface, or event listening mechanism. For example, the target task may be a contract review task triggered by responding to the user message "Please help me review this contract," or a document processing task triggered by an automated workflow.

[0069] S202. In response to the target task, determine multiple initial agents for performing the target task.

[0070] In this embodiment, in response to the triggering of the target task, an initial set of intelligent agents corresponding to the target task is determined according to the intelligent agent function definition and triggering rules. Optionally, based on the task type, content characteristics, or triggering conditions of the target task, intelligent agents associated with the target task are selected from multiple registered intelligent agents as initial intelligent agents. For example, when the target task is a contract review task, a legal review intelligent agent, a compliance inspection intelligent agent, and a financial analysis intelligent agent are determined as initial intelligent agents to perform the contract review task according to the intelligent agent function definition and triggering rules, thereby determining multiple initial intelligent agents.

[0071] S203, enabling multiple initial agents to respond to the target task and enter the invisible reasoning stage.

[0072] In this embodiment, the invisible reasoning stage does not output information to the outside world.

[0073] Specifically, each initial agent is controlled to enter an invisible reasoning phase. During this phase, each agent performs pre-filling and early decoding. All intermediate data generated during this phase is temporarily stored in a server-side buffer and is neither output to the user nor written to the shared context. In other words, the reasoning process of the agents is not visible to the outside world during the invisible reasoning phase, and the user cannot perceive the intermediate output of this phase. For example, in a contract review task, the legal review agent, compliance check agent, and financial analysis agent each perform pre-filling and early decoding during the invisible reasoning phase, generating initial byte tokens, which are temporarily stored in the server-side buffer. The user cannot see any intermediate generated content.

[0074] S204. Identify multiple agents that are in the invisible reasoning stage and are executing the target task in parallel.

[0075] In this embodiment, during the invisible reasoning phase, multiple agents that are currently active and executing the target task are identified. Specifically, this step is executed at least once during the execution of the target task to identify multiple agents that need to be arbitrated in the current round. It should be noted that since agents that were terminated by the arbitration result in the previous round are no longer included in the scope of identification in the current round, the number of agents identified in each round is either reduced or unchanged compared to the previous round.

[0076] As can be seen from the above technical solutions, the task processing method provided in this application identifies multiple agents that are active and executing the target task during the invisible reasoning phase. Since the invisible reasoning phase does not output information to the outside world, the intermediate generated content of each agent is not output to the user end, nor is it written to the shared context, thereby ensuring that the arbitration process occurs before the answer is visible to the outside world, and avoiding any incomplete output that is visible to the outside world from the terminated agent.

[0077] In an optional embodiment, S204, namely, the specific implementation method for determining multiple agents in the invisible reasoning stage and executing the target task in parallel, includes:

[0078] In response to the arrival of the sampling period, identify multiple agents that are in the invisible inference phase and are executing the target task in parallel.

[0079] In this embodiment, multiple agents in the invisible inference stage who are executing the target task in parallel are identified and a new round of agent identification and arbitration is initiated by triggering a sampling period. The sampling period includes at least one of a time period or a decoding step period. Optionally, when the sampling period is a time period, it is triggered once every target time interval, for example, once every 200 milliseconds. When the sampling period is a decoding step period, it is triggered once after completing the target number of decoding steps, for example, once after completing 3 decoding steps.

[0080] Based on this, the determination of multiple agents is performed according to the sampling period, which enables dynamic selection of agents in multiple rounds during the invisible reasoning stage.

[0081] See Figure 3 , Figure 3 This is a flowchart illustrating a task processing method provided in an embodiment of this application, showing the specific implementation flow of the task processing method, such as... Figure 3 As shown, this method includes:

[0082] S301, Receive target task.

[0083] S302. In response to the target task, determine multiple initial agents for performing the target task.

[0084] S303, enables multiple initial agents to respond to the target task and enter the invisible reasoning stage.

[0085] S304. In response to the arrival of the sampling period, identify multiple agents that are in the invisible inference phase and are executing the target task in parallel.

[0086] S305. Obtain the intermediate state information generated by each agent during the execution of the target task, and generate the arbitration result corresponding to each agent based on the correlation between the intermediate state information of each agent.

[0087] In this embodiment, either a pause-and-wait approach or a parallel execution approach can be used in each round. Specifically, the pause-and-wait approach means that when a new round of agent determination and arbitration is triggered, the reasoning execution of each agent is paused, and the arbitration result is generated. After the arbitration result is generated, the execution of each agent is controlled to continue or terminate. The parallel execution approach means that when a new round of agent determination and arbitration is triggered, the reasoning execution of each agent and the arbitration process are carried out in parallel, and the generation of the arbitration result does not affect the continuous reasoning of each agent during the arbitration process.

[0088] S306. For the first intelligent agent, terminate the execution of the target task by the first intelligent agent.

[0089] In this embodiment, for the first agent whose arbitration result indicates termination of the target task execution, the generated sequence of the agent is removed from the scheduling queue. The agent no longer participates in the subsequent decoding process, and the content it has generated but has not yet been output is cleared. The terminated agent no longer participates in the subsequent processing flow of the target task, and the intermediate data it has generated is not output to the outside world or written to the shared context.

[0090] S307. For the second intelligent agent, enable the second intelligent agent to continuously execute the target task.

[0091] In this embodiment, under the pause waiting mode, the agent that indicates to continue execution according to the arbitration result resumes reasoning execution. Under the parallel execution mode, the arbitration process and reasoning execution are carried out simultaneously, and the agent that indicates to continue execution according to the arbitration result continues reasoning execution during the arbitration process.

[0092] It should be noted that S304 to S307 are repeated according to the sampling period until the invisible inference phase ends. The number of agents determined in each round is either reduced or unchanged compared to the previous round. When the invisible inference phase ends and the visible output phase is about to begin, for agents that have been continuously determined to continue execution in each round, they are controlled to switch from the invisible inference phase to the visible output phase, and all their generated and subsequently generated content is output and written to the shared context.

[0093] As can be seen from the above technical solutions, the task processing method provided in this application determines an initial agent in response to the target task and controls it to enter the invisible reasoning stage. Multiple rounds of agent determination and arbitration are triggered according to the sampling period. During the reasoning process, joint arbitration decisions are made based on the correlation between the intermediate state information of multiple agents. Agents that do not need to continue execution are terminated, while agents that need to continue execution are retained. After the invisible reasoning stage ends, the agents that continue execution are controlled to switch to the visible output stage, thereby reducing the consumption of computing resources and improving the accuracy of intent perception.

[0094] In an optional embodiment, the intermediate state information includes latent features. In S102, the specific method for obtaining the intermediate state information generated by multiple agents during the execution of the target task includes:

[0095] For each agent, obtain the agent's intermediate representation in the current sampling round, and obtain the agent's latent state features in the current sampling round based on the intermediate representation.

[0096] In this embodiment, the intermediate representation includes deep semantic features and / or attention pattern features. The deep semantic features are derived from the hidden state vectors of the Transformer's higher-level modules, obtained through multi-layer vector fusion, and are used to encode the agent's understanding of the task and its tendency to answer specific topics. The attention pattern features are obtained from the KV cache attention distribution matrix through pooling dimensionality reduction, and are used to characterize the agent's attention focus areas and contextual dependencies. Each agent performs inference during the invisible inference phase. Its corresponding generated sequence generates a sub-sequence during the decoding inference process. This sub-sequence is part of the complete generated sequence and is temporarily stored in the server-side buffer, not output to external callers or users, providing the basis for inference in the visible output.

[0097] In summary, this scheme, based on the aforementioned intermediate representation, obtains the latent state features of each agent in the current sampling round, thereby transforming the reasoning state of each agent into a feature representation that can be used for association analysis. The intermediate representation integrates the agent's deep semantic understanding and attention-focusing information during the reasoning process, accurately reflecting each agent's understanding direction of the target task and its tendency to provide responses. Therefore, the latent state features extracted based on the intermediate representation can be used to infer reliable associations between agents.

[0098] In one optional embodiment, a specific method for obtaining the latent state features of an agent in the current sampling round based on the intermediate representation includes: directly using the intermediate representation as the latent state features of the agent in the current sampling round; or, obtaining the progress difference features of the agent in the current sampling round, and obtaining the latent state features of the agent in the current sampling round based on the intermediate representation and the progress difference features.

[0099] In this embodiment, the progress difference feature is used to characterize the deviation of the decoding time from the decoding time of other agents and / or the deviation of the decoding steps from the decoding steps of other agents in the current sampling round. Since the decoding speed of each agent is not exactly the same, when sampling is triggered according to different sampling periods, the inference progress of each agent at the same sampling time or the same number of decoding steps will differ. This difference will affect the comparability of intermediate information of each agent. Therefore, the progress difference feature is introduced to improve the accuracy of the correlation.

[0100] In this embodiment, when the sampling period is a time period, each agent is sampled at the same physical moment, but their decoding progress is different. The progress difference feature includes the decoding step deviation, that is, the difference between the number of characters generated by the current agent and the maximum number of characters generated in the group. Taking the sampling period as a duration t as an example, at the sampling time T, the number of characters generated by agent A is s1, the number of characters generated by agent B is s2, and the number of characters generated by agent C is s3, and s1 < s2 < s3. The progress difference feature of agent A is s3-s1, and the progress difference feature of agent B is s3-s2.

[0101] In this embodiment, when the sampling period is the decoding step period, each agent is sampled at the same decoding step, but the physical time at which they reach that decoding step is different. In this case, the progress difference feature includes the decoding time deviation. Taking the sampling period as the decoding step s as an example, each agent is sampled at the Nth step. The sampling time of agent A is t1, the sampling time of agent B is t2, and the sampling time of agent C is t3, and t1 < t2 < t3. Then, the progress difference feature of agent A is t3-t1, and the progress difference feature of agent B is t3-t2.

[0102] In summary, progress difference features can express the differences in reasoning progress among agents at sampling times, enabling subsequent association analysis to align latent features with different progress levels to a unified time or progress benchmark. Based on this, latent features are obtained by combining intermediate representations and progress difference features. These latent features not only contain the semantic understanding information of the agents but also the progress alignment information of each agent in the sampling time sequence, thereby improving the accuracy of association analysis.

[0103] In one optional embodiment, the latent state features of the agent in the current sampling round are obtained based on the intermediate representation and the progress difference features, including: concatenating the intermediate representation and the progress difference features to obtain the latent state features. Alternatively, derived features of the agent in the current sampling round are obtained, based on the intermediate representation, the progress difference features, and the derived features, to obtain the latent state features of the agent in the current sampling round.

[0104] In this embodiment, the derived features include at least one of the following: key-value cache attention pooling result, character probability distribution entropy, end-character prediction probability, tool invocation tendency score, and the number of generated characters. Specifically, the key-value cache attention pooling result characterizes the distribution of the agent's attention intensity to different parts of the context. The character probability distribution entropy characterizes the degree of uncertainty the agent experiences when generating characters; a higher entropy value indicates that the agent hesitates among multiple characters and the inference direction has not yet converged. The end-character prediction probability characterizes the agent's confidence in predicting whether the current sequence is about to end. The tool invocation tendency score characterizes the agent's intention to invoke external tools during inference. The number of generated characters characterizes the agent's generation progress in the current sampling round.

[0105] In this embodiment, intermediate representations, progress difference features, and derived features can be concatenated or weighted and fused to obtain a multi-dimensional latent feature vector.

[0106] In summary, derived features, intermediate representations, and progress difference features together constitute latent features, enabling latent features to characterize the reasoning state of an agent from multiple dimensions and further improve the accuracy of association analysis.

[0107] In an optional embodiment, S102, namely, the specific method for generating the arbitration result corresponding to each intelligent agent based on the correlation between the intermediate state information corresponding to each intelligent agent, includes:

[0108] Based on the correlation between the latent features of each agent, the first type of index for each agent is obtained, and the arbitration result for each agent is determined based on the arbitration index set.

[0109] In this embodiment, the arbitration index set includes a first type of index for each agent. The first type of index characterizes the correlation characteristics of each agent relative to other agents in the current sampling round. Optionally, the first type of index includes independent increments and / or latent similarity with other agents. The latent similarity characterizes the degree of similarity of latent features of different agents in the current sampling round. It is obtained by calculating the cosine similarity or Euclidean distance between the latent feature vectors of each agent and is used to identify whether multiple agents are forming a convergent response direction. The independent increment characterizes the differentiated contribution provided by each agent relative to other agents. It is obtained by calculating the deviation of each agent's latent features from the mean of the latent features of other agents within the group and is used to identify whether each agent provides information content different from other agents.

[0110] It should be noted that, based on the first type of indicators mentioned above, it is possible to determine whether there is content redundancy or complementarity between the reasoning processes of each agent, and thus determine the arbitration result of each agent based on the arbitration indicator set. For example, when the latent similarity between agent A and agent B is higher than the similarity threshold, it indicates that the two are forming a convergent response direction, and at least one of the two agents can be identified as an agent to be terminated based on this indicator. As another example, when the independent increment of agent C is higher than the increment threshold, it indicates that agent C provides significantly differentiated information content compared to other agents, and agent C can be identified as an agent to be retained based on this indicator.

[0111] Furthermore, in an optional embodiment, the arbitration index set also includes a second type of index for each agent. Then, based on the correlation between the intermediate state information corresponding to each agent, the arbitration result corresponding to each agent is generated, further including:

[0112] Obtain the latent state feature trajectory corresponding to each agent, and obtain the second type of index of the agent based on the latent state feature trajectory corresponding to the agent.

[0113] In this embodiment, the latent feature trajectory includes latent features from each sampling round arranged in chronological order, which are used to reflect the evolution trend of the reasoning direction and content tendency of each agent in the time dimension.

[0114] In this embodiment, the second type of metric includes the relevance between each agent and the target task and / or the non-contribution convergence score of each agent. The relevance characterizes the degree of matching between each agent and the target task. Optionally, the relevance is obtained by calculating the semantic similarity between latent features and the feature representation of the target task. A higher relevance indicates that the agent's reasoning direction is more in line with the requirements of the target task. The non-contribution convergence score characterizes whether each agent converges in an irrelevant direction. It is obtained by analyzing the stability and convergence direction of the latent feature trajectory within a time window. A higher non-contribution convergence score indicates that the agent is stably converging in a direction deviating from the target task or already fully covered by other agents.

[0115] In summary, based on the second type of indicators mentioned above, the continuous value of each agent in the execution of the target task can be evaluated.

[0116] Based on this, the arbitration index set includes at least one first-class index for indicating the relationship between agents and at least one second-class index for indicating the reasoning quality of each agent. Figure 4 This is a flowchart illustrating yet another task processing method provided in an embodiment of this application. Figure 4 The illustration shows a specific method for determining the arbitration results of each agent based on a set of arbitration indicators in one alternative embodiment, such as... Figure 4As shown, this method includes:

[0117] S401. Determine whether each agent meets the target termination condition based on the arbitration index set.

[0118] In this embodiment, the target termination condition includes: a first type of indicator satisfying a first termination condition, and / or a second type of indicator satisfying a second termination condition. For example, the target termination condition includes: either a first type of indicator satisfying the first termination condition or a second type of indicator satisfying the second termination condition; that is, if at least one of the first or second type of indicators satisfies the termination condition corresponding to that single indicator, then the agent satisfies the target termination condition. As another example, the target termination condition includes: either a first type of indicator satisfying the first termination condition or a second type of indicator satisfying the second termination condition; that is, if both the first and second type of indicators satisfy their corresponding termination conditions, then the agent satisfies the target termination condition.

[0119] In this embodiment, the first type of metric includes latent similarity and independent increment. The first termination condition includes a latent similarity with at least one target agent exceeding a first threshold for a first consecutive cumulative round and / or an independent increment falling below a second threshold for a second consecutive cumulative round. The first and second cumulative rounds are pre-configured values, denoted as K1 and K2. The latent similarity corresponds to the first threshold; when an agent's latent similarity exceeds the first threshold for K1 consecutive rounds, it indicates that the agent's reasoning direction highly overlaps with that of the target agent. The independent increment corresponds to the second threshold; when an agent's independent increment falls below the second threshold for K2 consecutive rounds, it indicates that the agent has failed to provide a differentiated contribution relative to other agents.

[0120] In this embodiment, the second type of metric includes relevance and non-contribution convergence score. The second termination condition includes relevance being below a third threshold for three consecutive cumulative rounds and / or non-contribution convergence score being above a fourth threshold for four consecutive cumulative rounds. The third and fourth cumulative rounds are pre-configured values, denoted as K3 and K4. Relevance corresponds to the third threshold; when the agent's relevance is below the third threshold for K3 consecutive rounds, it indicates that the agent's inference direction has deviated from the target task. The non-contribution convergence score corresponds to the fourth threshold; when the agent's non-contribution convergence score is above the fourth threshold for K4 consecutive rounds, it indicates that the agent is steadily converging in a direction that is already fully covered by other agents or is unrelated to the target task.

[0121] It should be noted that the target termination condition, the various thresholds involved, and the cumulative number of rounds can all be dynamically configured according to the target task or the performance of the agent.

[0122] S402. If the agent meets the target termination condition, the candidate arbitration result for the agent is determined to include termination of execution.

[0123] In this embodiment, if the agent meets the target termination condition, it means that the agent has at least one of the following situations during the reasoning process:

[0124] The reasoning direction of this agent is highly consistent with that of the target agent.

[0125] The agent failed to provide a differentiated contribution compared to other agents.

[0126] The agent's reasoning direction has deviated from the target task.

[0127] The agent is steadily converging in directions that are already fully covered by other agents or are irrelevant to the target task.

[0128] Based on this, the candidate arbitration result for the intelligent agent is to terminate execution.

[0129] S403. If the agent does not meet the target termination conditions, the candidate arbitration results for the agent are determined to include continued execution.

[0130] In this embodiment, if the agent does not meet the target termination condition, it means that the agent has not encountered any of the above situations, its reasoning direction is consistent with the target task, it has a differentiated contribution with each target agent and has not converged in an irrelevant direction, then the candidate arbitration result of the agent is to continue execution.

[0131] S404. Determine the arbitration result of the agent based at least on the candidate arbitration results of the agent.

[0132] As can be seen from the above technical solutions, the task processing method provided in this application introduces a set of arbitration indicators by introducing a first type of indicator and a second type of indicator. Based on the target termination condition, the method performs joint judgment on each agent to determine whether each agent meets the termination condition, thereby realizing joint arbitration decision-making for multiple agents, avoiding decision bias caused by relying solely on the independent judgment of a single agent, and improving the accuracy of arbitration decision-making.

[0133] To ensure the successful completion of the target task and avoid insufficient number of agents to continue execution due to excessive termination, this application also provides a group-level security check mechanism. That is, by adding quantity constraints, a comprehensive judgment is made on the candidate arbitration results of each agent to determine the final arbitration result for each agent. In one optional embodiment, the specific method for determining the arbitration result of an agent based at least on its candidate arbitration results includes:

[0134] The number of target agents is counted. Based on the number of target agents and the candidate arbitration results of each agent, the arbitration result of each agent is determined so that the number of agents whose arbitration result is to continue execution is not less than the number constraint.

[0135] In this embodiment, if the number of agents whose candidate arbitration results are to terminate execution results in the number of agents continuing execution being less than a preset quantity constraint, the arbitration results of some agents whose candidate arbitration results are to terminate execution will be adjusted to continue execution, so as to ensure that at least a preset number of agents are retained to continue executing the target task.

[0136] In summary, by setting quantity constraints, we can avoid situations where no agent outputs a response, thus ensuring the normal completion of the target task.

[0137] In an optional embodiment, the task processing method provided in this application introduces a protection flag mechanism before determining whether each agent meets the target termination condition based on the arbitration index set. That is, the arbitration index set also includes protection flags, which are used to indicate whether the agent meets the protection conditions. If the protection flag indicates that the agent meets the protection conditions, the candidate arbitration result of the agent is determined to continue execution.

[0138] Optionally, the protection conditions include at least one of the following: the agent is explicitly specified by the user, the agent assumes mandatory responsibilities, the agent's tool call is in progress and has not yet been completed, or the agent is configured by the system to participate in the explicit reasoning of the target task. When the agent's protection flag indicates that any of the above protection conditions are met, the agent's candidate arbitration result is directly determined to continue execution, and subsequent target termination condition judgments are no longer executed.

[0139] Based on this, a specific method for determining whether each agent meets the target termination condition based on the arbitration index set includes: if the protection flag indicates that the agent does not meet the protection condition, then determining whether each agent meets the target termination condition based on the arbitration index set.

[0140] In other words, agents that meet the protection conditions are given priority for retention and are not terminated based on the arbitration index set. For agents that do not meet the protection conditions, the arbitration index set is used to determine whether they meet the target termination conditions, thus covering all agents that need to be retained and avoiding misjudgments of agents that need protection.

[0141] See Figure 5 , Figure 5 This is a flowchart illustrating a task processing method provided in an embodiment of this application. S102 shows a specific implementation flow for generating arbitration results corresponding to each intelligent agent based on the correlation between the intermediate state information corresponding to each agent. Figure 5 As shown, this method includes:

[0142] S501. Determine whether each intelligent agent meets the protection conditions.

[0143] In this embodiment, the system checks the protection flags of each agent to determine whether each agent meets the protection conditions. The protection conditions include at least one of the following: the agent is explicitly specified by the user, the agent assumes mandatory responsibilities, the agent's tool call is in progress and has not yet been completed, or the agent is configured by the system to respond.

[0144] S502. If the intelligent agent meets the protection conditions, the candidate arbitration result of the intelligent agent shall be directly determined as to continue execution.

[0145] In this embodiment, for an agent that meets the protection conditions, its candidate arbitration result is directly determined to continue execution, and the subsequent termination condition judgment process of S503 to S506 is no longer executed.

[0146] Furthermore, for intelligent agents that do not meet the protection conditions, the subsequent termination condition judgment process S503 to S506 is executed.

[0147] S503, obtain the latent state similarity and independent increment of each agent.

[0148] In this embodiment, for agents that do not meet the protection conditions, the system obtains a first type of index for each agent based on the correlation between the latent state features corresponding to each agent. The first type of index is used to characterize the correlation characteristics of each agent relative to other agents in the current sampling round.

[0149] S504. Obtain the correlation and non-contribution convergence score of each agent.

[0150] In this embodiment, a second type of index is obtained for each agent based on its latent state feature trajectory. This second type of index is used to characterize the reasoning quality of each agent during the execution of the target task.

[0151] S505. Determine whether each agent meets the target termination condition.

[0152] In this embodiment, the target termination condition includes at least one of the following: latent similarity is higher than a first threshold for a first consecutive cumulative round, independent increment is lower than a second threshold for a second consecutive cumulative round, relevance is lower than a third threshold for a third consecutive cumulative round, and non-contribution convergence score is higher than a fourth threshold for a fourth consecutive cumulative round.

[0153] S506. If the agent meets the target termination condition, the candidate arbitration result for the agent is determined to be termination of execution. If the agent does not meet the target termination condition, the candidate arbitration result for the agent is determined to be continued execution.

[0154] S507. Determine the arbitration result for each agent based on the candidate arbitration results and quantity constraints.

[0155] In this embodiment, the number of target agents whose candidate arbitration result is to continue execution is counted. If the number of agents whose candidate arbitration result is to terminate execution results in the number of agents continuing execution being less than 1, the arbitration result of some agents whose candidate arbitration result is to terminate execution is adjusted to continue execution, ensuring that at least one agent continues to execute the target task.

[0156] As can be seen from the above technical solution, this solution does not immediately terminate the agent based on a single score of a sampling. Instead, it first checks the protection conditions, then checks the termination evidence, and finally performs a group-level security check. This avoids the accidental termination of important agents, ensures the normal completion of the target task, and improves the reliability of arbitration decisions.

[0157] In another optional embodiment, S102, based on the correlation between the intermediate state information corresponding to each of the intelligent agents, an arbitration result corresponding to each intelligent agent is generated, including:

[0158] The latent state feature trajectories corresponding to each of the aforementioned agents are input into the arbitration model, which then outputs an arbitration result sequence based on the correlation between the intermediate state information corresponding to each of the aforementioned agents.

[0159] In this embodiment, the arbitration result sequence includes the arbitration results of each agent, wherein the latent feature trajectory includes latent features under each sampling round arranged in chronological order.

[0160] Specifically, the arbitration model is a trained artificial intelligence model, such as a graph neural network, a cross-attention network, or a large language model. The input to this arbitration model is the latent feature trajectory of each agent across multiple sampling rounds, i.e., the sequence of latent features generated by each agent in time. Internally, the arbitration model automatically identifies the correlations between the latent features of each agent, including the degree of latent similarity, the degree of differentiated contribution, the degree of matching with the target task, and whether convergence is in an irrelevant direction, and outputs the arbitration results of each agent end-to-end based on these correlations.

[0161] Based on this, by adopting an arbitration model, the mapping relationship from latent feature trajectories to arbitration results can be automatically learned, thereby improving the intelligence level and generalization ability of arbitration decision-making.

[0162] Figure 6 This application provides a schematic diagram of the structure of a task processing system, illustrating the system's architecture, such as... Figure 6 As shown, the task processing system includes a task triggering module 601, a concurrency management module 602, a latent state sampling module 603, a latent state field maintenance module 604, a latent state arbitrator 605, and a scheduling execution module 606.

[0163] Combination Figure 6 The architecture of the task processing system shown below describes the complete task processing flow of multi-agent joint arbitration scheduling based on the concurrent latent state field in scenarios where multiple agents concurrently execute target tasks, as follows:

[0164] The task triggering module 601 receives user messages from external input. For the target task corresponding to the user message, it generates a globally unique group identifier group_id. According to the task configuration, it triggers multiple agents (agents A1~An) to execute the target task corresponding to the user message, and assigns multiple agents to the same generation group. It then outputs a task request carrying group_id and sends it to the concurrency management module.

[0165] The concurrency management module 602 receives a task request carrying a group_id, determines the concurrency group, and obtains n generated sequences within the concurrency group, namely {sequence_1 ... sequence_n}. After each agent in the control group performs pre-filling, it enters the invisible inference stage. The intermediate data generated in the invisible inference stage is temporarily stored in the server buffer, not output externally, not written to the shared context, and the computational latent layers of multiple agents are bound to the same group_id. Every N decoding steps, all active generated sequences in the invisible inference stage are selected and output to the latent sampling module.

[0166] Each time the latent state sampling module 603 receives an active generation sequence, it performs multi-source state sampling processing based on each generation sequence to obtain the latent state features of the corresponding agent at the current time. Optionally, multi-source state sampling includes collecting hidden states, key-value cache representations (KV cache), logits probability / end character EOS probability, tool call tendency, streaming submission status, and progress difference features. Further, the multi-source state sampling results are fused to obtain the latent state feature vectors corresponding to each generation sequence at sampling position t, and each latent state feature vector is output to the latent state field maintenance module 604.

[0167] The latent field maintenance module 604 receives the latent feature vectors of each generated sequence at sampling time t. At the same sampling time t, it aggregates the latent feature vectors of all sequences to construct the concurrent latent field Z_t={z_{1,t},z_{2,t},...,z_{n,t}} for the current time, where z_{1,t}~z_{n,t} represent the latent feature vectors of sequences_1~sequence_n at time t. For each generated sequence, the latent feature vectors from historical sampling times are continuously accumulated to obtain the latent feature trajectory, for example, {Z_{tK},...,Z_t}, where Z_{tK}~Z_t represent the latent feature vectors from time tK to time t, respectively. Based on this, the latent field maintenance module maintains the latent feature trajectory containing snapshots of multiple generated sequences at multiple historical sampling times, refreshing the latent field snapshot each time a sampling time update is completed. It should be noted that if agents within a group use different base models, the latent state can be mapped to a unified vector space through a projection layer. The latent state field maintenance module 604 inputs the latent state feature trajectories corresponding to each generated sequence, as well as the group_id and sequence_id corresponding to each sequence, into the latent state arbitrator 605.

[0168] The latent arbitrator 605 is equipped with an arbitration model trained offline. Based on the latent feature trajectories corresponding to each generated sequence, the arbitration model identifies the correlation between each agent in the latent feature space and outputs a joint control vector U_t=[u_1,u_2,...,u_n] at time t. Each component in the vector corresponds to the arbitration result of a generated sequence. For example, u_1 represents the arbitration result corresponding to sequence_1. The arbitration result includes either continue or abort. The joint control vector is then sent to the scheduling execution module 606.

[0169] It should be noted that the arbitration model is trained offline. Optionally, the training process includes: recording the complete generation results of multiple agents under the same target task and the latent state field at each sampling time; labeling agents that should be retained, irrelevant agents, redundant agents, and agents that provide complementary information; constructing prefix samples using the latent trajectories before the current sampling time as input and the final contribution set as supervision labels, thereby avoiding the leakage of complete answers or future information into the model input. Based on this, ensemble models, cross-attention networks, graph neural networks, pairwise ranking models, linear probing, or rule-and-model hybrid systems can be used for training, and the valuable agent retention rate, termination accuracy, token saving rate, latency, and response quality are verified based on the test set to obtain the arbitration model. In this way, the arbitration model can learn the end-to-end mapping from latent feature trajectories to arbitration results without manually setting indicator calculation rules and decision thresholds. During online inference, predictions are made only based on the latent trajectories before the current sampling time, ensuring consistency with the prefix sample construction method during offline training.

[0170] The scheduling execution module 606 receives the joint control vector and performs flow splitting for each generated sequence within the group according to the arbitration result: if the arbitration result is continue, the generated sequence continues execution and enters the next round of sampling cycle listening. If the arbitration result is abort, the subsequent decoding process of the generated sequence is terminated, the sequence is removed from the scheduling queue, the key-value buffer corresponding to the sequence is released, byte stream output is turned off, the content of the generated sequence is not displayed externally, nor written to the context, and it no longer participates in the sampling arbitration loop.

[0171] The above describes a task processing method provided by an embodiment of this application. The following will describe the related apparatus for performing the above task processing method.

[0172] Please see Figure 7 , Figure 7 This is a schematic diagram of a task processing device provided in an embodiment of this application. Figure 7 As shown, the task processing device 700 includes:

[0173] Arbitration object determination unit 701 is used to determine multiple intelligent agents that execute the target task in parallel;

[0174] Arbitration result generation unit 702 is used to obtain intermediate state information generated by each of the intelligent agents during the execution of the target task, and generate an arbitration result corresponding to each of the intelligent agents according to the correlation between the intermediate state information of each intelligent agent. The arbitration result indicates whether to terminate or continue the execution of the target task.

[0175] Arbitration result response unit 703 is used to terminate the execution of the target task by the first intelligent agent, the first intelligent agent including an intelligent agent whose arbitration result indicates termination of the execution of the target task.

[0176] In one possible implementation, when the arbitration object determination unit is used to determine multiple agents performing the target task in parallel, it is specifically used for:

[0177] Receive the target task; in response to the target task, determine multiple initial agents for executing the target task; cause the multiple initial agents to enter an invisible reasoning phase in response to the target task, wherein the invisible reasoning phase does not output information to the outside world; determine multiple agents that are in the invisible reasoning phase and are executing the target task in parallel.

[0178] In one possible implementation, the arbitration result generation unit, when used to obtain intermediate state information generated by multiple agents during the execution of a target task, is specifically used for:

[0179] For each agent, obtain the agent's intermediate representation in the current sampling round, the intermediate representation including deep semantic features and / or attention pattern features; obtain the agent's latent state features in the current sampling round based on the intermediate representation; the intermediate state information includes the latent state features.

[0180] In one possible implementation, when the arbitration object determination unit is used to determine multiple agents in the invisible reasoning stage who are executing the target task in parallel, it is specifically used for:

[0181] In response to the arrival of a sampling period, multiple agents in the invisible inference phase and performing the target task in parallel are identified, wherein the sampling period includes at least one of a time period or a decoding step period.

[0182] In one possible implementation, the arbitration result generation unit, when obtaining the latent state features of the agent in the current sampling round based on the intermediate representation, is specifically used for:

[0183] Obtain the progress difference feature of the agent in the current sampling round. The progress difference feature is used to characterize the deviation of the decoding time of the agent from the decoding time of other agents and / or the deviation of the number of decoding steps from the number of decoding steps of other agents in the current sampling round. Based on the intermediate representation and the progress difference feature, obtain the latent state feature of the agent in the current sampling round.

[0184] In one possible implementation, the arbitration result generation unit, when obtaining the latent state features of the agent in the current sampling round based on the intermediate representation and the progress difference features, specifically uses the following:

[0185] Obtain the derived features of the agent in the current sampling round. The derived features include at least one of the following: key-value cache attention pooling result, character probability distribution entropy, end character prediction probability, tool call tendency score, and number of generated characters. Based on the intermediate representation, the progress difference feature, and the derived features, obtain the latent state features of the agent in the current sampling round.

[0186] In one possible implementation, the arbitration result generation unit, when generating arbitration results corresponding to each intelligent agent based on the correlation between the intermediate state information corresponding to each intelligent agent, specifically performs the following:

[0187] Based on the correlation between the latent features of each agent, a first type of index is obtained for each agent; the arbitration result of each agent is determined based on the arbitration index set, wherein the arbitration index set includes the first type of index of each agent.

[0188] In one possible implementation, the first type of metric includes independent increments and / or latent state similarity with other agents; wherein the latent state similarity is used to characterize the degree of similarity of the latent state features of different agents in the current sampling round, and the independent increments are used to characterize the differentiated contributions provided relative to other agents.

[0189] In one possible implementation, the arbitration result generation unit, when generating arbitration results corresponding to each intelligent agent based on the correlation between the intermediate state information corresponding to each intelligent agent, specifically performs the following:

[0190] The latent feature trajectories corresponding to each of the aforementioned agents are input into the arbitration model. The arbitration model outputs an arbitration result sequence based on the correlation between the intermediate state information corresponding to each of the aforementioned agents. The arbitration result sequence includes the arbitration results of each agent. The latent feature trajectories include latent features under each sampling round arranged in time sequence.

[0191] This application also provides an electronic device in its embodiments. (See reference...) Figure 8 The diagram illustrates a structural schematic of an electronic device suitable for implementing the task processing method in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0192] like Figure 8As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. When the electronic device is powered on, the RAM 803 also stores various programs and data required for the operation of the electronic device. The processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0193] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, memory cards, hard drives, etc.; and communication devices 809. Communication device 809 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0194] This application also provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the task processing methods provided in this application.

[0195] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the task processing methods provided in this application.

[0196] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0197] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0198] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0199] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A task processing method, comprising: Identify multiple agents that will execute the target task in parallel; Obtain intermediate state information generated by each of the intelligent agents during the execution of the target task, and generate an arbitration result corresponding to each of the intelligent agents based on the correlation between the intermediate state information of each intelligent agent. The arbitration result indicates whether to terminate or continue the execution of the target task. The execution of the target task by the first intelligent agent is terminated, wherein the first intelligent agent includes an intelligent agent whose arbitration result indicates that the execution of the target task is terminated.

2. The task processing method according to claim 1, wherein determining multiple agents that execute the target task in parallel includes: Receive the target task; In response to the target task, a plurality of initial agents are determined to perform the target task; Multiple initial agents are caused to enter an invisible reasoning phase in response to the target task, and the invisible reasoning phase does not output information to the outside world. Identify multiple agents that are in the invisible reasoning phase and are executing the target task in parallel.

3. The task processing method according to claim 1, obtaining intermediate state information generated by multiple agents during the execution of a target task, including: For each agent, obtain the intermediate representation of the agent in the current sampling round, the intermediate representation including deep semantic features and / or attention pattern features; Based on the intermediate representation, the latent state features of the agent in the current sampling round are obtained; The intermediate state information includes the latent state features.

4. The task processing method according to claim 3, wherein determining the multiple agents in the invisible reasoning stage and executing the target task in parallel includes: In response to the arrival of a sampling period, multiple agents in the invisible inference phase and performing the target task in parallel are identified, wherein the sampling period includes at least one of a time period or a decoding step period.

5. The task processing method according to claim 3, wherein obtaining the latent state features of the agent in the current sampling round based on the intermediate representation includes: Obtain the progress difference feature of the agent in the current sampling round. The progress difference feature is used to characterize the deviation of the decoding time of the agent from the decoding time of other agents and / or the deviation of the number of decoding steps from the number of decoding steps of other agents in the current sampling round. Based on the intermediate representation and the progress difference feature, the latent state feature of the agent in the current sampling round is obtained.

6. The task processing method according to claim 5, based on the intermediate representation and the progress difference feature, obtaining the latent state features of the agent in the current sampling round, includes: Obtain the derived features of the agent in the current sampling round. The derived features include at least one of the following: key-value cache attention pooling result, character probability distribution entropy, end character prediction probability, tool call tendency score, and number of generated characters. Based on the intermediate representation, the progress difference feature, and the derived feature, the latent state feature of the agent in the current sampling round is obtained.

7. The task processing method according to claim 1, wherein an arbitration result corresponding to each intelligent agent is generated based on the correlation between the intermediate state information corresponding to each intelligent agent, including: Based on the correlation between the latent features of each agent, the first type of index of each agent is obtained. The arbitration result of each agent is determined based on a set of arbitration indicators, wherein the set of arbitration indicators includes a first type of indicator for each agent.

8. The task processing method according to claim 7, wherein the first type of metric includes independent increments and / or latent state similarity with other agents; wherein, The latent state similarity is used to characterize the degree of similarity of the latent state features of different agents in the current sampling round, and the independent increment is used to characterize the differentiated contribution provided relative to other agents.

9. The task processing method according to claim 1, wherein an arbitration result corresponding to each intelligent agent is generated based on the correlation between the intermediate state information corresponding to each intelligent agent, comprising: The latent feature trajectories corresponding to each of the aforementioned agents are input into the arbitration model. The arbitration model outputs an arbitration result sequence based on the correlation between the intermediate state information corresponding to each of the aforementioned agents. The arbitration result sequence includes the arbitration results of each agent. The latent feature trajectories include latent features under each sampling round arranged in time sequence.

10. A task processing apparatus, comprising: The arbitration object determination unit is used to determine multiple intelligent agents that execute the target task in parallel. The arbitration result generation unit is used to obtain intermediate state information generated by each of the intelligent agents during the execution of the target task, and generate an arbitration result corresponding to each of the intelligent agents according to the correlation between the intermediate state information of each intelligent agent. The arbitration result indicates whether to terminate or continue the execution of the target task. An arbitration result response unit is used to terminate the execution of the target task by a first intelligent agent, the first intelligent agent including an intelligent agent whose arbitration result indicates termination of the execution of the target task.