A multi-task collaborative processing method and system based on digital employees

By using ant colony algorithm and long-term memory neural network in multi-task collaborative processing, dynamically optimized task allocation, solving the problem of inefficient task execution in the existing technology, and achieving more efficient and balanced task processing.

CN119179563BActive Publication Date: 2025-03-04北京长河数智科技有限责任公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411412886.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-03-04
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

The prior art is difficult to achieve dynamic optimization of task execution efficiency in multi-task collaborative processing, and lacks consideration of the ability differences of heterogeneous digital employees, resulting in uneven task allocation and low execution efficiency.

Method used

Ant colony algorithm is used to combine task complexity evaluation and execution time prediction to generate an initial task scheduling plan, and predict future task execution through long and short-term memory neural networks. The model prediction control algorithm is used to dynamically optimize task allocation, real-time feedback and adjustment of scheduling decisions and actual execution are achieved.

Benefits of technology

The execution efficiency and load balancing of multi-task collaborative processing are improved, the parallel processing capabilities of digital employees are fully utilized, task allocation is optimized, and the adaptability and robustness of the overall system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179563B_ABST
    Figure CN119179563B_ABST
Patent Text Reader

Abstract

The present application discloses a multi-task collaborative processing method and system based on digital employees, which relates to the field of cloud computing technology, including: first, decomposing the task submitted by the user into multiple sub-tasks, which are executed by digital employees. Then, the ant colony algorithm is used in combination with task complexity evaluation and execution time prediction to generate the initial task scheduling plan for the digital employee. During the execution of the digital employee, the long short-term memory neural network is used to predict the task execution status and resource occupancy trend for a period of time in the future, and the model predictive control algorithm is used to dynamically optimize and adjust the task allocation, so as to realize real-time feedback and adjustment of scheduling decisions and actual execution. This is aimed at the problem of low task execution efficiency in multi-task collaboration of digital employees in the prior art. While satisfying the task dependency constraints, the present application dynamically optimizes the task execution efficiency and load balancing, thereby effectively realizing business scenarios such as business process automation and cross-departmental collaboration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a multi-task collaborative processing method and system based on digital employees. Background Art

[0002] With the rapid development and widespread application of artificial intelligence technology, intelligence and automation have become important trends in social development. In many fields such as industrial production, finance, medical care, and education, artificial intelligence is playing an increasingly important role, greatly improving production efficiency and service quality. As an important branch of artificial intelligence, digital employee technology has attracted much attention in recent years. Digital employees are software systems that can perform tasks autonomously based on artificial intelligence and machine learning technologies. By learning business processes and tasks, digital employees can replace humans to complete repetitive and regular work, and in some scenarios, they can show higher efficiency and accuracy than humans.

[0003] In actual applications, the processing capabilities of a single digital employee are limited, and it is often difficult for them to complete complex business processes independently. Therefore, scenarios where multiple digital employees work together to handle tasks are becoming more and more common. Through the division of labor and collaboration among multiple digital employees, the parallel processing capabilities of digital employees can be fully utilized to improve the overall task execution efficiency. However, in the process of multi-task collaborative processing, how to reasonably allocate tasks, coordinate collaboration between digital employees, and optimize task execution efficiency is a challenging problem.

[0004] Traditional multi-task scheduling methods, such as first-come-first-served and round-robin scheduling, usually adopt static scheduling strategies, lack consideration of task characteristics and digital employee capabilities, and are difficult to adapt to dynamically changing task requirements and load conditions. There is a lack of effective feedback mechanism between scheduling decisions and actual task execution, and it is impossible to dynamically optimize scheduling plans based on actual execution conditions. In addition, most existing scheduling methods are aimed at homogeneous systems and lack consideration of differences in the capabilities of heterogeneous digital employees. These problems result in the inability to fully utilize the processing capabilities of digital employees, unbalanced task allocation, and low task execution efficiency, making it difficult to meet actual application needs. Summary of the invention

[0005] In view of the problem of low task execution efficiency in multi-task collaboration of digital employees in the prior art, the present application provides a multi-task collaborative processing method and system based on digital employees. First, the task submitted by the user is decomposed into multiple sub-tasks, which are executed by digital employees. Then, the ant colony algorithm is combined with task complexity evaluation and execution time prediction to generate the initial task scheduling plan for digital employees. During the execution of digital employees, the long short-term memory neural network is used to predict the task execution status and resource occupancy trend in the future, and the model predictive control algorithm is used to dynamically optimize and adjust the task allocation, so as to realize real-time feedback and adjustment of scheduling decisions and actual execution. While satisfying the task dependency constraints, the task execution efficiency and load balancing are dynamically optimized, thereby improving the execution efficiency of multi-task collaborative processing.

[0006] The purpose of this application is achieved through the following technical solutions.

[0007] One aspect of the present application provides a multi-task collaborative processing method based on digital employees, including: receiving tasks submitted by users, decomposing the tasks into multiple subtasks, generating an initial task set, and the subtasks are executed by digital employees; evaluating the computing resource requirements of each subtask according to the initial task set, and determining the estimated execution time of each subtask according to a preset mapping relationship between task complexity and execution time; obtaining the performance parameters of each current digital employee; based on the computing resource requirements, the estimated execution time and performance parameters, using an ant colony algorithm to generate initial scheduling information of the digital employees; the initial scheduling information includes a task allocation plan for each digital employee at different times; sending the corresponding task allocation plan to each digital employee, triggering each digital employee to execute the task according to the task allocation plan. The system executes corresponding subtasks according to the task allocation plan; in the process of digital employees executing subtasks, the execution progress of each subtask is tracked to obtain the monitoring data of the digital employees; the monitoring data includes CPU occupancy, memory occupancy and network bandwidth occupancy; the monitoring data is input into the pre-trained long short-term memory neural network to predict the task execution status and resource occupancy trend in the future; according to the prediction results, the model predictive control algorithm is used to solve the optimal scheduling strategy in the future; based on the optimal scheduling strategy, the task allocation plan of each digital employee in the future is adjusted, and the adjusted task allocation plan is sent to the corresponding digital employee; the digital employee executes the subsequent part of the subtask according to the adjusted task allocation plan.

[0008] Among them, digital employees are virtual employees that can automatically perform tasks and provide services based on artificial intelligence technology and computer systems. In this application, digital employees are the actual executors of subtasks. When a large task is decomposed into multiple subtasks, each subtask will be assigned to one or more digital employees to complete. Digital employees use their own computing resources and algorithm capabilities to autonomously execute the subtasks assigned to them and return the task results. Each digital employee has a set of performance parameters, such as CPU processing power, memory size, network bandwidth, etc. These performance parameters characterize the computing resource capacity and processing power of digital employees, and are an important basis for task scheduling decisions. The scheduling algorithm needs to comprehensively consider the performance parameters of each digital employee and the resource requirements of the task in order to make a reasonable task allocation plan. During the task execution process, digital employees will continue to generate monitoring data, such as CPU occupancy, memory occupancy, network bandwidth occupancy, etc. These monitoring data reflect the real-time working status and resource usage of digital employees, and are key inputs for predicting future execution and optimizing scheduling strategies. By analyzing the historical and real-time monitoring data of digital employees, the progress and bottlenecks of task execution can be accurately grasped. Digital employees are both the objects of task allocation and the objects of dynamic scheduling. The initial scheduling information and the adjusted task allocation plan are issued on a digital employee basis. Each digital employee independently arranges the task execution plan based on the received task allocation plan, and flexibly reallocates tasks and resources based on the dynamic adjustment of the scheduling strategy.

[0009] Furthermore, an ant colony algorithm is used to generate initial scheduling information for digital employees, including: for each subtask in the initial task set, according to the task type label, the corresponding computing resource requirement vector is obtained from a preset task complexity knowledge base; the computing resource requirement vector includes CPU requirements, memory requirements and network bandwidth requirements; the computing requirement vector of the subtask is input into a pre-built task complexity and execution time mapping relationship model to obtain the estimated execution time of the corresponding subtask; wherein the task complexity and execution time relationship mapping model is obtained by machine learning training on the execution data of historical figures; the performance parameters of each current digital employee are obtained, and the performance parameters include the computing power, memory capacity and network bandwidth of the digital employee; the computing power of the digital employee is calculated according to the CPU model and the number of cores, and the memory capacity and network bandwidth of the digital employee are obtained according to the hardware configuration; the computing resource requirements, estimated execution time and performance parameters of the digital employee of the subtask are used as input, and the ant colony algorithm is used to assign executors and execution time to each subtask in the initial task set, and the output result is used as the initial scheduling information of the digital employee.

