Multi-agent optimal allocation method of dynamic routing algorithm
By combining dynamic routing algorithms and improved genetic algorithms with agent capabilities and task characteristics, the load status is adjusted in real time, solving the imbalance problem in multi-agent task allocation and improving the system's efficiency and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YIZHUANG INTELLIGENT CITY RES INST GRP CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the neglect of real-time load status of agents in multi-agent task allocation leads to uneven distribution of system resources, with some agents being overloaded while others are idle, thus reducing overall efficiency.
A dynamic routing algorithm is adopted. By constructing a multi-objective optimization function, combining the agent capability matrix and task feature matrix, and introducing load state as an auxiliary judgment condition, an improved genetic algorithm is used to perform optimal allocation of multiple agents. Load data is collected in real time and tasks are migrated when overload is detected.
It achieves dynamic balance in multi-agent systems, avoids agent overload, and improves system utilization efficiency and stability.
Smart Images

Figure CN121722571B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to artificial intelligence technology, and more particularly to a multi-agent optimal allocation method using dynamic routing algorithms. Background Technology
[0002] Traditional research on multi-agent task allocation mostly employs static allocation strategies, performing a one-time matching based on the agent's basic capabilities and task requirements. Existing technologies often focus solely on capability matching when selecting agents, neglecting the agent's real-time load status. This results in some high-performing agents operating under high load for extended periods, while other agents remain idle, leading to unbalanced system resource allocation and reduced overall efficiency. Summary of the Invention
[0003] This invention provides a multi-agent optimal allocation method for dynamic routing algorithms, which can solve the problems in the prior art.
[0004] A first aspect of this invention provides a multi-agent optimal allocation method for dynamic routing algorithms, comprising:
[0005] The task is acquired and a task feature matrix is extracted, the task feature matrix including expertise requirements, cost constraints, and performance requirements; a multi-agent capability matrix is constructed, the multi-agent capability matrix including capability attributes and load status;
[0006] A multi-objective optimization function is constructed based on the task feature matrix and the multi-agent capability matrix. The multi-objective optimization function includes a specialty matching degree term, a cost term, and a performance achievement degree term. An improved genetic algorithm that introduces load state as an auxiliary decision condition in the selection operation is used to solve the multi-objective optimization function to obtain the optimal multi-agent and generate allocation instructions.
[0007] The system receives user intervention commands for the optimal multi-agent system, verifies the intervention commands, updates the corresponding parameters of the multi-objective optimization function, and then re-solves the problem.
[0008] The load data of each multi-agent is collected in real time, and the load level is determined based on the load data; when an overload level is detected, the tasks of the overloaded multi-agent are transferred to the candidate multi-agent with normal load.
[0009] The steps of acquiring tasks and extracting task feature matrices, including expertise requirements, cost constraints, and performance requirements; and constructing multi-agent capability matrices, including capability attributes and load states, include:
[0010] Parse the task description to obtain the task type identifier, and extract the expertise dimension and demand intensity from the preset knowledge base based on the task type identifier as expertise requirements; extract the task's resource quota and execution time limit as cost constraints; and obtain the service quality indicators corresponding to the task as performance requirements.
[0011] For each agent in a multi-agent cluster, offline capability evaluation data and online task execution feedback data are acquired. The offline capability evaluation data and the online task execution feedback data are then fused using a time-series weighted method to generate a dynamic capability score as a capability attribute. Historical resource consumption data and task completion time data are acquired to calculate the unit task cost as the cost component of the capability attribute. Real-time collection of computing resource usage data and task queue data is used to calculate the current load value as the load status.
[0012] The steps for constructing a multi-objective optimization function based on the task feature matrix and the multi-agent capability matrix include:
[0013] Calculate the similarity between the ability attribute and the expertise requirement in each expertise dimension, and generate an expertise matching degree item by normalizing the weighted summation;
[0014] Calculate the deviation between the cost component and the cost constraint and normalize it to generate a cost item;
[0015] Determine whether the capability attribute meets the performance requirements, assign a compliance value to the multi-agent that meets the requirements, and calculate a penalty value based on the performance gap to generate a performance compliance item for the multi-agent that does not meet the requirements.
[0016] The load balance of the multi-agent cluster is calculated based on the load status of each agent in the cluster. The task feature matrix is extracted to generate a task feature vector. The similarity between the task feature vector and the historical task feature vector is calculated. The weight coefficients corresponding to the most similar historical tasks are selected and weighted averaged to obtain the initial weight coefficients. The initial weight coefficients are dynamically adjusted based on the load balance. When the load balance is lower than the balance threshold, the weight coefficient of the cost item is increased and the weight coefficient of the expertise matching item is decreased. The adjusted weight coefficients are applied to the weighted summation of the expertise matching item, the cost item, and the performance achievement item to construct the multi-objective optimization function.
[0017] An improved genetic algorithm, which incorporates load state as an auxiliary decision criterion in the selection operation, is used to solve the multi-objective optimization function to obtain the optimal multi-agent, and the steps for generating allocation instructions include:
[0018] Initialize the population and generate a multi-agent allocation scheme for each individual, wherein the multi-agent allocation scheme represents the mapping relationship between tasks and multi-agents;
[0019] The multi-objective optimization function value of each agent is calculated as the basic fitness. The load state of the assigned multi-agent is extracted to calculate the load balance and normalized into a load fitness component. The basic fitness and the load fitness component are weighted and fused to generate a comprehensive fitness.
[0020] When performing the selection operation, the overall fitness ranking value of each agent is calculated, the load status of the assigned multi-agent is extracted to determine whether it exceeds the load threshold, the selection probability of individuals exceeding the load threshold is reduced, and the selection probability of individuals not exceeding the load threshold is calculated based on the overall fitness ranking value. Individuals are selected to enter the crossover operation according to the selection probability.
[0021] Perform a crossover operation on the selected individuals to generate offspring individuals, and then perform a mutation operation on the offspring individuals;
[0022] The process is iterated until the termination condition is met. The multi-agent allocation scheme corresponding to the individual with the highest overall fitness is selected as the optimal multi-agent allocation scheme, and an allocation instruction is generated. The allocation instruction includes the target multi-agent identifier and task execution parameters.
[0023] The steps to perform a selection operation include:
[0024] Obtain the evolution stage coefficients of the current iteration algebra, extract the load status of each multi-agent in the multi-agent cluster to calculate the standard deviation of the population load distribution, and dynamically calculate the load threshold based on the evolution stage coefficients and the standard deviation of the population load distribution.
[0025] Extract the load status of the assigned multi-agent agents in the multi-agent allocation scheme corresponding to each agent, calculate the load deviation between the current load status and the load threshold, and calculate the gradient penalty coefficient based on the load deviation using a nonlinear mapping function when the load deviation is greater than zero; obtain the historical load data of each agent, calculate the load change rate of the current load status relative to the historical load data, and calculate the trend prediction coefficient when the load change rate is greater than zero; multiply the gradient penalty coefficient and the trend prediction coefficient as a comprehensive adjustment coefficient to reduce the probability of the individual being selected.
[0026] When the load deviation is less than or equal to zero, the probability of selection is calculated based on the comprehensive fitness ranking value.
[0027] The steps of receiving user intervention operations for the optimal multi-agent, verifying the intervention operations, updating the corresponding parameters of the multi-objective optimization function, and resolving the problem include:
[0028] The system captures user intervention operations on the optimal multi-agent to generate intervention instructions, extracts the designated replacement multi-agent identifier from the intervention instructions, and determines whether the multi-agent's capability attributes meet the expertise requirements and performance requirements in the task feature matrix. If they do, the system records it as a valid intervention.
[0029] Obtain the capability attributes of the multi-agent corresponding to the effective intervention, calculate the matching degree between the capability attributes and the expertise requirements as the intervention matching degree, calculate the weight adjustment amount based on the difference between the intervention matching degree and the expertise matching degree item in the multi-objective optimization function, and apply the weight adjustment amount to update the weight coefficients of the multi-objective optimization function.
[0030] Based on the updated multi-objective optimization function, the solution process is re-executed to obtain a new optimal multi-agent allocation scheme. The difference between the old and new allocation schemes is calculated, and a scheme change prompt is generated when the difference exceeds the change threshold.
[0031] The steps of collecting load data from each multi-agent in real time, determining the load level based on the load data, and migrating the tasks of the overloaded multi-agent to a candidate multi-agent with normal load when an overload level is detected include:
[0032] The load data of each agent in the multi-agent cluster is collected in real time. The load data includes computing resource utilization and task execution queue length. A comprehensive load value is calculated based on the computing resource utilization and task execution queue length. The comprehensive load value is compared with a preset multi-level load threshold to determine the load level.
[0033] When the load level reaches the overload level, extract the tasks currently being executed by the overloaded multi-agent and obtain the task feature matrix. Select multi-agents with normal load levels from the multi-agent cluster as a candidate multi-agent set. Calculate the matching degree between the capability attributes of each candidate multi-agent in the candidate multi-agent set and the expertise requirements in the task feature matrix. Select the candidate multi-agent with the highest matching degree as the target migration multi-agent.
[0034] A task migration instruction is generated to migrate the tasks of the overloaded multi-agent to the target migration multi-agent, and the load status of the overloaded multi-agent and the target migration multi-agent is updated and synchronized to the multi-agent capability matrix.
[0035] A second aspect of the present invention provides an electronic device, comprising:
[0036] processor;
[0037] Memory used to store processor-executable instructions;
[0038] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0039] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0040] This invention improves upon traditional genetic algorithms by introducing load status as an auxiliary criterion in the selection process. This allows task allocation to fully consider the current load of multiple agents, preventing some agents from becoming overloaded while others remain idle, thus improving the overall system utilization efficiency. This invention collects load data from each agent in real time and determines the load level based on this data. When an overload level is detected, it automatically migrates the tasks of overloaded agents to candidate agents with normal loads, achieving dynamic system balance and improving system stability and reliability. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating the multi-agent optimal allocation method of the dynamic routing algorithm in an embodiment of the present invention.
[0042] Figure 2 Flowchart for optimizing the load-aware genetic algorithm. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0045] Figure 1 This is a flowchart illustrating the multi-agent optimal allocation method of the dynamic routing algorithm according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes:
[0046] The process involves: acquiring tasks and extracting a task feature matrix, which includes expertise requirements, cost constraints, and performance requirements; constructing a multi-agent capability matrix, which includes capability attributes and load status; building a multi-objective optimization function based on the task feature matrix and the multi-agent capability matrix, which includes expertise matching, cost, and performance achievement terms; using an improved genetic algorithm that incorporates load status as an auxiliary decision condition in the selection operation to solve the multi-objective optimization function to obtain the optimal multi-agent and generate allocation instructions; receiving user intervention operations for the optimal multi-agent, verifying the intervention operations, updating the corresponding parameters of the multi-objective optimization function, and resolving the problem; collecting load data for each multi-agent in real time and determining the load level based on the load data; and migrating the tasks of overloaded multi-agents to candidate multi-agents with normal load levels when an overload level is detected.
[0047] In one optional implementation, the steps of acquiring a task and extracting a task feature matrix, the task feature matrix including expertise requirements, cost constraints, and performance requirements; and constructing a multi-agent capability matrix, the multi-agent capability matrix including capability attributes and load status, include: parsing the task description to obtain a task type identifier; extracting expertise dimensions and demand intensity from a preset knowledge base based on the task type identifier as expertise requirements; extracting the task's resource quota and execution time limit as cost constraints; acquiring the service quality index corresponding to the task as performance requirements; for each multi-agent in the multi-agent cluster, acquiring offline capability evaluation data and online task execution feedback data; performing time-series weighted fusion of the offline capability evaluation data and the online task execution feedback data to generate a dynamic capability score as a capability attribute; acquiring historical resource consumption data and task completion time data to calculate the unit task cost as the cost component of the capability attribute; and collecting real-time computing resource usage data and task queue data to calculate the current load value as the load status.
[0048] For example, when extracting task features, the task description text is first parsed using natural language processing technology to extract keywords and match them against a pre-defined task type library to obtain the corresponding task type identifier. For instance, for the description of "high-definition video encoding task", keywords such as "video" and "encoding" can be extracted, and the task type identifier "VIDEO_ENCODING" can be obtained by matching them.
[0049] Using this identifier as an index, the corresponding specialty dimension configuration table is retrieved from the preset knowledge base. Specialty dimensions specifically include types such as computing power, memory processing, GPU acceleration, network transmission, storage read / write, and data parsing. Each dimension corresponds to a demand intensity value between 0 and 1, where 0 represents no demand, below 0.3 represents low demand, 0.3 to 0.7 represents medium demand, and above 0.7 represents high demand. Taking a video encoding task as an example, possible specialty requirements are: computing power demand intensity 0.8, memory processing demand intensity 0.5, and GPU acceleration demand intensity 0.9, indicating that this task has high requirements for computing power and GPU acceleration.
[0050] Simultaneously, resource quotas and execution time limits are extracted from the task description or configuration file to form cost constraints. Resource quotas are quantified in standardized units, including limits on CPU core count (in cores), memory size (in GB), storage space (in GB), and network bandwidth (in Mbps), etc. Execution time limits are expressed in minutes, representing the maximum allowed time to complete the task. For example, a video encoding task might require no more than 4 CPU cores, a maximum of 2GB of memory, and must be completed within 30 minutes. These parameters constitute the task's cost constraint vector.
[0051] Based on the task type, select applicable metrics from a predefined set of service quality metrics as performance requirements. Performance requirements include quantitative metrics such as response time threshold in milliseconds, throughput minimum in tasks per second, error rate maximum in percentage, and accuracy minimum in percentage. Performance requirements for video encoding tasks may include metrics such as encoding quality of not less than 35 dBPSNR and frame rate of not less than 30 fps.
[0052] The extracted expertise requirement vector, cost constraint vector, and performance requirement vector are arranged in rows to form a task feature matrix. This matrix uses tasks as row indices and feature dimensions as column indices to ensure subsequent matching calculations with the multi-agent capability matrix for corresponding dimensions.
[0053] When constructing the multi-agent capability matrix, for each agent in the cluster, offline capability evaluation data and online task execution feedback data are first acquired. Offline capability evaluation data consists of basic capability scores obtained through standardized testing when the agent joins the system. The score range is 0 to 100, including scores for multiple dimensions such as computing power, memory access speed, and GPU performance. Online task execution feedback data represents the performance data of the agent during actual task execution, including task completion quality scores ranging from 0 to 100 and execution efficiency indices, such as the ratio of actual time to standard time.
[0054] A time-series weighted fusion method is used for the two types of data mentioned above, giving higher weight to recent data and gradually decreasing weight to older data, thus reflecting the dynamic changes in the agent's capabilities. The decay factor α is typically set between 0.85 and 0.95, and the historical data window length is set to the most recent 20 to 50 records. The historical data is arranged in chronological order, and a weight is assigned to the data at the i-th time point, with the weight value = α^(ni), where n is the total number of data points. Then, all data values are multiplied by their corresponding weights, summed, and divided by the sum of all weights to obtain a weighted average as the dynamic capability score. This score ranges from 0 to 100 and is normalized to the 0 to 1 interval as the main component of the capability attribute.
[0055] In parallel, a cost assessment model is established by analyzing the agent's historical resource consumption data and task completion time data. Historical resource consumption data includes indicators such as average CPU utilization, average memory usage in GB, and network traffic in MB for each task. Task completion time data records the time required for the agent to complete different types of tasks in minutes. The unit task cost is calculated as follows: the total resource consumption for a certain type of task (CPU time × CPU unit price + memory usage × memory unit price + network traffic × traffic unit price) is divided by the number of tasks of that type completed, yielding the average cost value for a single task, expressed as a standardized cost unit. For example, for video encoding tasks, the CPU time and memory usage required to encode one minute of video can be calculated as the cost component for the agent processing this type of task.
[0056] In addition, real-time data on computing resource usage and task queues are collected to assess the current load status. Computing resource usage data includes real-time system status indicators such as current CPU utilization (as a percentage), memory utilization (as a percentage), and disk I / O utilization (as a percentage). Task queue data includes the number of tasks currently waiting to be executed and their priority distribution. The current load value is calculated using a weighted summation method, with weights configured as follows: CPU utilization 0.4, memory utilization 0.3, disk I / O utilization 0.2, and the normalized task queue length 0.1. The task queue length is normalized by dividing by a preset maximum queue capacity, typically 50 to 100. A higher load value indicates a heavier current load on the agent and a lower capacity to accept new tasks.
[0057] The aforementioned time-weighted fusion mechanism can dynamically reflect the evolution trend of the agent's capabilities; the comprehensive calculation of multi-dimensional load data can accurately assess the agent's real-time state, providing a reliable data foundation for subsequent precise matching and allocation.
[0058] In one optional implementation, the step of constructing a multi-objective optimization function based on the task feature matrix and the multi-agent capability matrix includes: calculating the similarity between the capability attributes and the expertise requirements in each expertise dimension and normalizing the weighted sum to generate an expertise matching term; calculating the deviation between the cost component and the cost constraint and normalizing it to generate a cost term; determining whether the capability attributes meet the performance requirements, assigning a compliance value to multi-agents that meet the requirements, and calculating a penalty value based on the performance gap to generate a performance compliance term for multi-agents that do not meet the requirements; and calculating the multi-agent cluster based on the load status of each multi-agent in the multi-agent cluster. The load balancing degree is determined; the task feature matrix is extracted to generate a task feature vector, the similarity between the task feature vector and the historical task feature vector is calculated, the weight coefficients corresponding to the most similar historical tasks are selected and weighted averaged to obtain the initial weight coefficient; the initial weight coefficient is dynamically adjusted based on the load balancing degree, and when the load balancing degree is lower than the balancing threshold, the weight coefficient of the cost item is increased and the weight coefficient of the expertise matching degree item is decreased; the adjusted weight coefficients are applied to the weighted summation of the expertise matching degree item, the cost item and the performance achievement item to construct the multi-objective optimization function.
[0059] For example, for each pairing of a multi-agent with a task, the cosine similarity method is used to calculate the matching degree between the capability attribute vector and the expertise requirement vector dimension by dimension. Taking video coding task as an example, assume that the task expertise requirements include three dimensions: computing power requirement intensity 0.8, GPU acceleration requirement intensity 0.9, and memory processing requirement intensity 0.5. The corresponding capability attributes of a certain agent are computing power 0.75, GPU acceleration 0.85, and memory processing 0.6. After calculating the similarity of each dimension, the results are weighted and summed according to preset weights such as 0.4, 0.4, and 0.2. The calculation result ranges from -1 to +1, and is normalized by mapping it to the interval of 0 to 1 through linear transformation. The final weighted sum is the expertise matching degree term, and the higher the value, the higher the expertise matching degree between the multi-agent and the task.
[0060] For the cost dimension, the cost components of multiple agents are compared with the cost constraints of the task to calculate the deviation value. The deviation value is calculated by subdividing the resource limits of the task cost constraints (such as CPU core count, memory size, and execution time) with the corresponding cost components of each agent, resulting in multiple sub-item deviations. If a sub-item's cost component is lower than the corresponding value of the cost constraint, the deviation is positive, indicating that the cost requirement is met; if the cost component is higher than the cost constraint, the deviation is negative, indicating that the cost constraint is exceeded. All sub-item deviations are weighted and summed to obtain a comprehensive deviation value, with weights allocated according to resource importance: CPU weight 0.4, memory weight 0.3, and execution time weight 0.3. The calculated comprehensive deviation value is then converted to the 0-1 range using a maximum-minimum normalization method to obtain the cost item. The closer the value is to 1, the more compliant the cost requirement.
[0061] In the performance evaluation phase, for each multi-agent, its capability attributes are assessed to determine whether they meet the task's performance requirements. The criterion is as follows: performance-related metrics in the capability attributes, such as processing speed, accuracy, and response time, are compared with the corresponding thresholds in the task performance requirements. If all performance metrics meet or exceed the required thresholds, the agent meets the performance requirements and is assigned a pass value of 1.0. If not, a penalty value is calculated based on the performance gap. The performance gap is calculated as follows: the absolute value of the difference between the actual value of each non-compliant metric and the required threshold is normalized to obtain the gap ratio for that metric. The square root of the sum of the squares of the gap ratios of all non-compliant metrices is then taken to obtain the comprehensive performance gap value. An exponential decay function is used to map the comprehensive performance gap value to the interval between 0 and 1. In the mapping formula, a gap value of 0 is output as 1, and the larger the gap value, the closer the output value is to 0, forming the penalty value. Finally, the value of the performance compliance term equals either the pass value or the penalty value.
[0062] To achieve adaptive adjustment of weighting coefficients, the current comprehensive load value of each multi-agent is first calculated, the standard deviation of the load value of the entire cluster is calculated, and then the load balance is determined by comparing the standard deviation with a preset threshold. A higher load balance indicates a more balanced distribution of tasks among the multi-agents.
[0063] In parallel, all feature dimension values in the task feature matrix are extracted, namely, the values of each dimension of expertise requirements, each value of cost constraints, and each value of performance requirements, to form a task feature vector. The length of the vector is the total number of feature dimensions. The similarity between this vector and each vector in the historical task feature vector library is calculated using Euclidean distance or cosine similarity methods. A preset number of historical tasks with the highest similarity, such as 3 or 5, are selected, and the weight coefficient records used by these historical tasks in the final convergence during the optimization process are extracted. Each record contains three values: the weight of the expertise matching item, the weight of the cost item, and the weight of the performance achievement item. The selected historical weight coefficient records are then weighted and averaged according to their similarity values. The higher the similarity of the historical task, the greater the influence of its weight coefficient, resulting in an initial weight coefficient triplet.
[0064] Based on the current load balancing status, a load balancing threshold is set, such as 0.7. When the load balancing falls below this threshold, the weighting coefficient of the cost item is increased while the weighting coefficient of the expertise matching item is decreased. The adjustment magnitude is proportional to the difference in load balancing. This adjustment mechanism allows the system to prioritize cost factors when the load is unbalanced, which helps to achieve a more balanced resource allocation.
[0065] Finally, the adjusted weighting coefficients are applied to the weighted sum of the expertise matching, cost, and performance achievement terms to construct a multi-objective optimization function. This function has the form: F = w1 × expertise matching + w2 × cost + w3 × performance achievement, where w1, w2, and w3 are the adjusted weighting coefficients and satisfy w1 + w2 + w3 = 1. The optimization objective is to find the multi-agent and task allocation scheme that maximizes the F value.
[0066] In this way, the multi-objective optimization function dynamically balances the three factors of expertise matching, cost control, and performance requirements, and adaptively adjusts according to the load conditions, thus achieving efficient and flexible multi-agent task allocation.
[0067] In one optional implementation, an improved genetic algorithm that incorporates load state as an auxiliary decision criterion in the selection operation is used to solve the multi-objective optimization function to obtain the optimal multi-agent. The step of generating the allocation instruction includes: initializing the population; generating a multi-agent allocation scheme for each individual, wherein the multi-agent allocation scheme represents the mapping relationship between tasks and multi-agents; calculating the multi-objective optimization function value of each individual as the basic fitness; extracting the load state of the allocated multi-agents to calculate the load balance and normalizing it into a load fitness component; weightedly fusing the basic fitness and the load fitness component to generate a comprehensive fitness; and calculating the load balance of each individual when performing the selection operation. The overall fitness ranking value of each agent is used to extract the load status of the assigned multi-agent to determine whether it exceeds the load threshold. For individuals exceeding the load threshold, the selection probability is reduced. For individuals not exceeding the load threshold, the selection probability is calculated based on the overall fitness ranking value. Individuals are selected to enter the crossover operation according to the selection probability. The crossover operation is performed on the selected individuals to generate offspring individuals. The mutation operation is performed on the offspring individuals. The process is iterated until the termination condition is reached. The multi-agent allocation scheme corresponding to the individual with the highest overall fitness is selected as the optimal multi-agent allocation scheme, and an allocation instruction is generated. The allocation instruction includes the target multi-agent identifier and task execution parameters.
[0068] Combination Figure 2 The optimization flowchart of the load-aware genetic algorithm is used to illustrate this. For example, in the initial stage of the algorithm, population initialization is performed, creating an initial population consisting of several individuals. Each individual represents a possible multi-agent allocation scheme, using integer encoding. Each gene bit corresponds to a task, and the gene value represents the agent number assigned to execute that task. For example, for a scenario with 10 tasks and 5 agents, the individual encoding can be represented as [2,1,3,5,2,4,1,3,5,4], indicating that task 1 is assigned to agent 2, task 2 is assigned to agent 1, and so on. The individuals in the initial population are obtained through random generation. The population size is typically set to 50 to 200 to ensure population diversity while controlling computational complexity.
[0069] For each individual's assigned task, the task is substituted into the previously constructed multi-objective optimization function F = w1 × expertise matching degree + w2 × cost item + w3 × performance achievement degree. The resulting function value is the individual's basic fitness, comprehensively reflecting the overall performance across the three dimensions of expertise matching, cost control, and performance achievement. Simultaneously, the comprehensive load value of the assigned agents in this task is extracted to calculate the load balance. The load balance is calculated using the standard deviation of the comprehensive load values of each agent; a smaller standard deviation indicates a more balanced load distribution. The calculated load balance value is normalized to a load fitness component between 0 and 1 using a maximum-minimum-maximum normalization method. Finally, the basic fitness and the load fitness component are weighted and fused according to a set weighting coefficient to obtain the comprehensive fitness value. The weighting coefficient is usually determined based on the specific application scenario; for example, the basic fitness weight can be set to 0.7, and the load fitness component weight to 0.3.
[0070] Upon entering the selection phase, individuals are first sorted from highest to lowest based on their overall fitness value, obtaining a ranking value for each individual. Then, the load state of the assigned agents is extracted, and it is checked whether it exceeds a preset load threshold. The load state uses the previously calculated overall load value, and the threshold is typically set to 80%. For individuals whose load state exceeds the threshold, their selection probability is reduced by multiplying by a penalty coefficient, such as 0.5; for individuals whose load state does not exceed the load threshold, their selection probability is calculated using a roulette wheel selection method based on their overall fitness ranking value, i.e., the higher the fitness, the greater the selection probability. Finally, based on the adjusted selection probabilities, individuals are selected from the population for the crossover operation. This selection operation adds a load state judgment step compared to traditional genetic algorithms, effectively avoiding overload situations.
[0071] The selected individuals undergo a crossover operation to generate offspring. A two-point crossover method is used, randomly selecting two crossover points and exchanging gene segments between the two parent individuals at these two points. For example, for parent individuals [2,1,3,5,2] and [4,3,1,2,5], if the crossover points are indices 1 and 3, then the offspring individuals [2,3,1,5,2] and [4,1,3,2,5] will be generated. The crossover probability is set to 0.8, meaning there is an 80% probability of performing the crossover operation and a 20% probability of directly copying the parent into the offspring.
[0072] Mutation operations are performed on offspring individuals to maintain population diversity. A uniform mutation method is used, where each gene locus is mutated with a probability typically 0.1, randomly replacing the gene value with a feasible agent number. For example, for offspring individuals [2,3,1,5,2], if the third gene mutates, it might become [2,3,4,5,2], indicating that task 3 is reassigned from agent 1 to agent 4.
[0073] The above process is executed iteratively until a preset termination condition is met. The termination condition can be reaching the maximum number of iterations, such as 100 generations, or the optimal fitness value not significantly improving over multiple generations, such as 20 generations. Finally, the multi-agent allocation scheme corresponding to the individual with the highest overall fitness is selected as the optimal scheme, and an allocation instruction is generated. The allocation instruction includes the target multi-agent identifier and task execution parameters, such as "Agent 2 executes task 1, parameters set to {priority: high, deadline: 2023-05-2014:30:00}".
[0074] In practical applications, algorithm parameters can be adjusted for specific scenarios. For example, in scenarios with many urgent tasks, the weight of the performance achievement term in the multi-objective optimization function can be increased; in scenarios with high system load, the weight of the load fitness component can be increased. Furthermore, the load threshold can be dynamically adjusted based on the agent's processing power; agents with stronger processing power can have higher load thresholds set.
[0075] This invention effectively avoids agent overload by introducing load state as an auxiliary decision-making condition into the selection operation of the genetic algorithm, thereby improving the overall system stability and task execution efficiency. Simultaneously, the design of the multi-objective optimization function takes into account multiple dimensions, resulting in a more comprehensive and reasonable multi-agent allocation scheme.
[0076] In one optional implementation, the steps of performing the selection operation include: obtaining the evolutionary stage coefficient of the current iteration algebra, extracting the load state of each multi-agent in the multi-agent cluster to calculate the standard deviation of the population load distribution, and dynamically calculating the load threshold based on the evolutionary stage coefficient and the standard deviation of the population load distribution; extracting the load state of the assigned multi-agent in the multi-agent allocation scheme corresponding to each agent to calculate the load deviation between the current load state and the load threshold, and calculating the gradient penalty coefficient based on the load deviation using a nonlinear mapping function when the load deviation is greater than zero; obtaining the historical load data of each agent to calculate the load change rate of the current load state relative to the historical load data, calculating the trend prediction coefficient when the load change rate is greater than zero, and using the product of the gradient penalty coefficient and the trend prediction coefficient as a comprehensive adjustment coefficient to reduce the selection probability of the individual; and calculating the selection probability based on the comprehensive fitness ranking value when the load deviation is less than or equal to zero.
[0077] For example, during the evolutionary process, the current evolutionary stage of the algorithm is determined based on the current iteration generation. The iteration generation refers to the number of complete generations the genetic algorithm has executed. The evolutionary progress ratio is obtained by dividing the current iteration generation by the preset maximum number of iterations. This ratio ranges from 0 to 1, with values close to 0 indicating an early exploration stage and values close to 1 indicating a later convergence stage. The evolutionary stage coefficient is calculated using the square root of this ratio, ensuring a faster increase in the coefficient in the early stages to maintain population diversity, and a gradual flattening in the later stages to enhance convergence. For instance, when the maximum number of iterations is set to 100 generations, and the algorithm is currently running at generation 25, the evolutionary progress ratio is 0.25, and the evolutionary stage coefficient is approximately 0.5.
[0078] Simultaneously, all agents in the multi-agent cluster are traversed, and the current comprehensive load value of each agent is extracted to form a load state set. The comprehensive load value is calculated using the aforementioned method and includes a weighted combination of CPU utilization, memory usage, and task queue length. The standard deviation of all values in the load state set is calculated, which reflects the dispersion of the population load distribution. The larger the standard deviation, the more significant the load difference between agents, and the more unbalanced the overall load. The calculation involves summing the squares of the differences between all load values and the mean, dividing by the number of agents, and then taking the square root.
[0079] The dynamic calculation of the load threshold combines two factors: the evolutionary stage coefficient and the standard deviation of the population load distribution. A baseline threshold is set to a fixed value, such as 0.75, representing the upper limit of the agent's overall load value. The dynamic threshold is adjusted based on the baseline threshold. The adjustment amount is the product of the standard deviation and the evolutionary stage coefficient, multiplied by an adjustment factor. The adjustment factor is typically set between 0.2 and 0.4 to control the magnitude of the dynamic adjustment. When evolution is in its early stages and the load distribution is relatively dispersed, the threshold is moderately increased to accommodate more allocation schemes; when evolution enters its later stages or the load is relatively balanced, the threshold becomes stricter to avoid new imbalances. Specifically, the calculation is the baseline threshold plus the standard deviation multiplied by the evolutionary stage coefficient, and then multiplied by the adjustment factor. If the calculated result exceeds the upper limit of 0.95 or falls below the lower limit of 0.6, it is truncated to the upper or lower limit range, respectively.
[0080] For each individual in the population, its corresponding multi-agent allocation scheme is extracted, and the agent IDs of all assigned tasks in that scheme are identified. The current comprehensive load values of these agents are statistically analyzed, and the maximum load value is calculated as the representative load state of that individual's allocation scheme. This maximum load value is compared with a dynamically calculated load threshold; the difference is the load deviation. A positive load deviation indicates that the allocation scheme has caused an agent to be overloaded, and the larger the deviation value, the more severe the overload. A negative or zero load deviation indicates that all assigned agents are within an acceptable load range.
[0081] When the load deviation is greater than zero, a gradient penalty coefficient is calculated using a nonlinear mapping function. This nonlinear mapping function is an exponential function; the input is the load deviation, and the output is a penalty coefficient between 0.1 and 1. Specifically, the load deviation is multiplied by a sensitivity parameter, which is then used as the exponent of the exponential function. The sensitivity parameter is typically set between 5 and 10 to control the response rate of the penalty intensity to the deviation. When the deviation is small, such as 0.05, if the sensitivity parameter is 8, the exponent is 0.4, and the penalty coefficient is approximately 0.67. When the deviation increases to 0.15, the penalty coefficient decreases to approximately 0.30. This mechanism ensures that minor overloads are moderately suppressed, while severe overloads are significantly penalized.
[0082] Obtain historical load data for each agent assigned to the corresponding allocation scheme. Historical load data records the trajectory of the agent's overall load value changes over several iterations; the data window length is typically set to the most recent 5 to 10 iterations. Calculate the load change rate relative to historical load data. This is done by subtracting the historical average load value from the current maximum load value, and then dividing by the historical average load value to obtain the percentage change rate. A positive change rate indicates that the current load is trending upwards relative to the historical load; a larger change rate indicates faster load growth. A negative or zero change rate indicates that the load is flat or decreasing.
[0083] When the load change rate is greater than zero, a trend prediction coefficient is calculated to reflect the deteriorating load trend. The trend prediction coefficient is calculated based on the load change rate through a linear mapping; a change rate range of 0 to 0.5 corresponds to a linearly decreasing trend prediction coefficient from 1 to 0.5. When the change rate is 0.1, the trend prediction coefficient is 0.92; when the change rate increases to 0.3, the trend prediction coefficient decreases to 0.7. If the change rate exceeds 0.5, the trend prediction coefficient is fixed at 0.5 to avoid excessive penalty. This coefficient reflects a forward-looking constraint on the load growth trend.
[0084] The gradient penalty coefficient is multiplied by the trend prediction coefficient to obtain the overall adjustment coefficient. This coefficient ranges from 0.05 to 1, with smaller values indicating stronger suppression of selection probability due to overload and increasing load trends. An individual's original selection probability is calculated using a roulette wheel method based on its overall fitness ranking value, and then multiplied by the overall adjustment coefficient to obtain the adjusted selection probability. For example, if an individual's original selection probability is 0.15, and its gradient penalty coefficient is 0.4 and trend prediction coefficient is 0.8, then the overall adjustment coefficient is 0.32, and the adjusted selection probability drops to approximately 0.048. This mechanism ensures that allocation schemes with overload and increasing load are significantly suppressed during selection.
[0085] When the load deviation is less than or equal to zero, it indicates that the allocation scheme corresponding to this individual has not caused agent overload. The selection probability is directly calculated based on the overall fitness ranking value, without any penalty or adjustment. The selection probability of such individuals is positively correlated with their overall fitness; the higher the fitness ranking, the greater the selection probability. The calculation method still uses the roulette wheel selection method, dividing the individual's overall fitness value by the sum of the fitness values of all non-overloaded individuals to obtain the selection probability. For example, if a non-overloaded individual has an overall fitness of 0.85, and the sum of the fitness values of all non-overloaded individuals is 15, then the selection probability of this individual is approximately 0.057.
[0086] This invention utilizes a dual mechanism of evolutionary stage perception and load trend prediction to adaptively adjust selection pressure at different evolutionary stages, effectively suppressing the propagation and deterioration of load imbalance and improving the long-term stability and resource utilization efficiency of the allocation scheme.
[0087] In one optional implementation, the steps of receiving user intervention operations on the optimal multi-agent, verifying the intervention operations, updating the corresponding parameters of the multi-objective optimization function, and resolving the problem include: capturing user intervention operations on the optimal multi-agent to generate intervention instructions; extracting the designated replacement multi-agent identifier from the intervention instructions; determining whether the multi-agent's capability attributes meet the expertise requirements and performance requirements in the task feature matrix; recording the intervention as effective when they meet the requirements; obtaining the capability attributes of the multi-agent corresponding to the effective intervention; calculating the matching degree between the capability attributes and the expertise requirements as the intervention matching degree; calculating the weight adjustment amount based on the difference between the intervention matching degree and the expertise matching degree item in the multi-objective optimization function; applying the weight adjustment amount to update the weight coefficients of the multi-objective optimization function; re-executing the solution process based on the updated multi-objective optimization function to obtain a new optimal multi-agent allocation scheme; calculating the difference between the new and old allocation schemes; and generating a scheme change prompt when the difference exceeds a change threshold.
[0088] For example, intervention instructions from users are received through a user interface. These instructions typically include the multi-agent identifier that the user wishes to replace and the target multi-agent identifier after the replacement. When a user selects an assigned agent on the task assignment results interface and specifies that it should be replaced with another available agent, an intervention instruction such as "Replace the executor of task A from agent X with agent Y" is generated.
[0089] After the intervention instruction is generated, the designated replacement multi-agent identifier, i.e., agent Y, is extracted. Then, based on the expertise requirements and performance requirements of task A in the task feature matrix, it is determined whether agent Y's capability attributes meet these conditions. Specifically, agent Y's capability values are compared with the expertise requirements of task A to ensure that all necessary capability values are not lower than the corresponding expertise requirement threshold. For example, if task A requires at least 80 points of precision operation ability, and agent Y's precision operation ability is 85 points, then this requirement is met; if all necessary capability items are met, it is recorded as a valid intervention. Conversely, if any capability is insufficient, an invalid intervention prompt is sent to the user, requiring them to select a suitable agent again.
[0090] For effective intervention, the capability attribute vector of agent Y is obtained, and its matching degree is calculated with the expertise requirement vector of task A to obtain the intervention matching degree. The matching degree calculation adopts the weighted cosine similarity method, considering the closeness between capability attributes and expertise requirements in each dimension. In specific calculation, the capability vector and task requirement vector of the agent are first normalized, and then the weighted dot product of the two vectors is calculated to obtain a matching degree score between 0 and 1, with a higher value indicating a higher degree of matching.
[0091] Based on the intervention matching degree, the difference between it and the expertise matching degree term in the original multi-objective optimization function is calculated. Assuming the expertise matching degree of agent X assigned to task A in the original optimization function is 0.75, while the intervention matching degree of the user-specified agent Y is 0.85, the difference is 0.1. The weight adjustment is calculated based on this difference, using an adaptive weight adjustment algorithm. When the difference is positive, indicating that the user-selected agent is better in expertise matching, the weight of the expertise matching degree in the multi-objective optimization function is increased; when the difference is negative, the weight of the expertise matching degree is decreased, and the weights of other objective terms such as load balancing and task completion time are adjusted accordingly to ensure that the sum of all weights remains 1.
[0092] The specific calculation of the weight adjustment amount takes into account the absolute magnitude and sign of the difference. The sigmoid function is used to map the difference to a reasonable range of weight changes, preventing excessively large single adjustments from causing optimization instability. The adjustment formula is designed to ensure that larger differences produce more significant weight changes, while smaller differences only result in fine-tuning. At the same time, upper and lower limits are set to prevent the weights from being overly concentrated on a single objective.
[0093] After updating the weights, the solution process is re-executed based on the adjusted multi-objective optimization function. The solution process employs an improved genetic algorithm or particle swarm optimization algorithm to re-search for the optimal multi-agent allocation scheme that satisfies the constraints. In the new optimization process, the user's mandatory intervention item (i.e., task A must be assigned to agent Y) is retained, while the agent allocation for other tasks is optimized.
[0094] After obtaining the new optimal solution, the difference between the old and new allocation solutions is calculated. The difference is determined by comparing the proportion of changes in the task-agent matching relationships between the two solutions, and is counted as the number of changed matching pairs divided by the total number of tasks. For example, if there are a total of 10 tasks, and the new solution changes the executing agents of 3 tasks, including the user-specified change, then the difference is 0.3 or 30%.
[0095] When the difference exceeds the preset change threshold, typically set at 20% to 30%, a solution change prompt is generated, displaying all changed task-agent matching pairs to the user, with a highlighting of cascading changes caused by weight adjustments. The prompt includes the number of changes, the specific content of the changes, and a brief explanation of the reasons for the changes, helping the user understand the impact of the intervention on the overall optimization results.
[0096] In addition, it calculates the changes in various optimization objectives of the new solution compared to the original solution, such as the overall improvement in expertise matching and changes in load balancing, providing users with comprehensive solution evaluation information. Users can then decide whether to accept the new solution or make further interventions and adjustments.
[0097] This invention can learn user preferences and continuously adjust weight configurations, so that the task allocation of multi-agents not only meets objective optimization goals, but also conforms to users' subjective expectations and domain knowledge, ultimately achieving intelligent decision-making effects through human-machine collaboration.
[0098] In one optional implementation, the step of real-time collection of load data from each multi-agent and determining the load level based on the load data; when an overload level is detected, migrating the tasks of the overloaded multi-agent to a candidate multi-agent with normal load includes: real-time collection of load data from each multi-agent in the multi-agent cluster, the load data including computing resource utilization and task execution queue length; calculating a comprehensive load value based on the computing resource utilization and task execution queue length; comparing the comprehensive load value with a preset multi-level load threshold to determine the load level; when the load level reaches an overload level, [the following steps are taken]: Take the task currently being executed by the overloaded multi-agent and obtain the task feature matrix. Select multi-agents with normal load levels from the multi-agent cluster as a candidate multi-agent set. Calculate the matching degree between the capability attributes of each candidate multi-agent in the candidate multi-agent set and the expertise requirements in the task feature matrix. Select the candidate multi-agent with the highest matching degree as the target migration multi-agent. Generate a task migration instruction to migrate the task of the overloaded multi-agent to the target migration multi-agent. Update the load status of the overloaded multi-agent and the target migration multi-agent and synchronize it to the multi-agent capability matrix.
[0099] For example, the load data mainly includes two key indicators: computing resource utilization and task execution queue length. Computing resource utilization is obtained by real-time monitoring of parameters such as CPU utilization, memory utilization, and storage space utilization of the multi-agent system. For instance, CPU utilization can be sampled every 5 seconds, and the average value over 30 seconds can be calculated using a sliding window to obtain a stable computing resource utilization indicator. Simultaneously, the number of tasks awaiting processing in the current task execution queue is obtained, which serves as the task execution queue length.
[0100] When calculating the overall load value based on the collected load data, a weighted summation method is used. The weight of computing resource utilization is set to 0.6, and the weight of task execution queue length is set to 0.4. After normalization, the weighted calculation is performed. For example, if a multi-agent system has a CPU utilization of 80%, a memory utilization of 70%, an average computing resource utilization of 75%, a task queue length of 10, and a normalized value of 0.8, then its overall load value is calculated as: 0.6 × 0.75 + 0.4 × 0.8 = 0.77.
[0101] The load level is divided into four levels: low load, normal load, high load, and overload, with corresponding load thresholds of 0.3, 0.7, and 0.9, respectively. When the comprehensive load value is less than 0.3, it is determined to be a low load level; when the comprehensive load value is between 0.3 and 0.7, it is determined to be a normal load level; when the comprehensive load value is between 0.7 and 0.9, it is determined to be a high load level; and when the comprehensive load value is greater than 0.9, it is determined to be an overload level.
[0102] When the load level of a multi-agent is detected to have reached the overload level, a task migration mechanism is triggered. The tasks currently being executed by the overloaded multi-agent are extracted, and a task feature matrix is obtained. The task feature matrix includes attributes such as task type, computational complexity, resource requirements, and expertise requirements. Expertise requirements describe the specialized skills needed to complete the task, such as image processing, speech recognition, and path planning. Each expertise is represented by a value between 0 and 1, indicating the degree of demand for that expertise.
[0103] From the multi-agent cluster, multi-agents with a normal load level are selected as the candidate multi-agent set. The overall load value of the candidate multi-agents should be between 0.3 and 0.7 to ensure they have sufficient resources to receive migration tasks. For each candidate multi-agent, the matching degree between its capability attributes and the expertise requirements in the task feature matrix is calculated. The multi-agent's capability attributes are stored in the multi-agent capability matrix, containing the proficiency of various expertise. The matching degree is calculated using the cosine similarity method, which calculates the similarity between the task expertise requirement vector and the candidate multi-agent capability vector.
[0104] For example, if the task expertise requirement vector is [0.8, 0.5, 0.2], representing the degree of requirement for three different expertise, and the capability vector of candidate multi-agent A is [0.9, 0.4, 0.3], and the capability vector of candidate multi-agent B is [0.7, 0.7, 0.1], then the matching degree between A and the task is 0.982, and the matching degree between B and the task is 0.968. Therefore, A, which has a higher matching degree, is selected as the target transfer multi-agent.
[0105] Generating task migration instructions includes constructing migration description information, task state sealing, and communication protocol settings. The migration description information includes the task ID, execution status, task parameters, and completed portions, ensuring the target migrating multi-agent can resume task execution from its breakpoint. Task state sealing packages the intermediate results and context information of the current task execution, facilitating the restoration of the execution environment on the target multi-agent. Communication protocol settings include establishing a secure communication channel between the overloaded multi-agent and the target migrating multi-agent, and determining the data transmission format and verification mechanism.
[0106] During task migration, the execution of the target task on the overloaded multi-agent is first paused, and the encapsulated task state information is sent to the target migration multi-agent through a pre-established communication channel. Upon receiving the task data, the target migration multi-agent parses the task description information, restores the execution environment, and resumes task execution from the breakpoint. After migration is complete, the overloaded multi-agent releases its computing resources, and the target migration multi-agent allocates resources to process the newly received task.
[0107] After the task migration is complete, update the load status of the overloaded multi-agent and the target migration multi-agent. Recalculate the combined load value of both and update their load levels. Simultaneously, synchronize the latest load status to the multi-agent capability matrix to ensure that the stored multi-agent state information is consistent with the actual situation. Updating the capability matrix includes modifying the available resource quantity, current task queue length, and load level information.
[0108] This invention utilizes a dynamic load balancing mechanism to effectively prevent performance degradation caused by overload of a single agent, thereby improving response speed and task processing efficiency. When load imbalance occurs, it automatically adjusts resource allocation, migrating tasks from high-load agents to low-load agents, thus optimizing resource utilization.
[0109] A second aspect of the present invention provides an electronic device, comprising:
[0110] processor;
[0111] Memory used to store processor-executable instructions;
[0112] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0113] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0114] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-agent optimal allocation method for dynamic routing algorithms, characterized in that, include: The process involves: acquiring tasks and extracting task feature matrices, which include expertise requirements, cost constraints, and performance requirements; constructing a multi-agent capability matrix, which includes capability attributes and load status; parsing task descriptions to obtain task type identifiers; extracting expertise dimensions and demand intensity from a pre-defined knowledge base based on task type identifiers as expertise requirements; extracting task resource quotas and execution time limits as cost constraints; and obtaining service quality indicators corresponding to the task as performance requirements. For each agent in a multi-agent cluster, offline capability evaluation data and online task execution feedback data are acquired. The offline capability evaluation data and online task execution feedback data are then fused using time-series weighting to generate a dynamic capability score as a capability attribute. Obtain historical resource consumption data and task completion time data to calculate the unit task cost as the cost component of the capability attribute; Real-time collection of computing resource usage data and task queue data is used to calculate the current load value as the load status. A multi-objective optimization function is constructed based on the task feature matrix and the multi-agent capability matrix. The multi-objective optimization function includes a specialty matching degree term, a cost term, and a performance achievement degree term. An improved genetic algorithm that introduces load state as an auxiliary decision condition in the selection operation is used to solve the multi-objective optimization function to obtain the optimal multi-agent and generate the assignment instruction. When the selection operation is executed, the comprehensive fitness ranking value of each agent is calculated, and the load state of the assigned multi-agent is extracted to determine whether it exceeds the load threshold. For individuals that exceed the load threshold, the selection probability is reduced. For individuals that do not exceed the load threshold, the selection probability is calculated based on the comprehensive fitness ranking value. Individuals are selected to enter the crossover operation according to the selection probability. Perform a crossover operation on the selected individuals to generate offspring individuals, and then perform a mutation operation on the offspring individuals; The selection process includes: obtaining the evolutionary stage coefficients from the current iteration algebra; extracting the load states of each agent in the multi-agent cluster and calculating the standard deviation of the population load distribution; dynamically calculating the load threshold based on the evolutionary stage coefficients and the standard deviation of the population load distribution; extracting the load states of the assigned agents in the multi-agent allocation scheme for each agent and calculating the load deviation between the current load state and the load threshold; when the load deviation is greater than zero, calculating the gradient penalty coefficient based on the load deviation using a nonlinear mapping function; obtaining the historical load data of each agent and calculating the load change rate of the current load state relative to the historical load data; when the load change rate is greater than zero, calculating the trend prediction coefficient; multiplying the gradient penalty coefficient and the trend prediction coefficient as a comprehensive adjustment coefficient to reduce the individual's selection probability; and when the load deviation is less than or equal to zero, calculating the selection probability based on the comprehensive fitness ranking value. It receives user intervention commands for the optimal multi-agent system, verifies the intervention commands, updates the corresponding parameters of the multi-objective optimization function, and then resolves the problem. The system collects load data from each multi-agent in real time and determines the load level based on the load data. When an overload level is detected, the tasks of the overloaded multi-agent are transferred to the candidate multi-agent with normal load.
2. The method according to claim 1, characterized in that, The steps for constructing a multi-objective optimization function based on the task feature matrix and the multi-agent capability matrix include: Calculate the similarity between the ability attribute and the expertise requirement in each expertise dimension, and generate an expertise matching degree item by normalizing the weighted summation; Calculate the deviation between the cost component and the cost constraint and normalize it to generate a cost item; Determine whether the capability attribute meets the performance requirements, assign a compliance value to the multi-agent that meets the requirements, and calculate a penalty value based on the performance gap to generate a performance compliance item for the multi-agent that does not meet the requirements. The load balance of the multi-agent cluster is calculated based on the load status of each agent in the cluster. The task feature matrix is extracted to generate a task feature vector. The similarity between the task feature vector and the historical task feature vector is calculated. The weight coefficients corresponding to the most similar historical tasks are selected and weighted averaged to obtain the initial weight coefficients. The initial weight coefficients are dynamically adjusted based on the load balance. When the load balance is lower than the balance threshold, the weight coefficient of the cost item is increased and the weight coefficient of the expertise matching item is decreased. The adjusted weight coefficients are applied to the weighted summation of the expertise matching item, the cost item, and the performance achievement item to construct the multi-objective optimization function.
3. The method according to claim 1, characterized in that, An improved genetic algorithm, which incorporates load state as an auxiliary decision criterion in the selection operation, is used to solve the multi-objective optimization function to obtain the optimal multi-agent, and the steps for generating allocation instructions include: Initialize the population and generate a multi-agent allocation scheme for each individual, wherein the multi-agent allocation scheme represents the mapping relationship between tasks and multi-agents; The multi-objective optimization function value of each agent is calculated as the basic fitness. The load state of the assigned multi-agent is extracted to calculate the load balance and normalized into a load fitness component. The basic fitness and the load fitness component are weighted and fused to generate a comprehensive fitness. When performing the selection operation, the overall fitness ranking value of each agent is calculated, the load status of the assigned multi-agent is extracted to determine whether it exceeds the load threshold, the selection probability of individuals exceeding the load threshold is reduced, and the selection probability of individuals not exceeding the load threshold is calculated based on the overall fitness ranking value. Individuals are selected to enter the crossover operation according to the selection probability. Perform a crossover operation on the selected individuals to generate offspring individuals, and then perform a mutation operation on the offspring individuals; The process is iterated until the termination condition is met. The multi-agent allocation scheme corresponding to the individual with the highest overall fitness is selected as the optimal multi-agent allocation scheme, and an allocation instruction is generated. The allocation instruction includes the target multi-agent identifier and task execution parameters.
4. The method according to claim 1, characterized in that, The steps of receiving user intervention operations for the optimal multi-agent, verifying the intervention operations, updating the corresponding parameters of the multi-objective optimization function, and resolving the problem include: The system captures user intervention operations on the optimal multi-agent to generate intervention instructions, extracts the designated replacement multi-agent identifier from the intervention instructions, and determines whether the multi-agent's capability attributes meet the expertise requirements and performance requirements in the task feature matrix. If they do, the system records it as a valid intervention. Obtain the capability attributes of the multi-agent corresponding to the effective intervention, calculate the matching degree between the capability attributes and the expertise requirements as the intervention matching degree, calculate the weight adjustment amount based on the difference between the intervention matching degree and the expertise matching degree item in the multi-objective optimization function, and apply the weight adjustment amount to update the weight coefficients of the multi-objective optimization function. Based on the updated multi-objective optimization function, the solution process is re-executed to obtain a new optimal multi-agent allocation scheme. The difference between the old and new allocation schemes is calculated, and a scheme change prompt is generated when the difference exceeds the change threshold.
5. The method according to claim 1, characterized in that, The steps of collecting load data from each multi-agent in real time, determining the load level based on the load data, and migrating the tasks of the overloaded multi-agent to a candidate multi-agent with normal load when an overload level is detected include: The load data of each agent in the multi-agent cluster is collected in real time. The load data includes computing resource utilization and task execution queue length. A comprehensive load value is calculated based on the computing resource utilization and task execution queue length. The comprehensive load value is compared with a preset multi-level load threshold to determine the load level. When the load level reaches the overload level, extract the tasks currently being executed by the overloaded multi-agent and obtain the task feature matrix. Select multi-agents with normal load levels from the multi-agent cluster as a candidate multi-agent set. Calculate the matching degree between the capability attributes of each candidate multi-agent in the candidate multi-agent set and the expertise requirements in the task feature matrix. Select the candidate multi-agent with the highest matching degree as the target migration multi-agent. A task migration instruction is generated to migrate the tasks of the overloaded multi-agent to the target migration multi-agent, and the load status of the overloaded multi-agent and the target migration multi-agent is updated and synchronized to the multi-agent capability matrix.
6. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 5.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data communication system and method based on future network
CN119065818A
Dynamic load balancing method and system of AI model intelligent machine
CN119201435A