A task scheduling method, device, medium and product

By receiving task information and agent modeling, the dynamic allocation of task scheduling method solves the problems of large resource consumption and coordination difficulties in multi-agent systems, and achieves efficient and stable task execution and resource utilization.

CN120353561BActive Publication Date: 2025-09-02SHANDONG HAILIANG INFORMATION TECH RES INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510849043.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-02
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

The existing task scheduling methods have problems such as high resource consumption, difficulty in coordination of agents and slow model adaptability in multi-agent systems, which affects system efficiency and stability.

Method used

By receiving task information, the agent is modeled to determine the ability portrait of each agent, and dynamically allocate tasks according to the task sequence and operating system scheduling algorithm, considering the characteristics and task importance of the agent, and optimizing the task execution performance.

Benefits of technology

It realizes efficient and stable task scheduling of multi-agent systems in complex environments, maximizes resource utilization, and improves system adaptability and task execution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353561B_ABST
    Figure CN120353561B_ABST
Patent Text Reader

Abstract

The present invention discloses a task scheduling method, device, medium and product, which relate to the field of artificial intelligence technology. This solution receives tasks and determines corresponding task information, performs agent modeling on multiple existing intelligent agents to determine the capability profile of each intelligent agent, clarifies the basic information of the tasks to be executed and the task execution capability of each intelligent agent in the system, thereby forming the basis for multi-agent collaboration; considering the resource competition and coordination problems in the task allocation of intelligent agents, when performing task scheduling, tasks are sorted to generate a task sequence, and each task is sequentially assigned to the corresponding intelligent agent according to the task sequence, each capability profile and the operating system scheduling algorithm. The task allocation strategy can be dynamically adjusted according to the characteristics of the intelligent agent and the importance of the task, maximizing resource utilization and optimizing task execution performance, thereby meeting the efficient and stable task scheduling requirements of the multi-agent system in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a task scheduling method, device, medium and product. Background Art

[0002] Task scheduling in a multi-agent system achieves optimal execution by rationally assigning tasks to individual agents. It can be categorized into static and dynamic scheduling. Deep learning and reinforcement learning methods, such as deep Q-networks and deep deterministic policy gradients, have been applied to multi-agent task scheduling, enabling them to adjust scheduling strategies in dynamic environments and improve system efficiency.

[0003] However, reinforcement learning methods require extensive training data and computing resources, and effectively coordinating the strategies of multiple agents in multi-agent collaboration is difficult. Game theory-based approaches also employ strategies to maximize utility for each agent as a participant in the game. However, game theory and mechanism design often assume a static or slowly changing system environment. In real-world applications, agents may not be able to access all environmental information, resulting in the inability of the game model to quickly adapt to changing circumstances, impacting system efficiency and stability.

[0004] In view of the above, how to solve the current task scheduling problem in which reinforcement learning requires a lot of resources and multi-agent coordination is difficult, and the game theory method lacks agent information in practical applications, the model adapts slowly, and affects system efficiency and stability, is an urgent problem that technicians in this field need to solve. Summary of the Invention

[0005] The present invention provides a task scheduling method, device, medium and product to solve the problems in current task scheduling, such as reinforcement learning requires a large amount of resources and multi-agent coordination is difficult, and game theory methods lack agent information in practical applications, slow model adaptation, and affect system efficiency and stability.

[0006] The present invention provides a task scheduling method applied to a heterogeneous multi-agent system; the method comprises:

[0007] Receive multiple tasks and determine corresponding task information; wherein the task information includes at least task priority, deadline, and task requirements;

[0008] Conduct agent modeling for multiple existing agents to determine the capability profile of each agent; wherein the capability profile at least includes the task execution capability of the corresponding agent, the current task execution status, and the agent resources;

[0009] Broadcast each task to each agent, and control each agent to transmit the corresponding capability profile to other agents;

[0010] Sort each task according to its information to generate a task sequence;

[0011] According to the task sequence and operating system scheduling algorithm, each task is assigned to the corresponding agent in turn so that the agent can perform the task.

[0012] The present invention also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any one of the above-mentioned task scheduling methods when executing the computer program.

[0013] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned task scheduling methods are implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, which implements the steps of any of the above-mentioned task scheduling methods when executed by a processor.

[0015] The beneficial effect of the present invention is that, by receiving tasks and determining corresponding task information, agent modeling is performed on multiple existing intelligent agents to determine the capability profile of each intelligent agent, and the basic information of the tasks to be executed and the task execution capability of each intelligent agent in the system are clarified, thereby forming the basis for multi-agent collaboration; considering the resource competition and coordination problems in the task allocation of intelligent agents, when executing task scheduling, tasks are sorted to generate a task sequence, and each task is assigned to the corresponding intelligent agent in turn according to the task sequence, each capability profile and the operating system scheduling algorithm, which can dynamically adjust the task allocation strategy according to the characteristics of the intelligent agent and the importance of the task, maximize resource utilization and optimize task execution performance, thereby meeting the efficient and stable task scheduling requirements of multi-agent systems in complex environments.

[0016] In addition, the present invention also provides a task scheduling device, medium and product, with the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 A flowchart of a task scheduling method provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of the multi-agent task scheduling principle provided by an embodiment of the present invention;