[0010] Among them, the task complexity knowledge base is a pre-built database for storing computing resource demand vectors of different types of tasks. It divides and quantifies the complexity of different types of tasks based on historical experience and expert knowledge, forming a knowledge base that maps task types to computing resource requirements. In this knowledge base, each task type corresponds to a computing resource demand vector, which usually contains quantitative indicators of demand for resources such as CPU, memory, and network bandwidth. These indicators can be continuous values, indicating the relative size of resource requirements; or they can be classified values, indicating the level of resource requirements (such as low, medium, high, etc.). The construction of the task complexity knowledge base usually requires analysis and mining of historical task execution data, extracting resource consumption patterns of different task types, and summarizing and abstracting them in combination with domain expert experience to form reusable complexity quantification indicators. The quality of the knowledge base largely determines the accuracy of subsequent task complexity estimation and execution time prediction. More specifically, in this application, the task complexity knowledge base is mainly used to quickly obtain its computing resource demand vector based on the type label of the subtask, and provide input for subsequent execution time estimation. For each subtask in the initial task set, its task type label is first extracted. The task type label is a highly abstract and classified feature of the task function, computing mode, etc., such as data preprocessing, feature extraction, model training, result evaluation, etc. According to the type label of the subtask, the corresponding computing resource requirement vector entry is retrieved in the preset task complexity knowledge base. Since the knowledge base has pre-established the mapping relationship between task type and resource requirement, the general resource requirement quantification value of the task type can be directly obtained by looking up the table according to the type label. The resource requirement vector retrieved from the knowledge base is used as the estimated value of the computing resource requirement of the subtask. The resource requirement vector contains the demand description of resources such as CPU, memory, and network bandwidth, forming a quantitative representation of task complexity. The resource requirement vector of the task, together with other information, is used as the input of the task execution time prediction model, and the estimated execution time of the task is obtained after calculation. The resource requirement vector and estimated execution time of the subtask are further used to construct the scheduling graph model, and are used in the ant colony algorithm to estimate the edge weights between nodes and guide the generation of task scheduling schemes. By introducing the task complexity knowledge base, the scheme can significantly improve the efficiency and accuracy of task computing resource requirement estimation. The knowledge base is equivalent to summarizing historical experience, abstracting and quantifying the resource requirements of different types of tasks, so that these experience knowledge can be directly reused when facing new tasks, without the need to conduct separate demand analysis for each task, reducing time expenditure. At the same time, the construction of the knowledge base integrates historical data and expert experience, and can provide more accurate and more field-specific task complexity judgments than simple estimation methods.

[0011] Furthermore, a mapping model of the relationship between task complexity and execution time is obtained by performing machine learning training on the execution data of historical figures, including: extracting the computing resource requirement vector and actual execution time of each historical task from the historical task execution records to form a training data set; the actual execution time is the execution time of the historical task; using the computing resource requirement vector in the training data set as the input feature and the actual execution time as the target value, training the support vector regression algorithm model to obtain a task complexity evaluation model; using the computing resource requirement vector in the training data set as the input feature and the actual execution time as the target value, training the long short-term memory neural network model to obtain an execution time prediction model; combining the task complexity evaluation model and the execution time prediction model to construct a mapping relationship model between task complexity and execution time; wherein, the combination refers to using the output complexity quantitative value of the task complexity evaluation model as the input of the execution time prediction model, and the two models are cascaded to form a complexity-execution time mapping relationship.

[0012] Furthermore, the task complexity evaluation model and the execution time prediction model are combined to construct a mapping relationship model between task complexity and execution time, including: using the computing resource requirement vector in the training data set as input, and using the trained task complexity evaluation model to predict the complexity quantitative value of each historical task; using the computing resource requirement vector in the training data set as input, and using the trained execution time prediction model to predict the execution time prediction value of each historical task; the complexity quantitative value and the execution time prediction value of each historical task constitute a training data set, and a polynomial regression algorithm is used to train a mapping relationship sub-model between the complexity quantitative value and the execution time prediction value; for a given sub-task, first input the corresponding computing resource requirement vector into the task complexity evaluation model to obtain the corresponding complexity quantitative value; then input the complexity quantitative value of the sub-task into the mapping relationship sub-model to obtain the estimated execution time of the corresponding sub-task; the task complexity evaluation model, the execution time prediction model and the mapping relationship sub-model are cascaded to form a mapping relationship model between task complexity and execution time.

[0013] Furthermore, based on the computing resource requirements, estimated execution time and performance parameters of the digital employees of the subtasks, the ant colony algorithm is used to generate the executor and execution time of each subtask in the initial task set as the initial scheduling information of the digital employees, including: inputting the computing resource requirement vector of each subtask in the initial task set into the task complexity evaluation model to obtain the complexity quantitative value of the corresponding subtask; inputting the complexity quantitative value into the complexity-execution time mapping relationship sub-model to obtain the estimated execution time of the corresponding subtask; obtaining the computing power, memory capacity and network bandwidth of each current digital employee; constructing a multi-task scheduling graph model for digital employees; initializing the ant colony algorithm parameters, including the number of ants m, the pheromone importance factor α, the path length importance factor β, the pheromone evaporation coefficient ρ and the number of iterations n; randomly placing m ants on the n task nodes of the scheduling graph to form the initial distribution of the ants; for each ant, starting from the current node, according to the pheromone concentration and heuristic factor between nodes, a roulette strategy is used to select the next node until all task nodes are traversed to form a complete path; according to the path of each ant The task nodes and employee nodes on the path are matched to form a task scheduling plan, and the comprehensive benefit valuation of the scheduling plan is calculated; the scheduling plans of all ants are compared, and the plan with the best comprehensive benefit valuation is selected as the optimal solution for this iteration; the pheromone concentration of each edge in the scheduling graph is updated according to the optimal solution, and the update formula is: τ'(r,s)←(1-ρ)τ(r,s)+Δτ(r,s), where τ(r,s) represents the pheromone concentration on the edge (r,s), where r and s represent the starting and ending nodes of the edge respectively; ρ represents the pheromone evaporation The transmission coefficient is in the range of [0, 1]; Δτ(r, s) represents the increment of pheromone newly left by ants on the edge (r, s) in this iteration; the pheromone update step is repeated until the maximum number of iterations is reached, or the optimal comprehensive benefit valuation changes for multiple consecutive iterations less than the threshold, and the corresponding optimal solution is output as the initial scheduling plan; each task node and its matching employee node in the scheduling plan are extracted, the matching result is used as the executor of the corresponding subtask, and the order of the subtasks in the optimal path is used as the execution time of the executor to form the initial scheduling information of the digital employee.

[0014] Specifically, by inputting the computing resource requirement vector of each subtask into the task complexity evaluation model and the execution time prediction model, the complexity quantitative value and estimated execution time of each subtask are obtained. At the same time, the performance parameters of each current digital employee are obtained, including computing power, memory capacity and network bandwidth. These two types of information are the basic inputs for the subsequent construction of the scheduling graph model and the execution of the ant colony algorithm. Using the subtask complexity quantitative values, estimated execution time and digital employee performance parameters obtained in the previous step, a digital employee multi-task scheduling graph model is constructed. The scheduling graph contains task nodes representing subtasks and employee nodes representing digital employees, as well as directed edges connecting the nodes. The edge weights connecting task nodes and employee nodes represent the efficiency estimation of employees executing tasks, and the edge weights connecting employee nodes represent the task switching overhead.

[0015] Furthermore, a multi-task scheduling graph model for digital employees is constructed, including: taking each subtask in the initial task set as a task node, denoted as T i , taking the current digital employees as employee nodes, denoted as S j ; (i = 1, 2, ..., n), (j = 1, 2, ..., m); where n is the number of subtasks and m is the number of digital employees; at any task node T i and employee node S j Set a directed edge E between ij , indicating that employee S j Execute Task T i , the edge weight w(E ij ) is employee S j Execute Task T i The efficiency valuation is calculated as follows:

