Task allocation method and device, electronic equipment, storage medium and program product

By decomposing the initial task and mapping relationships to determine the agent, the problem of low agent utilization is solved, and agent load balancing and task execution efficiency are improved.

CN120909736APending Publication Date: 2025-11-07CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511161010.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In existing technologies, the utilization rate of intelligent agents is low, with some agents being busy while others are idle.

Method used

By decomposing the initial task, determining the task type of each subtask, and assigning the subtasks to the agents that have not processed subtasks or have been assigned the longest since the last subtask, based on the mapping relationship, the workload of the agents is balanced.

Benefits of technology

It improves the utilization rate of intelligent agents, avoids situations where agents are idle or have an uneven workload, and improves task execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909736A_ABST
    Figure CN120909736A_ABST
Patent Text Reader

Abstract

The invention provides a task allocation method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of data processing.The method comprises the steps that an initial task is decomposed, and a plurality of subtasks and task types corresponding to the subtasks are obtained; determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, wherein the first mapping relationship is a mapping relationship between different execution nodes and different task types; a first agent corresponding to each subtask is determined, the first agent is an agent which does not process the subtask in a plurality of agents or an agent which has the longest time from last subtask allocation, and the plurality of agents are agents corresponding to execution nodes; and each subtask is allocated to the corresponding first intelligent agent. The utilization rate of the intelligent agent can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and in particular to a task allocation method and device, electronic equipment, storage medium and program product. BACKGROUND

[0002] With the development of agent technology, the execution efficiency of a task can be effectively improved by multiple agents cooperating to execute the task. In the related art, a task is first decomposed into multiple subtasks, and then the multiple subtasks are allocated to different agents, so as to execute the task by multiple agents cooperating. However, in the related art, the execution of the subtasks by the agents is not considered when the subtasks are allocated to the agents, and there is a situation that some agents are busy and some agents are idle, resulting in low utilization of the agents.

[0003] It can be seen that the related art has the problem of low utilization of the agents. SUMMARY

[0004] Embodiments of the present application provide a task allocation method and device, electronic equipment, storage medium and program product to solve the problem of low utilization of the agents in the related art.

[0005] To solve the above problems, the present application is implemented as follows:

[0006] In a first aspect, the embodiments of the present application provide a task allocation method, comprising:

[0007] decomposing an initial task to obtain multiple subtasks and a task type corresponding to each subtask;

[0008] determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types;

[0009] determining a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been idle for the longest time since the last time a subtask was allocated, the multiple agents being agents corresponding to the execution nodes;

[0010] allocating each subtask to the corresponding first agent.

[0011] In a second aspect, the embodiments of the present application further provide a task allocation device, comprising:

[0012] a decomposition module configured to decompose an initial task to obtain multiple subtasks and a task type corresponding to each subtask;

[0013] The first determining module is configured to determine the execution node corresponding to each subtask based on the first mapping relationship and the task type, wherein the first mapping relationship is a mapping relationship between different execution nodes and different task types.

[0014] The second determining module is configured to determine the first agent corresponding to each subtask, wherein the first agent is an agent that has not processed a subtask or an agent that has been away from the last time of assigning a subtask for the longest time among a plurality of agents, and the plurality of agents are agents corresponding to the execution nodes.

[0015] The assigning module is configured to assign each subtask to the corresponding first agent.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, including a transceiver and a processor,

[0017] The processor is configured to decompose an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask.

[0018] The processor is further configured to determine the execution node corresponding to each subtask based on the first mapping relationship and the task type, wherein the first mapping relationship is a mapping relationship between different execution nodes and different task types.

[0019] The processor is further configured to determine the first agent corresponding to each subtask, wherein the first agent is an agent that has not processed a subtask or an agent that has been away from the last time of assigning a subtask for the longest time among a plurality of agents, and the plurality of agents are agents corresponding to the execution nodes.

[0020] The processor is further configured to assign each subtask to the corresponding first agent.

[0021] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the task assignment method of the first aspect.

[0022] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the task assignment method of the first aspect.

[0023] In a sixth aspect, the present application further provides a computer program product, including computer instructions, wherein the computer instructions, when executed by a processor, implement the steps of the task assignment method of the first aspect.

[0024] In the embodiment of the present application, the task allocation method comprises: decomposing an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask; determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types; determining a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been away from the last time of allocating a subtask for the longest time among a plurality of agents, the plurality of agents being agents corresponding to the execution node; and allocating each subtask to the corresponding first agent. In this way, the execution node is determined through the task type of the subtask, and then the first agent is determined from the plurality of agents corresponding to the execution node, the first agent being an agent that has not processed a subtask or an agent that has been away from the last time of allocating a subtask for the longest time among the plurality of agents, so that after each subtask is allocated to the corresponding first agent, the number of subtasks allocated by the plurality of agents corresponding to the execution node is balanced, avoiding the situation that some agents are busy and some agents are idle, thereby improving the utilization rate of the agents. BRIEF DESCRIPTION OF DRAWINGS

[0025] To make the technical solutions of the embodiments of the present application clearer, the drawings needed in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0026] Figure 1 is a flowchart of a task allocation method provided by the embodiment of the present application;

[0027] Figure 2 is a schematic diagram of a relationship between a subtask and a neighboring subtask provided by the embodiment of the present application;

[0028] Figure 3 is one of schematic diagrams of a two-dimensional agent array provided by the embodiment of the present application;

[0029] Figure 4 is another schematic diagram of a two-dimensional agent array provided by the embodiment of the present application;

[0030] Figure 5 is a data transmission schematic diagram provided by the embodiment of the present application;

[0031] Figure 6 is a schematic diagram of an agent platform provided by the embodiment of the present application;

[0032] Figure 7 is a structural diagram of a task allocation device provided by the embodiment of the present application;

[0033] Figure 8 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0035] Please refer to Figure 1 , Figure 1 is a flowchart of a task allocation method provided by an embodiment of the present application, as shown in Figure 1 , comprising the following steps:

[0036] Step 101, decomposing an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask.