[0020] Figure 3A schematic diagram of a task scheduling device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0022] It should be noted that, in the description of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. The terms "first," "second," etc., in the present invention are used to distinguish similar objects, and are not used to describe a particular order or precedence.

[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0024] Currently, task scheduling in multi-agent systems achieves optimal execution by rationally assigning tasks to individual agents. This approach is primarily categorized into static and dynamic scheduling. Static scheduling methods, such as genetic algorithms and particle swarm optimization, can achieve superior results when task and resource information is stable, but they lack adaptability to dynamically changing environments. Dynamic scheduling methods consider the time-varying nature of task and resource information and incorporate monitoring and feedback mechanisms to dynamically allocate tasks, improving system flexibility and robustness. Deep learning and reinforcement learning methods, such as deep Q-networks and deep deterministic policy gradients, have been applied to multi-agent task scheduling, enabling them to adjust scheduling strategies and improve system efficiency in dynamic environments. However, reinforcement learning methods require large amounts of training data and computing resources, and effectively coordinating the strategies of multiple agents in multi-agent collaboration remains a challenge. Others have employed game theory-based approaches, treating each agent as a participant in a game and adopting strategies to maximize their utility. However, game theory and mechanism design often assume a static or slowly changing system environment. In practical applications, agents may not be able to access all environmental information, resulting in the inability of the game model to quickly adapt to changing environments, impacting system efficiency and stability. To address these issues, the present invention provides a task scheduling method.

[0025] It is important to note that the method provided by this invention is applicable to heterogeneous multi-agent systems. Heterogeneous multi-agent systems are composed of agents with different capabilities, structures, and functions, and achieve efficient execution of complex tasks through collaboration and sharing. The task scheduling method is described in detail below with reference to specific embodiments.

[0026] Figure 1 Flowchart of a task scheduling method provided by an embodiment of the present invention. Figure 1 As shown, the method includes:

[0027] S10: Receive multiple tasks and determine corresponding task information.

[0028] The task information includes at least task priority, deadline and task requirements.

[0029] First, the system receives multiple tasks and determines the corresponding task information for each task. It is understood that the tasks that the agent can handle include, but are not limited to, understanding and executing user instructions, providing detailed and helpful responses by networking or processing files, and other types of tasks, which will not be detailed here.

[0030] It should be noted that task information includes at least task priority, deadline, and task requirements. Task priority refers to the priority of the current task execution; deadline is the last allowed time for the task to complete execution; task requirements refer to the resources required for task execution, including but not limited to physical resources and network resources. Therefore, a task can be represented as , For the i-th task, is the task priority of task i, is the deadline of task i, is the task requirement of task i. In addition, the task information may also include other content, depending on the specific implementation situation.

[0031] S11: Conduct agent modeling for multiple existing agents to determine the capability profile of each agent.

[0032] Among them, the capability profile at least includes the task execution capability of the corresponding intelligent agent, the current task execution status and the intelligent agent resources.

[0033] Furthermore, we conduct agent modeling on multiple agents that currently exist in the system to determine the capability profile of each agent. The agent set is represented as ,in, For intelligent agents, It is important to note that agent modeling is the process of describing and abstracting the capabilities and states of each agent. This includes capability modeling, which describes the various skills, functions, or abilities of an agent to handle specific tasks, and state modeling, which describes the current state or attributes of an agent.

[0034] After completing the agent modeling, the agent's capability profile is obtained. It should be noted that the capability profile at least includes the corresponding agent's task execution capability, current task execution status, and agent resources. Among them, task execution capability refers to the functional capabilities and task types that the agent can handle; current task execution status indicates that the agent is currently executing a task or is in an idle state; agent resources refer to the available resources currently owned by the agent, such as the graphics processor that the agent can currently call in a large model training or inference environment. Therefore, the agent The capability profile can be expressed as ; For intelligent agents mission execution capabilities, For intelligent agents The current task execution status, For intelligent agents In addition, the capability profile may also include other content, depending on the specific implementation situation.

[0035] S12: Broadcast each task to each intelligent agent, and control each intelligent agent to transmit the corresponding capability profile to other intelligent agents.

[0036] S13: Sort the tasks according to the task information to generate a task sequence.

[0037] Subsequently, each task is broadcast to each agent, and each agent is controlled to transmit its own capability profile to the other agents to facilitate the execution of subsequent tasks. It should be noted that the specific process of controlling each agent to transmit its corresponding capability profile to the other agents is not limited in this embodiment and depends on the specific implementation situation.

[0038] Furthermore, the tasks are sorted based on their information to generate a task sequence. It should be noted that this embodiment does not limit the specific task information involved in task sorting. For example, task priority, deadline, or task requirements can be used, or tasks can be sorted based on a combination of multiple parameters. Furthermore, this embodiment does not limit the specific order of task sorting, which will be determined based on specific implementation circumstances.

[0039] S14: According to the task sequence, each capability profile and the operating system scheduling algorithm, each task is assigned to the corresponding intelligent agent in turn so that the intelligent agent can perform the task.