[0016] Among them, C i Represents task T i The quantitative value of complexity, P j Indicates employee S j The comprehensive performance parameters, α and β are balance factors, satisfying α+β=1; P j The calculation formula is: Among them, C max 、M max and B max They represent the maximum values ​​of computing power, memory capacity and network bandwidth among all employees, and are used to normalize single parameters; λ1, λ2, and λ3 are weight coefficients, satisfying λ1+λ2+λ3=1, reflecting the influence of different performance indicators on the efficiency of employee task execution. j and employee node S k Set a directed edge F between jk, indicating that employee S j With employee S k The task switching overhead between them, the edge weight w(F jk ) is the estimated switching cost, and the calculation formula is: w(F jk )=γ(1-R(T j ,T k ), where T j and T k Respectively represent the employee node S j and S k Connected task nodes, R(T j ,T k ) represents task T j and T k The task relevance R can be obtained by the following methods: using task attribute metadata (such as task category, required skills, etc.) to calculate the similarity between tasks; statistically analyzing the historical data of employees performing tasks to calculate the correlation between tasks; having task experts or supervisors make subjective assignments based on experience; and constructing the task node T i , employee node S j And the connecting edge E ij and F jk The directed graph G of digital employees is used as the multi-task scheduling graph model, denoted as: G = (V, E), where V = {T i}∪{S j}, E={E ij}∪{F jk}.

[0017] Furthermore, according to the path of each ant, the task nodes and employee nodes on the path are matched in pairs to form a task scheduling scheme, and the comprehensive benefit valuation of the scheduling scheme is calculated, including: obtaining a complete path formed by each ant traversing all task nodes, denoted as L k (k=1, 2, ..., m), where m is the number of ants; for each path L k , extract all task nodes T on the corresponding path i And the first employee node S connected after each task node j , T i With S j Matching forms a task-employee scheduling result, recorded as (T i ,S j ); Set path L k All task-employee matching results on (T i ,S j ) is combined into a task scheduling scheme according to the order of task nodes in the path, denoted as A k ; For each scheduling scheme Ak , based on the matching results (T i ,S j ) in task node T i With employee node S j Connecting edge E ij The efficiency valuation w(E ij ), calculate the scheduling plan A k The execution efficiency Eff k , the calculation formula is:

[0018] Where n is the total number of task nodes; for each scheduling scheme A k , based on the matching results (T i ,S j ) employee node S j And the corresponding matching task node T i The complexity quantitative value C i , calculate the scheduling plan A k Load balancing Bal k , the calculation formula is: Among them, m is the total number of employee nodes, is the average complexity of all tasks; for each scheduling scheme A k , and its execution efficiency Eff k and load balancing Bal k Weighted summation to get scheduling plan A k Comprehensive benefit valuation Obj k , the calculation formula is: k =w1×Eff k +w2×Bal k , where w1 and w2 are weight coefficients, satisfying w1+w2=1, reflecting the relative importance of execution efficiency and load balancing in the overall benefits, and can be flexibly set according to actual needs.

[0019] Furthermore, the monitoring data is input into a pre-trained long short-term memory neural network to predict the task execution status and resource occupancy trend in the future, including: obtaining the monitoring data collected during the execution of each digital employee's subtask, including the time series data of CPU occupancy, memory occupancy and network bandwidth occupancy; arranging the monitoring data in chronological order to form time series data reflecting the dynamic changes in the resource occupancy of digital employees; dividing the time series data into fixed time windows, each time window containing a subsequence of monitoring data within a period of time as the input sequence of the LSTM neural network model; mapping the input sequence of the LSTM model into a dense vector representation through the embedding layer, extracting the time series features of the input sequence through the LSTM layer, and outputting the predicted value of the resource occupancy of digital employees in the future through the fully connected layer at the last time step; wherein, the network structure and parameters of the LSTM model are obtained through pre-training.

[0020] Furthermore, based on the prediction results, the model predictive control algorithm is used to solve the optimal scheduling strategy for a period of time in the future, including: using the predicted value of the resource occupancy of digital employees in the future period of time output by the LSTM neural network model and the obtained employee performance parameters as the input of the model predictive control MPC algorithm, and using the initial task set as the task list to be scheduled; converting the task scheduling problem into an optimization control problem of the MPC algorithm, with each scheduling cycle as a control step; within each control step, the MPC algorithm takes the weighted combination of maximizing the task execution efficiency and load balancing of the scheduling scheme in the future period of time as the optimization goal, and takes the resource capacity and task dependency of the digital employees as constraints to solve the optimal scheduling decision sequence from the current step to several future steps; the optimization objective function is set as: Among them, t represents the future prediction step, k represents the kth scheduling scheme, and Eff k (t) and Bal k (t) represent the task execution efficiency and load balancing of the scheduling scheme k at time t in the future, respectively, and w1 and w2 are balancing factors.

[0021] The constraints are set as: Among them, A k (t) represents the scheduling plan k at time t in the future, C max 、M max and B max denote the upper limits of the CPU, memory, and network bandwidth capacity of digital employees, respectively. D denotes the set of task dependencies. T i <T l Represents task T i Must precede T lExecution; by solving the optimization control problem, the optimal scheduling decision sequence from the current step to several future steps is obtained, recorded as {A(t)|t=1,2,......,T}; the first decision A(1) in the optimal scheduling decision sequence {A(t)} is output as the task allocation plan for the current scheduling cycle and sent to the digital employee for execution; the remaining decisions A(2) to A(T) in the optimal scheduling decision sequence {A(t)} are temporarily stored as a prediction reference for subsequent scheduling cycles and are not sent for execution.

[0022] Among them, the MPC (Model Predictive Control) algorithm is a model-based optimization control method that realizes the prediction and control of dynamic systems through rolling optimization and feedback correction under the premise of satisfying constraints. In this application, the MPC algorithm is used to solve the optimal task scheduling strategy in the future. The MPC algorithm predicts the resource occupancy of digital employees in the future based on the LSTM neural network model. By analyzing historical scheduling data and employee performance parameters, the LSTM model learns the correlation between task execution and resource consumption, predicts the resource occupancy trend under different scheduling decisions, and provides the MPC algorithm with system status information in the future. The MPC algorithm adopts a rolling optimization strategy to divide the entire scheduling process into multiple scheduling cycles, each of which is a control step. In each control step, the MPC algorithm uses the current task set and employee status as initial conditions to optimize the scheduling decision sequence in the future (called the prediction time domain), and executes the first decision of the sequence as the optimal scheduling solution for the current step. The MPC algorithm optimizes the comprehensive performance of the scheduling solution in the future as the optimization goal. This performance indicator is usually a weighted combination of task execution efficiency and load balancing, indicating a balance between task execution speed and employee load balancing. By setting different weights, the preference of the scheduling scheme can be flexibly adjusted. The MPC algorithm needs to meet a series of constraints during the optimization process to ensure the feasibility and rationality of the scheduling scheme. Common constraints include: resource capacity constraints of digital employees, such as CPU, memory, network bandwidth, etc. cannot exceed the maximum capacity of employees; task dependencies, there may be dependencies between the scheduled tasks, and they need to be executed in the order of dependencies; task execution time constraints, some tasks may have a hard requirement for the latest completion time. After each control step, the MPC algorithm compares the actual execution result with the predicted value, and uses the deviation as a feedback signal to correct the prediction model and optimization target. By introducing a feedback mechanism, the MPC algorithm can adaptively adjust the scheduling strategy to deal with uncertainty and interference in the task execution process. As time goes by and new tasks arrive, the MPC algorithm will continuously update the scheduling scheme. At the beginning of each control step, the MPC algorithm uses the current task set and employee status as new initial conditions, re-optimizes the scheduling decision sequence for a period of time in the future, and adjusts the task allocation and execution plan according to the new optimal decision.

[0023] Another aspect of the present application also provides a multi-task collaborative processing system based on digital employees, which is used to execute a multi-task collaborative processing method based on digital employees of the present application.

[0024] Compared with the prior art, the advantages of this application are:

[0025] This application can fully utilize the parallel processing capabilities of digital employees by decomposing user tasks into multiple subtasks and executing them in parallel by digital employees. At the same time, in the initial scheduling and dynamic optimization adjustment, factors such as task complexity, employee performance and real-time load are comprehensively considered, and tasks and employees can be dynamically matched to optimize task execution efficiency and employee load balance, avoiding the situation where individual employees are overloaded while other employees are idle, thereby improving the overall task execution efficiency and computing resource utilization.

[0026] Traditional scheduling methods usually adopt static scheduling strategies. Once a scheduling plan is formulated, it is difficult to make dynamic adjustments based on actual execution conditions. This application introduces a real-time monitoring feedback mechanism, which uses a long-short-term memory neural network to predict the task execution progress and resource occupancy in the future, and uses a model predictive control algorithm to dynamically optimize and adjust task allocation, thereby achieving real-time closed-loop feedback optimization between scheduling decisions and actual execution, and improving the adaptability and robustness of the system. When the actual load of employees does not meet expectations, the system can automatically adjust task allocation to ensure efficient execution of tasks.

[0027] This application uses the ant colony algorithm to generate the initial scheduling plan, introduces the task complexity evaluation model and the execution time prediction model, which can intelligently evaluate the task characteristics, accurately estimate the task execution time, and generate a near-optimal scheduling plan, providing a good initial value for subsequent optimization. In dynamic scheduling optimization, the long short-term memory neural network is used to predict future load trends, and the model predictive control algorithm is combined for multi-step rolling optimization, which can perceive future changes in advance and make adjustments in advance.

[0028] This application constructs a digital employee multi-task scheduling graph model, models the multi-task scheduling problem as an optimal path search problem on the graph, and obtains the optimal scheduling solution through intelligent algorithm solution. This modeling method has good versatility, can easily expand task nodes and employee nodes, and flexibly adapt to task collaboration scenarios of different scales and types. In addition, the system architecture has modular characteristics, each functional module can be independently upgraded and optimized, and it is easy to integrate new optimization algorithms, with good scalability and maintainability. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is an exemplary flow chart of a multi-task collaborative processing method based on digital employees according to some embodiments of the present application;

[0030] Figure 2 is an exemplary flow chart of obtaining initial scheduling information of digital employees according to some embodiments of the present application;

[0031] Figure 3 is an exemplary flow chart of constructing a mapping relationship model between task complexity and execution time according to some embodiments of the present application;

[0032] Figure 4 This is an exemplary flowchart for obtaining an initial scheduling plan according to some embodiments of the present application. DETAILED DESCRIPTION

[0033] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0034] Figure 1 is an exemplary flow chart of a multi-task collaborative processing method based on digital employees according to some embodiments of the present application, including: receiving tasks submitted by users, decomposing tasks into multiple subtasks, generating an initial task set, and the subtasks are executed by digital employees; evaluating the computing resource requirements of each subtask according to the initial task set; determining the estimated execution time of each subtask according to a preset mapping relationship between task complexity and execution time; obtaining the performance parameters of each current digital employee; based on the computing resource requirements, the estimated execution time and performance parameters, using an ant colony algorithm to generate initial scheduling information of digital employees; the initial scheduling information includes a task allocation plan for each digital employee at different times; sending the corresponding task allocation plan to each digital employee, triggering each digital employee to complete the task. Digital employees perform corresponding subtasks according to the task allocation plan; in the process of digital employees performing subtasks, the execution progress of each subtask is tracked to obtain monitoring data of digital employees; monitoring data includes CPU occupancy, memory occupancy and network bandwidth occupancy; monitoring data is input into the pre-trained long short-term memory neural network to predict the task execution status and resource occupancy trend in the future; based on the prediction results, the model predictive control algorithm is used to solve the optimal scheduling strategy in the future; based on the optimal scheduling strategy, the task allocation plan of each digital employee in the future is adjusted, and the adjusted task allocation plan is sent to the corresponding digital employee; digital employees perform the subsequent part of the subtask according to the adjusted task allocation plan