[0037] The initial task is a task that needs to be processed by multiple agents in cooperation. By decomposing the initial task into multiple subtasks, the multiple subtasks can be allocated to different agents, and each agent can process one or more subtasks to achieve cooperative processing of the initial task by multiple agents.

[0038] The task type is the task type of the subtask, and the task types of different subtasks can be the same or different. For different agents, the task types of the subtasks they can execute are also different. When allocating subtasks to agents, it is necessary to consider that the agent can process the subtask, and usually the allocation of subtasks is realized through the task type of the subtask, so that the agent after allocation can process the subtask.

[0039] Step 102, determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types.

[0040] The first mapping relationship is a mapping relationship between different execution nodes and different task types. After decomposing the initial task to obtain the task type of the subtask, the execution node of each subtask can be determined according to the first mapping relationship and the task type, and through the execution node, the subtask can be allocated to the agent that can execute it.

[0041] The first mapping relationship is a mapping relationship created before the initial task is allocated, the execution node is a node processing a subtask of a specific task type, the execution node corresponds to at least one agent, and when the subtask of the task type corresponding to the execution node is decomposed, the first mapping relationship can be used to quickly determine that the execution node is a node for task allocation, and the subtask is allocated to an agent that can execute the subtask by the execution node.

[0042] In step 103, a first agent corresponding to each subtask is determined, the first agent being an agent that has not processed a subtask or an agent that has been idle for the longest time since the last subtask allocation among a plurality of agents, the plurality of agents being agents corresponding to the execution node.

[0043] The plurality of agents are agents corresponding to the execution node, and each of the plurality of agents can be used to execute a subtask allocated by the execution node. When allocating tasks, different agents need to be balanced to avoid a situation in which some agents are heavily loaded while other agents are always idle. Therefore, the first agent, which is an agent that has not processed a subtask or an agent that has been idle for the longest time since the last subtask allocation, is preferentially allocated. In this way, the number of subtasks allocated to each agent is balanced as much as possible, so that each agent processes the same or similar number of subtasks within a certain period of time.

[0044] In step 104, each subtask is allocated to the corresponding first agent.

[0045] In the embodiment of the application, the task allocation method comprises: decomposing an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask; determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types; determining a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been idle for the longest time since the last subtask allocation among a plurality of agents, the plurality of agents being agents corresponding to the execution node; and allocating each subtask to the corresponding first agent. In this way, the execution node is determined based on the task type of the subtask, and the first agent is determined from the plurality of agents corresponding to the execution node. The first agent is an agent that has not processed a subtask or an agent that has been idle for the longest time since the last subtask allocation. After each subtask is allocated to the corresponding first agent, the number of subtasks allocated by the plurality of agents corresponding to the execution node is balanced, and a situation in which some agents are busy while other agents are idle is avoided, thereby improving the utilization rate of the agents.

[0046] In an embodiment, the initial task is decomposed into a plurality of subtasks, and each subtask corresponds to a task type, which includes:

[0047] The initial task is decomposed into a plurality of subtasks, and each subtask corresponds to a task type and a position code, and the position code of each subtask is used to represent the execution order, and the position codes of adjacent two subtasks in the plurality of subtasks are the same or different.

[0048] The determination of the first agent corresponding to each subtask includes:

[0049] In the case that the first subtask corresponding position code corresponds to the second mapping relationship in the first preset mapping relationship set, the first agent corresponding to the position code is determined based on the second mapping relationship, the second mapping relationship is the mapping relationship between the position codes of different subtasks and different agents, and the first subtask is one of the plurality of subtasks.

[0050] It should be noted that the plurality of subtasks obtained by decomposing the initial task have an execution order, and when the initial task is executed by a plurality of agents, the execution order between the plurality of subtasks needs to be considered to execute different subtasks in turn. The above-mentioned position code is the relative position of the subtask in the initial task, and the execution order can be determined by the position code of each subtask.

[0051] The first preset mapping relationship set pre-stores a plurality of second mapping relationships, and the second mapping relationship is the mapping relationship between the position code and the agent. In this way, after the position code of the subtask is determined, it is determined whether there is a second mapping relationship corresponding to the position code in the first preset mapping relationship set, and in the case that there is, the first agent is directly determined through the second mapping relationship, and it is not necessary to determine the first agent from the plurality of agents in the execution node, which effectively improves the allocation efficiency.

[0052] Among them, the first preset mapping relationship set only includes the second mapping relationship corresponding to part of the position codes, and when allocating the subtask, it is necessary to determine whether there is a mapping relationship corresponding to the position code in the first preset mapping relationship set through the position code, and in the case that there is, the first agent is directly determined through the second mapping relationship, and in the case that there is not, the first agent is determined from the plurality of agents.

[0053] In the embodiment of the present application, in the case that the second mapping relationship corresponding to the position code of the first subtask exists in the first preset mapping relationship set, the first agent corresponding to the position code is determined based on the second mapping relationship, and the second mapping relationship is the mapping relationship between the position codes corresponding to different subtasks and different agents. In this way, by determining whether the second mapping relationship corresponding to the position code exists in the first preset mapping relationship set, the first agent is quickly determined based on the second mapping relationship in the case that the second mapping relationship exists, and it is not necessary to determine the first agent from the multiple agents in the execution node, thereby effectively improving the allocation efficiency.

[0054] In the case that the second mapping relationship corresponding to the position code does not exist in the first preset mapping relationship set, the first agent needs to be determined from the multiple agents corresponding to the execution node. Specifically, the method further comprises the following steps of:

[0055] In the case that the second mapping relationship corresponding to the position code of the first subtask does not exist in the first preset mapping relationship set, the multiple agents corresponding to the first execution node are determined based on a third mapping relationship, and the third mapping relationship is the mapping relationship between different execution nodes and different agents.

[0056] The first agent corresponding to the first subtask is determined from the multiple agents.