[0040] Finally, based on the task sequence, the capability profile of each agent, and the operating system scheduling algorithm, each task is sequentially assigned to the corresponding agent, allowing the agent to execute and process the corresponding task. It should be noted that the operating system scheduling algorithm is used to rationally allocate agent time to different tasks to improve system efficiency and responsiveness. Common algorithms include priority scheduling, round-robin scheduling, and time-slice round-robin scheduling. The specific type of operating system scheduling algorithm used in this embodiment is not limited and will be determined based on the specific implementation.

[0041] In this embodiment, by receiving tasks and determining corresponding task information, agent modeling is performed on multiple existing agents to determine the capability profile of each agent, and the basic information of the tasks to be executed and the task execution capabilities of each agent in the system are clarified, thereby forming the basis for multi-agent collaboration; taking into account the resource competition and coordination issues in the task allocation of agents, when executing task scheduling, tasks are sorted to generate a task sequence, and each task is assigned to the corresponding agent in turn according to the task sequence, each capability profile and the operating system scheduling algorithm. The task allocation strategy can be dynamically adjusted according to the characteristics of the agent and the importance of the task, maximize resource utilization and optimize task execution performance, thereby meeting the efficient and stable task scheduling requirements of multi-agent systems in complex environments.

[0042] Based on the above embodiment, in some embodiments, receiving multiple tasks and determining corresponding task information includes:

[0043] S101: Receive multiple tasks and build a task set.

[0044] S102: Determine dependency information corresponding to each task.

[0045] The dependency information represents the execution sequence and / or constraint relationship between the corresponding task and other tasks.

[0046] S103: Constructing a directed acyclic graph of the task set according to each dependency information.

[0047] Specifically, when receiving a task and determining task information, multiple tasks are received and a task set is constructed. , n is a positive integer. The dependency information corresponding to each task is further determined. It should be noted that the dependency information represents the execution order and / or constraint relationship between the corresponding task and the rest of the tasks, that is, some tasks can only be executed after other tasks are completed. Finally, a directed acyclic graph of the task set is constructed based on each dependency information. .in, , yes prerequisite tasks.

[0048] It should be noted that a directed acyclic graph (DAG) is a graphical structure used to represent inter-task dependencies. A directed graph indicates that task dependencies are sequential, with some tasks requiring the completion of others before they can be executed. An acyclic graph indicates that task dependencies do not form cycles, thus avoiding dependency loops. In this embodiment, by constructing a directed acyclic graph, the system can clearly understand the dependencies between tasks, helping to rationally plan the execution order and scheduling strategies.

[0049] Based on the above embodiment, in some embodiments, controlling each agent to transmit the corresponding capability profile to other agents respectively includes:

[0050] S111: Construct a joint structure of intelligent agent capability states based on each capability portrait.

[0051] Among them, the joint structure of agent capability and status represents the role capability and status distribution of all current agents.

[0052] S112: Control each agent to transmit the corresponding task execution status, agent resources and agent capability status joint structure to other agents respectively.

[0053] In the specific implementation, when the intelligent agents transmit their respective ability portraits to each other, it is necessary to build the joint structure of the intelligent agent ability status according to each ability portrait. .

[0054] It's important to note that the agent capability state joint structure represents the current role capabilities and state distribution of all agents. This structure is an aggregated representation of all agent capability profiles. Therefore, when agents communicate their capability profiles to each other, it's also necessary to control each agent's transmission of its corresponding task execution status, agent resources, and agent capability state joint structure to the rest of the agents.

[0055] In this embodiment, each intelligent agent transmits the corresponding task execution status, intelligent agent resources and intelligent agent capability status joint structure to other intelligent agents respectively, so that the system can clearly understand the capability role of each intelligent agent and the overall capability of the current system, so as to facilitate the dynamic optimization of subsequent task planning and the rational allocation of resources.

[0056] Based on the above embodiment, in some embodiments, sorting the tasks according to the task information includes:

[0057] S121: Sort the tasks in descending order according to their corresponding task priorities to generate an initial task sequence.

[0058] S122: Determine whether there is a task with the same priority as the corresponding task in the initial task sequence. If not, proceed to step S126; if so, proceed to step S123.

[0059] S123: Determine tasks with the same corresponding task priority as tasks to be adjusted.

[0060] S124: Sort the tasks to be adjusted in ascending order according to their corresponding deadlines to generate an adjustment task sequence.

[0061] S125: The initial task sequence is updated according to the adjusted task sequence to generate a task sequence.

[0062] S126: Determine the initial task sequence as the task sequence.

[0063] In this embodiment, in order to sort the tasks, the task priorities corresponding to the tasks are specifically Sort each task in descending order to generate an initial task sequence. Further determine whether there is a task with the same priority as the corresponding task in the initial task sequence. If it is confirmed that there is no task with the same priority as the corresponding task, the initial task sequence is directly determined as the task sequence. Understandably, Sort the priority of task i, is the task priority of task i.

[0064] If tasks with the same priority level are confirmed to exist, they are identified as pending tasks for further sorting. Subsequently, the pending tasks are sorted in ascending order based on their respective deadlines to generate an adjustment task sequence. Finally, the initial task sequence is updated based on the adjustment task sequence. This means that the order of the pending tasks in the initial task sequence is replaced with the order of the pending tasks in the adjustment task sequence to generate the final task sequence.