[0035] First, the user submits the task request to be processed to the task management module. Receiving user task requests: The user submits the task request through the human-computer interaction interface. The human-computer interaction interface can be in the form of a web page, mobile app, desktop application, etc. The user enters the task description information on the interface, explains the goals and requirements of the task, and submits it to the task management module for processing. After receiving the user request, the task management module extracts the task description information and task goal information for subsequent task analysis and decomposition. Task description information processing: The task management module performs natural language processing on the task description information submitted by the user. First, the task description text is segmented using a word segmentation tool, and then keywords are extracted using named entity recognition, part-of-speech tagging and other technologies. Keywords include core entities, attributes, actions, etc. involved in the task. Then, the pre-trained word vector model is used to semantically expand the keywords and extract the context information of the task, that is, the background knowledge and constraints related to the task.

[0036] Constructing task semantic network: The task management module uses the pre-trained task knowledge graph to semantically represent and associate the extracted task keywords and context information. The task knowledge graph is a structured task domain knowledge base that contains a large number of task concept nodes and the relationships between concepts. By mapping task keywords to concept nodes in the graph, semantic connections between keywords are established to form a task semantic network that reflects the intrinsic semantic structure of the task. Task decomposition: The task management module divides the task into multiple subtasks based on the constructed task semantic network and the preset task decomposition rules. The task decomposition rules are automatically generated based on the task knowledge graph, and use the task-subtask hierarchical relationship in the graph and the process dependency relationship between tasks to form a set of general task decomposition logic. For a specific task semantic network, the decomposition rules can be applied to identify the subtask structure therein, and the original task can be divided into relatively semantically independent subtasks to form a complete set of subtasks.

[0037] Generate an initial task set: For each subtask in the subtask set, the task management module first extracts its task type label. The task type label describes the functional attributes of the subtask, such as text translation, data analysis, etc. Then, the task management module queries the preset task type-digital employee capability mapping relationship table and preliminarily selects digital employees with the ability to perform the task type as candidates. Next, the task management module compares the target information of the subtask with the capability value of the candidate digital employee and selects the digital employee who best matches the target as the executor of the subtask. The matching results of all subtasks and their executors form the initial task set, which clarifies which digital employee is responsible for completing each subtask. Extract computing resource requirements: The task management module further analyzes the basic information of the subtask and extracts its computing resource requirement vector. The resource requirement vector includes the demand values ​​for resources such as CPU, memory, storage, and network bandwidth. The task management module matches the preset task resource requirement template according to the characteristics of the subtask, such as the task type and data size, automatically estimates the resource requirement value, and generates a resource requirement vector. The resource requirement vector is used for subsequent task scheduling optimization.

[0038] Next, the static scheduling optimization module obtains the initial task set and the subtask computing resource requirement vector data from the task management module. Establish an inter-module communication interface: First, a standardized communication interface needs to be established between the task management module and the static scheduling optimization module. The interface defines the protocol and format for data transmission between the two modules. Common interface implementation methods include RESTful API, RPC, etc. The interface standardizes the details of data exchange to achieve loose coupling between modules. Task management module encapsulates data: After generating the initial task set and extracting the subtask resource requirement vector, the task management module needs to encapsulate these data into the format specified by the interface. The initial task set can be represented as a list, in which each element is the description information of a subtask, including attributes such as subtask ID, type, executor, and data volume. The subtask resource requirement vector can be represented as a key-value pair, with the subtask ID as the key and the array of resource requirement values ​​as the value. The task management module stores the encapsulated data in memory or writes it to a disk file.

[0039] The static scheduling optimization module initiates a data request: The static scheduling optimization module initiates a request to obtain data through the interface exposed by the task management module. The request specifies parameters such as the type and range of the required data. For example, when requesting the initial task set data, you can specify the number of subtasks or the range of task IDs to which they belong; when requesting resource requirement vector data, you can specify the corresponding subtask ID list. The task management module responds to the data request: After receiving the data request from the static scheduling optimization module, the task management module queries the corresponding data according to the request parameters. For the initial task set, the task management module reads the encapsulated list data from the memory or disk, filters and slices it according to the request parameters, and returns it to the static scheduling optimization module. For the resource requirement vector, the task management module queries the resource requirement value array corresponding to the requested subtask ID from the key-value pair data, assembles it into response data and returns it.

[0040] The static scheduling optimization module receives and parses data: The static scheduling optimization module obtains the data response returned by the task management module through the interface. For the initial task set, the static scheduling optimization module parses the received list data into subtask objects, extracts the attribute information of each subtask, and constructs a local task set view. For the resource demand vector, the static scheduling optimization module parses the response data into a dictionary structure with the subtask ID as the key and the resource demand value array as the value, which facilitates the subsequent scheduling algorithm to access the resource demand of each subtask. Data synchronization and update: Since the task management module is the main source and manager of tasks, the task data obtained by the static scheduling optimization module may be lagging. In order to ensure the timeliness of scheduling decisions, the static scheduling optimization module needs to keep data synchronized with the task management module. A common synchronization method is periodic polling, that is, the static scheduling optimization module actively initiates data requests to the task management module at regular intervals to obtain the latest task set and resource demand data. Another method is push notification, that is, the task management module actively pushes update notifications to the static scheduling optimization module when the data changes, triggering it to obtain new data in a timely manner.

[0041] Figure 2This is an exemplary flow chart for obtaining the initial scheduling information of digital employees according to some embodiments of the present application, and the initial scheduling information of digital employees is generated by using an ant colony algorithm, including: building a task complexity knowledge base, collecting a large amount of historical task execution data, including task type, computing resource consumption (such as CPU usage, memory occupancy, network bandwidth, etc.) and actual execution time. Clean and preprocess the collected data, remove outliers, and fill in missing values. Label and classify the task types to form a standardized task type label set. For each task type, the distribution characteristics of its computing resource consumption, such as mean, variance, median, etc., are counted to generate the computing resource demand vector of the task type. The task type label and the corresponding computing resource demand vector are stored in the form of a key-value pair to build a task complexity knowledge base. Obtain the computing resource requirements of the subtask, and extract its task type label for each subtask in the initial task set. According to the task type label of the subtask, query the corresponding computing resource demand vector in the task complexity knowledge base. The query result is used as the computing resource demand vector of the subtask, including CPU demand, memory demand and network bandwidth demand.

[0042] Construct a task complexity and execution time mapping model, prepare a training data set, and extract the computing resource requirement vector and actual execution time of each task from the historical task execution records. Use the computing resource requirement vector as the input feature of the model, and the actual execution time as the target value of the model. Train the task complexity evaluation model and select the support vector regression (SVR) algorithm. SVR is a regression algorithm based on the support vector machine (SVM). It fits the data by finding the optimal hyperplane and is suitable for continuous value prediction problems such as complexity evaluation. SVR allows a certain prediction error by introducing the ε-insensitive loss function, thereby improving the robustness and generalization ability of the model. The kernel function of SVR (such as linear kernel, Gaussian kernel, etc.) can map the input features to a high-dimensional space and capture the nonlinear relationship between features. Prepare a training data set, use the computing resource requirement vector in the historical task execution records as the input feature X, and the actual execution time as the target value y. Preprocess the data, such as missing value filling, outlier processing, data normalization, etc., to improve the data quality. Divide the data set into a training set and a validation set. The training set is used for model training, and the validation set is used for model performance evaluation. Hyperparameter optimization: The performance of the SVR model is affected by hyperparameters, such as the penalty coefficient C, the ε value of the ε-insensitive loss function, the kernel function type and its parameters, etc. A cross-validation method, such as k-fold cross-validation, is used to divide the training set into k subsets. Each subset is used as the validation set in turn, and the remaining subsets are used as the training set. K training and evaluation are performed, and the average performance is taken as the generalization performance estimate of the model. A grid search method is used to set the candidate value range of the hyperparameter, exhaust all parameter combinations, cross-validate each combination, and select the parameter combination with the best performance as the final hyperparameter setting. Model training: The SVR model is reinitialized using the optimized hyperparameters. The training set is input into the model, and the support vector and the corresponding weight coefficient are calculated by solving the convex quadratic programming problem. During the training process, the performance of the model on the validation set is monitored, such as the mean square error (MSE), mean absolute error (MAE) and other indicators to determine whether the model converges or overfits. Parameters such as the number of training iterations and the early stopping threshold are adjusted as needed to control the model training process.