[0057] In the embodiment of the present application, in the case that the second mapping relationship corresponding to the position code of the first subtask does not exist in the first preset mapping relationship set, the multiple agents corresponding to the first execution node are determined based on a third mapping relationship, and the first agent is determined from the multiple agents, thereby realizing the allocation of the agent for the subtask.

[0058] The third mapping relationship is a mapping relationship between the execution node and the agent which is established in advance. The execution node is determined by the task type, and the multiple agents corresponding to the execution node are determined based on the third mapping relationship. At this time, the multiple agents can be used to execute the subtask of the task type. Finally, the agent which has not processed the subtask or the agent which has the longest time from the last allocation of the subtask is selected as the first agent from the multiple agents, so as to achieve the effect of the load balancing of the agent.

[0059] In one embodiment, after the first agent corresponding to the first subtask is determined from the multiple agents, the method further comprises the following steps of:

[0060] The second mapping relationship is constructed based on the location encoding of the first subtask and the first agent;

[0061] Add the second mapping relationship to the first preset mapping relationship set.

[0062] It should be noted that the relationships between adjacent subtasks obtained from the initial task decomposition are different; they can have sequential or parallel relationships. For example, ... Figure 2 As shown, subtasks 1 and 2 are sequential, while subtasks 3 and 4 are parallel. Specifically, in the sequential relationship, the preceding subtask executes before the following subtask, and their position codes differ. In the parallel relationship, the two subtasks should be considered as a single entity requiring synchronous execution, and their position codes are identical. Based on this, this invention proposes a first preset mapping relationship set for task allocation to subtasks with parallel relationships.

[0063] Specifically, after determining the first agent from multiple agents each time, a second mapping relationship is constructed between the position code of the subtask in the initial task and the first agent, and added to the first preset mapping relationship set. In this way, if the subtask is a serial task, it will not affect the allocation of other subtasks; if the subtask is a parallel task, when allocating parallel subtasks with a parallel relationship to this subtask, since the parallel subtasks have the same position code as this subtask, the second mapping relationship can be directly obtained from the first preset mapping relationship set. The first agent is then determined through the second mapping relationship. At this time, both the parallel subtask and this subtask are assigned to the same agent, allowing the parallel task to be executed as a whole to satisfy the execution order of multiple initial tasks.

[0064] In one embodiment, determining the first agent corresponding to the first subtask from the plurality of agents includes:

[0065] Obtain an array of agents corresponding to the plurality of agents. The array of agents includes a first partition and / or a second partition. The plurality of subtasks are arranged sequentially in the first partition or the second partition. The first partition includes the identifiers of agents that have processed subtasks, and the second partition includes the identifiers of agents that have not processed subtasks.

[0066] In the case that the agent array includes the second partition, the first agent corresponding to the first identification in the second partition is set as the first agent, the identification of the first agent in the second partition is deleted, and the identification of the first agent is added to the last position of the first partition; and / or, in the case that the agent array does not include the second partition, the first agent corresponding to the first identification in the first partition is set as the first agent, and the identification of the first agent is moved to the last position of the first partition.

[0067] The above agent array is used to represent the case of allocation of sub-tasks among different agents. In this case, the identifications of multiple agents are arranged in the agent array in sequence, and the earlier the arrangement, the longer the time interval from the last allocation of sub-tasks. Through the agent array, the agent with the longest time interval from the last allocation of sub-tasks can be quickly determined.

[0068] In the case that the agent array includes the second partition, the first agent corresponding to the first identification in the second partition is set as the first agent, the identification of the first agent in the second partition is deleted, and the identification of the first agent is added to the last position of the first partition; and / or, in the case that the agent array does not include the second partition, the first agent corresponding to the first identification in the first partition is set as the first agent, and the identification of the first agent is moved to the last position of the first partition. Figure 3 As shown in the above two-dimensional agent array, when creating a two-dimensional agent array, the agent identification, agent task processing time, and agent processing speed ranking of each agent can be obtained, and the multiple agents are ranked by using the above parameters. The agent identification can be the name of the agent, specifically the name used by the agent on the chain. The agent task processing time is the timestamp of the last task executed by the agent, and this field is 0 when the agent is just on the chain. The agent processing speed ranking changes dynamically, and is initially sorted by the task execution time of the availability detection. Then, the processing speed of each agent in the period is ranked at a certain period. For example, the agent processing speed ranking is initially sorted by the task execution time of the availability detection, that is, the shorter the task execution time of the availability detection, the faster the processing speed of the agent in executing the task, and the earlier the ranking. After the overall execution of each task is completed, the ranking is updated, and the ranking is performed according to the task execution time of the execution end, that is, the faster the processing speed, the earlier the ranking.

[0069] Further, when the sub-tasks are allocated according to the agent array, the sub-tasks are allocated to different agents in sequence. At this time, the agent array includes a first partition and a second partition, as shown in the above two-dimensional agent array. The first partition includes the identifications of the agents that have processed the sub-tasks, and the second partition includes the identifications of the agents that have not processed the sub-tasks. When the sub-tasks are allocated, the agents corresponding to the identifications in the second partition are preferentially allocated. After all the agents are allocated the sub-tasks, only the identifications of the agents in the first partition exist at this time, and then the sub-tasks are allocated to different agents according to the arrangement order of the identifications of the agents in the first partition. Figure 4

[0070] ​In the embodiment of the present application, the agent array corresponding to the plurality of agents is obtained, the agent array includes the first partition and / or the second partition, the plurality of sub-tasks are arranged in the first partition or the second partition in turn, the first partition includes the identifier of the agent that has processed the sub-task, and the second partition includes the identifier of the agent that has not processed the sub-task; in the case where the agent array includes the second partition, the agent corresponding to the first identifier in the second partition is set as the first agent, the identifier of the first agent in the second partition is deleted, and the identifier of the first agent is added to the last position of the first partition; and / or in the case where the agent array does not include the second partition, the agent corresponding to the first identifier in the first partition is set as the first agent, and the identifier of the first agent is moved to the last position of the first partition. In this way, the agent that has not processed the sub-task or the agent that has the longest time from the last time of assigning the sub-task is obtained from the plurality of agents as the first agent through the agent array, so that the load balancing in the sub-task assignment can be realized.