[0065] In this embodiment, tasks are sorted according to their priority and deadline, thereby generating a sequence of tasks to be processed, which can ensure that tasks with higher importance and urgency are processed first, thereby improving task processing efficiency.

[0066] Figure 2 The schematic diagram of the multi-agent task scheduling principle provided by the embodiment of the present invention is shown in FIG. Figure 2 As shown in the figure, each task is assigned to the corresponding agent in turn according to the task sequence, each capability profile and the operating system scheduling algorithm, including:

[0067] S131: Determine whether the task has corresponding unfinished prerequisite tasks and / or predecessor tasks according to the directed acyclic graph; if so, proceed to step S132; if not, proceed to step S133.

[0068] S132: Determine that the task will not be temporarily allocated for scheduling.

[0069] S133: Determine, among the intelligent agents, an intelligent agent to be selected whose corresponding task execution capability is greater than the task requirement.

[0070] S134: Determine the capability redundancy value of each candidate agent based on the task execution capability of each candidate agent and the task requirements of the task.

[0071] S135: Determine the candidate agent with the largest corresponding capability redundancy value as the first target agent, and assign the task to the first target agent.

[0072] In this embodiment, to implement task allocation, all tasks in the task sequence are traversed and a determination is made based on the directed acyclic graph to determine whether any tasks have corresponding uncompleted prerequisite and / or predecessor tasks. If a task is confirmed to have corresponding uncompleted prerequisite and / or predecessor tasks, it is considered that the task cannot be scheduled for execution at this time and is temporarily excluded from scheduling and allocation. The task can be scheduled and allocated again after a period of time.

[0073] If it is confirmed that there is no corresponding unfinished prerequisite task and predecessor task, then it is considered that the current task can be scheduled for execution. Specifically, the candidate agent whose corresponding task execution capability is greater than the task requirement is determined among the agents, that is, , Agent to be selected mission execution capabilities, The currently schedulable tasks mission requirements.

[0074] Finally, according to the task execution capability of each candidate agent and the task requirements, the capability redundancy value of each candidate agent is determined, that is, ; The candidate agent with the largest corresponding capability redundancy value is determined as the first target agent, so that the task can be assigned to the first target agent. The specific formula is as follows:

[0075] ;

[0076] In this embodiment, through task dependency modeling and scheduling logic detection, resource competition caused by logical conflicts in task execution can be effectively avoided, ensuring the feasibility of task planning; at the same time, the matching mechanism based on the agent capability portrait can dynamically adjust the task allocation strategy according to the characteristics of the agent, maximize resource utilization and optimize task execution performance.

[0077] Based on the above embodiments, in some embodiments, after allocating each task to the corresponding agent in sequence according to the task sequence, each capability profile and the operating system scheduling algorithm, the following is further included:

[0078] S136: Receive task status, task progress, task execution time and resource consumption data fed back by each agent according to the time wheel cycle.

[0079] S137: Determine the estimated completion time of the task corresponding to each agent based on the task execution capability of each agent and the task requirements of the task being executed.

[0080] S138: Update the agent capability status joint structure according to each resource consumption data.

[0081] In order to monitor the execution of tasks, after allocating each task to the corresponding intelligent agent in turn according to the task sequence, capability profiles and operating system scheduling algorithm, it is also necessary to receive the task status, task progress, task execution time and resource consumption data fed back by each intelligent agent according to the time wheel cycle.

[0082] It should be noted that this embodiment does not impose any restrictions on the specific size of the time slice period, which depends on the specific implementation. Furthermore, the task status is the stage status of the task in its life cycle; the task progress is the percentage of task execution or the number of execution rounds; the task execution time is the duration of the task being executed by the agent; and the resource consumption data is the actual resource consumption of the agent during the task execution process.

[0083] Furthermore, according to the task execution capability of each agent and the task requirements corresponding to the task being performed , determine the estimated completion time of each agent's corresponding task. The formula is as follows:

[0084] ;

[0085] in, For the task The estimated completion time of the task.

[0086] Finally, the joint structure of agent capability status is updated according to the resource consumption data. The formula is as follows:

[0087] ;

[0088] in, is the updated joint structure of agent capability states, is the joint structure of the agent's capability state before updating, Resource consumption data.

[0089] In this way, by monitoring the execution of tasks and updating the joint structure of agent capability status, the system can better grasp the current status of each agent, so as to facilitate the subsequent possible allocation of new tasks and adjustment of existing tasks.

[0090] In order to detect task conflicts of intelligent agents, based on the above embodiments, in some embodiments, the method further includes:

[0091] S141: When the agent is assigned multiple tasks, determine the sum of the task requirements of each task under the agent.

[0092] S142: Determine whether the sum of the task requirements is greater than the task execution capability of the agent; if so, proceed to step S143; if not, end.

[0093] S143: Confirm that the agent currently has a task conflict and end the task processing process of the agent.