[0043] To train the execution time prediction model, we select the long short-term memory (LSTM) neural network. LSTM is a special recurrent neural network (RNN). By introducing a gating mechanism, it solves the gradient vanishing and gradient exploding problems of traditional RNN when processing long sequence data. LSTM can effectively capture long-distance dependencies in time series data and is suitable for time series prediction tasks such as execution time prediction. The internal structure of LSTM includes input gate, forget gate, output gate and cell state. Information is selectively stored and updated through gating units to achieve long short-term memory. Build the LSTM network structure and determine the input layer dimension of the LSTM network, that is, the length of the feature vector. In the execution time prediction task, the input feature can be the computing resource requirement vector of the task, the complexity evaluation value, etc. Set the number of layers of the LSTM hidden layer and the number of nodes in each layer. The number of hidden layers determines the depth of the model, and the number of nodes affects the expressiveness of the model. The optimal network structure can be determined through experiments and parameter adjustment. Select the number of nodes in the output layer of the LSTM network, usually 1, which represents the predicted execution time value. After the LSTM layer, a fully connected layer can be added to convert the output of the LSTM into the final prediction value. According to the task requirements, other layers such as embedding layer and attention mechanism can be added to further improve the model performance. Training data preparation: the computing resource requirement vector and complexity evaluation value in the historical task execution record are used as input feature X, and the actual execution time is used as the target value y. Preprocess the data, such as missing value filling, outlier processing, data normalization, etc., to improve data quality. Divide the data set into training set, validation set and test set. The training set is used for model training, the validation set is used for model hyperparameter tuning and early stopping judgment, and the test set is used to evaluate the final performance of the model. Model training: initialize the weights and biases of the LSTM network, generally using randomly initialized or pre-trained word vectors. Input the training data into the LSTM network, and calculate the output value and loss function through forward propagation. Common loss functions include mean square error (MSE) and mean absolute error (MAE). Calculate the gradient of the loss function to the network parameters through the back-propagation algorithm, use the optimization algorithm (such as Adam, RMSprop, etc.) to update the network weights, and iterate multiple epochs until the model converges. During the training process, use the Early Stopping method to monitor the performance on the validation set. When the validation loss does not improve for several consecutive epochs, stop training to prevent overfitting. Use regularization techniques such as L1 / L2 regularization and Dropout to add regularization terms to the loss function to limit model complexity and improve generalization ability.

[0044] Figure 3It is an exemplary flow chart of constructing a mapping relationship model between task complexity and execution time according to some embodiments of the present application, constructing a sub-model of the mapping relationship between task complexity and execution time, generating a new training data set, and using the trained task complexity evaluation model and execution time prediction model to predict historical task data. For each historical task, input its computing resource requirement vector into the task complexity evaluation model to obtain the corresponding complexity quantitative value. At the same time, input the computing resource requirement vector of the task into the execution time prediction model to obtain the predicted execution time value. The complexity quantitative value of each historical task is used as the input feature X, and the execution time prediction value is used as the target value y to form a new training data set.

[0045] Select the polynomial regression algorithm. Polynomial regression is a regression algorithm used to fit nonlinear relationships. It captures the complex mapping relationship between features and targets by introducing high-order terms. The general form of polynomial regression is: y = w0 + w1x + w2x 2 +......+w n x n , where n is the degree of the polynomial, w i is the model parameter. By adjusting the degree of the polynomial, the complexity and fitting ability of the model can be controlled. The higher the degree, the more complex the model is and the stronger the fitting ability is, but it is also prone to overfitting. To train the polynomial regression model, input the new training data set into the polynomial regression model and estimate the model parameter w through optimization algorithms such as the least squares method. i . During the training process, the performance of polynomial models of different orders is evaluated through methods such as cross-validation, and the optimal polynomial order is selected. Regularization techniques such as L1 / L2 regularization are used to add regularization terms to the loss function to control model complexity and prevent overfitting. Model parameters are iteratively updated through optimization algorithms such as gradient descent and stochastic gradient descent until convergence or the preset number of iterations is reached. Model evaluation and tuning: Use the trained polynomial regression model to predict the validation set, calculate performance indicators such as MSE, MAE, and R square, and evaluate the goodness of fit of the model. Draw a scatter plot of the complexity quantitative value and the execution time prediction value, visually observe the relationship between the two, and judge the fitting effect of the polynomial regression. Try different hyperparameters such as polynomial order and regularization strength, and tune them through methods such as grid search and random search to select the parameter combination with the best performance. Analyze the residual distribution of the model, identify possible abnormal points or outliers, and perform data cleaning or feature transformation.

[0046] The complete mapping model is formed by cascading the task complexity evaluation model, the execution time prediction model and the mapping relationship sub-model in sequence to form a complete mapping relationship model between task complexity and execution time. For a given sub-task, first extract its computing resource requirement vector, input it into the task complexity evaluation model, and obtain the complexity quantitative value. Input the complexity quantitative value into the mapping relationship sub-model, and calculate the estimated execution time of the sub-task through the polynomial regression function. Through the cascade combination of models, an end-to-end mapping from task features to complexity and then to execution time is achieved, improving the accuracy and efficiency of the estimation.

[0047] Get the performance parameters of digital employees, read the hardware configuration information of digital employees, and obtain the list of currently available digital employees and their unique identifiers by calling the API interface of the digital employee management system. For each digital employee, query and read the corresponding hardware configuration information according to its identifier, including parameters such as CPU model, number of cores, memory capacity, and network bandwidth. Organize and store the read hardware configuration information according to the identifier of the digital employee to form a hardware configuration information table. Calculate the computing power parameters of the digital employee, and benchmark the common CPU models according to the preset CPU performance evaluation standards to obtain the performance scores of single cores of different CPU models. For each digital employee, extract the CPU model and number of cores from its hardware configuration information table. Query the CPU performance evaluation standard table to obtain the performance score of the corresponding CPU model single core, multiply it by the number of cores, and obtain the computing power parameters of the digital employee. Add the calculated computing power parameters to the hardware configuration information table of the digital employee. Extract the memory capacity and network bandwidth parameters of the digital employee. For each digital employee, directly extract the memory capacity and network bandwidth parameters from its hardware configuration information table. Add the extracted memory capacity and network bandwidth parameters to the hardware configuration information table of the digital employee.

[0048] Generate a digital employee performance parameter vector. For each digital employee, extract the computing power, memory capacity, and network bandwidth parameters from its hardware configuration information table. Combine the extracted parameters into a multidimensional vector in a predefined order to form the performance parameter vector of the digital employee. Organize the performance parameter vectors of all digital employees into a matrix in the order of their identifiers, with each row corresponding to a performance parameter vector of a digital employee. Store the generated performance parameter matrix in memory or a database for subsequent task scheduling and optimization.

[0049] Calculate the estimated execution time of the subtask, input the subtask computing resource requirement vector, and extract the corresponding computing resource requirement vector for each subtask in the initial task set. The computing resource requirement vector may include the subtask's demand for resources such as CPU, memory, bandwidth, and other characteristic parameters related to task execution. Organize and store the extracted computing resource requirement vector according to the subtask identifier. Calculate the subtask complexity quantitative value, and input the computing resource requirement vector of each subtask into the pre-trained task complexity evaluation model. The task complexity evaluation model can be a supervised learning model, such as a regression model, a neural network, etc., which predicts the complexity of a new task by fitting the relationship between the resource requirements and the complexity quantitative values ​​of historical tasks. The model outputs the complexity quantitative value corresponding to each subtask, indicating the computational complexity of the task. The calculated subtask complexity quantitative value is associated with the corresponding subtask identifier and stored.

[0050] Predict the execution time of subtasks, and input the complexity quantitative value of each subtask into the pre-trained complexity-execution time mapping submodel. The complexity-execution time mapping submodel can be a regression model, which predicts the execution time of new tasks by fitting the relationship between the complexity quantitative value and the actual execution time of historical tasks. The model outputs the estimated execution time of each subtask, which represents the time required to complete the task under a standard computing environment. The predicted estimated execution time of the subtask is associated with the corresponding subtask identifier and stored. Store subtask attribute data, and for each subtask, combine its computing resource requirement vector, complexity quantitative value, and estimated execution time into an attribute tuple. Organize the attribute tuples of all subtasks into a list or array in the order of their identifiers. Store the generated subtask attribute list in memory or a database as input data for the ant colony algorithm for subsequent task scheduling optimization. Build a digital employee multi-task scheduling graph model, create task nodes, traverse the initial task set, and for each subtask, create a corresponding task node T i The attributes of a task node include task identifier, computing resource requirement vector, complexity quantitative value, and estimated execution time. The created task nodes are organized into a list or array in the order of their identifiers, which is recorded as the task node list T.

[0051] Create an employee node. According to the currently available list of digital employees, create a corresponding employee node S for each digital employee. j The attributes of employee nodes include employee identifiers, computing power, memory capacity, network bandwidth and other performance parameters. The created employee nodes are organized into a list or array in the order of their identifiers, recorded as the employee node list S. The comprehensive performance parameters of the employee nodes are calculated. For each employee node S j , extracting the computational capability C from its attributesj 、Memory capacity M j and network bandwidth B j . According to the preset weight coefficients λ1, λ2, λ3, the employee node S is calculated j Comprehensive performance parameters P j The calculation formula is: j =λ1×C j +λ2×M j +λ3×B j , where λ1+λ2+λ3=1. The calculated comprehensive performance parameter P j Add to employee node S j in the properties.