[0071] Specifically, the sub-task assignment can exist in the following multiple cases.

[0072] Case one: the number of tasks of the agent to be assigned is one.

[0073] For case one, there is no concurrent task assignment at the same time, and the identifier of the agent in the first position of the two-dimensional agent array can be returned to the task scheduling service, that is, the first agent is the first agent that processes the sub-task. Then, the identifier of the agent is moved to the tail of the two-dimensional agent array, and the agent originally in the second position of the two-dimensional agent array becomes the first position. In this way, the agent that has the longest time from the last time of assigning the sub-task is always placed in the first position of the two-dimensional agent array.

[0074] Case two: the number of tasks of the agent to be assigned is multiple, and there are some agents in the two-dimensional agent array that have not processed the sub-task.

[0075] For case two, the two-dimensional agent array includes the first partition and the second partition. If the number of sub-tasks of the agent to be assigned is less than or equal to the number of identifiers of the agents that have not processed the sub-task, the agents corresponding to the identifiers are sequentially assigned a sub-task based on the order from front to back in the second partition, and then the agents are moved to the tail of the first partition of the two-dimensional agent array.

[0076] If the number of total agent identifiers in the two-dimensional agent array is greater than or equal to the number of sub-tasks of the to-be-allocated agents, and the number of sub-tasks of the to-be-allocated agents is greater than the number of agent identifiers of the agents that have not processed tasks, a sub-task is allocated to each agent corresponding to an identifier in the second partition; other to-be-processed sub-tasks are sequentially allocated to agents corresponding to identifiers in the first partition based on the arrangement order. Subsequently, the agents are sequentially moved to the tail of the first partition in the two-dimensional agent array.

[0077] If the number of total agent identifiers in the two-dimensional agent array is less than the number of sub-tasks of the to-be-allocated agents, at this time, the number of concurrent sub-tasks far exceeds the number of agents, a sub-task is allocated to all agents, the relative order of the agent identifiers in the two-dimensional agent array remains unchanged, and all are included in the first partition. Subsequently, other to-be-processed sub-tasks are sequentially allocated to agents corresponding to identifiers in the first partition based on the arrangement order; the agents are sequentially moved to the tail of the two-dimensional agent array.

[0078] Case three, the number of tasks of the to-be-allocated agents is multiple, and there are no part of the agents in the two-dimensional agent array that have not processed sub-tasks.

[0079] For case three, if the number of total agent identifiers in the two-dimensional agent array is greater than or equal to the number of sub-tasks of the to-be-allocated agents, a sub-task is sequentially allocated to an agent corresponding to an identifier based on the arrangement order. Subsequently, the agents are sequentially moved to the tail of the two-dimensional agent array.

[0080] If the number of total agent identifiers in the two-dimensional agent array is less than the number of tasks of the to-be-allocated agents, at this time, the number of concurrent sub-tasks far exceeds the number of agents, a sub-task is allocated to all agents, the relative order of the agent identifiers in the two-dimensional agent array remains unchanged, and all are included in the first partition. Subsequently, other to-be-processed sub-tasks are sequentially allocated to agents corresponding to identifiers in the first partition based on the arrangement order; the agents are sequentially moved to the tail of the two-dimensional agent array.

[0081] In an embodiment, the allocating each sub-task to a corresponding first agent comprises:

[0082] sending, to a first agent corresponding to a first sub-task, the first sub-task and an agent identifier corresponding to a second sub-task, the second sub-task being a sub-task executed after the first sub-task, the agent identifier corresponding to the second sub-task being used to instruct the first agent corresponding to the first sub-task to send an execution result to an agent corresponding to the agent identifier after executing the first sub-task.

[0083] It should be noted that there is an execution sequence between the plurality of sub-tasks, and the result after the execution of the previous sub-task needs to be sent to the agent of the next sub-task to realize data transmission, and then realize the initial task of the multi-agent collaborative processing. In the related art, the data transmission process is as shown in Figure 5 The agent A and the agent B are agents for processing adjacent sub-tasks, and the execution result needs to be sent from the agent A to the task scheduling service device first, and then the execution result is forwarded from the task scheduling device to the agent B, which has a long process and low data transmission efficiency.

[0084] In the embodiment of the present application, the first sub-task and the second sub-task corresponding to the first agent corresponding to the first sub-task are sent to the first agent corresponding to the first sub-task, and the second sub-task is a sub-task executed after the first sub-task, and the agent identifier corresponding to the second sub-task is used to indicate that the execution result is sent to the agent corresponding to the agent identifier after the first agent corresponding to the first sub-task executes the first sub-task. In this way, the execution result does not need to be forwarded through the task scheduling service device, and the data transmission efficiency can be effectively improved.

[0085] In one embodiment, the method further comprises:

[0086] Receiving agent information of a second agent, the second agent being an agent that has not processed a sub-task;

[0087] Detecting the second agent through a node in the blockchain to obtain a detection result;

[0088] In the case where the detection result represents that the second agent is a normally used agent, obtaining a first agent type corresponding to the second agent;

[0089] In the case where the first agent type corresponds to a fourth mapping relationship in the second preset mapping relationship set, determining a second execution node corresponding to the first agent type based on the fourth mapping relationship, and sending the agent information of the second agent to the second execution node, the mapping relationship included in the second preset mapping relationship set being a mapping relationship between different agent types and different execution nodes; and / or, in the case where the first agent type does not correspond to the fourth mapping relationship in the second preset mapping relationship set, randomly obtaining a third execution node based on the on-chain order of the nodes in the blockchain, sending the agent information of the second agent to the third execution node, establishing the fourth mapping relationship between the third execution node and the first agent type, and adding the fourth mapping relationship to the second preset mapping relationship set.

[0090] It should be noted that the above task allocation method is applied to, for example, Figure 6The intelligent agent platform shown here mainly includes the underlying blockchain and its smart contracts, the upper-layer intelligent agent platform and its registered intelligent agents, intelligent agent task scheduling service, and intelligent task allocation service.