[0094] Specifically, when an agent is assigned multiple tasks, the sum of the task requirements of each task assigned to the agent is determined. It should be noted that this embodiment does not impose a limit on the number of tasks assigned to an agent, which depends on the specific implementation. It should also be noted that when an agent is assigned multiple tasks, they do not necessarily need to be executed simultaneously. Each task may be scheduled and assigned to the agent at different times, but they all require the agent's task execution capacity.

[0095] Furthermore, we determine whether the sum of the task requirements is greater than the agent's task execution capability. For example, if an agent is assigned two tasks:

[0096] ;

[0097] in, For the task and tasks The sum of the task requirements, The task execution capability of the intelligent agent.

[0098] If the sum of the task requirements is confirmed to be less than the agent's task execution capability, the system returns 0 to indicate that the agent currently has no task conflicts. If the sum of the task requirements is confirmed to be greater than the agent's task execution capability, the system returns 1 to indicate that the agent currently has a task conflict and terminates the agent's task processing. This allows for conflict detection in the agent's task execution.

[0099] In some embodiments, if it is determined that the agent currently has a task conflict, the method further includes:

[0100] S144: Determine the last assigned task among the tasks under the agent as the task to be migrated.

[0101] S145: Determine, from among the remaining intelligent agents, a candidate intelligent agent whose corresponding task execution capability is greater than the task requirement of the task to be transferred.

[0102] S146: Determine the capability redundancy value of each candidate agent based on the task execution capability of each candidate agent and the task requirements of the task to be migrated.

[0103] S147: Determine the candidate agent with the largest corresponding capability redundancy value as the second target agent, and assign the task to the second target agent.

[0104] In this embodiment, if it is confirmed that there is a task conflict between the agents, the conflicting tasks need to be reallocated. Specifically, the last task assigned among the tasks under the agent is determined as the task to be migrated. For example, the agent The next task and tasks In the task The task to be migrated.

[0105] Further, a candidate agent whose corresponding task execution capability is greater than the task requirement of the task to be transferred is determined among the remaining agents, that is, , Candidate Agent mission execution capabilities, For tasks to be migrated According to the task execution capability of each candidate agent and the task requirements of the task to be transferred, the capability redundancy value of each candidate agent is determined, that is, Finally, the candidate agent with the largest corresponding capability redundancy value is determined as the second target agent to assign the task to the second target agent. The specific formula is as follows:

[0106] ;

[0107] In this embodiment, a conflict feedback mechanism is introduced to achieve dynamic optimization of task planning and reasonable allocation of agent resources through monitoring and adjustment strategies, which significantly improves the adaptability and efficiency of task scheduling.

[0108] In order to determine the task completion status, based on the above embodiments, in some embodiments, after assigning each task to the corresponding agent in sequence according to the task sequence, each capability profile and the operating system scheduling algorithm, the following is further included:

[0109] S151: Monitor the task execution time corresponding to each agent.

[0110] S152: Determine the remaining task execution time of each agent based on the task execution time and the expected task completion time of each agent.

[0111] S153: Determine whether the remaining execution time of each agent's task is not greater than 0; if so, proceed to step S154; if not, return to step S151.

[0112] S154: Confirm that the task execution of the corresponding agent is completed, and output a prompt message indicating that the task of the corresponding agent is completed.

[0113] Specifically, after completing the task scheduling and allocation, it is also necessary to monitor the task execution time corresponding to each agent. . According to the task execution time of each agent and the estimated completion time of the task , determine the remaining execution time of each agent's task, the formula is as follows:

[0114] ;

[0115] in, The remaining execution time of the agent's task.

[0116] Subsequently, a determination is made as to whether the remaining execution time of each agent's task is not greater than 0. If the remaining execution time of the agent's task is greater than 0, the corresponding agent's task is determined to be uncompleted, and the process returns to the step of monitoring the execution time of each agent's task. If the remaining execution time of the agent's task is not greater than 0, the corresponding agent's task is determined to be completed, and a prompt indicating that the corresponding agent's task has been completed is output.

[0117] In addition, in some embodiments, after confirming that the task is completed, it is necessary to recycle the agent resources. Therefore, after confirming that the task of the corresponding agent is completed, it also includes:

[0118] S155: Update the task completion status of all agents.

[0119] S156: Recover the resources occupied by the agent that has completed the task into the agent capability state joint structure.

[0120] Specifically, the task completion status of all agents is updated first, and then the resources occupied by the agents that have completed the task are recycled into the joint structure of the agent capability status, as follows:

[0121] ;

[0122] in, is the joint structure of agent capability status after resource recovery, It is the joint structure of agent capability states before resource recovery; The amount of agent resources recovered this time is the same as the task requirements of the corresponding completed task.

[0123] In summary, after completing task assignment, the task completion status is determined in real time and the corresponding agent resources are recovered to facilitate the assignment of new tasks, thereby improving the flexibility of task planning and the optimal utilization of agent resources.

[0124] Based on the above embodiment, in some embodiments, after confirming that the task of the corresponding agent is completed, the process further includes:

[0125] S157: Determine the deadline, expected completion time, and remaining execution time of the unfinished tasks.

[0126] S158: Determine the urgency of the unfinished task based on the corresponding deadline and the remaining execution time of the task;