[0052] Calculate the efficiency estimate of the task-employee edge for each task node T_i in the task node list T and each employee node S in the employee node list S j , calculate the efficiency estimate w(E ij ). Extract the complexity quantitative value D from the attributes of the task node T_i i , from employee node S j Extract the comprehensive performance parameter P from the attributes j . According to the preset balance factors α and β, the efficiency estimate w(E ij ). The calculation formula is:

[0053] Where α+β=1. The calculated efficiency estimate w(E ij ) as task node T i and employee node S j There is a directed edge E between ij The weight of .

[0054] Calculate the estimated switching cost of the employee-employee edge, for each pair of employee nodes S in the employee node list S j and S k , calculate the estimated switching cost w(F jk ). Find out the nodes S that are related to the employees respectively. j and S k All connected task nodes, denoted as T j and T k . Computational task set T j and T k The average correlation R(T j ,T k ), similarity metrics between task attributes can be used, such as cosine similarity, Jaccard similarity, etc. According to the preset cost coefficient γ, the switching cost estimate w(F jk ). The calculation formula is: w(F jk)=γ(1-R(T j ,T k )), where 0≤R(T j ,T k )≤1. The calculated switching cost estimate w(F jk ) as employee node S j and S k There is a directed edge F between jk The weight of .

[0055] Construct a multi-task scheduling graph model and create an empty directed graph G, where the node set is the union of the task node list T and the employee node list S. For each task node T i and employee node S j , if there is a directed edge E ij , then add it to the graph G, and the weight of the edge is the efficiency estimate w(E ij ). For each pair of employee nodes S j and S k , if there is a directed edge F jk , then add it to the graph G, and the weight of the edge is the switching cost estimate w(F jk ). The constructed multi-task scheduling graph model G is stored in the memory or database for subsequent task scheduling optimization.

[0056] Figure 4 This is an exemplary flowchart for obtaining an initial scheduling scheme according to some embodiments of the present application. The parameters of the ant colony algorithm are initialized. According to the scale and complexity of the problem, the number of ants m is set, which is usually 1-2 times the number of task nodes. The pheromone importance factor α is set, and the value range is (0, 1]. The larger the value, the greater the impact of the pheromone. The path length importance factor β is set, and the value range is (0, 1]. The larger the value, the greater the impact of the path length. The pheromone evaporation coefficient ρ is set, and the value range is (0, 1). The larger the value, the faster the pheromone decays. The maximum number of iterations n is set, which is determined according to the convergence speed of the problem, and is usually 100-500. Initialize the ant position, and randomly generate m integers in the range of [1, n], which represent the initial task node numbers of the m ants. Place each ant on the task node with the corresponding number to complete the initial distribution of the ants.

[0057] Construct a single ant's solution, initialize the empty path path and the unvisited task node set unvisited. Add the current node to path and delete it from unvisited. Repeat the following steps until unvisited is empty: Calculate the state transition probability p(i,j) based on the pheromone concentration τ(i,j) and heuristic factor η(i,j) between the current node i and the unvisited node j, as follows: Use the roulette wheel strategy to select the next visited node next, add it to path, and delete it from unvisited. Use next as the new current node and repeat the above process. Output the complete path of the ant.

[0058] Generate and evaluate the scheduling plan. For each ant k (k = 1, 2, ..., m): the complete path L formed by ant k traversing all task nodes k In the example above, we extract the task nodes T in turn. i and employee node S j :Initialize the air conditioning scheme A k . Traverse the path L k Each task node T in i : Check T i Next node after: If the next node is employee node S j , then the matching result (T i ,S j )Add scheduling plan A k If the next node is still a task node, continue to check the next node until you encounter an employee node. k Add ant_schedules to the ant scheduling list.

[0059] For each schedule A in the ant schedule list ant_schedules k :Initialize the employee load list load, the length is the total number of employee nodes m, and the initial value is 0. k Each matching result (T i ,S j ): Read task T from the task complexity list task_complexity i The complexity of C i . i Accumulated to load[j], indicating that employee S j Read all task complexities from the task complexity list task_complexity and calculate the average Initialize the mean square error sq diff = 0. For each employee node S j (j=1, 2, ..., m): Initialize the total load of S_j For each matching result (T i ,S j ): Read task T from the task complexity list task_complexity i The complexity of C i . i Add to Calculate the square of (sum_load_j-avg_C) and add it to sq diff Computing Load Balancing Read the execution efficiency weight w1 and load balancing weight w2 from the weight coefficient list weights. Calculate the comprehensive benefit estimate Obj of the scheduling scheme A_k k =w1×Eff k +w2×Bal k . k Write the scheduling scheme comprehensive benefit valuation list objs. Find the maximum value max from the scheduling scheme comprehensive benefit valuation list objs. obj , and take the corresponding scheduling scheme as the best solution of the current iteration, and write it into the iterative best solution list iter_best_solutions.

[0060] Update pheromone and read the best solution of the current iteration from the iterative best solution list iter_best_solutions. For each task-employee matching (T i ,S j ):Calculate pheromone increment Where Q is a constant, Obj best is the comprehensive benefit estimate of best. Read the edge (T i ,S j )The current pheromone concentration τ(T i ,S j ). Update edge (T i ,S j )Pheromone concentration:

[0061] τ'(T i ,S j )=(1-ρ)×τ(T i ,S j )+Δτ(T i ,S j ), where ρ is the pheromone evaporation coefficient. The updated pheromone concentration τ(T i ,S j ) is written back to the task-employee adjacency matrix. For the edge on the non-optimal solution path in the task-employee adjacency matrix (T i ,S j ): Read edges from the task-employee adjacency matrix (T i ,S j )The current pheromone concentration τ(T i ,S j ). Update the edge (T according to the pheromone evaporation coefficient ρ i ,S j) of pheromone concentration: τ*(T i ,S j )=(1-ρ)×τ(T i ,S j ). The updated pheromone concentration τ(T i ,S j ) Write back the task-employee adjacency matrix. Repeat until one of the following termination conditions is met: the preset maximum number of iterations n is reached. The optimal comprehensive benefit estimate Obj for multiple consecutive iterations best The change is less than the preset threshold.

[0062] Output the optimal scheduling solution, find the scheduling solution with the largest comprehensive benefit valuation Obj from the iterative optimal solution list iter_best_solutions, and use it as the optimal scheduling solution best_solution. Initialize the employee task queue list worker_queues, with a length equal to the total number of employee nodes m, and each element is an empty list. For each task-employee match (T i ,S j ): Set task T i Append to worker_queues[j], indicating employee S j For each employee task queue in worker_queues: sort the tasks in the order in the best_solution path. Output worker_queues as the task execution queue for each digital employee under the optimal scheduling solution.

[0063] The initial scheduling plan is passed to the task management module, which issues the corresponding subtasks and execution plans to each digital employee, triggering the digital employee to execute the task. In the process of executing the subtask, the digital employee collects real-time monitoring data such as its own CPU, memory, and network bandwidth, and feeds it back to the task execution monitoring module. Data collection and preprocessing: Deploy a monitoring agent for each digital employee to collect real-time resource usage data during the employee's subtask execution, including CPU usage, memory usage, and network bandwidth usage. Clean and preprocess the collected monitoring data, remove outliers and missing values, and normalize the data to the [0, 1] interval. Arrange the preprocessed monitoring data in chronological order to form time series data that reflects the dynamic changes in digital employee resource usage. Time series data division: Set a fixed time window size, such as 30 minutes, and divide the time series data according to the time window. Each time window contains a subsequence of monitoring data within a period of time, forming the input data set of the LSTM neural network model. For each time window, extract the corresponding time series data of CPU usage, memory usage, and network bandwidth usage to form a three-dimensional input sequence.

[0064] LSTM model input and training: randomly divide the divided time window data set into training set, validation set and test set. Use the training set data to fine-tune the pre-trained LSTM model to adapt to the current task execution scenario. The input of the LSTM model is the three-dimensional time series data of each time window, which is mapped into a dense vector representation through the embedding layer. The output of the embedding layer is passed to one or more LSTM layers in turn to extract the time series features of the input sequence. At the last time step, the output of the LSTM layer is mapped to the predicted value of the digital employee resource occupancy in the future through the fully connected layer. Use the validation set data to evaluate the model performance and adjust the model hyperparameters such as the number of LSTM layers and the number of hidden units as needed. Model prediction and result output: use the trained LSTM model to predict the test set data and evaluate the performance of the model in practical applications. For each input time window data, the LSTM model outputs the corresponding predicted value of the digital employee resource occupancy in the future. Arrange the prediction results in chronological order to generate a prediction sequence of the digital employee resource occupancy trend. Pass the prediction sequence to the dynamic scheduling optimization module as the input of the optimization algorithm to guide subsequent task scheduling decisions.