[0091] Blockchain and its smart contracts mainly provide on-chain smart agent verification and smart agent availability verification. Smart contracts automatically generate sub-smart contracts based on smart agent type. The smart agent platform verifies the on-chain smart agents through blockchain and its smart contracts. After verification, tasks can be assigned to smart agents.

[0092] The task invocation service is used to receive tasks, parse tasks, and schedule tasks. It obtains information about which agents will execute one or more tasks through the task allocation service, and finally returns the results of multi-agent collaborative processing to the caller.

[0093] The task allocation service is primarily used to determine which agent should be assigned to a task. It sorts multiple agents on the execution node using two-dimensional agent data, with the agent ranked first receiving priority. The service can also initiate calls to the next agent for a task based on the agent's registered address in the blockchain, reducing data transmission and improving task execution efficiency.

[0094] Based on such Figure 6 The intelligent agent platform shown requires that the intelligent agent and the task be put on the blockchain before task allocation. Before putting the intelligent agent and the task on the blockchain, the organization to which the intelligent agent belongs and the intelligent agent contract also need to be put on the blockchain so that the blockchain nodes can verify the intelligent agent put on the blockchain.

[0095] The on-chain process for the organizations to which the intelligent agents belong includes the following steps: 1.1 The organizations to which the intelligent agents belong join the consortium blockchain. The administrator configures the necessary information for each organization on the operating platform corresponding to the consortium blockchain management node, and distributes the configuration and consortium blockchain code to each organization. 1.2 Each organization deploys the same consortium blockchain code with different configuration parameters on its own server, completing the consortium blockchain construction. 1.3 If more organizations to which the intelligent agents belong join the consortium blockchain later, steps 1.1 and 1.2 are repeated to allow them to join. After joining the consortium blockchain, the data in the current snapshot is synchronized. Once synchronization is complete, the organization becomes a normal node, receiving data and participating in the consensus process.

[0096] The smart contract mainly includes metadata, an agent detection contract function, a creation contract function of a group agent smart contract, and a group agent task allocation contract. The agent detection contract function is used for detecting the availability of the agent. When the agent is chained, the agent provides data structures such as an agent calling method such as an interface, an input parameter, a return result, and the like. The contract execution mainly includes the following steps: 1, constructing a parameter according to a list of input parameters; 2, calling a corresponding agent according to the agent calling method; 3, comparing the return result with an expected return result structure after receiving the return result, if the comparison is correct, the smart contract detection is successful, otherwise the detection fails; 4, the agent detection contract function packs and publishes the information of the successfully detected agent to the blockchain for consensus, and after the consensus is successful, the agent can receive a subtask and execute it. In this way, the agent information of the second agent, which is an agent that has not processed a subtask, is received through the agent monitoring contract function; the second agent is detected through the nodes in the blockchain to obtain a detection result.

[0097] In addition, the agent grouping smart contract creation contract function is used to assign groups to the agent after receiving the success of the availability detection of the on-chain agent. The contract performs the following main steps: 1. Obtain the agent type of the on-chain agent whose availability detection is successful; 2. Detect the second preset mapping relationship set between the agent type saved in the blockchain and the execution node, if the fourth mapping relationship of the first agent type exists in the second preset mapping relationship set, determine the second execution node corresponding to the first agent type based on the fourth mapping relationship, and send the agent information of the second agent to the second execution node (that is, if the key of the mapping relationship exists in the agent type of the on-chain agent, the agent information of the agent is added to the value corresponding to the key, that is, the agent group corresponding to the second execution node), and the subsequent execution node can allocate sub-tasks to the agent in the agent group. If there is no fourth mapping relationship, it means that the agent of a new type is published on the chain. At this time, the next step 3 is performed; 3. The agent of a new type is published on the chain. That is, in the case where the fourth mapping relationship corresponding to the first agent type does not exist in the second preset mapping relationship set, a new fourth mapping relationship needs to be created so that the agent of a new type can be allocated sub-tasks. Specifically, the fourth mapping relationship (Map) composed of the new type type and the desired second blockchain execution node (generally, the on-chain order of the alliance chain member is trained) is packaged into a block and published to the blockchain for consensus. If the consensus is successful, each blockchain node records the Map content to the existing Map in the local (if it is the first time for the agent to be on the chain, there is no Map structure in the local at this time, and the Map can be used as the local Map storage). Encode the new type type into the grouping agent task allocation contract, and distribute the contract to the second execution node of the blockchain. The second execution node receives the grouping agent task allocation contract and executes it to provide task execution candidate agent information to the task scheduling service.

[0098] The above grouping agent task allocation contract is used to receive tasks to be processed and allocate corresponding agents to complete task processing. The algorithm and core of the contract are the longest idle fastest response task allocation algorithm for agent selection, which can effectively balance the needs of the user end for fast processing of tasks and the task balance of multiple agents of the same task type, avoid over-busy and over-idle agents, and maintain the healthy and orderly development of the agent ecology. Specifically, in the present application, two-dimensional agent array can be used to allocate sub-tasks.

[0099] In the embodiment of the present application, the agent information of a second agent is received, the second agent being an agent that has not processed a subtask; the second agent is detected through a node in the blockchain to obtain a detection result; in the case that the detection result indicates that the second agent is a normally used agent, a first agent type corresponding to the second agent is obtained; in the case that a fourth mapping relationship corresponding to the first agent type exists in a second preset mapping relationship set, a second execution node corresponding to the first agent type is determined based on the fourth mapping relationship, and the agent information of the second agent is sent to the second execution node, the mapping relationships included in the second preset mapping relationship set being mapping relationships between different agent types and different execution nodes; and / or, in the case that the fourth mapping relationship corresponding to the first agent type does not exist in the second preset mapping relationship set, a third execution node is randomly obtained based on the on-chain sequence of the node in the blockchain, the agent information of the second agent is sent to the third execution node, the fourth mapping relationship between the third execution node and the first agent type is established, and the fourth mapping relationship is added to the second preset mapping relationship set. In this way, the on-chain of the second agent is realized through the detection of the agent information of the second agent and the second preset mapping relationship set, so that the subtasks obtained by decomposition can be distributed to the on-chain second agent.