[0127] S159: Determine the new task priority of the unfinished task according to the corresponding urgency and the expected completion time of the task, and return to step S13.

[0128] In this embodiment, after confirming that the corresponding agent's task has been completed, it is necessary to adjust the order of the unfinished tasks in the current task sequence. Specifically, the deadline, expected completion time, and remaining execution time of the unfinished tasks are determined; the urgency of the unfinished tasks is determined based on the corresponding deadline and remaining execution time; and the new task priority of the unfinished tasks is determined based on the corresponding urgency and expected completion time. The specific formula is as follows:

[0129] ;

[0130] in, For unfinished tasks New task priorities; is the weight; For the task The urgency of the task Deadline and remaining execution time of the task The difference between For the task The estimated completion time of the task.

[0131] In this embodiment, by dynamically adjusting the task priority, the scheduler can comprehensively consider the task urgency and resource matching in the next round of allocation, thereby improving the task processing efficiency.

[0132] Based on the above embodiment, in some embodiments, the method further includes:

[0133] S161: After the agent completes the corresponding task, the control agent shares the corresponding agent resources with other agents.

[0134] S162: The control agent generates a task execution strategy to be used when executing the corresponding task, and shares the task execution strategy with other agents.

[0135] Specifically, after an agent completes its corresponding task, in this embodiment, to improve the processing efficiency of remaining tasks, the control agent shares the corresponding agent resources with other agents. Simultaneously, the control agent generates a task execution strategy for the corresponding task and shares this strategy with the remaining agents. This allows the remaining agents to use the shared agent resources and task execution strategy to process their own tasks, significantly improving task processing efficiency.

[0136] Furthermore, because agents possess monitoring and feedback capabilities, they can monitor the overall system status and the task execution status of other agents in real time. Therefore, after completing their tasks, any anomalies or potential issues detected by agents within the system can be quickly reported, enabling the system to dynamically adjust and optimize. For example, if an agent, while monitoring, discovers a delay in the execution of another agent's task, it can immediately provide feedback, prompting the system to reschedule tasks and ensure the smooth completion of the overall task. This monitoring and feedback mechanism empowers the system with self-regulation capabilities, improving its operational stability and efficiency.

[0137] Secondly, after completing its primary task, an agent can use its idle time to perform other or auxiliary tasks. These idle tasks are designed to fully utilize the agent's capabilities and resources, avoiding idle states. By performing idle tasks, the agent not only remains active but also provides additional support and services to the system. For example, after completing its primary data processing task, an agent can use its idle time to perform data preprocessing or cleaning, providing higher-quality data resources for subsequent tasks. This full utilization of idle resources allows the system to more flexibly respond to changes and demands, improving overall system performance.

[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0139] Figure 3 Schematic diagram of a task scheduling device provided by an embodiment of the present invention. The device is applied to a heterogeneous multi-agent system; Figure 3 As shown, the device includes:

[0140] A receiving module 10 is configured to receive a plurality of tasks and determine corresponding task information; wherein the task information includes at least task priority, deadline, and task requirements;

[0141] Modeling module 11, for performing agent modeling on multiple existing agents to determine the capability profile of each agent; wherein the capability profile at least includes the task execution capability of the corresponding agent, the current task execution status, and the agent resources;

[0142] Broadcast module 12, used to broadcast each task to each agent and control each agent to transmit the corresponding capability profile to other agents;

[0143] The sorting module 13 is used to sort each task according to the task information to generate a task sequence;

[0144] The scheduling module 14 is used to assign each task to the corresponding intelligent agent in turn according to the task sequence, each capability profile and the operating system scheduling algorithm, so that the intelligent agent can perform the task.

[0145] In some embodiments, the receiving module 10 includes:

[0146] A first receiving submodule, configured to receive multiple tasks and construct a task set;

[0147] A first determination submodule is configured to determine dependency information corresponding to each task; wherein the dependency information represents the execution sequence and / or constraint relationship between the corresponding task and the remaining tasks;

[0148] The first construction submodule is used to construct a directed acyclic graph of the task set according to each dependency information.

[0149] In some embodiments, the broadcast module 12 includes:

[0150] The second construction submodule is used to construct an agent capability state joint structure based on each capability portrait; wherein the agent capability state joint structure represents the role capability and state distribution of all current agents;

[0151] The first control submodule is used to control each agent to transmit the corresponding task execution status, agent resources and agent capability status joint structure to other agents respectively.

[0152] In some embodiments, the sorting module 13 includes:

[0153] A first sorting submodule is used to sort the tasks in descending order according to their corresponding task priorities to generate an initial task sequence;

[0154] The first judgment submodule is used to judge whether there is a task with the same priority as the corresponding task in the initial task sequence; if not, the initial task sequence is determined as the task sequence; if so, the task with the same priority as the corresponding task is determined as the task to be adjusted;

[0155] The second sorting submodule is used to sort the tasks to be adjusted in ascending order according to the deadlines corresponding to the tasks to be adjusted, so as to generate an adjustment task sequence;

[0156] The first updating submodule is configured to update the initial task sequence according to the adjusted task sequence to generate a task sequence.