[0065] The dynamic scheduling optimization module outputs the optimal scheduling decision for the current scheduling cycle, generates an adjusted task allocation plan, and sends it to the corresponding digital employees through the task management module to guide the digital employees to dynamically adjust the execution of subtasks. At the same time, the scheduling decision of the subsequent scheduling cycle is used as a prediction reference to guide subsequent scheduling. Digital employees execute the subsequent part of the subtask according to the updated task allocation plan. The predicted value of the digital employee resource occupancy in the future period output by the LSTM neural network model and the obtained employee performance parameters are used as the input of the MPC algorithm. The initial task set is used as the list of tasks to be scheduled. The task scheduling problem is converted into an optimization control problem of the MPC algorithm, and each scheduling cycle is used as a control step. The optimization goal and constraint conditions are set. In each control step, the optimization goal of the MPC algorithm is set to maximize the weighted combination of the task execution efficiency and load balancing of the scheduling plan in the future period. The optimization objective function is set as: Among them, t represents the future prediction step, k represents the kth scheduling scheme, and Eff k (t) and Bal k (t) represent the task execution efficiency and load balancing of the scheduling scheme k at time t in the future, respectively, and w1 and w2 are balancing factors.

[0066] The constraints are set as: Among them, A k(t) represents the scheduling plan k at time t in the future, C max 、M max and B max denote the upper limits of the CPU, memory, and network bandwidth capacity of digital employees, respectively. D denotes the set of task dependencies. T i <T l Represents task T i Must precede T l Execute. Taking the resource capacity and task dependencies of digital employees as constraints, solve the optimal scheduling decision sequence from the current step to several future steps. Represent the scheduling decision variable as a binary integer variable, such as x ijk Indicates that task j is assigned to employee k at time i. Convert the optimization objective function into a linear function, such as maximizing where eff jk represents the execution efficiency of task j assigned to employee k. The constraints are converted into linear inequalities or equations, such as, indicating that the CPU usage of employee k at time i does not exceed the upper limit C max . Use a MIP solver, such as Gurobi, CPLEX, etc., to solve the converted mixed integer programming problem and obtain the optimal scheduling decision sequence. By solving the optimization control problem, the optimal scheduling decision sequence from the current step to several future steps is obtained, which is recorded as {A(t)|t=1,2,……,T}.

[0067] The first decision A(1) in the optimal scheduling decision sequence {A(t)} is output as the task allocation plan for the current scheduling cycle and sent to the digital employee for execution. The remaining decisions A(2) to A(T) in the optimal scheduling decision sequence {A(t)} are temporarily stored as a prediction reference for subsequent scheduling cycles and are not sent for execution. When the next scheduling cycle arrives, the actual scheduling execution results of the previous cycle are repeated and fed back to the MPC algorithm. The MPC algorithm re-solves the optimization control problem based on the updated digital employee resource occupancy prediction value, employee performance parameters, and newly added tasks to be scheduled, and generates a new optimal scheduling decision sequence.

[0068] Finally, during the iterative execution of multiple scheduling cycles, the digital employees continuously feed back the task execution monitoring data, and the dynamic scheduling optimization module continuously optimizes and adjusts the scheduling decision based on the real-time monitoring data and prediction results, forming a closed-loop feedback between the scheduling decision and the actual execution, and realizing dynamic adaptive optimization of scheduling. Based on the optimal scheduling strategy, the task allocation plan of each digital employee in the future period is adjusted, and the adjusted task allocation plan is sent to the corresponding digital employee; the digital employee executes the subsequent part of the subtask according to the adjusted task allocation plan, including: according to the optimal scheduling decision sequence {A(t)|t=1, 2, ......, T} from the current scheduling cycle to several future cycles obtained by the model predictive control algorithm, the first decision A(1) in the decision sequence is extracted as the optimal task allocation plan for this scheduling cycle, denoted as A*; the optimal task allocation plan A* is compared with the actual task allocation plan A0 of the previous scheduling cycle, and the difference part ΔA between the two plans is identified. The difference part includes: the newly added task allocation (T i ,S j ), indicating that employee S j To perform a new task T i ; The revoked task assignment in scheme A* (T i ,S j ), indicating that the reason is that employee S j Tasks performed T i The assignment is cancelled; the employee's execution task in scheme A* changes from (T_i, S_j) to (T_i, S_k), indicating that the original employee S j Tasks performed T i Employee S k Execute; according to the differences in task allocation, generate the adjusted task allocation plan A' according to the following rules: For the newly added task allocation (T i ,S j ), add the corresponding task assignment in plan A' and assign it to employee S j Send Task T i The execution instructions and parameters trigger employee S j Start executing task T i ; For the revoked task assignment (T i ,S j ), remove the corresponding task assignment in plan A' and assign it to employee S j Send Task T i The cancellation instruction triggers employee S j Cancel the execution of task T i , and release related resources; for the task allocation of employees to perform changes (T i ,S j )→(T i ,Sk ), update the corresponding task assignment in plan A' and send it to employee S j Send Task T i The cancellation instruction triggers employee S j Cancel the execution of task T i ; At the same time, send task T to employee S_k i The execution instructions and parameters trigger employee S k Start executing task T i ; For the task allocation (T i ,S j ), keep the corresponding task assignment in plan A', employee S j Continue to execute task T i , no adjustment is made; the adjusted task allocation plan A' is used as the latest task allocation plan for digital employees and is issued to each digital employee. The digital employee performs the following operations according to the task allocation related to himself in plan A': For the task allocation to employee S in plan A' j New tasks T i , employee S j According to the received task execution instructions and parameters, start executing task T i ; For scenario A', cancel the allocation to employee S j According to the received task cancellation instruction, employee S_j stops executing task T i , and release task T i c) For the task T that performs employee changes in solution A' i , former executive employee S j According to the task cancellation instruction, the task Ti is stopped and the newly assigned execution employee S k Start executing task T according to the task execution instruction i ; For the task T in scheme A', the allocation result remains the same as the previous cycle i , Executive Staff S j Continue to execute task T i , no adjustment is made; each digital employee performs the corresponding subtask adjustment according to the adjusted task allocation plan A' and completes the subsequent execution of the subtask.

Claims

1. A multi-task collaborative processing method based on digital employees, comprising: Receive tasks submitted by users, decompose the tasks into multiple subtasks, generate an initial task set, and the subtasks are performed by digital employees; According to the initial task set, evaluate the computing resource requirements of each subtask; determine the estimated execution time of each subtask according to the preset mapping relationship between task complexity and execution time; obtain the performance parameters of each current digital employee; based on the computing resource requirements, estimated execution time and performance parameters, use the ant colony algorithm to generate the initial scheduling information of the digital employees; The initial scheduling information contains the task allocation scheme of each digital employee at different times; Send the corresponding task allocation plan to each digital employee, triggering each digital employee to perform the corresponding subtask according to the task allocation plan; When digital employees are executing subtasks, the progress of each subtask is tracked to obtain monitoring data of digital employees; the monitoring data includes CPU usage, memory usage, and network bandwidth usage; Input monitoring data into the pre-trained long short-term memory neural network to predict the task execution status and resource usage trend in the future; based on the prediction results, use the model predictive control algorithm to solve the optimal scheduling strategy in the future; Based on the optimal scheduling strategy, adjust the task allocation plan for each digital employee in the future, and send the adjusted task allocation plan to the corresponding digital employee; The digital employee performs the subsequent parts of the subtask according to the adjusted task allocation plan.

2. The multi-task collaborative processing method based on digital employees according to claim 1, characterized in that: The ant colony algorithm is used to generate the initial scheduling information of digital employees, including: For each subtask in the initial task set, the corresponding computing resource requirement vector is obtained from the preset task complexity knowledge base according to the task type label; the computing resource requirement vector includes CPU requirement, memory requirement and network bandwidth requirement; Input the computational demand vector of the subtask into the pre-built task complexity and execution time mapping model to obtain the estimated execution time of the corresponding subtask; wherein the task complexity and execution time mapping model is obtained by machine learning training on the execution data of historical figures; Obtain the performance parameters of each current digital employee, which include the computing power, memory capacity, and network bandwidth of the digital employee. The computing power of the digital employee is calculated based on the CPU model and the number of cores, and the memory capacity and network bandwidth of the digital employee are obtained based on the hardware configuration. The computing resource requirements, estimated execution time and performance parameters of digital workers of subtasks are taken as input, and the ant colony algorithm is used to assign executors and execution time to each subtask in the initial task set, and the output result is used as the initial scheduling information of digital workers.

3. The multi-task collaborative processing method based on digital employees according to claim 2, characterized in that: The task complexity and execution time relationship mapping model is obtained by machine learning training on historical figures' execution data, including: The computing resource requirement vector and actual execution time of each historical task are extracted from the historical task execution records to form a training data set; the actual execution time is the execution time of the historical task; The computing resource requirement vector in the training data set is used as the input feature and the actual execution time is used as the target value to train the support vector regression algorithm model and obtain the task complexity evaluation model. Taking the computing resource demand vector in the training data set as the input feature and the actual execution time as the target value, the long short-term memory neural network model is trained to obtain the execution time prediction model; The task complexity evaluation model and the execution time prediction model are combined to construct a mapping relationship model between task complexity and execution time. The combination refers to using the output complexity quantitative value of the task complexity evaluation model as the input of the execution time prediction model, and the two models are cascaded to form a complexity-execution time mapping relationship.