[0100] The above-mentioned second agent can be an agent published to the blockchain by a consortium member, for receiving and executing related tasks. The agent information of the agent includes data structure information such as interface, incoming parameter, and return result, and agent type (task type executable by the agent) information. The agent information of the second agent is packaged into a block and published to the blockchain, and after consensus, is saved in each node of the blockchain. Subsequently, the smart contract of each node of the blockchain starts to execute, and first executes an agent detection contract function; after successful agent availability detection, an agent grouping smart contract creation contract is executed; after completion of agent grouping, the second agent is included in the task distribution list of a second execution node through a grouping agent task distribution contract, and the ordering sequence of the agent receiving tasks is calculated according to the contract, so as to provide task execution candidate agent information to a task scheduling service.

[0101] The agent platform can query information related to each agent in the blockchain at any time, such as availability, task execution quantity, and task execution time.

[0102] In some embodiments, the initial task can be that after the task processing platform packages the task into a block, publishes it to the blockchain, and after consensus, saves it in each node of the blockchain.

[0103] Please refer toFigure 7 , Figure 7 is a structural diagram of a task allocation apparatus provided by an embodiment of the present application, as shown in Figure 7 FIG. 7, the task allocation apparatus 700 comprises:

[0104] a decomposition module 701 configured to decompose an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask;

[0105] a first determination module 702 configured to determine an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types;

[0106] a second determination module 703 configured to determine a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been away from the last time of assigning a subtask for the longest time among a plurality of agents, the plurality of agents being agents corresponding to the execution node;

[0107] an assignment module 704 configured to assign each subtask to the corresponding first agent.

[0108] In an embodiment, the decomposition module 701 comprises:

[0109] a decomposition sub-module configured to decompose the initial task to obtain the plurality of subtasks and a task type and a position code corresponding to each subtask, the position code of each subtask being used to represent an execution order, the position codes of two adjacent subtasks in the plurality of subtasks being the same or different.

[0110] The second determination module 703 comprises:

[0111] a first determination sub-module configured to, in a case where a second mapping relationship corresponding to a position code corresponding to a first subtask exists in a first preset mapping relationship set, determine a first agent corresponding to the position code based on the second mapping relationship, the second mapping relationship being a mapping relationship between different subtask corresponding position codes and different agents, the first subtask being one subtask in the plurality of subtasks.

[0112] In an embodiment, the second determination module 703 further comprises:

[0113] a second determination sub-module configured to, in a case where the second mapping relationship corresponding to the position code corresponding to the first subtask does not exist in the first preset mapping relationship set, determine a plurality of agents corresponding to a first execution node corresponding to the first subtask based on a third mapping relationship, the third mapping relationship being a mapping relationship between different execution nodes and different agents.

[0114] a third determining sub-module, configured to determine the first agent corresponding to the first sub-task from the plurality of agents.

[0115] In an embodiment, the task allocation apparatus 700 further comprises:

[0116] a constructing module, configured to construct the second mapping relationship based on the position encoding of the first sub-task and the first agent;

[0117] an adding module, configured to add the second mapping relationship to the first preset mapping relationship set.

[0118] In an embodiment, the third determining sub-module comprises:

[0119] an obtaining unit, configured to obtain an agent array corresponding to the plurality of agents, the agent array comprising a first partition and / or a second partition, the plurality of sub-tasks being arranged in the first partition or the second partition in sequence, the first partition comprising an identifier corresponding to an agent that has processed a sub-task, and the second partition comprising an identifier corresponding to an agent that has not processed a sub-task;

[0120] a first setting unit, configured to, in a case where the agent array comprises the second partition, set an agent corresponding to a first identifier in the second partition as the first agent, delete the identifier of the first agent in the second partition, and add the identifier of the first agent to a last position of the first partition; and / or, in a case where the agent array does not comprise the second partition, set an agent corresponding to a first identifier in the first partition as the first agent, and move the identifier of the first agent to a last position of the first partition.

[0121] In an embodiment, the allocation module 704 comprises:

[0122] an allocation sub-module, configured to send, to a first agent corresponding to a first sub-task, an agent identifier corresponding to a second sub-task, the second sub-task being a sub-task executed after the first sub-task, the agent identifier corresponding to the second sub-task being used to instruct the first agent corresponding to the first sub-task to send an execution result to an agent corresponding to the agent identifier after executing the first sub-task.

[0123] In an embodiment, the task allocation apparatus 700 further comprises:

[0124] a receiving module, configured to receive agent information of a second agent, the second agent being an agent that has not processed a sub-task;

[0125] The detection module is configured to detect the second agent by a node in the blockchain to obtain a detection result.

[0126] The acquisition module is configured to acquire a first agent type corresponding to the second agent in a case where the detection result indicates that the second agent is a normally used agent.

[0127] The processing module is configured to determine a second execution node corresponding to the first agent type based on a fourth mapping relationship corresponding to the first agent type in a case where the fourth mapping relationship exists in a second preset mapping relationship set, and send agent information of the second agent to the second execution node, wherein the mapping relationships included in the second preset mapping relationship set are mapping relationships between different agent types and different execution nodes; and / or, in a case where the fourth mapping relationship corresponding to the first agent type does not exist in the second preset mapping relationship set, randomly acquire a third execution node based on a node on-chain order in the blockchain, send the agent information of the second agent to the third execution node, establish the fourth mapping relationship between the third execution node and the first agent type, and add the fourth mapping relationship to the second preset mapping relationship set.

[0128] The task allocation device provided in the embodiments of the present application can implement the above Figure 1 The technical features of each process of each embodiment of the task allocation method shown in the above

[0129] It should be noted that the task allocation device in the embodiments of the present application can be a device, a component in an electronic device, an integrated circuit, or a chip.