[0157] In some embodiments, the scheduling module 14 includes:

[0158] The second judgment submodule is used to determine whether the task has corresponding unfinished prerequisite tasks and / or predecessor tasks based on the directed acyclic graph; if so, determine that the task will not be temporarily scheduled; if not, determine among the agents a candidate agent whose corresponding task execution capability exceeds the task requirement;

[0159] The second determination submodule is used to determine the capability redundancy value of each candidate agent according to the task execution capability of each candidate agent and the task requirements of the task;

[0160] The third determination submodule is used to determine the candidate intelligent agent with the largest corresponding capability redundancy value as the first target intelligent agent, and allocate the task to the first target intelligent agent.

[0161] In some embodiments, it further includes:

[0162] The second receiving submodule is used to receive task status, task progress, task execution time and resource consumption data fed back by each agent according to the time wheel cycle;

[0163] The fourth determination submodule is used to determine the estimated completion time of the task corresponding to each agent based on the task execution capability of each agent and the task requirements of the task being executed;

[0164] The second updating submodule is used to update the joint structure of the intelligent agent capability status according to the resource consumption data.

[0165] In some embodiments, it further includes:

[0166] a fifth determination submodule, for determining the sum of the task requirements of each task under the intelligent agent when the intelligent agent is assigned multiple tasks;

[0167] The third judgment submodule is used to judge whether the sum of the task requirements is greater than the task execution capability of the agent; if so, it is confirmed that the agent currently has a task conflict and the task processing process of the agent is terminated.

[0168] In some embodiments, it further includes:

[0169] The sixth determination submodule is used to determine the last assigned task among the tasks under the agent as the task to be transferred;

[0170] a seventh determination submodule, configured to determine, from among the remaining agents, a candidate agent whose corresponding task execution capability is greater than the task requirement of the task to be transferred;

[0171] an eighth determination submodule, configured to determine a capability redundancy value of each candidate agent based on the task execution capability of each candidate agent and the task requirements of the task to be transferred;

[0172] The ninth determination submodule is used to determine the candidate agent with the largest corresponding capability redundancy value as the second target agent, and assign the task to the second target agent.

[0173] In some embodiments, it further includes:

[0174] The monitoring submodule is used to monitor the task execution time corresponding to each agent;

[0175] A tenth determination submodule is used to determine the remaining execution time of each agent's task based on the task execution time and the expected completion time of each agent's task;

[0176] The fourth judgment submodule is used to judge whether the remaining execution time of the task of each agent is not greater than 0; if so, it confirms that the task execution of the corresponding agent is completed and outputs a prompt message indicating that the task of the corresponding agent is completed; if not, it triggers the monitoring submodule.

[0177] In some embodiments, it further includes:

[0178] The third update submodule is used to update the task completion status of all agents;

[0179] The resource recovery submodule is used to recycle the resources occupied by the agent after the task is completed into the joint structure of the agent's capability status.

[0180] In some embodiments, it further includes:

[0181] The eleventh determination submodule is used to determine the deadline, expected completion time, and remaining execution time of unfinished tasks;

[0182] a twelfth determination submodule, for determining the urgency of the unfinished task based on the corresponding deadline and the remaining execution time of the task;

[0183] The thirteenth determination submodule is used to determine the new task priority of the unfinished task according to the corresponding urgency and the expected completion time of the task, and return to the step of sorting each task according to the task information.

[0184] In some embodiments, it further includes:

[0185] The second control submodule is used to control the intelligent agent to share the corresponding intelligent agent resources with other intelligent agents after the intelligent agent completes the corresponding task;

[0186] The third control submodule is used to control the intelligent agent to generate a task execution strategy used when executing the corresponding task, and share the task execution strategy with other intelligent agents.

[0187] For the description of the features in the embodiment corresponding to the task scheduling device, please refer to the relevant description of the embodiment corresponding to the task scheduling method, and no further details will be given here.

[0188] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned task scheduling method embodiments.

[0189] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned task scheduling method embodiments when running.

[0190] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0191] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned task scheduling method embodiments are implemented.

[0192] An embodiment of the present invention also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned task scheduling method embodiments.

[0193] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0194] The above is a detailed introduction to the task scheduling method, device, medium and product provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A task scheduling method, characterized in that: Applied to a heterogeneous multi-agent system; the method comprises: Receive multiple tasks and determine corresponding task information; wherein the task information includes at least task priority, deadline and task requirements; Performing agent modeling on the existing multiple agents to determine the capability profile of each agent; wherein the agent modeling includes capability modeling and state modeling; the capability profile includes at least the task execution capability of the corresponding agent, the current task execution status, and the agent resources; Broadcasting each of the tasks to each of the agents, and controlling each of the agents to transmit the corresponding capability profile to the other agents; Sorting each of the tasks according to the task information to generate a task sequence; Allocating each of the tasks to the corresponding agent in sequence according to the task sequence, each of the capability profiles, and the operating system scheduling algorithm, so that the agent can perform the task; The steps of allocating each task to the corresponding agent in sequence according to the task sequence, each capability profile, and the operating system scheduling algorithm include: Determining whether the task has corresponding unfinished prerequisite tasks and / or predecessor tasks according to the directed acyclic graph corresponding to the task; If so, it is determined that the task will not be temporarily scheduled; If not, determining a candidate intelligent agent from among the intelligent agents whose corresponding task execution capability is greater than the task requirement of the task; Determining a capability redundancy value of each candidate agent according to the task execution capability of each candidate agent and the task requirement of the task; The candidate agent with the largest capability redundancy value is determined as the first target agent, and the task is assigned to the first target agent.

