Task allocation method and device, computer readable storage medium, and electronic device
Patent Information
- Application Number
- CN202611207233.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-03
AI Technical Summary
Existing task allocation methods cannot quickly generate strategies that take into account multiple performance metrics, resulting in low efficiency in task allocation in multi-agent systems.
By decomposing the task to be processed into multiple atomic subtasks, obtaining real-time state data of each agent, calculating the comprehensive efficiency index, and using an attention network to evaluate the suitability of the agent and the subtask, a cost matrix is constructed and solved to generate a task allocation strategy.
It improves the accuracy of task and agent matching and the balance of resource utilization, thereby increasing the timeliness of task completion and overall efficiency.
Smart Images

Figure CN123030347A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of multi-agent cooperative scheduling technology, and in particular to a task allocation method, a task allocation device, a computer-readable storage medium, and an electronic device. Background Technology
[0002] With the deep integration of artificial intelligence and Internet of Things technologies, multi-agent systems have been widely applied in complex scenarios such as smart manufacturing, smart logistics, emergency rescue, and autonomous driving. In these scenarios, how to efficiently and rationally allocate large-scale dynamic tasks to heterogeneous agents is the core issue determining the overall system performance.
[0003] Existing task allocation methods can be mainly divided into two categories: one is traditional methods based on rules or heuristic algorithms, such as greedy strategies, the Hungarian algorithm, and their variants; the other is intelligent decision-making methods based on machine learning or reinforcement learning. However, both of these methods have significant limitations in practical applications.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure. Summary of the Invention
[0005] The purpose of this disclosure is to provide a task allocation method, a task allocation device, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least a certain extent, the technical problem of the inability to quickly generate task allocation strategies that take into account multiple performance indicators in related technologies.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to a first aspect of this disclosure, a task allocation method is provided, comprising: Receive the task to be processed and decompose the task to be processed into multiple atomic subtasks; The real-time state data of each agent is acquired, and the comprehensive efficiency index of each agent for each atomic subtask is calculated; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors. The fitness score between each agent and each atomic subtask is calculated based on an attention network. A cost matrix is constructed based on the comprehensive efficiency index and the suitability score, and the cost matrix is solved to generate a task allocation strategy.
[0008] In an exemplary embodiment of this disclosure, the step of decomposing the task to be processed into multiple atomic subtasks includes: Extract the set of skill requirements and the set of resource requirements corresponding to the task to be processed as a task complexity metric; wherein, the task complexity metric represents the number of skill requirement types and the number of resource requirement types required for the task to be processed; The granularity of subtask partitioning is determined based on the aforementioned task complexity metric. The task to be processed is divided into multiple atomic subtasks that can be executed in parallel according to the subtask division granularity, and a skill constraint label and resource requirement threshold are bound to each atomic subtask.
[0009] In an exemplary embodiment of this disclosure, the multi-dimensional performance factors include at least two of the following: task execution capability, resource utilization indicators, and robustness factors. The task execution capability is determined based on the agent's historical task completion rate and skill matching degree; The resource utilization index is determined based on the weighted sum of the resource utilization rate and the corresponding resource weight coefficient for each resource dimension of the agent; the resource weight coefficient is a dynamic parameter output by the reinforcement learning model. The robustness factor is determined based on the hardware reliability and fault tolerance of the agent.
[0010] In an exemplary embodiment of this disclosure, the calculation of the fit score between each agent and each atomic subtask based on the attention network includes: The feature vectors of each intelligent agent and the requirement feature vectors of each atomic subtask are input into the attention network; The attention network is used to perform feature interaction between the feature vector and the demand feature vector to obtain the fit score.
[0011] In an exemplary embodiment of this disclosure, the step of constructing a cost matrix based on the comprehensive efficiency index and the suitability score, solving the cost matrix, and generating a task allocation strategy includes: When the number of agents is not equal to the number of atomic subtasks, the cost matrix is expanded into a square matrix by adding virtual entities, and the allocation cost corresponding to the virtual entity is set to a preset penalty value; the preset penalty value is higher than the normal allocation cost. For each element in the cost matrix that represents a feasible allocation between an agent and an atomic subtask, the value of the element is determined based on the comprehensive efficiency index of the corresponding agent and the fitness score of the corresponding atomic subtask; wherein, the value of the element is negatively correlated with both the comprehensive efficiency index and the fitness score; For each element in the cost matrix that represents an infeasible allocation between the agent and the atomic subtask, the value of the element is set to the preset penalty value; The extended cost matrix is minimized to output the task allocation strategy.
[0012] In an exemplary embodiment of this disclosure, the method further includes: Monitor the operating status of each intelligent agent and the execution progress of each atomic subtask; When a runtime exception is detected, the comprehensive efficiency index and the cost matrix are updated, and the task allocation strategy is regenerated. The runtime exception events include at least one of the following: new task access, agent failure, agent overload, or atomic subtask execution delay.
[0013] In an exemplary embodiment of this disclosure, updating the comprehensive efficiency index and the cost matrix, and regenerating the task allocation strategy when the runtime exception event is detected, includes: Identify the event characteristics of the runtime exception event; the event characteristics include at least one of event type and scope of impact; Select a local or global reallocation strategy based on the event characteristics; If the local redistribution strategy is selected, then only the comprehensive efficiency index corresponding to the affected agent and the affected atomic subtask, as well as the corresponding element values in the cost matrix, are updated, and a new task allocation strategy is generated based on the updated cost matrix. If the global redistribution strategy is selected, the cost matrix is reconstructed and solved again to generate a new task allocation strategy.
[0014] In an exemplary embodiment of this disclosure, the method further includes: Collect historical task completion rate, resource utilization rate, and average task completion time as global performance feedback metrics; The global performance feedback quantity is constructed as the reward function of the reinforcement learning model; The resource weight coefficients of the reinforcement learning model are iteratively optimized based on the reward function.
[0015] According to a second aspect of this disclosure, a task allocation apparatus is provided, comprising: The task receiving module is used to receive tasks to be processed and decompose the tasks to be processed into multiple atomic subtasks. The efficiency index calculation module is used to acquire real-time status data of each agent and calculate the comprehensive efficiency index of each agent for each atomic subtask; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors; The scoring determination module is used to calculate the fit score between each agent and each atomic subtask based on the attention network. The matrix construction and solution module is used to construct a cost matrix based on the comprehensive efficiency index and the fitness score, and to solve the cost matrix to generate a task allocation strategy.
[0016] According to a third aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the task allocation method described in the first aspect above.
[0017] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the task allocation method described in the first aspect by executing the executable instructions.
[0018] As can be seen from the above technical solutions, the task allocation method, task allocation device, computer-readable storage medium, and electronic device in the exemplary embodiments of this disclosure have at least the following advantages and positive effects: In some embodiments of the present disclosure, the technical solutions are as follows: receiving a task to be processed, decomposing the task into multiple atomic sub-tasks; acquiring real-time state data of each agent, calculating the comprehensive efficiency index of each agent for each atomic sub-task; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors; calculating the fit score between each agent and each atomic sub-task based on an attention network; constructing a cost matrix based on the comprehensive efficiency index and the fit score, and solving the cost matrix to generate a task allocation strategy. On the one hand, it can objectively quantify the actual execution capability of each agent in the current real-time state by calculating the comprehensive efficiency index through multi-dimensional efficiency factor weighted fusion, avoiding allocation bias caused by relying solely on static attributes or historical averages, and improving the accuracy of matching between tasks and agents at the efficiency level. On the other hand, it can dynamically calculate the fit score between agents and atomic subtasks based on attention networks, capturing the nonlinear high-order correlation between the two in multi-dimensional features such as skill constraints, resource requirements, and priorities, overcoming the problem that traditional linear weighted models are insufficient in expressing complex matching relationships, and enhancing the semantic-level adaptability of allocation strategies to heterogeneous tasks and heterogeneous agents. Furthermore, it can use the comprehensive efficiency index representing the agent's own operating efficiency and the fit score representing the degree of supply and demand matching as the basis for constructing the cost matrix, so that the solution process takes into account both individual execution efficiency and global matching quality, generating an optimized allocation strategy that meets both the agent's current load state and the inherent needs of the task, improving the timeliness of overall task completion and the balance of resource utilization.
[0019] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0021] Figure 1 A flowchart illustrating the task allocation method in an embodiment of this disclosure is shown; Figure 2 This diagram illustrates a process for decomposing a task into multiple atomic subtasks in an embodiment of this disclosure. Figure 3 This illustration shows how, in an embodiment of the present disclosure, a cost matrix is constructed based on the comprehensive efficiency index and the suitability score, and a task allocation strategy is generated by solving the cost matrix. Figure 4 A flowchart illustrating the update mechanism of the task allocation strategy in an embodiment of this disclosure is shown. Figure 5 This illustration shows a flowchart of how, when a runtime anomaly is detected, the comprehensive efficiency index and cost matrix are updated, and the task allocation strategy is regenerated. Figure 6 This diagram illustrates the iterative optimization mechanism for resource weight coefficients of a reinforcement learning model in an embodiment of this disclosure. Figure 7 This diagram illustrates the overall flow of the task allocation method in an embodiment of this disclosure. Figure 8 This diagram illustrates the structure of the task allocation apparatus in an exemplary embodiment of the present disclosure. Figure 9 A schematic diagram of the structure of an electronic device in an exemplary embodiment of this disclosure is shown. Detailed Implementation
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0023] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0024] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.
[0025] First, the technical terms related to the technical background of this disclosure will be explained: Reinforcement learning is a machine learning paradigm in which an agent learns optimal decision-making strategies by interacting with its environment and receiving rewards or penalties. In this disclosure, reinforcement learning is used to dynamically adjust the weights in an attention mechanism (such as the weight ratio between skill matching and resource matching), enabling the system to adaptively learn which factors are more important in different scenarios, thereby continuously optimizing the task allocation strategy.
[0026] Attention Mechanism: Inspired by human cognitive processes, it is a weighting mechanism that allows a system to dynamically prioritize different parts of the input information. In this disclosure, it is used to compute the compatibility of an agent with a task. The system assigns different attention weights to "skill matching" and "resource matching" to more precisely measure their contribution to the final decision, rather than a simple fixed ratio.
[0027] Multi-objective optimization refers to the process of finding a set of optimal solutions (called Pareto optimal solutions) when there are multiple conflicting optimization objectives. This disclosure does not solely pursue the shortest task completion time, but simultaneously optimizes multiple objectives such as task completion time, resource utilization, and system robustness. Its core "efficiency index" is precisely the embodiment of integrating these objectives into a comprehensive indicator.
[0028] Dynamic Task Allocation: Unlike static scheduling that allocates tasks only once, this is a strategy that can adjust task allocation in real time in response to environmental changes. This disclosed system continuously monitors the system status (such as agent failures, task delays, and the arrival of new tasks) through a real-time monitoring component and triggers a dynamic scheduler to reallocate tasks, ensuring the system's continuous and efficient operation in changing environments.
[0029] Environmental changes refer to external or internal events that occur during system operation and affect task allocation decisions. In the context of this disclosure, these mainly include: dynamic addition of new tasks, agent offline or failure, excessive agent load, and delays in task execution. The main value of the system lies in its ability to effectively respond to these changes.
[0030] The Hungarian Algorithm is a classic combinatorial optimization algorithm for solving the minimum weight matching problem in bipartite graphs (i.e., the assignment problem). This disclosure improves upon it to handle non-square matrix cases where the number of agents and tasks is unequal, and uses the "efficiency index" and "compatibility" as the core optimizer by converting them into costs to find the optimal one-to-one assignment scheme for the current set of tasks and agents.
[0031] Efficiency Index: This disclosure proposes a comprehensive performance metric to quantify the overall execution efficiency of each agent on a set of tasks. Its calculation formula integrates task completion rate, resource utilization rate, resource weight coefficient, and robustness factor, and is the core driver of multi-objective optimization. A higher index indicates a stronger overall ability of the agent to execute the set of tasks, giving it a greater advantage in task allocation.
[0032] Multi-Agent System (MAS): A system consisting of one or more intelligent agents capable of interacting (cooperating, competing, coordinating). This disclosure pertains to such systems, where each agent is a computing entity (such as a server, robot, or drone) possessing specific skills and resources, and collaboratively completes a complex overall task through the scheduling of this system.
[0033] Real-Time Monitoring: A core component of the system, its function is to continuously and periodically check the status of all agents and tasks. Like the system's "sensors," it detects deviations such as whether agents are online, overloaded, or experiencing task delays, and generates timely reports to provide a basis for dynamic adjustments.
[0034] Fault tolerance refers to the ability of a system to continue operating normally and providing services even when some components fail. The fault tolerance disclosed herein is manifested in the following: when real-time monitoring detects that an agent is offline or a task has failed, the dynamic scheduler immediately initiates a reallocation process, assigning the affected task to other healthy and capable agents, thereby ensuring the completion of the overall task.
[0035] Resource utilization is a metric that measures the efficiency of system resource usage (such as CPU, memory, and storage). High resource utilization means less resource idleness and waste. This disclosure takes it as one of the core optimization objectives, considering the degree of matching between the agent's resource capabilities and task requirements in both efficiency index calculation and cost matrix construction, aiming to improve the overall system's resource utilization efficiency.
[0036] In the embodiments of this disclosure, a task allocation method is first provided, which at least to some extent overcomes the shortcomings of related technologies in that they cannot quickly generate task allocation strategies that take into account multiple performance indicators.
[0037] Figure 1 The diagram shows a flowchart of a task allocation method in an embodiment of this disclosure. The execution entity of the task allocation method can be a server or system responsible for task allocation processing.
[0038] refer to Figure 1 A task allocation method according to an embodiment of the present disclosure includes the following steps: Step S110: Receive the task to be processed and decompose the task to be processed into multiple atomic subtasks. Step S120: Obtain real-time state data of each agent and calculate the comprehensive efficiency index of each agent for each atomic subtask; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors. Step S130: Calculate the fit score between each agent and each atomic subtask based on the attention network; Step S140: Construct a cost matrix based on the comprehensive efficiency index and the suitability score, and solve the cost matrix to generate a task allocation strategy.
[0039] exist Figure 1In the technical solution provided by the embodiment shown, the task to be processed is received and decomposed into multiple atomic sub-tasks; real-time state data of each agent is obtained, and the comprehensive efficiency index of each agent for each atomic sub-task is calculated; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors; the fit score between each agent and each atomic sub-task is calculated based on the attention network; a cost matrix is constructed based on the comprehensive efficiency index and the fit score, and the cost matrix is solved to generate a task allocation strategy. On the one hand, it can objectively quantify the actual execution capability of each agent in the current real-time state by calculating the comprehensive efficiency index through multi-dimensional efficiency factor weighted fusion, avoiding allocation bias caused by relying solely on static attributes or historical averages, and improving the accuracy of matching between tasks and agents at the efficiency level. On the other hand, it can dynamically calculate the fit score between agents and atomic subtasks based on attention networks, capturing the nonlinear high-order correlation between the two in multi-dimensional features such as skill constraints, resource requirements, and priorities, overcoming the problem that traditional linear weighted models are insufficient in expressing complex matching relationships, and enhancing the semantic-level adaptability of allocation strategies to heterogeneous tasks and heterogeneous agents. Furthermore, it can use the comprehensive efficiency index representing the agent's own operating efficiency and the fit score representing the degree of supply and demand matching as the basis for constructing the cost matrix, so that the solution process takes into account both individual execution efficiency and global matching quality, generating an optimized allocation strategy that meets both the agent's current load state and the inherent needs of the task, improving the timeliness of overall task completion and the balance of resource utilization.
[0040] The following are Figure 1 The specific implementation process of each step in the process will be explained in detail: In step S110, the task to be processed is received and decomposed into multiple atomic subtasks.
[0041] In this step, tasks to be processed can be received. Then, these tasks are broken down into indivisible atomic subtasks so that they can be accurately matched and allocated to heterogeneous intelligent agents in the future.
[0042] refer to Figure 2 , Figure 2 This illustration shows a flowchart of how a task to be processed is decomposed into multiple atomic subtasks in an embodiment of this disclosure, including steps S201-S203: In step S201, the skill requirement set and resource requirement set corresponding to the task to be processed are extracted as task complexity metrics; wherein, the task complexity metrics represent the number of skill requirement types and resource requirement types required for the task to be processed.
[0043] In this step, semantic parsing and structured feature extraction can be performed on a single task to be processed. Specifically, firstly, the process documents or order descriptions associated with the task are scanned to identify all skill types required to complete the task (such as CNC machining, visual inspection, precision assembly, etc.), and the number of skill requirement types is obtained after deduplication. At the same time, the resource types required during the execution of the task are analyzed (such as GPU computing units, high-precision robotic arms, specific energy consumption quotas, etc.), and the number of resource requirement types is obtained after deduplication. The counts of the above two dimensions are combined to generate a task complexity metric that characterizes the degree of multidimensional coupling of the task to be processed. The higher the value of this metric, the more complex the cross-skill and cross-resource dependencies of the task during execution, providing an objective and quantifiable data basis for subsequent adaptive adjustment of decomposition granularity, effectively avoiding the over-decomposition or under-decomposition problems that occur when traditional fixed-granularity decomposition methods are faced with heterogeneous tasks.
[0044] In step S202, the granularity of subtask division is determined based on the task complexity metric.
[0045] In this step, the system can incorporate a complexity-based adaptive decomposition algorithm. Using the task complexity metric generated in step S201 as the core input parameter, it dynamically calculates the optimal subtask partitioning granularity for the current task. Specifically, the algorithm can preset complexity thresholds and granularity mapping rules: when the task complexity metric is higher than the first threshold, it is determined that the task has high internal coupling and high execution risk, automatically selecting a fine-grained partitioning strategy to increase the number of subtasks to decouple complex dependencies; when the task complexity metric is lower than the second threshold, it is determined that the task structure is simple and highly independent, automatically selecting a coarse-grained partitioning strategy to reduce the number of subtasks and lower scheduling communication and state synchronization overhead; when the metric is between the two thresholds, a medium-grained partitioning is adopted. This adaptive mechanism ensures that each task can obtain a decomposition strategy that precisely matches its own complexity, achieving a technical upgrade from "globally unified" to "individually adaptive" decomposition granularity.
[0046] In step S203, the task to be processed is divided into multiple atomic subtasks that can be executed in parallel according to the subtask division granularity, and skill constraint labels and resource requirement thresholds are bound to each atomic subtask.
[0047] In this step, the task to be processed can be divided into multiple logically independent and time-parallel atomic subtasks according to the subtask granularity described above. During the division process, attribute binding operations can be performed simultaneously: on the one hand, based on the position of each atomic subtask in the parent task's process flow, corresponding skill constraint tags are bound to it, clarifying the agent skill type that the atomic subtask must match; on the other hand, according to the proportion of the parent task's total resource requirements or a predefined allocation weight, a resource requirement threshold is set for each atomic subtask as the upper limit of its resource consumption during execution. This binding operation makes each atomic subtask a standardized scheduling unit with complete execution semantics, ensuring both decoupling and parallelism between atomic subtasks, and providing a structurally unified and informationally complete input object for the subsequent refined task allocation based on fitness scores and cost matrices.
[0048] Next, refer to Figure 1 In step S120, real-time state data of each agent is acquired, and the comprehensive efficiency index of each agent for each atomic subtask is calculated; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors.
[0049] In this step, the system first acquires real-time operational status data for each heterogeneous agent through heartbeat monitoring, log collection, and resource monitoring probes. This data includes historical task execution records, current resource usage, hardware health status, and skill registration information. Subsequently, for each atomic subtask to be assigned, the system iterates through all candidate agents, calculates their multi-dimensional performance factors when matched with that subtask, and generates a comprehensive efficiency index using a pre-defined weighted fusion formula. This index is not an inherent attribute of the agent, but a dynamic evaluation value of the "agent-subtask" pairing relationship, which can accurately reflect the expected performance level of a specific agent when performing a specific subtask.
[0050] In an exemplary embodiment of this disclosure, the aforementioned multi-dimensional performance factors may include at least two of task execution capability, resource utilization indicators, and robustness factors, and the calculation methods for each factor are as follows: Task execution capability The skill matching degree is determined based on the historical task completion rate and skill matching degree of agent i. Specifically, the system extracts the number of successful attempts and the total number of attempts of the agent in performing tasks with the same skill tag from the historical task log to calculate the historical task completion rate; at the same time, the skill constraint tag bound to the atomic sub-task is intersected with the set of skills registered by the agent to obtain the skill matching degree (e.g., 1.0 for complete matching, 0.5 for partial matching, and 0 for no matching). The two are weighted and summed according to a preset ratio (e.g., 6:4) and normalized to the interval [0,1] to obtain the skill matching degree. .
[0051] Resource utilization indicators The resource weight coefficients can be determined by the weighted sum of the resource utilization rate and the corresponding resource weight coefficients for each resource dimension of agent i; the resource weight coefficients are dynamic parameters output by the reinforcement learning model.
[0052] Specifically, to reasonably assess the resource load status of an agent, firstly, the resource utilization rate of the agent for each resource dimension (such as CPU, memory, GPU, network bandwidth, etc.) can be obtained. This resource utilization rate is defined as the ratio of the current actual usage of the corresponding resource dimension to the total resource capacity, which can intuitively reflect the real-time load level of each dimension. Simultaneously, the resource weight coefficients corresponding to each resource dimension can be obtained. These resource weight coefficients are dynamic parameters output by the reinforcement learning model and are used to characterize the relative importance of the corresponding resource dimension within the current scheduling cycle. After obtaining the above data, the resource utilization rate of the agent for each resource dimension and the corresponding resource weight coefficient can be weighted and summed to determine the agent's resource utilization index. Through this weighted summation calculation method, the resource utilization index can comprehensively reflect the overall resource consumption of the agent across multiple dimensions, and due to the introduction of dynamic weights, the evaluation results can adaptively reflect the current system's emphasis on different resource dimensions.
[0053] Furthermore, the aforementioned resource weight coefficients are not fixed preset values, but are dynamically adjusted by the reinforcement learning model based on the current system load status (such as the average utilization of global resources, task queue length, etc.). For example, when the system is under computationally intensive load, the reinforcement learning model can automatically increase the weight coefficients of the computation dimension; when under data-intensive load, it can increase the weight coefficients of the storage or I / O dimension, thereby achieving adaptive dynamic optimization of the weight coefficients.
[0054] Robustness factor The hardware reliability and fault tolerance of the agent are determined. Hardware reliability is calculated by statistically analyzing the downtime and mean time between failures (MTBF) over the agent's last M scheduling cycles (M being an integer greater than 1). Fault tolerance is quantified and scored based on whether the agent possesses mechanisms such as task resume capability, automatic anomaly recovery, and redundancy backup (e.g., adding 0.3 points for resume capability and 0.2 points for hot standby). Both are normalized and weighted to obtain a robustness factor value, ensuring that highly reliable agents receive priority allocation when executing critical path subtasks.
[0055] Finally, the above factors can be substituted into the multi-factor fusion formula to calculate the comprehensive efficiency index of each "agent-subtask" pairing. This index serves as the core quantitative basis for task allocation decisions in subsequent steps, achieving a technological upgrade from single-indicator evaluation to multi-dimensional dynamic performance assessment. For example, the above multi-factor fusion formula can be expressed as: ,in, The overall efficiency index for agent i to execute atomic subtask j. The weights corresponding to each factor and satisfying .
[0056] In step S130, the fit score between each agent and each atomic subtask is calculated based on the attention network.
[0057] In this step, feature vectorization encoding is first performed: the agent's skill set, resource capacity, historical performance, and robustness parameters are encoded into fixed-dimensional agent feature vectors; the skill constraint labels, resource requirement thresholds, and priority information corresponding to atomic subtasks are encoded into requirement feature vectors of the same dimension. The feature vectors of each agent and the requirement feature vectors of each atomic subtask are input into an attention network. Internally, the attention network models the relationships within the agent group and task group through self-attention layers, and completes the feature interaction between agent feature vectors and requirement feature vectors through cross-attention layers. The feature interaction uses a scaled dot product attention mechanism to calculate the association strength between paired entities, and after normalization, a fit score is obtained. The fit score characterizes the degree of matching and fit between the agent and the atomic subtask in the current scheduling scenario.
[0058] Compared to the traditional fixed-weight linear summation matching method, this scheme has the following advantages: First, the attention network adopts an end-to-end training mechanism based on historical scheduling performance feedback. Its internal weights can be continuously iterated through gradient backpropagation based on the actual execution results of the task (such as completion quality and time consumption deviation), dynamically adjusting the focus of feature interaction, thereby adapting to various scheduling scenarios such as computing power load and task type. Second, cross attention can capture non-linear high-order correlations between features, breaking through the expression limitations of simple linear models and improving the accuracy of matching evaluation. Third, attention networks support batch parallel inference, which can efficiently complete the matching and evaluation of large-scale intelligent agents and atomic subtasks, and meet the real-time scheduling requirements.
[0059] The adaptation score and comprehensive efficiency index output in this step together constitute a two-dimensional evaluation basis, realizing joint task allocation optimization that takes into account both the agent's own operational efficiency and the degree of supply and demand matching.
[0060] In step S140, a cost matrix is constructed based on the comprehensive efficiency index and the suitability score, and the cost matrix is solved to generate a task allocation strategy.
[0061] In this step, a cost matrix can be constructed based on the comprehensive efficiency index and suitability score, and the cost matrix can be solved to generate a task allocation strategy. For details, please refer to... Figure 3 , Figure 3 This illustration shows a flowchart of how to construct a cost matrix based on a comprehensive efficiency index and a suitability score, and how to solve the cost matrix to generate a task allocation strategy, including steps S301-S304: In step S301, when the number of agents is not equal to the number of atomic subtasks, the cost matrix is expanded into a square matrix by adding virtual entities, and the allocation cost corresponding to the virtual entity is set to a preset penalty value; the preset penalty value is higher than the normal allocation cost.
[0062] In this step, firstly, the total number of available agents and the total number of atomic subtasks to be assigned within the current scheduling period are counted, and it is determined whether the two are equal. If they are not equal, the original non-square matrix cost matrix is expanded to N by adding virtual entities. An N-square matrix (where N is the larger of the number of agents and the number of tasks, and N is an integer greater than 1). In practice: when the number of agents is less than the number of tasks, virtual agents are added in the column directions of the matrix; when the number of tasks is less than the number of agents, virtual tasks are added in the row directions of the matrix. The cost value of all allocation positions corresponding to virtual entities (i.e., virtual agents executing real tasks, real agents executing virtual tasks, and virtual agents executing virtual tasks) is uniformly set to a preset penalty value. This preset penalty value is set to be much higher than the maximum cost value that all real agent-task pairings may produce (e.g., 10 times the maximum real cost or a sufficiently large constant), thus mathematically ensuring that the optimization algorithm, when seeking the global minimum total cost, is only forced to choose virtual allocation in the extreme case where real entities cannot meet all matching requirements, and prioritizing that effective matching between real entities is not crowded out by virtual allocation. This mechanism fundamentally solves the limitation of the classic Hungarian algorithm, which can only handle square matrices, enabling the algorithm to directly adapt to the normal scenario in real-world production environments where the number of agents and tasks is dynamically unequal.
[0063] In step S302, for each element in the cost matrix that represents the feasible allocation between the agent and the atomic subtask, the value of the element is determined according to the comprehensive efficiency index of the corresponding agent and the fitness score of the corresponding atomic subtask; wherein, the value of the element is negatively correlated with both the comprehensive efficiency index and the fitness score.
[0064] In this step, the positions of all elements in the cost matrix representing feasible allocations between real agents and real atomic subtasks can be traversed, and their cost values can be calculated one by one. Specifically, for each feasible pairing, the system reads the overall efficiency index of the agent for that atomic subtask output in step S120, and the fit score between the two output in step S130, and converts them into cost values through a negative correlation mapping function. A typical implementation may be: Where α and β are normalized weighting coefficients ( ε is a minimal constant to prevent division by zero. This formula ensures that pairs with higher overall efficiency indices and better fit scores have lower corresponding cost values, thus naturally gaining priority allocation rights under the optimization objective of minimizing total cost. By directly embedding multidimensional efficiency evaluation and fit assessment into the numerical construction process of the cost matrix, the algorithm eliminates the need for additional multi-objective trade-offs and can simultaneously achieve the dual optimization objectives of "high efficiency priority" and "high fit priority" in a single solution, significantly improving the overall optimality of allocation decisions.
[0065] In step S303, for each element in the cost matrix that represents an infeasible allocation between the agent and the atomic subtask, the value of the element is set to a preset penalty value.
[0066] In this step, for all elements in the cost matrix representing infeasible allocations, their values can be forcibly set to the same preset penalty value as in step S301. The criteria for determining infeasible allocations include: no overlap between the skill set registered by the agent and the skill constraint labels bound to the atomic subtasks; the agent's current available resource balance being lower than the resource requirement threshold of the atomic subtasks; the agent being in a faulty, maintenance, or offline state; or business rules explicitly prohibiting the pairing (such as security isolation requirements). By uniformly setting the cost of all infeasible pairings to a high penalty value, the system automatically avoids these invalid or inefficient allocations during subsequent minimization solutions, eliminating the need for additional feasibility filtering or post-processing verification steps outside the algorithm. This mechanism not only ensures the physical executability and business compliance of the output allocation strategy but also avoids matrix dimension changes and index errors caused by manually removing infeasible elements, enabling the algorithm to complete end-to-end optimization within a unified matrix framework.
[0067] In step S304, the expanded cost matrix is minimized to output the task allocation strategy.
[0068] In this step, the complete N, after S301 expansion, S302 assignment, and S303 marking, can be... The N-cost matrix is used as input, and the improved Hungarian algorithm is called to minimize it. The algorithm, through steps such as row and column reduction, independent zero-element covering, and augmented path search, achieves a polynomial time complexity of O(n log n). Within the given framework, the optimal assignment problem of the cost matrix is solved to obtain the allocation scheme with the minimum sum of N mutually exclusive row and column elements. The solution is a binary matching set, where each real atomic subtask is uniquely assigned to a real agent, or marked as being undertaken by a virtual agent (indicating no suitable resources are currently available); each real agent is assigned at most one real atomic subtask, or remains idle (corresponding to a virtual task). The system then filters out all matching items involving virtual entities, retaining only real "agent-atomic subtask" pairings, generating the final task allocation strategy and issuing it to the scheduling and execution module. This step transforms the aforementioned multi-dimensional evaluation results into deterministic, globally optimal allocation instructions, realizing a closed loop from soft scoring to hard decision-making. Moreover, thanks to the matrix expansion and high-cost marking mechanism, the output strategy naturally satisfies the unequal quantity constraint and feasibility constraint, requiring no additional modification.
[0069] In an exemplary embodiment of this disclosure, an update mechanism for the aforementioned task allocation strategy is also provided, referring to... Figure 4 , Figure 4 This diagram illustrates the flowchart of the task allocation strategy update mechanism in an embodiment of the present disclosure, including steps S401-S402: In step S401, the running status of each agent and the execution progress of the atomic subtasks are monitored.
[0070] In this step, lightweight probes deployed on each agent node and in the task execution environment continuously collect runtime data at a preset sampling period (e.g., every 500 milliseconds or every 1 second). For agents, the collected data includes at least online / offline status, CPU and memory usage, current queue length, communication latency, and health heartbeat signals. For atomic subtasks, the collected data includes at least the current execution stage, elapsed time, expected remaining time, output result verification status, and availability of dependent resources. The collected data is timestamped and then fed into a real-time monitor. The monitor maintains a dynamic state baseline model based on historical normal operation data, used to compare current observations in real time. When any observed indicator deviates from the baseline by more than a preset threshold (e.g., a sudden increase in load rate of more than 30%, task time exceeding twice the expected standard deviation, or three consecutive heartbeat loss), it is identified as a potential anomaly and triggers the subsequent evaluation process. This monitoring process uses a non-blocking asynchronous architecture to ensure zero interference with the main business process, while supporting unified normalization processing of multi-source heterogeneous data, providing standardized input for subsequent anomaly identification.
[0071] In step S402, when a runtime exception event is detected, the comprehensive efficiency index and cost matrix are updated, and the task allocation strategy is regenerated.
[0072] In this step, once it is confirmed that a runtime anomaly has actually occurred (rather than a momentary fluctuation), the policy update process can be initiated immediately. Runtime anomalies include at least one of the following: new task access, agent failure, agent overload, or atomic subtask execution delay. Specifically: new task access refers to urgent or high-priority tasks temporarily inserted during the scheduling cycle, which must be immediately included in the allocation system; agent failure refers to an agent completely losing its service capability due to hardware damage, software crashes, or network interruptions; agent overload refers to an agent being online but with resource utilization consistently exceeding a safety threshold, leading to a significant decrease in processing performance or a surge in response timeout risk; atomic subtask execution delay refers to a task's actual execution time exceeding the expected window, possibly caused by data anomalies, dependency blocking, or environmental interference, thereby affecting the timing constraints of downstream task chains. The system first identifies the affected set of agents and the set of atomic subtasks based on the nature of the aforementioned abnormal events. Second, it calls the comprehensive efficiency index calculation module defined in step S120, re-evaluating the performance of only the affected entities to obtain updated index values. Third, according to the cost matrix construction rules defined in step S302, it refreshes the values of corresponding elements in the cost matrix using the updated comprehensive efficiency index and potentially changing fitness scores. Finally, using the updated cost matrix as input, it re-calls the optimization solver to generate a new task allocation strategy and distributes it to the execution layer. Throughout the update process, while ensuring numerical consistency, incremental calculation is prioritized to reduce recalculation overhead, with rollback to full reconstruction mode only when necessary, thus achieving a balance between response speed and computational resource consumption.
[0073] refer to Figure 5 , Figure 5 This embodiment of the present disclosure illustrates the process of updating the comprehensive efficiency index and cost matrix and regenerating the task allocation strategy when a runtime exception event is detected, including steps S501-S504: In step S501, the event characteristics of the runtime exception event are identified; the event characteristics include at least one of the event type and the scope of impact.
[0074] In this step, structured analysis can be performed on the aforementioned runtime anomalies to extract key event features. Event types include, but are not limited to: agent hardware failure, software crash, network partition, task execution timeout, abnormal input data, and unavailability of external dependent services. The scope of impact is determined through dependency graph propagation analysis, specifically including a list of directly affected agent identifiers, a list of directly affected atomic subtask identifiers, and a set of downstream tasks indirectly affected due to pre- or post-task dependencies. The system has a built-in event feature classifier, driven by a hybrid approach of a predefined rule base and a lightweight machine learning model, which automatically maps raw alarm logs to standardized event type codes and scope of impact descriptors. This feature extraction process is completed in milliseconds, providing accurate decision-making basis for subsequent strategy selection and avoiding invalid reallocation caused by misjudgments or omissions.
[0075] In step S502, a local redistribution strategy or a global redistribution strategy is selected based on the event characteristics.
[0076] In this step, the event characteristics output in step S501 can be used to determine the event according to the preset strategy selection rules. If the event type is a single point of failure (such as a single agent going offline or a single task timeout) and the impact is limited to a small number of agents and tasks (for example, the proportion of affected entities to the total number of entities is less than a preset threshold, such as 10%), it is determined to be a local anomaly, and a local redistribution strategy is selected. If the event type is a systemic risk (such as network partitioning, core service outage, or large-scale load surge) or the impact is widespread (the proportion of affected entities is higher than the threshold, or it involves high-priority task chains on critical paths), it is determined to be a global anomaly, and a global redistribution strategy is selected. This determination logic also supports a dynamic threshold adjustment mechanism, which can adaptively adjust the switching boundary according to the current overall system load level, task urgency, and historical anomaly handling effects to ensure that unnecessary global oscillations are avoided under slight disturbances, while timely initiation of comprehensive re-optimization in the event of a major failure to ensure system resilience.
[0077] In step S503, if a local redistribution strategy is selected, only the comprehensive efficiency index corresponding to the affected agent and the affected atomic subtask, as well as the corresponding element values in the cost matrix, are updated, and a new task allocation strategy is generated based on the updated cost matrix.
[0078] In this step, firstly, the set of affected agents and the set of affected atomic subtasks identified in step S501 are locked. Then, only these entities are re-executed with the comprehensive efficiency index calculation process from step S120 to obtain updated index values, while the indices of the remaining unaffected entities remain unchanged. Next, all row and column intersections involving the aforementioned affected entities are located in the cost matrix, and only the element values at these positions are recalculated, while the remaining elements of the matrix retain their original values. Finally, this updated cost matrix is used as input to call the optimization solver for local re-optimization. This solution process can keep the allocation scheme of the unaffected parts unchanged, adjusting only the affected parts, thereby significantly reducing the problem size and solution time. The generated local new strategy only replaces the corresponding allocation instructions in the original strategy, while the remaining parts continue to execute, achieving a smooth transition with minimal intrusion.
[0079] In step S504, if a global redistribution strategy is selected, the cost matrix is reconstructed and solved again to generate a new task allocation strategy.
[0080] In this step, if the current anomaly is determined to exceed the local repair capability, a comprehensive policy reset can be performed. At this point, the original cost matrix cache can be ignored, and the comprehensive efficiency index calculation of step S120 and the fitness score calculation of step S130 are re-executed for all agents and all atomic subtasks to obtain the latest full evaluation data. Subsequently, a complete cost matrix can be constructed from scratch. Finally, this new cost matrix is input into the optimization solver to execute the complete global optimization solution process, generating a new allocation policy covering all agents and all atomic subtasks. This new policy completely replaces the original policy, and the atomic transaction mechanism ensures that there is no mixing of old and new policies during the distribution process. Although the global reallocation computational overhead is large, it can completely eliminate local cumulative errors and anomaly propagation effects, restoring overall optimality when the system encounters structural changes, and is a necessary fallback mechanism to ensure long-term operational stability.
[0081] This disclosure also provides an iterative optimization mechanism for resource weight coefficients in reinforcement learning models. (See references) Figure 6 , Figure 6 This diagram illustrates the iterative optimization mechanism for resource weight coefficients of a reinforcement learning model in an embodiment of this disclosure, including steps S601-S603: In step S601, historical task completion rate, resource utilization rate, and average task completion time are collected as global performance feedback quantities.
[0082] In this step, at the end of a preset evaluation period (e.g., every 10 minutes or after each batch of tasks is completed), three core metrics are aggregated and extracted from the execution logs and monitoring database. The historical task completion rate refers to the proportion of tasks successfully delivered and passing quality verification within that period out of the total number of submitted tasks, reflecting system reliability. The resource utilization rate is the weighted average utilization rate of key resources such as CPU, memory, and network bandwidth for all agents, characterizing the sufficiency of resource utilization. The average task completion time is the average actual time spent on all completed atomic subtasks, reflecting system response efficiency. These metrics, after normalization, constitute a three-dimensional global performance feedback vector, serving as the raw input for subsequent reward calculations. The data collection process employs a sliding window and exponential decay weighting mechanism, ensuring that recent performance has a slightly higher impact on the feedback than long-term data, thereby enhancing sensitivity to dynamic environmental changes while avoiding misleading results from single abnormal fluctuations.
[0083] In step S602, the global performance feedback quantity is constructed as the reward function of the reinforcement learning model.
[0084] In this step, the three-dimensional global performance feedback vector obtained in step S601 can be mapped to a scalar reward value. Specifically, the reward function is defined as a weighted sum of the feedback quantities: Where C represents the historical task completion rate, U represents the resource utilization rate, and T represents the average task completion time. The coefficient is a preset positive coefficient, and satisfies This design positively incentivizes high completion rates and high resource utilization, while imposing negative penalties for long completion times, guiding the model to seek Pareto optimality among reliability, resource efficiency, and timeliness. Furthermore, the reward function incorporates a safety constraint: when resource utilization exceeds 95% or task completion rate falls below 80%, an additional negative penalty is applied to prevent the system from entering an unstable region. The entire reward calculation process is differentiable and continuous, ensuring that gradient signals are stably transmitted to the policy network, providing a clear optimization direction for subsequent parameter updates.
[0085] In step S603, the resource weight coefficients of the reinforcement learning model are iteratively optimized based on the reward function.
[0086] In this step, the reward value generated in step S602 can be used as a feedback signal to drive the reinforcement learning model to update the resource weight coefficients online. Specifically, the current resource weight coefficients serve as output parameters of the policy network, and their adjustment range is determined by both the reward gradient and exploration noise. After each update, the new weights are injected into the comprehensive efficiency index calculation module for the next round of task allocation decisions, forming a closed-loop iteration of "decision-execution-feedback-update". To prevent overfitting and short-term fluctuations, the system uses an experience replay buffer to store historical state-action-reward triples and combines this with the target network to smooth the parameter update rhythm. Simultaneously, an upper limit for the weight change rate and a convergence detection mechanism are set. When the reward variance falls below a threshold for multiple consecutive evaluation periods, the learning rate is automatically reduced or updates are paused to ensure a smooth and controllable weight evolution process. Through this mechanism, the resource weight coefficients can adaptively adjust with changes in the long-term operating environment, enabling the task allocation strategy to continuously approach the global optimum and achieving autonomous evolution of system performance.
[0087] refer to Figure 7 , Figure 7 This diagram illustrates the overall flow of the task allocation method in this embodiment, including steps S701-S710: In step S701, the process begins by receiving information about the task to be processed and information related to the intelligent agent.
[0088] In step S702, task decomposition: the task decomposer automatically decomposes the task into multiple atomic subtasks based on the task complexity, process constraints and resource requirements; each atomic subtask carries clear input and output specifications, prerequisite dependencies and quality acceptance criteria, forming the smallest execution unit that can be independently scheduled.
[0089] In step S703, the agent evaluator calculates the comprehensive efficiency index of each candidate agent for the current set of atomic subtasks to be assigned. This index integrates multiple dimensions such as historical yield, current resource utilization, equipment reliability model, and accuracy maintenance capability to quantify the expected performance of each agent in performing a specific subtask in the current state.
[0090] In step S704, the compatibility weights between the agent and the atomic subtasks are dynamically adjusted based on the attention mechanism, and an agent-task cost matrix is constructed by combining the aforementioned comprehensive efficiency index. Each element in the matrix is generated by weighting the fit score and the efficiency index, reflecting both the degree of technical matching and the execution cost.
[0091] In step S705, the improved Hungarian algorithm is used to solve the above cost matrix, and the optimal agent is assigned to each atomic subtask to ensure that the overall production efficiency is maximized, resource consumption is optimized, and equipment load is balanced while satisfying all process and timing constraints.
[0092] In step S706, the task allocation scheme is converted into specific allocation instructions and sent to the corresponding intelligent agent.
[0093] In step S707, a real-time monitor is started to continuously collect the running status of each intelligent agent and the execution progress of atomic subtasks at millisecond intervals, providing a data foundation for subsequent anomaly detection.
[0094] In step S708, it is determined whether a runtime abnormal event is detected; if no event is detected, the process returns to step S707 for continued monitoring.
[0095] If detected, proceed to step S709 to identify the event characteristics of the runtime exception event.
[0096] In step S710, local or global policy updates are performed based on event characteristics (policy updates may involve updating the comprehensive efficiency index or the cost matrix).
[0097] This disclosure also provides a task allocation system, which may include the following modules: The task decomposer is configured to receive newly arrived production orders or complex task requests and automatically decompose them into multiple atomic subtasks based on the task's complexity, process constraints, resource requirements, and prerequisite dependencies. Each atomic subtask serves as the smallest independently schedulable execution unit, carrying clear input / output specifications, quality acceptance standards, and process sequence information, providing structured input for subsequent allocation.
[0098] The agent evaluator is configured to calculate the comprehensive efficiency index of each candidate agent in real time for the current set of atomic subtasks to be assigned. This index integrates multi-dimensional dynamic and static indicators such as the agent's historical yield, current resource utilization, equipment reliability model (such as mean time between failures), and accuracy retention capability (such as recent processing error trends) to quantify the expected performance and adaptability of each agent in performing a specific subtask in the current state.
[0099] The optimizer is configured to dynamically adjust the compatibility weights between agents and atomic subtasks based on an attention mechanism, and construct an agent-task cost matrix by combining the comprehensive efficiency index output by the agent evaluator. Then, an improved Hungarian algorithm is used to solve the cost matrix. Under the premise of satisfying all process and timing constraints, the optimal agent is assigned to each atomic subtask to achieve multi-objective collaborative optimization that maximizes overall production efficiency, optimizes resource consumption, and balances equipment load.
[0100] The real-time monitor is configured to continuously collect the operating status of each agent (such as load, temperature, vibration, tool wear, etc.) and the execution progress of atomic subtasks (such as completed processes, measured time, quality inspection results, etc.) at millisecond intervals, and perform real-time analysis on the collected data to detect abnormal events during operation (such as agent failure, overload, subtask execution delay, etc.), providing an accurate state awareness basis for dynamic scheduling.
[0101] The dynamic scheduler is configured to respond to abnormal events or new task injection requests detected by the real-time monitor. First, it verifies the authenticity and classifies the type of the abnormality, and accurately locates the affected agents and atomic subtasks. Then, it performs incremental policy updates, only recalculating the comprehensive efficiency index and corresponding elements of the cost matrix of the affected entities, quickly generating local redistribution schemes or emergency task insertion schemes, and issuing adjustment instructions to the relevant agents to ensure that the system maintains continuous, stable and efficient operation under dynamic disturbances.
[0102] The following uses a smart manufacturing scenario as an example to explain the overall implementation method of this disclosure: In a smart factory environment, there are various heterogeneous manufacturing devices (as agents) and continuously arriving production orders (as tasks). During the system initialization phase, all available devices are first registered, including but not limited to high-end precision machine tools, general-purpose machining centers, and automated inspection equipment. Each device is modeled as an agent entity with specific processing capabilities (skill set) and resource constraints (such as energy consumption limits, remaining tool life, maximum feed rate, etc.). Its static attributes and dynamic states together constitute the basic data for subsequent allocation decisions.
[0103] When a new production order arrives, the system automatically decomposes it into multiple atomic subtasks based on the order's complexity (e.g., the number of processing steps required, geometric accuracy requirements, material properties, and resource needs) using a task decomposer. Each atomic subtask carries clearly defined input / output specifications, prerequisite dependencies, and quality acceptance criteria, forming the smallest independently schedulable execution unit. Subsequently, the agent evaluator calculates the comprehensive efficiency index for each candidate device for each atomic subtask. This index not only considers the device's historical yield and current resource utilization but also integrates the device's reliability model (e.g., mean time between failures) and accuracy maintenance capabilities (e.g., recent processing error trends), thereby quantifying the expected performance of the device in executing a specific subtask under the current conditions.
[0104] Based on the aforementioned comprehensive efficiency index and combined with compatibility weights dynamically adjusted by the attention mechanism, the system constructs an agent-task cost matrix. Each element in this matrix is generated by weighting the fit score and the comprehensive efficiency index, reflecting both the technical matching degree between the equipment and the task, and the expected cost of executing the task. The improved Hungarian algorithm then solves this cost matrix, assigning optimal processing equipment to each atomic subtask to ensure that, while satisfying process constraints, overall production efficiency is maximized, resource consumption is optimized, and equipment load is balanced.
[0105] During order execution, the real-time monitor continuously collects the operating status of each device (such as spindle load, temperature, and vibration signals) and the execution progress of atomic subtasks (such as completed processes, measured time, and quality inspection results) at millisecond intervals. When an abnormal event is detected during operation, such as a machine tool's machining cycle time exceeding the expected threshold due to tool wear, the system immediately identifies the event type as "atomic subtask execution delay" and locates the affected device and subtask. Based on this, the dynamic scheduler initiates a local reallocation strategy: only updating the comprehensive efficiency index and corresponding element values in the cost matrix of the affected device, resolving the problem, and migrating the incomplete subtasks to other devices with corresponding processing capabilities and currently lower loads, while simultaneously verifying whether the new allocation scheme introduces new timing conflicts or resource contention.
[0106] When an urgent order is inserted, the system treats it as a "new task access" anomaly. The dynamic scheduler first scans the real-time load rate of all devices, filtering out idle or lightly loaded devices with loads below a preset safety threshold. Then, it rapidly decomposes the urgent order and, based on the latest comprehensive efficiency index and cost matrix, prioritizes the allocation of newly generated atomic subtasks to these low-load devices. This process does not require interrupting or rolling back the execution flow of existing orders; it only updates strategies and issues instructions at the incremental level, ensuring production continuity.
[0107] Through the aforementioned mechanisms, the system achieves closed-loop control across the entire chain in intelligent manufacturing scenarios, from task decomposition, performance evaluation, cost modeling, optimal allocation to anomaly response and emergency order insertion. The entire process not only supports multi-objective collaborative optimization (efficiency, cost, balance, and timeliness), but also adaptively adjusts allocation strategies under dynamic disturbances such as equipment failures, load fluctuations, and order changes, significantly improving the overall operational efficiency, resource utilization, and robustness against interference of the intelligent manufacturing system.
[0108] Based on the above technical solutions, this disclosure has at least the following technical effects: First, it improves the overall operational efficiency and resource allocation of the system: By constructing a comprehensive efficiency index model, a multi-objective optimization framework, and an improved Hungarian algorithm, the system can achieve optimal matching between agents and atomic subtasks while ensuring the quality of task completion. This mechanism not only significantly improves task execution speed and order delivery efficiency (practical applications show that overall operational efficiency can be improved by more than 20%), but also greatly reduces equipment idling and resource idleness through refined resource matching and load balancing. Experimental data shows that the utilization rate of key resources can be increased by 25% to 40%, effectively reducing the operating cost and energy consumption per unit output while increasing production capacity.
[0109] Second, it enhances adaptability and robustness in dynamic environments: relying on real-time anomaly detection and incremental policy update mechanisms, the system can effectively cope with runtime disturbances such as new task access, agent failure, overload, and subtask execution delays. When an anomaly occurs, the system only performs local reassessment and cost matrix refresh on the affected entities, avoiding response lag caused by global recalculation, and ensuring rapid generation of feasible allocation schemes in scenarios of fluctuating device status or emergency order insertion. This closed-loop fault tolerance capability enables the system to maintain high stability and continuous operation in uncertain environments, significantly outperforming traditional static scheduling methods.
[0110] Third, improve the intelligence level of decision-making and the ability for autonomous evolution: By introducing an attention mechanism to dynamically adjust compatibility weights and combining it with a reinforcement learning closed loop to continuously optimize resource weight coefficients, the system can learn autonomously from feedback signals such as historical task completion rates, resource utilization rates, and average completion times. This mechanism drives the allocation strategy to evolve from fixed rule-driven to data-driven, continuously improving decision-making accuracy and environmental adaptability, and reducing reliance on external human intervention. Simultaneously, experience playback and convergence detection mechanisms ensure stable and controllable parameter updates, enabling the system to possess long-term autonomous evolution capabilities.
[0111] Fourth, it simplifies operation and maintenance complexity and expands the scope of application: Highly automated monitoring, anomaly identification, policy generation, and distribution processes transform complex multi-agent scheduling into autonomous closed-loop system processing. Operation and maintenance personnel only need to focus on high-level business metrics, significantly reducing management difficulty and technical barriers. Simultaneously, thanks to its incremental computing-first, modular, and flexible architecture, this disclosure can flexibly adapt to different scale scenarios, from small embedded production lines to large-scale cloud-edge collaborative manufacturing platforms. It can meet diverse needs without refactoring the core algorithm, possessing both good scalability and engineering practicality.
[0112] This disclosure also provides a task allocation device. Figure 8 This diagram illustrates the structure of the task allocation apparatus in an exemplary embodiment of this disclosure; as shown below. Figure 8As shown, the task allocation device 800 may include a task receiving module 810, an efficiency index calculation module 820, a score determination module 830, and a matrix construction and solution module 840. Wherein: The task receiving module 810 is used to receive tasks to be processed and decompose the set of tasks to be processed into multiple atomic sub-tasks. The efficiency index calculation module 820 is used to acquire real-time status data of each agent and calculate the comprehensive efficiency index of each agent for each atomic subtask; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors. The scoring determination module 830 is used to calculate the fit score between each agent and each atomic subtask based on the attention network; The matrix construction and solution module 840 is used to construct a cost matrix based on the comprehensive efficiency index and the fitness score, and to solve the cost matrix to generate a task allocation strategy.
[0113] In an exemplary embodiment of this disclosure, the task receiving module 810 decomposes the task to be processed into multiple atomic subtasks, including: Extract the set of skill requirements and the set of resource requirements corresponding to the task to be processed as a task complexity metric; wherein, the task complexity metric represents the number of skill requirement types and the number of resource requirement types required for the task to be processed; The granularity of subtask partitioning is determined based on the aforementioned task complexity metric. The task to be processed is divided into multiple atomic subtasks that can be executed in parallel according to the subtask division granularity, and a skill constraint label and resource requirement threshold are bound to each atomic subtask.
[0114] In an exemplary embodiment of this disclosure, the multi-dimensional performance factors include at least two of the following: task execution capability, resource utilization indicators, and robustness factors. The task execution capability is determined based on the agent's historical task completion rate and skill matching degree; The resource utilization index is determined based on the weighted sum of the resource utilization rate and the corresponding resource weight coefficient for each resource dimension of the agent; the resource weight coefficient is a dynamic parameter output by the reinforcement learning model. The robustness factor is determined based on the hardware reliability and fault tolerance of the agent.
[0115] In an exemplary embodiment of this disclosure, the scoring determination module 830 calculates a fit score between each agent and each atomic subtask based on an attention network, including: The feature vectors of each intelligent agent and the requirement feature vectors of each atomic subtask are input into the attention network; The attention network is used to perform feature interaction between the feature vector and the demand feature vector to obtain the fit score.
[0116] In an exemplary embodiment of this disclosure, the matrix construction and solving module 840 constructs a cost matrix based on the comprehensive efficiency index and the fitness score, solves the cost matrix, and generates a task allocation strategy, including: When the number of agents is not equal to the number of atomic subtasks, the cost matrix is expanded into a square matrix by adding virtual entities, and the allocation cost corresponding to the virtual entity is set to a preset penalty value; the preset penalty value is higher than the normal allocation cost. For each element in the cost matrix that represents a feasible allocation between an agent and an atomic subtask, the value of the element is determined based on the comprehensive efficiency index of the corresponding agent and the fitness score of the corresponding atomic subtask; wherein, the value of the element is negatively correlated with both the comprehensive efficiency index and the fitness score; For each element in the cost matrix that represents an infeasible allocation between the agent and the atomic subtask, the value of the element is set to the preset penalty value; The extended cost matrix is minimized to output the task allocation strategy.
[0117] In an exemplary embodiment of this disclosure, the matrix construction and solving module 840 is further configured to: Monitor the operating status of each intelligent agent and the execution progress of each atomic subtask; When a runtime exception is detected, the comprehensive efficiency index and the cost matrix are updated, and the task allocation strategy is regenerated. The runtime exception events include at least one of the following: new task access, agent failure, agent overload, or atomic subtask execution delay.
[0118] In an exemplary embodiment of this disclosure, when the matrix construction and solving module 840 detects the runtime anomaly event, it updates the comprehensive efficiency index and the cost matrix, and regenerates the task allocation strategy, including: Identify the event characteristics of the runtime exception event; the event characteristics include at least one of event type and scope of impact; Select a local or global reallocation strategy based on the event characteristics; If the local redistribution strategy is selected, then only the comprehensive efficiency index corresponding to the affected agent and the affected atomic subtask, as well as the corresponding element values in the cost matrix, are updated, and a new task allocation strategy is generated based on the updated cost matrix. If the global redistribution strategy is selected, the cost matrix is reconstructed and solved again to generate a new task allocation strategy.
[0119] In an exemplary embodiment of this disclosure, the matrix construction and solving module 840 is further configured to: Collect historical task completion rate, resource utilization rate, and average task completion time as global performance feedback metrics; The global performance feedback quantity is constructed as the reward function of the reinforcement learning model; The resource weight coefficients of the reinforcement learning model are iteratively optimized based on the reward function.
[0120] The specific details of each module in the above-mentioned task allocation device have been described in detail in the corresponding task allocation method, so they will not be repeated here.
[0121] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0122] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0123] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0124] This disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device.
[0125] Computer-readable storage media can be, for example—but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0126] A computer-readable storage medium can be sent, propagated, or transmitted for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0127] A computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0128] Furthermore, this disclosure also provides an electronic device capable of implementing the above-described method.
[0129] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0130] The following reference Figure 9 To describe an electronic device 900 according to such an embodiment of the present disclosure. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0131] like Figure 9As shown, the electronic device 900 is presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: at least one processor 910, at least one memory 920, a bus 930 connecting different system components (including memory 920 and processor 910), and a display 940.
[0132] The memory stores program code that can be executed by the processor 910, causing the processor 910 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processor 910 can perform actions such as... Figure 1 As shown: Step S110, receive the task to be processed and decompose the task to be processed into multiple atomic sub-tasks; Step S120, obtain the real-time state data of each agent and calculate the comprehensive efficiency index of each agent for each atomic sub-task; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional efficiency factors; Step S130, calculate the fit score between each agent and each atomic sub-task based on the attention network; Step S140, construct the cost matrix according to the comprehensive efficiency index and the fit score, solve the cost matrix, and generate the task allocation strategy.
[0133] The memory 920 may include a readable medium in the form of volatile storage, such as random access memory (RAM) 9201 and / or cache memory 9202, and may further include read-only memory (ROM) 9203.
[0134] The memory 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0135] Bus 930 can represent one or more of several types of bus structures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or a local bus using any of the various bus structures.
[0136] Electronic device 900 can also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 900, and / or with any device that enables electronic device 900 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. As shown, network adapter 960 communicates with other modules of electronic device 900 via bus 930. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 900, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0137] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A task allocation method, characterized in that, include: Receive the task to be processed and decompose the task to be processed into multiple atomic subtasks; Acquire real-time state data of each agent and calculate the comprehensive efficiency index of each agent for each atomic subtask; The comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors; The fitness score between each agent and each atomic subtask is calculated based on an attention network. A cost matrix is constructed based on the comprehensive efficiency index and the suitability score, and the cost matrix is solved to generate a task allocation strategy.
2. The method according to claim 1, characterized in that, The step of decomposing the task to be processed into multiple atomic subtasks includes: Extract the set of skill requirements and the set of resource requirements corresponding to the task to be processed as a task complexity metric; wherein, the task complexity metric represents the number of skill requirement types and the number of resource requirement types required for the task to be processed; The granularity of subtask partitioning is determined based on the aforementioned task complexity metric. The task to be processed is divided into multiple atomic subtasks that can be executed in parallel according to the subtask division granularity, and a skill constraint label and resource requirement threshold are bound to each atomic subtask.
3. The method according to claim 1, characterized in that, The multi-dimensional performance factors include at least two of the following: task execution capability, resource utilization indicators, and robustness factors. The task execution capability is determined based on the agent's historical task completion rate and skill matching degree; The resource utilization index is determined based on the weighted sum of the resource utilization rate and the corresponding resource weight coefficient for each resource dimension of the agent; the resource weight coefficient is a dynamic parameter output by the reinforcement learning model. The robustness factor is determined based on the hardware reliability and fault tolerance of the agent.
4. The method according to claim 1, characterized in that, The process of calculating the fit score between each agent and each atomic subtask based on an attention network includes: The feature vectors of each intelligent agent and the requirement feature vectors of each atomic subtask are input into the attention network; The attention network is used to perform feature interaction between the feature vector and the demand feature vector to obtain the fit score.
5. The method according to claim 1, characterized in that, The step of constructing a cost matrix based on the comprehensive efficiency index and the suitability score, solving the cost matrix, and generating a task allocation strategy includes: When the number of agents is not equal to the number of atomic subtasks, the cost matrix is expanded into a square matrix by adding virtual entities, and the allocation cost corresponding to the virtual entity is set to a preset penalty value; the preset penalty value is higher than the normal allocation cost. For each element in the cost matrix that represents a feasible allocation between an agent and an atomic subtask, the value of the element is determined based on the comprehensive efficiency index of the corresponding agent and the fitness score of the corresponding atomic subtask; wherein, the value of the element is negatively correlated with both the comprehensive efficiency index and the fitness score; For each element in the cost matrix that represents an infeasible allocation between the agent and the atomic subtask, the value of the element is set to the preset penalty value; The extended cost matrix is minimized to output the task allocation strategy.
6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Monitor the operating status of each intelligent agent and the execution progress of each atomic subtask; When a runtime exception is detected, the comprehensive efficiency index and the cost matrix are updated, and the task allocation strategy is regenerated. The runtime exception events include at least one of the following: new task access, agent failure, agent overload, or atomic subtask execution delay.
7. The method according to claim 6, characterized in that, When the runtime exception event is detected, updating the comprehensive efficiency index and the cost matrix, and regenerating the task allocation strategy, includes: Identify the event characteristics of the runtime exception event; the event characteristics include at least one of event type and scope of impact; Select a local or global reallocation strategy based on the event characteristics; If the local redistribution strategy is selected, then only the comprehensive efficiency index corresponding to the affected agent and the affected atomic subtask, as well as the corresponding element values in the cost matrix, are updated, and a new task allocation strategy is generated based on the updated cost matrix. If the global redistribution strategy is selected, the cost matrix is reconstructed and solved again to generate a new task allocation strategy.
8. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Collect historical task completion rate, resource utilization rate, and average task completion time as global performance feedback metrics; The global performance feedback quantity is constructed as the reward function of the reinforcement learning model; The resource weight coefficients of the reinforcement learning model are iteratively optimized based on the reward function.
9. A task allocation device, characterized in that, include: The task receiving module is used to receive tasks to be processed and decompose the tasks to be processed into multiple atomic subtasks. The efficiency index calculation module is used to acquire real-time status data of each agent and calculate the comprehensive efficiency index of each agent for each atomic subtask; the comprehensive efficiency index is obtained by weighted fusion of multi-dimensional performance factors; The scoring determination module is used to calculate the fit score between each agent and each atomic subtask based on the attention network. The matrix construction and solution module is used to construct a cost matrix based on the comprehensive efficiency index and the fitness score, and to solve the cost matrix to generate a task allocation strategy.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the task allocation method according to any one of claims 1 to 8.
11. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the task allocation method according to any one of claims 1 to 8 by executing the executable instructions.