[0130] The embodiments of the present application further provide an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program is executed by the processor to implement each process of the task allocation method embodiment shown in the above Figure 1 The technical features of each process of each embodiment of the task allocation method embodiment shown in the above

[0131] Specifically, referring to the above Figure 8 The embodiments of the present application further provide an electronic device, which includes a bus 801, a transceiver 802, an antenna 803, a bus interface 804, a processor 805, and a memory 806.

[0132] The processor 805 is configured to decompose an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask.

[0133] The processor 805 is further configured to determine an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types.

[0134] The processor 805 is further configured to determine a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been away from the last time of assigning a subtask for the longest time among a plurality of agents, the plurality of agents being agents corresponding to an execution node.

[0135] The processor 805 is further configured to assign each subtask to the corresponding first agent.

[0136] In one embodiment, the decomposing the initial task to obtain a plurality of subtasks and a task type corresponding to each subtask comprises:

[0137] The decomposing the initial task to obtain the plurality of subtasks and the task type and a position code corresponding to each subtask, the position code of each subtask being used to represent an execution order, position codes of two adjacent subtasks in the plurality of subtasks being the same or different.

[0138] The determining the first agent corresponding to each subtask comprises:

[0139] In a case where a second mapping relationship corresponding to the position code of the first subtask exists in a first preset mapping relationship set, determining a first agent corresponding to the position code based on the second mapping relationship, the second mapping relationship being a mapping relationship between different subtasks and different agents, the first subtask being one subtask in the plurality of subtasks.

[0140] In one embodiment, the determining the first agent corresponding to each subtask further comprises:

[0141] In a case where the second mapping relationship corresponding to the position code of the first subtask does not exist in the first preset mapping relationship set, determining a plurality of agents corresponding to the first execution node based on a third mapping relationship, the third mapping relationship being a mapping relationship between different execution nodes and different agents.

[0142] Determining the first agent corresponding to the first subtask from the plurality of agents.

[0143] In one embodiment, the processor 805 is further configured to construct the second mapping relationship based on the position code of the first subtask and the first agent.

[0144] The processor 805 is further configured to add the second mapping relationship to the first preset mapping relationship set.

[0145] In one embodiment, the determining, from the plurality of agents, the first agent corresponding to the first subtask comprises:

[0146] obtaining an agent array corresponding to the plurality of agents, the agent array including a first partition and / or a second partition, the plurality of subtasks being arranged in the first partition or the second partition in sequence, the first partition including an identifier corresponding to an agent that has processed a subtask, and the second partition including an identifier corresponding to an agent that has not processed a subtask;

[0147] In a case where the agent array includes the second partition, setting an agent corresponding to a first identifier in the second partition as the first agent, deleting the identifier of the first agent in the second partition, and adding the identifier of the first agent to a last position of the first partition; and / or, in a case where the agent array does not include the second partition, setting an agent corresponding to a first identifier in the first partition as the first agent, and moving the identifier of the first agent to a last position of the first partition.

[0148] In one embodiment, the assigning the each subtask to the corresponding first agent comprises:

[0149] sending, to a first agent corresponding to a first subtask, an agent identifier corresponding to a second subtask, the second subtask being a subtask executed after the first subtask, the agent identifier corresponding to the second subtask being used to indicate that, after the first agent corresponding to the first subtask executes the first subtask, an execution result is sent to an agent corresponding to the agent identifier.

[0150] In one embodiment, the transceiver 802 is configured to receive agent information of a second agent, the second agent being an agent that has not processed a subtask.

[0151] The processor 805 is further configured to detect the second agent through a node in a blockchain to obtain a detection result.

[0152] The transceiver 802 is further configured to, in a case where the detection result indicates that the second agent is a normally used agent, obtain a first agent type corresponding to the second agent.

[0153] The processor 805 is further configured to, in a case where a fourth mapping relationship corresponding to the first agent type exists in a second preset mapping relationship set, determine a second execution node corresponding to the first agent type based on the fourth mapping relationship, and send agent information of the second agent to the second execution node, the mapping relationship included in the second preset mapping relationship set being a mapping relationship between different agent types and different execution nodes; and / or, in a case where the fourth mapping relationship corresponding to the first agent type does not exist in the second preset mapping relationship set, randomly obtain a third execution node based on a node on-chain sequence in a block chain, send the agent information of the second agent to the third execution node, establish the fourth mapping relationship between the third execution node and the first agent type, and add the fourth mapping relationship to the second preset mapping relationship set.

[0154] In Figure 8 The bus architecture (represented by bus 801) can include any number of interconnecting buses and bridges, and the bus 801 links together various circuits such as the processor 805 and the memory 806 represented by one or more processors and the memory, respectively. The bus 801 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore, not described further herein. The bus interface 804 provides an interface between the bus 801 and the transceiver 802. The transceiver 802, which can be a single element or a plurality of elements such as a plurality of receivers and transmitters, provides a means for communicating with various other apparatus over a transmission medium. Data processed by the processor 805 is transmitted over a wireless medium via the antenna 803, and further, the antenna 803 receives data and delivers the data to the processor 805.

[0155] The processor 805 is responsible for managing the bus 801 and general processing, and can also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 806 can be used to store data used by the processor 805 in its execution.

[0156] Optionally, the processor 805 can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a graphic processing unit (GPU).

[0157] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program. Figure 1 The processes of the task allocation method embodiment correspond to each other and can achieve the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and the like.

[0158] The present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the above-mentioned Figure 1 The processes of the task allocation method embodiment correspond to each other and can achieve the same technical effects. To avoid repetition, details are not described herein.

[0159] The terms "first", "second", and the like in the embodiments of the present application are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device including a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to such processes, methods, products, or devices. In addition, "and / or" is used in the present application to represent at least one of the connected objects, for example, A and / or B and / or C represents 8 cases including A alone, B alone, C alone, A and B both exist, B and C both exist, A and C both exist, and A, B and C all exist.

[0160] It should be noted that in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0161] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, also can be through hardware, but many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software product, the computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disc), including a number of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or the second terminal equipment, etc.) executes the method of various embodiments of the present application.