2. The task scheduling method according to claim 1, characterized in that: Receive multiple tasks and determine the corresponding task information, including: receiving a plurality of the tasks and constructing a task set; Determining dependency information corresponding to each of the tasks; wherein the dependency information represents the execution sequence and / or constraint relationship between the corresponding task and the remaining tasks; A directed acyclic graph of the task set is constructed according to each dependency information.

3. The task scheduling method according to claim 1, wherein: Controlling each of the intelligent agents to transmit the corresponding capability profile to the other intelligent agents respectively includes: Constructing an agent capability state joint structure based on each of the capability portraits; wherein the agent capability state joint structure represents the current role capability and state distribution of all the agents; Control each of the intelligent agents to transmit the corresponding task execution status, the intelligent agent resources and the intelligent agent capability status joint structure to the other intelligent agents respectively.

4. The task scheduling method according to claim 2, characterized in that: Sorting the tasks according to the task information includes: sorting the tasks in descending order according to the task priorities corresponding to the tasks to generate an initial task sequence; Determine whether there is a task with the same priority as the task in the initial task sequence; If not, determining the initial task sequence as the task sequence; If so, determining the task with the same priority as the task to be adjusted; sorting the tasks to be adjusted in ascending order according to the deadlines corresponding to the tasks to be adjusted to generate an adjustment task sequence; The initial task sequence is updated according to the adjusted task sequence to generate the task sequence.

5. The task scheduling method according to claim 1, wherein: After allocating each of the tasks to the corresponding agent in sequence according to the task sequence, each of the capability profiles, and the operating system scheduling algorithm, the method further includes: Receive task status, task progress, task execution time, and resource consumption data fed back by each agent according to a time wheel cycle; Determining an estimated completion time for each of the agents corresponding to the task based on the task execution capability of each of the agents and the task requirements of the task being executed; The agent capability status joint structure is updated according to each of the resource consumption data.

6. The task scheduling method according to claim 1, wherein: Also includes: When the agent is assigned a plurality of tasks, determining the sum of the task requirements of each task under the agent; Determining whether the sum of the task requirements is greater than the task execution capability of the agent; If so, it is confirmed that the agent currently has a task conflict, and the task processing process of the agent is terminated.

7. The task scheduling method according to claim 6, characterized in that: If it is confirmed that the agent currently has a task conflict, the process also includes: Determine the task that is last assigned among the tasks under the agent as the task to be transferred; Determining, from the remaining intelligent agents, a candidate intelligent agent whose task execution capability is greater than the task requirement of the task to be transferred; Determining a capability redundancy value of each candidate agent based on the task execution capability of each candidate agent and the task requirement of the task to be migrated; The candidate agent with the largest capability redundancy value is determined as the second target agent, and the task is assigned to the second target agent.

8. The task scheduling method according to claim 5, characterized in that: After allocating each of the tasks to the corresponding agent in sequence according to the task sequence, each of the capability profiles, and the operating system scheduling algorithm, the method further includes: Monitoring the task execution time corresponding to each of the intelligent agents; Determine the remaining execution time of the task of each agent according to the task execution time of each agent and the expected completion time of the task; Determine whether the remaining execution time of the task of each agent is not greater than 0; If so, confirm that the task execution corresponding to the agent is completed, and output a prompt message indicating that the task is completed; If not, return to the step of monitoring the task execution time corresponding to each of the intelligent agents.

9. The task scheduling method according to claim 8, characterized in that: After confirming that the task corresponding to the agent is completed, the method further includes: Update the task completion status of all the agents; The resources occupied by the agent after completing the task are recovered into the agent capability status joint structure.

10. The task scheduling method according to claim 8, characterized in that: After confirming that the task corresponding to the agent is completed, the method further includes: Determine the deadline, the estimated completion time, and the remaining execution time of the task corresponding to the unfinished task; Determining the urgency of the unfinished task based on the corresponding deadline and the remaining execution time of the task; According to the corresponding urgency and the estimated completion time of the task, the new task priority of the unfinished task is determined, and the process returns to the step of sorting the tasks according to the task information.

11. The task scheduling method according to any one of claims 1 to 10, characterized in that: Also includes: After the agent completes the corresponding task, controlling the agent to share the corresponding agent resources with other agents; The intelligent agent is controlled to generate a task execution strategy used when executing the corresponding task, and the task execution strategy is shared with the other intelligent agents.

12. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the task scheduling method according to any one of claims 1 to 11 when executing the computer program.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the task scheduling method according to any one of claims 1 to 11.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the task scheduling method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Unmanned intelligent inspection equipment cooperative scheduling method and system in photovoltaic power generation scene

    CN119358998A