4. The multi-task collaborative processing method based on digital employees according to claim 3 is characterized by: The task complexity evaluation model and the execution time prediction model are combined to construct a mapping relationship model between task complexity and execution time, including: Using the computing resource requirement vector in the training dataset as input, and using the trained task complexity evaluation model, predict the quantitative complexity value of each historical task; Using the computing resource requirement vector in the training data set as input, and using the trained execution time prediction model, predict the execution time prediction value of each historical task; The quantitative complexity value and execution time prediction value of each historical task are used to form a training data set, and a polynomial regression algorithm is used to train the mapping relationship sub-model between the quantitative complexity value and the execution time prediction value; For a given subtask, first input the corresponding computing resource requirement vector into the task complexity evaluation model to obtain the corresponding complexity quantitative value; then input the complexity quantitative value of the subtask into the mapping relationship submodel to obtain the estimated execution time of the corresponding subtask; The task complexity evaluation model, the execution time prediction model and the mapping relationship sub-model are cascaded to form a mapping relationship model between task complexity and execution time.

5. The multi-task collaborative processing method based on digital employees according to claim 3 is characterized in that: Based on the computing resource requirements, estimated execution time and performance parameters of the digital worker, the ant colony algorithm is used to generate the executor and execution time of each subtask in the initial task set as the initial scheduling information of the digital worker, including: Input the computing resource requirement vector of each subtask in the initial task set into the task complexity evaluation model to obtain the complexity quantitative value of the corresponding subtask; input the complexity quantitative value into the mapping relationship model between task complexity and execution time to obtain the estimated execution time of the corresponding subtask; Obtain the computing power, memory capacity, and network bandwidth of each current digital worker; According to the quantitative values ​​of subtask complexity and estimated execution time, a multi-task scheduling graph model for digital employees is constructed; Initialize the ant colony algorithm parameters, including the number of ants m, pheromone importance factor α, path length importance factor β, pheromone evaporation coefficient ρ and number of iterations n; Randomly place m ants on n task nodes of the scheduling graph to form the initial distribution of ants; For each ant, starting from the current node, the roulette strategy is used to select the next node according to the pheromone concentration and heuristic factor between nodes until all task nodes are traversed to form a complete path; According to the path of each ant, the task nodes and employee nodes on the path are matched in pairs to form a task scheduling plan, and the comprehensive benefit valuation of the scheduling plan is calculated; Compare the scheduling plans of all ants and select the plan with the best comprehensive benefit valuation as the optimal solution for this iteration; According to the optimal solution, the pheromone concentration of each edge in the scheduling graph is updated. The update formula is: T'(r,s)←(1-ρ)T(r,s)+ΔT(r,s) Where T(r,s) represents the pheromone concentration on the edge (r,s), where r and s represent the starting and ending nodes of the edge respectively; ρ represents the pheromone evaporation coefficient, which ranges from [0 to 1]; ΔT(r,s) represents the pheromone increment newly left by the ant on the edge (r,s) in this iteration; Repeat the pheromone update steps until the maximum number of iterations is reached, or the optimal comprehensive benefit valuation changes for multiple consecutive iterations less than the threshold, and output the corresponding optimal solution as the initial scheduling plan; Extract each task node and its matching employee node in the scheduling scheme, use the matching result as the executor of the corresponding subtask, and use the order of the subtasks in the optimal path as the execution time of the executor to form the initial scheduling information of the digital employee.

6. The multi-task collaborative processing method based on digital employees according to claim 5, characterized in that: Construct a digital employee multi-task scheduling diagram model, including: Each subtask in the initial task set is a task node, denoted by T i , taking the current digital employees as employee nodes, denoted as S j ; At any task node T i and employee node S j Set a directed edge E between ij , indicating that employee S j Execute Task T i , the edge weight w(E ij ) is employee S j Execute Task T i The efficiency valuation is calculated as follows: Among them, C i Represents task T i The quantitative value of complexity, P j Indicates employee S j The comprehensive performance parameters, α and β are balance factors, satisfying α+β=1; At any employee node S j and employee node S k Set a directed edge F between jk , indicating that employee S j With employee S k The task switching overhead between them, the edge weight w(F jk ) is the estimated switching cost, and the calculation formula is: w(F jk )=γ(1-R(T j ,T k )) Among them, T j and T k Respectively represent the employee node S j and S k Connected task nodes, R(T j ,T k ) represents task T j and T k The correlation degree of , γ is the overhead coefficient; The constructed task node T i , employee node S j And the connecting edge E ij and F jk The directed graph G is used as the multi-task scheduling graph model for digital employees, which is recorded as: G = (V, E), where V = {T i} ∪ {S j}, and E = {E ij} ∪ {F jk}.

7. The multi-task collaborative processing method based on digital employees according to claim 6, characterized in that: According to the path of each ant, the task nodes and employee nodes on the path are matched in pairs to form a task scheduling plan, and the comprehensive benefit valuation of the scheduling plan is calculated, including: Get a complete path formed by each ant traversing all task nodes, denoted as L k ; For each path L k , extract all task nodes T on the corresponding path i And the first employee node S connected after each task node j , T i With S j Matching forms a task-employee scheduling result, recorded as (T i ,S j ); The path L k All task-employee matching results on (T i ,S j ) is combined into a task scheduling scheme according to the order of task nodes in the path, denoted as A k ; For each scheduling scheme A k , based on the matching results (T i ,S j ) in task node T i With employee node S j Connecting edge E ij The efficiency valuation w(E ij ), calculate the scheduling plan A k The execution efficiency Eff k , the calculation formula is: Where n is the total number of task nodes; For each scheduling scheme A k , based on the matching results (T i ,S j ) in employee node S j And the corresponding matching task node T i The complexity quantitative value C i , calculate the scheduling plan A k Load balancing Bal k , the calculation formula is: Among them, m is the total number of employee nodes, is the average complexity of all tasks; For each scheduling scheme A k , and its execution efficiency Eff k and load balancing Bal k Weighted summation to get scheduling plan A k Comprehensive benefit valuation Obj k , the calculation formula is: Obj k =w1×Eff k +w2×Bal k Among them, w1 and w2 are weight coefficients, satisfying w1+w2=1.

8. The multi-task collaborative processing method based on digital employees according to claim 7, characterized in that: The monitoring data is input into the pre-trained long short-term memory neural network to predict the task execution status and resource usage trend in the future, including: Obtain monitoring data collected during the execution of subtasks by each digital employee, including time series data of CPU usage, memory usage, and network bandwidth usage; Arrange the monitoring data in chronological order to form time series data that reflects the dynamic changes in digital employee resource usage; The time series data is divided into fixed time windows. Each time window contains a subsequence of monitoring data within a period of time, which serves as the input sequence of the LSTM neural network model. The input sequence of the LSTM neural network model is mapped into a dense vector representation through the embedding layer, the time series features of the input sequence are extracted through the LSTM layer, and the predicted value of the digital employee resource occupancy in the future period is output through the fully connected layer at the last time step; the network structure and parameters of the LSTM neural network model are obtained through pre-training.

9. The multi-task collaborative processing method based on digital employees according to claim 8, characterized in that: Based on the prediction results, the model predictive control algorithm is used to solve the optimal scheduling strategy for a period of time in the future, including: The predicted value of digital employee resource occupancy in the future period output by the LSTM neural network model and the obtained employee performance parameters are used as the input of the model predictive control MPC algorithm, and the initial task set is used as the task list to be scheduled; The task scheduling problem is converted into an optimization control problem of the MPC algorithm, with each scheduling cycle as a control step. In each control step, the MPC algorithm takes the weighted combination of maximizing the task execution efficiency and load balance of the scheduling scheme in the future as the optimization goal, and takes the resource capacity and task dependency of the digital employees as the constraints to solve the optimal scheduling decision sequence from the current step to several steps in the future; The optimization objective function is set as: Among them, t represents the future prediction step, k represents the kth scheduling scheme, and Eff k (t) and Bal k (t) represents the task execution efficiency and load balance of the scheduling scheme k at the future time t, respectively, w1 and w2 are the balance factors; The constraints are set as: Among them, A k (t) represents the scheduling plan k at time t in the future, C max 、M max and B max denote the upper limits of the CPU, memory, and network bandwidth capacity of digital employees, respectively. D denotes the set of task dependencies. T i <T l Represents task T i Must precede T l implement; By solving the optimization control problem, the optimal scheduling decision sequence from the current step to several future steps is obtained, which is recorded as {A(t)|t=1,2,......,T}; Output the first decision A(1) in the optimal scheduling decision sequence {A(t)} as the task allocation plan for the current scheduling cycle and send it to the digital employee for execution; The remaining decisions A(2) to A(T) in the optimal scheduling decision sequence {A(t)} are temporarily stored as a prediction reference for subsequent scheduling cycles and are not issued for execution.

10. A multi-task collaborative processing system based on digital employees, characterized in that: include: At least one processing unit; used to execute instructions to implement the multi-task collaborative processing method based on digital employees as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Task processing method and device based on digital employees, equipment and storage medium

    CN116205465A

  • Digital employee scheduling method and device based on particle swarm optimization, and medium

    CN116862141A