[0162] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not limited, those skilled in the art can make many forms without departing from the purpose of the present application and the scope of the claims under the inspiration of the present application, all belong to the protection of the present application.

Claims

1. A method of task allocation, characterized by, The method comprises the following steps: decomposing an initial task into a plurality of subtasks and a task type corresponding to each subtask; determining an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types; determining a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been idle for the longest time since the last time a subtask was assigned, the plurality of agents being agents corresponding to the execution nodes; assigning each subtask to the corresponding first agent.

2. The method of claim 1, wherein, The method of decomposing an initial task into a plurality of subtasks and a task type corresponding to each subtask comprises: decomposing the initial task into the plurality of subtasks and the task type corresponding to each subtask and a position code, the position code of each subtask being used to represent an execution order, the position codes of two adjacent subtasks in the plurality of subtasks being the same or different. The method of determining a first agent corresponding to each subtask comprises: in a case where a second mapping relationship corresponding to a position code of a first subtask exists in a first preset mapping relationship set, determining a first agent corresponding to the position code based on the second mapping relationship, the second mapping relationship being a mapping relationship between different subtasks and different agents, the first subtask being one of the plurality of subtasks.

3. The method of claim 2, wherein, The method of determining a first agent corresponding to each subtask further comprises: in a case where a second mapping relationship corresponding to a position code of a first subtask does not exist in the first preset mapping relationship set, determining a plurality of agents corresponding to a first execution node corresponding to the first subtask based on a third mapping relationship, the third mapping relationship being a mapping relationship between different execution nodes and different agents; determining the first agent corresponding to the first subtask from the plurality of agents.

4. The method of claim 3, wherein, After the first agent corresponding to the first subtask is determined from the plurality of agents, the method further comprises: constructing the second mapping relationship based on the position code of the first subtask and the first agent; adding the second mapping relationship to the first preset mapping relationship set.

5. The method of claim 3, wherein, The method of determining the first agent corresponding to the first subtask from the plurality of agents comprises: obtaining an agent array corresponding to the plurality of agents, the agent array including a first partition and / or a second partition, the plurality of subtasks being arranged in the first partition or the second partition in sequence, the first partition including an identifier corresponding to an agent that has processed a subtask, and the second partition including an identifier corresponding to an agent that has not processed a subtask; In a case where the array of agents includes the second partition, setting an agent corresponding to a first identifier in the second partition as the first agent, deleting the identifier of the first agent in the second partition, and adding the identifier of the first agent to a last position of the first partition; and / or in a case where the array of agents does not include the second partition, setting an agent corresponding to a first identifier in the first partition as the first agent, and moving the identifier of the first agent to a last position of the first partition.

6. The method of any one of claims 1 to 5, wherein, The assigning the each subtask to the corresponding first agent comprises: sending, to the first agent corresponding to the first subtask, the first subtask and an agent identifier corresponding to a second subtask, the second subtask being a subtask executed after the first subtask, the agent identifier being used to indicate that, after the first agent corresponding to the first subtask executes the first subtask, an execution result is sent to an agent corresponding to the agent identifier.

7. The method of any one of claims 1 to 5, wherein, The method further comprises: receiving agent information of a second agent, the second agent being an agent that has not processed a subtask; detecting, by a node in a blockchain, the second agent to obtain a detection result; in a case where the detection result indicates that the second agent is a normally used agent, obtaining a first agent type corresponding to the second agent; in a case where a fourth mapping relationship corresponding to the first agent type exists in a second preset mapping relationship set, determining a second execution node corresponding to the first agent type based on the fourth mapping relationship, and sending the agent information of the second agent to the second execution node, the mapping relationships included in the second preset mapping relationship set being mapping relationships between different agent types and different execution nodes; and / or in a case where the fourth mapping relationship corresponding to the first agent type does not exist in the second preset mapping relationship set, randomly obtaining a third execution node based on a node on-chain order in the blockchain, sending the agent information of the second agent to the third execution node, establishing the fourth mapping relationship between the third execution node and the first agent type, and adding the fourth mapping relationship to the second preset mapping relationship set.

8. A task allocation apparatus characterized by comprising: comprises: a decomposition module configured to decompose an initial task to obtain a plurality of subtasks and a task type corresponding to each subtask; a first determination module configured to determine an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types; a second determination module configured to determine a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been away from a last time of assigning a subtask for the longest time among a plurality of agents, the plurality of agents being agents corresponding to the execution node; an assignment module configured to assign each subtask to the corresponding first agent.

9. An electronic device, comprising: comprises a transceiver and a processor, The processor is configured to decompose the initial task to obtain a plurality of subtasks and a task type corresponding to each subtask. The processor is further configured to determine an execution node corresponding to each subtask based on a first mapping relationship and the task type, the first mapping relationship being a mapping relationship between different execution nodes and different task types. The processor is further configured to determine a first agent corresponding to each subtask, the first agent being an agent that has not processed a subtask or an agent that has been away from a last time of assigning a subtask for the longest time among a plurality of agents, the plurality of agents being agents corresponding to the execution node. The processor is further configured to assign each subtask to the corresponding first agent.

10. An electronic device, comprising: The processor, the memory, and a program stored on the memory and executable on the processor, the program being executed by the processor to implement the steps of the task assignment method according to any one of claims 1 to 7. A computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the steps of the task assignment method according to any one of claims 1 to 7.

11. A computer readable storage medium, characterized in that, Computer instructions are included, and the computer instructions are executed by the processor to implement the steps of the task assignment method according to any one of claims 1 to 7.

12. A computer program product, characterised in that, ​

Citation Information

Patent Citations

  • Dialogue method, model training method and equipment

    CN118689972A

  • Multi-agent cooperation method and system

    CN118917632A

  • Multi-agent cooperative task execution method, device and equipment and storage medium

    CN119904069A

  • Data sharing system and method for realizing multi-agent interaction

    CN120277143A

  • Task management system, task management method, and task management program

    US20190138358A1