Asynchronous task control method
By extracting the decision context and using a trained task allocation model in the asynchronous task control system, multiple task execution schemes are generated and scored, solving the problem of task allocation to non-optimal nodes and improving execution efficiency and stability.
Patent Information
- Application Number
- CN202511472217.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-10-15
AI Technical Summary
Existing asynchronous task scheduling methods rely on preset rules or simple load balancing strategies, which can lead to tasks being assigned to suboptimal nodes and affect execution efficiency.
By extracting the decision context of the asynchronous task control system and combining it with a trained task allocation model, multiple task execution plans are generated. The optimal plan is selected through a comprehensive scoring mechanism, taking into account task characteristics, work node characteristics, execution time, and success rate.
It improves the execution efficiency of asynchronous tasks, avoids execution lag and delay caused by resource mismatch and poor node status, and ensures that the solution has both speed and stability, achieving optimal configuration of resource utilization and execution rhythm.
Smart Images

Figure CN120950264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and more specifically, to an asynchronous task control method. Background Technology
[0002] With the rapid development of distributed systems and cloud computing technologies, asynchronous tasks, as a non-blocking task processing mode, have been widely applied in various complex scenarios. Early task processing often employed synchronous blocking modes, where task execution had to wait for preceding operations to complete, resulting in low efficiency and limited resource utilization. Asynchronous tasks, by decoupling task submission from result processing, allow the system to process other tasks while waiting for one task to complete, significantly improving resource throughput. Today, asynchronous tasks are widely used in e-commerce order processing, big data analysis, real-time message push, and background service scheduling, greatly reducing waiting time and supporting the stable operation of high-concurrency business scenarios.
[0003] In related technologies, the scheduling of asynchronous tasks often relies on preset rules or simple load balancing strategies, which may result in tasks being assigned to suboptimal nodes, affecting the execution efficiency of asynchronous tasks. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the execution efficiency of asynchronous tasks.
[0005] To address the above problems, this invention provides an asynchronous task control method.
[0006] In a first aspect, the present invention provides an asynchronous task control method, the asynchronous task control method comprising: Extract the current task features and current working node features based on the obtained decision context of the asynchronous task control system; Based on the current task characteristics and the current working node characteristics, a solution list is obtained through a trained task allocation model, and the solution list includes multiple task execution solutions. The total execution time of the corresponding plan is obtained based on the task execution plan; The success rate of the corresponding scheme is obtained based on the distribution of task execution results of the aforementioned task execution scheme. Based on the total execution time and success rate of the task execution plan, the corresponding plan score is determined through a comprehensive scoring mechanism. The task execution plan with the highest score among all the task execution plans is determined as the final plan.
[0007] Optionally, obtaining the total execution time of the corresponding plan based on the task execution plan includes: Obtain the historical execution records and historical working node characteristics corresponding to the tasks in the task execution plan, as well as the current working node characteristics of the tasks; Based on the historical execution records and the corresponding historical work node characteristics, the average execution time of the task is determined through a preset mean relationship; The predicted execution time of the task is determined based on the average execution time using a preset correction relationship; The predicted execution time is calibrated using the features of the current working node corresponding to the task to obtain the corresponding actual execution time; The total execution time of the plan is obtained by summing the actual execution times of all the tasks in the plan.
[0008] Optionally, determining the average execution time of the task based on the historical execution records and the corresponding historical work node characteristics through a preset mean relationship includes: The historical execution time and the time interval between each task execution history are determined based on the historical execution records, and the historical CPU utilization, historical memory utilization, and historical network latency corresponding to the task execution history are determined based on the historical worker node characteristics; the historical execution records include multiple task execution histories of the task. Based on the time interval and the preset decay relationship, the time decay factor corresponding to the task execution history is obtained; Based on the historical CPU utilization, the historical memory utilization, and the historical network latency, the node compensation coefficient corresponding to the task execution history is obtained through a preset compensation relationship; The average execution time of a task is determined by the mean relationship based on the historical execution time, the time decay factor, and the node compensation coefficient corresponding to all the task execution histories.
[0009] Optionally, the attenuation relationship satisfies: d i =exp(-α×∆c i ); The compensation relationship satisfies: e i =βf i +γg i +δh i ; The mean relationship satisfies: ; Where A is the average execution time of the task, and t i d represents the historical execution time corresponding to the i-th task execution history.i e is the time decay factor corresponding to the i-th task execution history. i Here, α is the node compensation coefficient corresponding to the i-th task execution history, n is the number of task execution histories, α is the attenuation coefficient, and ∆c is the compensation coefficient for the node. i The time interval between the execution history of the i-th task and the current time, where exp is an exponential function, β is the CPU coefficient, and f i The historical CPU utilization rate corresponding to the i-th task execution history, γ is the memory coefficient, and g i The historical memory usage rate corresponding to the i-th task execution history, δ, the historical network latency coefficient, and h i The historical network latency corresponding to the execution history of the i-th task.
[0010] Optionally, the correction relation satisfies: r = (ln(1+A)) × ε; Where r is the predicted execution time, A is the average execution time of the task, ε is the correction coefficient, and ln is the natural logarithm function.
[0011] Optionally, calibrating the predicted execution time using the features of the current working node corresponding to the task to obtain the corresponding actual execution time includes: Based on the characteristics of the current working node, determine the current CPU utilization, current memory utilization, and current network latency corresponding to the task; The current calibration coefficient is obtained by summing the products of the current CPU utilization, the current memory utilization, and the current network latency with their respective preset coefficients. The product of the current calibration coefficient and the predicted execution time is determined as the actual execution time of the task.
[0012] Optionally, obtaining the corresponding success rate of the task execution plan based on the distribution of task execution results includes: Obtain the failure interval sequence and the current execution count of the task; Based on the maximum and minimum failure interval counts in the failure interval sequence, the corresponding failure parameters are determined through a preset failure relationship; The average failure interval is obtained by summing all the failure interval counts in the failure interval sequence and dividing by the number of failures. The task success rate is determined based on the current number of executions, the failure parameters, and the average failure interval, using a preset success rate relationship. The minimum task success rate in the task execution plan is determined as the success rate of the plan.
[0013] Optionally, the failure relationship satisfies:
[0014] The success rate relationship satisfies: ; Where k is the failure parameter, p max p is the maximum number of failure intervals. min Let s be the minimum failure interval, s be the task success rate, and p be the number of failures. avg q represents the average failure interval, and q represents the current execution count.
[0015] Optionally, the step of determining the corresponding scheme score through a comprehensive scoring mechanism based on the total execution time and success rate of the task execution scheme includes: Obtain the working node characteristics of the task execution plan; Based on the working node characteristics of the aforementioned scheme, an abnormal node feature vector is obtained through a multi-dimensional abnormal waveform feature extraction algorithm. The score of the task execution plan is determined by a preset scoring relationship based on the total execution time of the plan, the success rate of the plan, and the feature vector of the abnormal node.
[0016] Optionally, the scoring relationship satisfies: ; Where Q is the score of the solution, and T is the total execution time of the solution. b Let μ be the base time, μ be the time penalty coefficient, ρ be the success reward coefficient, Y be the success rate of the proposed scheme, and ω be the anomaly penalty coefficient. Let ||||2 be the Euclidean norm, θ be the resonance reward coefficient, and Z be the resonance coefficient.
[0017] Secondly, an asynchronous task control device provided in an embodiment of the present invention includes: The extraction module is used to extract the features of the current task and the features of the current working node based on the decision context of the asynchronous task control system. The prediction module is used to obtain a list of solutions based on the current task characteristics and the current working node characteristics through a trained task allocation model. The list of solutions includes multiple task execution solutions. The first processing module is used to obtain the total execution time of the corresponding task execution plan based on the task execution plan. The second processing module is used to obtain the corresponding success rate of the task execution plan based on the distribution of the task execution results of the task execution plan. The scoring module is used to determine the corresponding scheme score based on the total execution time and success rate of the scheme corresponding to the task execution scheme through a comprehensive scoring mechanism. The comparison module is used to determine the task execution scheme with the highest score among all the task execution schemes as the final scheme.
[0018] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the asynchronous task control method as described in the first aspect when executing the computer program.
[0019] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the asynchronous task control method as described in the first aspect.
[0020] The beneficial effects of the asynchronous task control method of this invention are as follows: Based on the decision context of the asynchronous task control system, the current task characteristics and working node characteristics are extracted, providing comprehensive and realistic basic data for subsequent decisions. This avoids blind allocation due to missing information or detachment from the actual state, thereby reducing execution lag and delays that may occur due to resource mismatch or poor node status, laying the foundation for efficient execution. By generating a scheme list through a trained task allocation model, the model can quickly select multiple task-node combination schemes with higher adaptability based on its learning of historical scheduling patterns. This accurately captures the efficient and stable matching patterns of tasks and nodes, generating more efficient and potentially more efficient schemes compared to manual or simple rule allocation. This avoids inefficient combinations that consume resources and improves the overall efficiency baseline of the scheme. The total execution time of the scheme is calculated based on the key task execution path, and the success rate of the scheme is determined by combining the distribution of task execution results. Then, the scheme performance is quantified through a comprehensive scoring mechanism, accurately focusing on the core of efficiency. The critical path time directly determines the lower limit of the overall task completion. Calculating the total execution time based on this critical path allows for prioritizing solutions that can shorten the overall execution time. Furthermore, combining this with a success rate scoring logic avoids choosing high-failure-risk solutions in pursuit of speed (retrying after failure actually increases the total execution time), ensuring that the solution is both fast and stable, reducing time wasted due to retries. Finally, selecting the solution with the highest score is equivalent to further narrowing down the optimal solution among multiple potentially efficient options. This final solution is not only more advantageous in terms of total execution time (shortening the overall task execution time) but also reduces the probability of execution anomalies through reasonable task-node matching (reducing unnecessary time consumption). Ultimately, this achieves optimal configuration of asynchronous tasks in terms of resource utilization and execution rhythm, effectively improving execution efficiency. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an asynchronous task control method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an asynchronous task control device according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0022] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0023] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0024] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0025] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0026] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0027] In related technologies, in digital human interaction systems, the intelligent question-answering process often requires the execution of multiple asynchronous tasks based on user needs. However, current conventional asynchronous task scheduling lacks precise dynamic adaptation capabilities, relying heavily on preset rules or simple load balancing strategies. This approach fails to deeply integrate the characteristics of the tasks themselves, such as the differences in CPU and memory resource requirements, the execution rhythm differences between short-duration and long-cycle tasks, and the urgency differences between high-priority and ordinary tasks. Furthermore, it doesn't fully consider the real-time status of worker nodes, such as whether the node's current CPU utilization is nearing saturation, whether the available memory can support task execution, and whether the network bandwidth is sufficient to handle the data transmission needs. This "information fragmentation" scheduling method may lead to tasks being assigned to suboptimal nodes, resulting in "path mismatch." For example, assigning tasks with high network I / O requirements to nodes with congested network bandwidth can cause frequent data transmission delays, potentially extending a 10-minute task to 20 minutes. Similarly, assigning tasks with high memory requirements to nodes with insufficient memory can further prolong execution time due to frequent memory swapping. Meanwhile, when faced with tasks that have dependencies or require cross-node collaboration, the system lacks the ability to plan execution paths from a global perspective. This may prolong the completion cycle of individual tasks, causing resource waste. Nodes may also be in a "busy but inefficient" state due to running mismatched tasks, while suitable tasks may fail to occupy resources in a timely manner due to improper scheduling. In large-scale concurrent task scenarios, this may trigger a chain reaction, leading to overall execution chain disorder, with a large number of tasks accumulating on non-optimal paths, further reducing the overall task execution efficiency of the system. It may even trigger the retry mechanism due to tasks not completing for a long time, causing task backlog and resource contention, seriously affecting the execution efficiency of asynchronous tasks.
[0028] To address the problems existing in the aforementioned related technologies, embodiments of the present invention provide an asynchronous task control method.
[0029] like Figure 1 As shown in the figure, an asynchronous task control method is provided in an embodiment of the present invention, the asynchronous task control method comprising: S100: Extract the current task features and current working node features based on the decision context of the asynchronous task control system.
[0030] It should be noted that, for example, in the process of intelligent question answering for digital humans, multiple tasks proposed by users are scheduled and allocated through an asynchronous task control system to generate the task execution plan with the highest execution efficiency. For example, in an asynchronous task control system, the decision context provides a panoramic, dynamic, and comprehensive set of information for the scheduling and solution decision-making of intelligent question-answering tasks. It covers the core information of the intelligent question-answering task side, including basic task characteristics, such as the user needs to search for food videos, the compressed processing of the searched food videos, the estimated execution time, dependencies (search first, then compress), resource requirements, and historical execution trajectory (such as the execution time, success rate, and anomaly records of past search and compression tasks, which constitute the corresponding task "behavioral profile"); it also involves the core information of the working nodes (such as the hardware configuration of different nodes, the cluster they belong to, task type adaptation tags, real-time load, the current task queue, and historical anomaly feature vectors); it can also include environmental and policy constraints, such as environmental correction factors (network congestion level, remaining resource pool), scheduling policy rules (priority configuration, load balancing threshold, success rate weighting logic, and other parameters). Based on multiple tasks proposed by the user, the system comprehensively considers the real-time feature information of each working node and formulates the final solution with the highest execution efficiency. This final solution fully combines the user's requirements and the current state characteristics of the working nodes during the human-computer interaction process, and can efficiently and accurately complete multiple tasks proposed by the user.
[0031] Specifically, in the asynchronous task control system, the characteristics of the current task and the current working node are extracted through the decision context. For the characteristics of the current task, the system collects information such as task type (e.g., computational, I / O), expected execution time (calculated based on historical task execution time and related corrections), dependencies (whether it depends on other tasks to complete), and resource requirements (expected CPU, memory, etc. usage) from dimensions such as historical execution data and configuration information. The characteristics of the current working node focus on the real-time status and historical performance of the working node, such as the node's hardware configuration (number of CPU cores, memory capacity), current load (CPU utilization, memory usage), historical task execution success rate (obtained by analyzing historical execution results through Weibull distribution, etc.), and anomaly-related characteristics (based on the feature vector of anomaly nodes, covering indicators such as the number of historical anomalies and anomaly recovery time). By integrating and extracting this multi-dimensional information, basic data support is provided for subsequent task scheduling decisions and scheme evaluation.
[0032] S200: Based on the current task characteristics and the current working node characteristics, a scheme list is obtained through the trained task allocation model. The scheme list includes multiple task execution schemes.
[0033] Specifically, after acquiring the characteristics of the current task (such as task type, estimated execution time, resource requirements, dependencies, and historical execution success rate) and the characteristics of the current working node (such as node hardware configuration, real-time load, historical anomaly records, and task type adaptation tags), this feature data is input into the trained task allocation model. This model, trained on historical scheduling data, learns the matching patterns between tasks and nodes, such as which types of tasks are more efficient on nodes with specific configurations, and which nodes have a more stable success rate when handling high-load tasks. During model runtime, it combines the multi-dimensional features of tasks and nodes to generate multiple possible task execution plans. These plans differ in task allocation methods (such as which nodes to assign the task to) and execution order (for tasks with dependencies), collectively forming a plan list that provides the basis for subsequent multi-objective scoring and optimal plan selection.
[0034] For example, the training process of this task allocation model includes: First, extracting historical task scheduling records from the system log as training samples. Each sample contains task features (such as task type, resource requirements, historical execution time, etc.), corresponding worker node features (such as hardware configuration, real-time load, historical success rate, etc.), and actual result indicators of the scheduling (such as total execution time, success rate, resource utilization, etc.). Next, preprocessing the sample data includes outlier cleaning and feature standardization (such as normalizing indicators such as CPU utilization and memory usage to the range of 0 to 1). Then, selecting a suitable model structure (such as a gradient boosting-based tree model, deep learning, etc.). The model uses task and node features as inputs and a loss function constructed based on scheduling result metrics (such as minimizing total execution time and maximizing success rate as optimization objectives). Then, it trains the model using a training set, iteratively optimizing model parameters through backpropagation, while monitoring model performance using a validation set to prevent overfitting. Finally, it evaluates the model's generalization ability (such as the accuracy of predicting scheduling schemes for new tasks) using a test set. If preset metrics are met (such as the error between the predicted total execution time and the actual value being within 10%), training is complete; otherwise, feature selection or model structure needs to be adjusted and retrained to ultimately obtain a task allocation model that can stably output reasonable task allocation schemes. It should be noted that existing large-scale AI models that have been debugged can also be used as task allocation models. Based on the decision context (including current system resources, historical data, real-time metrics, and anomaly information), multiple candidate task execution schemes can be generated by analyzing task characteristics (type, size, complexity, etc.), worker node characteristics (memory usage, network I / O stability, current load, etc.), and time-series characteristics (historical success rate, execution time trend, etc.).
[0035] S300, the total execution time of the corresponding plan is obtained according to the task execution plan.
[0036] Specifically, one can first analyze the dependencies of all tasks in the solution (e.g., clarify the execution order through a task topology diagram), then for each possible task chain, accumulate the estimated execution time of each task on the chain (determined by combining task characteristics and worker node characteristics), and finally select the chain with the longest accumulated time as the critical path. Its total time is the total execution time of the solution. For example, a solution contains 3 task chains: chain 1 (T1→T3→T5) has a total time of 600s, chain 2 (T2→T4) has a total time of 450s, and chain 3 (T6) has a time of 120s. Since chain 1 is the critical task execution path, the total execution time of the solution is 600s.
[0037] S400, the success rate of the corresponding scheme is obtained based on the distribution of task execution results of the task execution scheme.
[0038] Specifically, when determining the success rate of a task execution plan by analyzing the distribution of task execution results, the core is to calculate the probability of the entire plan ultimately achieving its expected goal based on the historical execution result patterns of each task within the plan and the task dependencies. First, the distribution of task execution results can include: for each task in the plan, its historical execution result data is statistically analyzed (usually categorized as "success" and "failure," and in complex scenarios, it may include intermediate states such as "partial success"), thus obtaining the success probability of a single task (e.g., if task T1 has been executed 100 times and succeeded 92 times, its success probability is 92%). Common triggering conditions for task failure are also recorded (e.g., the failure rate of task T2 spikes when node resources are insufficient). Then, the success rates of individual tasks need to be integrated by combining the results of the dependency analysis between tasks. Because tasks in a task execution plan are not isolated, if there are sequential dependencies (e.g., task T3 can only be executed after T1 and T2 have both been successfully completed), the failure of a preceding task may directly prevent subsequent tasks from executing, causing the entire plan to fail. However, if there are parallel tasks (e.g., T4 and T5 can be executed simultaneously, and the process can proceed once either one is completed), the failure of a single parallel task may not necessarily affect the overall plan. The success rate of the plan needs to be calculated based on the historical execution result distribution of each task (single task success rate, failure conditions), and then combined and deduced according to the dependency logic between tasks (serial, parallel, branching, etc.) to finally obtain a quantitative indicator reflecting the overall probability of the plan's successful execution.
[0039] S500, based on the total execution time and success rate of the task execution plan, a comprehensive scoring mechanism is used to determine the corresponding plan score.
[0040] Specifically, when determining the score of a solution based on its total execution time and success rate, the comprehensive scoring mechanism uses multi-dimensional weighted calculations to convert time efficiency and success reliability into comparable quantitative scores. First, it is necessary to clarify the weighting of total execution time and success rate in the scoring (dynamically adjusted according to business needs; for example, time has a greater weight in scenarios with high real-time requirements, while success rate has a greater weight in scenarios with high stability requirements). For total execution time, the logic of "the shorter the time, the higher the score" is usually adopted. This can be done by comparing it with a benchmark time (such as the average time of similar historical solutions) to calculate the time efficiency score (for example, if a solution's total execution time is 80% of the benchmark time, then the time dimension score is 80 points; the specific scoring formula can include non-linear adjustments, such as imposing additional penalties on excessively long tasks). For success rate, the logic of "the higher the success rate, the higher the score" can be adopted, directly converting it into a corresponding score (e.g., a success rate of 95% corresponds to 95 points). Then, the comprehensive scoring mechanism performs a weighted sum of the time score and success rate score according to preset weights (e.g., time weight 0.4, success rate weight 0.6; if a solution scores 80 points for time and 95 points for success rate, then the comprehensive score is 80 × 0.4 + 95 × 0.6 = 89 points). Some scenarios also include additional correction items (such as task and node matching degree, the impact of abnormal nodes, etc.), ultimately obtaining a score reflecting the comprehensive performance of the solution, providing a direct basis for subsequent optimal solution selection.
[0041] S600, the task execution scheme with the highest scheme score among all the task execution schemes is determined as the final scheme.
[0042] Specifically, the scheme scores of all task execution schemes in the scheme list are sorted, and the task execution scheme with the highest score is selected as the final scheme. This ensures that the final selected task execution scheme is optimal in the current decision context (such as task characteristics, node status, environmental constraints, etc.), which satisfies the time efficiency requirements as much as possible, ensures a high success probability, and balances other influencing factors such as the matching degree between tasks and nodes, thereby providing decision support for the efficient and stable execution of asynchronous tasks.
[0043] In this embodiment, the current task features and working node features are extracted based on the decision context of the asynchronous task control system, providing comprehensive and realistic basic data for subsequent decisions. This avoids blind allocation due to missing information or detachment from the actual state, thereby reducing execution lag and delays that may occur due to resource mismatch or poor node status, laying the foundation for efficient execution. By generating a list of solutions through a trained task allocation model, the model can quickly select multiple task-node combination solutions with higher adaptability based on its learning of historical scheduling patterns. This accurately captures the efficient and stable matching patterns of tasks and nodes, generating more efficient and potentially more efficient solutions compared to manual or simple rule allocation. This avoids inefficient combinations that consume resources and improves the overall efficiency baseline of the solutions. The total execution time of the solution is calculated based on the key task execution path, and the success rate of the solution is determined by combining the distribution of task execution results. A comprehensive scoring mechanism is then used to quantify the solution performance, accurately focusing on the core of efficiency. The critical path time directly determines the lower limit of the overall task completion. Calculating the total execution time based on this critical path allows for prioritizing solutions that can shorten the overall execution time. Furthermore, combining this with a success rate scoring logic avoids choosing high-failure-risk solutions in pursuit of speed (retrying after failure actually increases the total execution time), ensuring that the solution is both fast and stable, reducing time wasted due to retries. Finally, selecting the solution with the highest score is equivalent to further narrowing down the optimal solution among multiple potentially efficient options. This final solution is not only more advantageous in terms of total execution time (shortening the overall task execution time) but also reduces the probability of execution anomalies through reasonable task-node matching (reducing unnecessary time consumption). Ultimately, this achieves optimal configuration of asynchronous tasks in terms of resource utilization and execution rhythm, effectively improving execution efficiency.
[0044] Optionally, obtaining the total execution time of the corresponding plan based on the task execution plan includes: Obtain the historical execution records and historical working node characteristics corresponding to the tasks in the task execution plan, as well as the current working node characteristics of the tasks; Based on the historical execution records and the corresponding historical work node characteristics, the average execution time of the task is determined through a preset mean relationship; The predicted execution time of the task is determined based on the average execution time using a preset correction relationship; The predicted execution time is calibrated using the features of the current working node corresponding to the task to obtain the corresponding actual execution time; The total execution time of the plan is obtained by summing the actual execution times of all the tasks in the plan.
[0045] Specifically, the historical execution records (such as execution duration and success / failure status on different nodes) and historical worker node characteristics (such as node load and hardware status at the time) for each task in the task execution plan are obtained, along with the real-time characteristics of the currently assigned node (such as current CPU utilization, memory usage, and network bandwidth). This information can be retrieved from the system's decision context. Next, based on the task's historical execution records and corresponding historical worker node characteristics, the average execution time of the task is calculated using a preset mean relationship. Based on the average execution time, the predicted execution time for the task is calculated using a correction relationship. To better reflect the actual execution patterns of the task, the predicted execution time can be further calibrated using the real-time characteristics of the current worker node to obtain the actual execution time of the task paired with the actual worker node pi. Finally, the actual execution times of all tasks in the task execution plan are summed to obtain the total execution time of the plan.
[0046] In this optional embodiment, the average execution time is determined based on the historical execution records of the task and the characteristics of the corresponding historical work nodes through a preset mean relationship, avoiding subjective estimation errors that are detached from actual data. Then, the average execution time is adjusted through a preset correction relationship to obtain the predicted execution time, which can optimize the time prediction by combining task characteristics and dynamic factors. Then, the predicted execution time is calibrated according to the characteristics of the current work node, which can eliminate the measurement deviation caused by the real-time status changes of the node. Finally, the total execution time is obtained by accumulating the actual execution times of all tasks, which provides a reliable time dimension basis for the comprehensive evaluation and optimal selection of subsequent schemes, effectively avoiding the selection of inefficient schemes due to inaccurate time calculations, thereby ensuring the efficiency and stability of asynchronous task execution.
[0047] Optionally, determining the average execution time of the task based on the historical execution records and the corresponding historical work node characteristics through a preset mean relationship includes: The historical execution time and the time interval between each task execution history are determined based on the historical execution records, and the historical CPU utilization, historical memory utilization, and historical network latency corresponding to the task execution history are determined based on the historical worker node characteristics; the historical execution records include multiple task execution histories of the task. Based on the time interval and the preset decay relationship, the time decay factor corresponding to the task execution history is obtained; Based on the historical CPU utilization, the historical memory utilization, and the historical network latency, the node compensation coefficient corresponding to the task execution history is obtained through a preset compensation relationship; The average execution time of a task is determined by the mean relationship based on the historical execution time, the time decay factor, and the node compensation coefficient corresponding to all the task execution histories.
[0048] Specifically, from the historical execution records of the task, the historical execution time (the actual duration of the execution) corresponding to each execution history of the task is extracted, as well as the time interval between that execution and the current time (reflecting the freshness of the historical data); at the same time, from the characteristics of the historical working nodes, the historical CPU utilization, historical memory utilization, and historical network latency of the node at the time of the execution are extracted (these three indicators reflect the load and performance status of the node at that time). Then, the time decay factor is calculated through a preset decay relationship. If the time interval between a certain execution history and the current time is longer (i.e., the older the data), the smaller the value of the time decay factor (because the larger the absolute value of the negative parameter in the exponential function, the closer the result is to 0), which means that the weight of that historical execution time in the subsequent mean calculation will be reduced; conversely, the time decay factor of recent data is closer to 1, and the weight is higher.
[0049] For example, the attenuation relationship satisfies: d i =exp(-α×∆c i ); Wherein, when the attenuation coefficient α = 0.1, the time interval ∆c between the i-th task execution history and the current time. i =10 (interval of 10 units of time), then the time decay factor di corresponding to the i-th task execution history is exp(-0.1×10) = exp(-1) ≈ 0.368, and when ∆c i =2 (interval of 2 units of time) di=exp(-0.1×2)≈0.819, the latter has a significantly higher weight due to data updates, avoiding the interference of outdated data (which may fail due to changes in node performance, task logic iteration, etc.) on the average time.
[0050] For example, the compensation relationship satisfies: e i =βf i +γg i +δh i ; Among them, f i For the historical CPU utilization rate corresponding to the i-th task execution history, g i h represents the historical memory usage rate corresponding to the i-th task execution history. iThe historical network latency (typically normalized to the range of 0 to 1) corresponds to the execution history of the i-th task, γ is the memory coefficient, β is the CPU coefficient, and δ is the historical network latency coefficient (set according to the resource sensitivity of the task; for example, the δ value is higher for IO-intensive tasks). The node compensation coefficient e corresponding to the execution history of the i-th task. i Its purpose is to quantify the impact of node status on execution time: if the node CPU utilization f during a certain execution... i High network latency h i (large), then e i A larger value indicates that the execution was affected by node load, and the execution time may be longer (this needs to be considered in conjunction with subsequent average calculation logic). This can be addressed later via e. i For t i Perform state adjustments. For example, for a computationally intensive task with β=0.6, γ=0.3, and δ=0.1, the state f of a certain execution... i =0.8, g i =0.5, h i =0.2, and substituting the above value into the formula for the compensation relationship, the node compensation coefficient is calculated to be 0.65.
[0051] For example, the mean relationship satisfies: ; Where A is the average execution time of the task, and t i d represents the historical execution time corresponding to the i-th task execution history. i e is the time decay factor corresponding to the i-th task execution history. i The compensation coefficient for the node corresponding to the i-th task execution history. The average execution time A is the sum of the execution times t for each historical execution. i After performing dynamic weighted summation and averaging: For each t... i Multiply by its corresponding time decay factor d i (The impact of correcting for old and new data) and node compensation coefficient e i (The effect of correcting node states), then sum all the products, and finally divide by the total decay factor d. iThe sum of these values. For example, a task has n=2 execution histories: the first execution t1=100s, d1=0.819 (short interval), e1=0.65 (moderate node load); the second execution t2=120s, d2=0.368 (long interval), e2=0.9 (high node load). Substituting these values into the formula for the mean, the average execution time A is approximately 77.16s (this is just an example; actual calculations should be based on the specific historical execution data of the task). By calculating the average execution time of the task, the excessive influence of outdated data is eliminated, and the deviation in historical execution time caused by abnormal node states is corrected. The final average execution time is closer to the actual average time of the task, providing a reliable benchmark for subsequent execution time prediction.
[0052] For example, the modified relation satisfies: r = (ln(1+A)) × ε; Where r is the predicted execution time, A is the average execution time of the task, ln is the natural logarithm function, and ε is the correction coefficient. The correction coefficient ε provides a flexible scenario adaptation space for the predicted execution time. In practice, task execution may be affected by different scenario factors (such as task priority adjustments, changes in the overall system load strategy, etc.). ε can be dynamically set according to these actual scenarios (for example, when the system needs to prioritize controlling time consumption and requires a more conservative prediction, ε can be set to a value slightly greater than 1; when a rapid estimation of basic time consumption is required, it can be set to a baseline value close to 1). By manually or automatically adjusting ε, the predicted execution time can break free from the limitations of simply relying on historical data and better adapt to current actual needs.
[0053] Optionally, calibrating the predicted execution time using the features of the current working node corresponding to the task to obtain the corresponding actual execution time includes: Based on the characteristics of the current working node, determine the current CPU utilization, current memory utilization, and current network latency corresponding to the task; The current calibration coefficient is obtained by summing the products of the current CPU utilization, the current memory utilization, and the current network latency with their respective preset coefficients. The product of the current calibration coefficient and the predicted execution time is determined as the actual execution time of the task.
[0054] In this optional embodiment, real-time metrics directly related to task execution time are extracted from the characteristics of the current working node, namely, the current CPU utilization (reflecting the real-time load of the node's CPU), the current memory utilization (reflecting the node's memory usage), and the current network latency (characterizing the real-time efficiency of the node's network data transmission). These metrics can intuitively reflect the current busyness of the node. For example, a higher CPU utilization indicates that the node's processor is processing more tasks, and new tasks may take longer due to resource contention; a higher network latency means that data transmission time will be longer for I / O-intensive tasks. The current calibration coefficient is then calculated based on these three real-time metrics: first, a corresponding preset coefficient is set for each metric (the coefficient size is determined by the task's sensitivity to resources; for example, computationally intensive tasks are more dependent on the CPU, so their corresponding preset coefficient can be set to a larger value, such as 0.6; while I / O-intensive tasks require a higher preset coefficient for network latency, such as 0.5); then, the current CPU utilization, current memory utilization, and current network latency are multiplied by their respective preset coefficients, and finally, the three products are summed to obtain the current calibration coefficient. For example, for a computationally intensive task, the preset CPU coefficient β' = 0.6, the preset memory coefficient γ' = 0.2, and the preset network latency coefficient δ' = 0.2; if the current node's CPU utilization is 80% (i.e., 0.8), memory utilization is 60% (i.e., 0.6), and network latency is 0.3, then the current calibration coefficient is 0.8 × 0.6 + 0.6 × 0.2 + 0.3 × 0.2 = 0.48 + 0.12 + 0.06 = 0.66. The calibration coefficient quantifies the degree to which the node's current state affects task time. The larger the coefficient, the more significant the adverse effect (or beneficial effect, depending on the coefficient design logic; generally, higher load means a larger coefficient, and the corresponding time needs to be adjusted upwards). Finally, the current calibration coefficient is multiplied by the predicted execution time to obtain the actual execution time of the task. By using the quantification coefficient of the node's real-time status, the predicted execution time is adjusted from a theoretical value based on history to the actual time consumption that matches the current node's actual load, avoiding time measurement deviations caused by changes in node status (such as from low load to high load). By extracting real-time resource indicators of the node, quantifying the impact of status, and correcting the predicted time, the final actual execution time can accurately reflect the task's true time consumption potential on the current node. This provides more reliable single-task time consumption data for the subsequent calculation of the total execution time of the solution, and also makes the solution evaluation more in line with the actual execution scenario.
[0055] Optionally, obtaining the corresponding success rate of the task execution plan based on the distribution of task execution results includes: Obtain the failure interval sequence and the current execution count of the task; Based on the maximum and minimum failure interval counts in the failure interval sequence, the corresponding failure parameters are determined through a preset failure relationship; The average failure interval is obtained by summing all the failure interval counts in the failure interval sequence and dividing by the number of failures. The task success rate is determined based on the current number of executions, the failure parameters, and the average failure interval, using a preset success rate relationship. The minimum task success rate in the task execution plan is determined as the success rate of the plan.
[0056] Optionally, the failure relationship satisfies:
[0057] The success rate relationship satisfies: ; Where k is the failure parameter, p max p is the maximum number of failure intervals. min Let s be the minimum failure interval, s be the task success rate, and p be the number of failures. avg q represents the average failure interval, and q represents the current execution count.
[0058] In this optional embodiment, the failure interval sequence and the current execution count of the task are obtained. The failure interval sequence refers to the interval between execution counts between each failure of the task. For example, if the task fails on the 3rd execution, fails again on the 8th execution, and fails again on the 15th execution, then the failure interval sequence is [5, 7] (5 executions between the 3rd and 8th executions, and 7 executions between the 8th and 15th executions). The current execution count refers to the total number of times the task has been executed up to the present (including the current execution count). This data is used to determine the probability of task failure in the current execution phase by combining historical patterns.
[0059] Furthermore, the maximum and minimum failure interval counts are extracted from the failure interval sequence. These two values reflect the fluctuation range of the task failure intervals; the greater the fluctuation, the weaker the regularity of task failures. Then, the maximum and minimum failure interval counts are substituted into a preset failure relationship formula to obtain the corresponding failure parameters. This transforms the fluctuation characteristics of the intervals into a quantitative indicator that can be used in success rate calculations. A larger failure parameter generally indicates higher uncertainty in task failure. Simultaneously, the sum of all interval counts in the failure interval sequence is divided by the "number of failures" (i.e., the number of failure intervals in the sequence). For example, in the sequence [5, 7], the sum is 12, the number of failures is 2, and the average failure interval count is 6. This value reflects the average number of executions in which a task will fail once, serving as a basic indicator for measuring task failure frequency. A larger average interval indicates a lower overall failure frequency. Finally, combining the current number of executions, failure parameters, and average failure interval count, the task success rate is determined using a preset success rate relationship. This relationship requires comprehensive consideration of three aspects: whether the current number of executions is close to the average failure interval (for example, if the average interval is 6, the success rate may be slightly lower on the 5th execution); the uncertainty brought by the failure parameters (when the failure parameters are large, the dependence on the "average interval" needs to be reduced, and the success rate should be appropriately lowered); and the possible historical trend (such as whether the failure interval gradually increases with the number of executions). Finally, since the task execution plan depends on the successful execution of all tasks (or the success of critical tasks), the overall reliability of the plan is affected by the weakest link. Therefore, the minimum task success rate in the plan is taken as the plan's success rate. For example, if the plan contains three tasks with success rates of 90%, 82%, and 88% respectively, then the plan's success rate is 82%. This setting can intuitively reflect the minimum reliability of the plan's execution and provide a key basis for plan risk assessment and resource adjustment (such as prioritizing the optimization of low-success-rate tasks). Starting from the historical failure patterns of tasks, by quantifying the interval characteristics and combining them with the current execution status, the success rate of a single task is gradually derived. Finally, the reliability of the plan is anchored by the minimum success rate. This reflects the accurate use of historical data and takes into account the uncertainty in execution, providing scientific support for the risk prediction and optimization of task execution plans.
[0060] Optionally, the step of determining the corresponding scheme score through a comprehensive scoring mechanism based on the total execution time and success rate of the task execution scheme includes: Obtain the working node characteristics of the task execution plan; Based on the working node characteristics of the aforementioned scheme, an abnormal node feature vector is obtained through a multi-dimensional abnormal waveform feature extraction algorithm. The score of the task execution plan is determined by a preset scoring relationship based on the total execution time of the plan, the success rate of the plan, and the feature vector of the abnormal node.
[0061] Optionally, the scoring relationship satisfies: ; Where Q is the score of the solution, and T is the total execution time of the solution. b Let μ be the base time, μ be the time penalty coefficient, ρ be the success reward coefficient, Y be the success rate of the proposed scheme, and ω be the anomaly penalty coefficient. Let ||||2 be the Euclidean norm, θ be the resonance reward coefficient, and Z be the resonance coefficient.
[0062] In this optional embodiment, feature data of all working nodes involved in the task execution plan are obtained, i.e., the plan's working node features. These features include the nodes' static attributes (such as hardware configuration and cluster affiliation) and dynamic states (such as real-time CPU utilization, memory usage fluctuations, network latency changes, and historical failure frequency), which together constitute the basic information for evaluating the node's operating status. Next, a multi-dimensional abnormal waveform feature extraction algorithm is used to perform in-depth analysis of these node features, generating an abnormal node feature vector. This algorithm captures abnormal patterns of nodes from multiple dimensions such as time, space, and frequency: for example, by analyzing the waveform changes of CPU utilization, it identifies abnormal waveforms such as sudden spikes and continuous high-load oscillations; by analyzing the trend of memory usage, it captures hidden anomalies such as leakage-type growth; and by combining the collaborative states between nodes, it identifies related anomalies such as chain fluctuations caused by single-point anomalies. These abnormal features are quantified into specific values in the vector (such as anomaly duration, fluctuation amplitude, and impact range), forming a multi-dimensional anomaly risk indicator. The larger the magnitude of the vector, the higher the overall anomaly risk of the nodes in the plan.
[0063] For example, the 5-dimensional anomaly node feature vector obtained by the multi-dimensional anomaly waveform feature extraction algorithm specifically includes the following: low-frequency energy, extracted from the 0 to 10 frequency bands after 3-level decomposition of the db4 wavelet, reflecting the low-frequency trend characteristics of the anomaly rate sequence; mid-frequency energy, corresponding to the energy of the 11 to 30 frequency bands, reflecting the mid-frequency periodic characteristics of the anomaly rate sequence; high-frequency energy, corresponding to the energy of the 31 to 50 frequency bands, reflecting the high-frequency noise characteristics of the anomaly rate sequence; Hurst exponent, used to quantify the long-term correlation of the anomaly rate sequence, reflecting the persistence characteristics of the anomaly pattern; and Singular Value Decomposition (SVD) entropy, calculated through SVD after phase space reconstruction, measuring the nonlinear complexity of the anomaly rate sequence. This 5-dimensional anomaly node feature vector is used as input to the anomaly penalty term in multi-objective score calculation, quantifying the impact of node anomalies on task execution.
[0064] Finally, based on the total execution time, success rate, and feature vectors of abnormal nodes, a scheme score is calculated using a pre-defined scoring relationship. This score reflects both the core values of execution efficiency (total execution time) and reliability (success rate) and incorporates the potential impact of node anomaly risks, achieving a comprehensive quantitative evaluation of the scheme's overall performance and providing a scientific basis for subsequent selection of the optimal scheme.
[0065] like Figure 2 As shown, an asynchronous task control device 200 provided in this embodiment of the invention includes: Extraction module 210 is used to extract current task features and current working node features based on the obtained decision context of the asynchronous task control system; Prediction module 220 is used to obtain a scheme list based on the current task features and the current working node features using a trained task allocation model. The scheme list includes multiple task execution schemes. The first processing module 230 is used to obtain the total execution time of the corresponding task execution plan based on the task execution plan. The second processing module 240 is used to obtain the corresponding scheme success rate based on the task execution result distribution of the task execution scheme; The scoring module 250 is used to determine the corresponding scheme score based on the total execution time and success rate of the scheme corresponding to the task execution scheme through a comprehensive scoring mechanism. The comparison module 260 is used to determine the task execution scheme with the highest scheme score among all the task execution schemes as the final scheme.
[0066] The asynchronous task control device in this embodiment is used to implement the asynchronous task control method described above. Its advantages over the prior art are the same as the advantages of the asynchronous task control method compared to the prior art, and will not be repeated here.
[0067] like Figure 3 As shown in the figure, an electronic device 300 provided in this embodiment of the invention includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the asynchronous task control method as described above when the computer program is executed.
[0068] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed: Extract the current task features and current working node features based on the obtained decision context of the asynchronous task control system; Based on the current task characteristics and the current working node characteristics, a solution list is obtained through a trained task allocation model, and the solution list includes multiple task execution solutions. The total execution time of the corresponding plan is obtained based on the task execution plan; The success rate of the corresponding scheme is obtained based on the distribution of task execution results of the aforementioned task execution scheme. Based on the total execution time and success rate of the task execution plan, the corresponding plan score is determined through a comprehensive scoring mechanism. The task execution plan with the highest score among all the task execution plans is determined as the final plan.
[0069] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the asynchronous task control method described above.
[0070] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations: Extract the current task features and current working node features based on the obtained decision context of the asynchronous task control system; Based on the current task characteristics and the current working node characteristics, a solution list is obtained through a trained task allocation model, and the solution list includes multiple task execution solutions. The total execution time of the corresponding plan is obtained based on the task execution plan; The success rate of the corresponding scheme is obtained based on the distribution of task execution results of the aforementioned task execution scheme. Based on the total execution time and success rate of the task execution plan, the corresponding plan score is determined through a comprehensive scoring mechanism. The task execution plan with the highest score among all the task execution plans is determined as the final plan.
[0071] The present invention will now be described an electronic device 300 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0072] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0073] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0074] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. An asynchronous task control method, characterized in that, The asynchronous task control method includes: Extract the current task features and current working node features based on the obtained decision context of the asynchronous task control system; Based on the current task characteristics and the current working node characteristics, a solution list is obtained through a trained task allocation model, and the solution list includes multiple task execution solutions. The total execution time of the corresponding plan is obtained based on the task execution plan; The success rate of the corresponding scheme is obtained based on the distribution of task execution results of the aforementioned task execution scheme. Based on the total execution time and success rate of the task execution plan, the corresponding plan score is determined through a comprehensive scoring mechanism. The task execution plan with the highest score among all the task execution plans is determined as the final plan.
2. The asynchronous task control method according to claim 1, characterized in that, The step of obtaining the total execution time of the corresponding plan based on the task execution plan includes: Obtain the historical execution records and historical working node characteristics corresponding to the tasks in the task execution plan, as well as the current working node characteristics of the tasks; Based on the historical execution records and the corresponding historical work node characteristics, the average execution time of the task is determined through a preset mean relationship; The predicted execution time of the task is determined based on the average execution time using a preset correction relationship; The predicted execution time is calibrated using the features of the current working node corresponding to the task to obtain the corresponding actual execution time; The total execution time of the plan is obtained by summing the actual execution times of all the tasks in the plan.
3. The asynchronous task control method according to claim 2, characterized in that, The step of determining the average execution time of the task based on the historical execution records and the corresponding historical work node characteristics through a preset mean relationship includes: The historical execution time and the time interval between each task execution history are determined based on the historical execution records, and the historical CPU utilization, historical memory utilization, and historical network latency corresponding to the task execution history are determined based on the historical worker node characteristics; the historical execution records include multiple task execution histories of the task. Based on the time interval and the preset decay relationship, the time decay factor corresponding to the task execution history is obtained; Based on the historical CPU utilization, the historical memory utilization, and the historical network latency, the node compensation coefficient corresponding to the task execution history is obtained through a preset compensation relationship; The average execution time of a task is determined by the mean relationship based on the historical execution time, the time decay factor, and the node compensation coefficient corresponding to all the task execution histories.
4. The asynchronous task control method according to claim 3, characterized in that, The attenuation relationship satisfies: d i =exp(-α×∆c i ); The compensation relationship satisfies: e i =βf i +γg i +δh i ; The mean relationship satisfies: ; Where A is the average execution time of the task, and t i d represents the historical execution time corresponding to the i-th task execution history. i e is the time decay factor corresponding to the i-th task execution history. i Here, α is the node compensation coefficient corresponding to the i-th task execution history, n is the number of task execution histories, α is the attenuation coefficient, and ∆c is the compensation coefficient for the node. i The time interval between the execution history of the i-th task and the current time, where exp is an exponential function, β is the CPU coefficient, and f i The historical CPU utilization rate corresponding to the i-th task execution history, γ is the memory coefficient, and g i The historical memory usage rate corresponding to the i-th task execution history, δ, the historical network latency coefficient, and h i The historical network latency corresponding to the execution history of the i-th task.
5. The asynchronous task control method according to claim 2, characterized in that, The correction relation satisfies: r = (ln(1+A)) × ε; Where r is the predicted execution time, A is the average execution time of the task, ε is the correction coefficient, and ln is the natural logarithm function.
6. The asynchronous task control method according to claim 2, characterized in that, The step of calibrating the predicted execution time using the features of the current working node corresponding to the task to obtain the corresponding actual execution time includes: Based on the characteristics of the current working node, determine the current CPU utilization, current memory utilization, and current network latency corresponding to the task; The current calibration coefficient is obtained by summing the products of the current CPU utilization, the current memory utilization, and the current network latency with their respective preset coefficients. The product of the current calibration coefficient and the predicted execution time is determined as the actual execution time of the task.
7. The asynchronous task control method according to claim 1, characterized in that, The step of obtaining the corresponding success rate of the task execution plan based on the distribution of task execution results includes: Obtain the failure interval sequence and the current execution count of the task; Based on the maximum and minimum failure interval counts in the failure interval sequence, the corresponding failure parameters are determined through a preset failure relationship; The average failure interval is obtained by summing all the failure interval counts in the failure interval sequence and dividing by the number of failures. The task success rate is determined based on the current number of executions, the failure parameters, and the average failure interval, using a preset success rate relationship. The minimum task success rate in the task execution plan is determined as the success rate of the plan.
8. The asynchronous task control method according to claim 7, characterized in that, The failure relation satisfies: ; The success rate relationship satisfies: ; Where k is the failure parameter, p max p is the maximum number of failure intervals. min Let s be the minimum failure interval, s be the task success rate, and p be the number of failures. avg q represents the average failure interval, and q represents the current execution count.
9. The asynchronous task control method according to claim 1, characterized in that, The step of determining the corresponding scheme score through a comprehensive scoring mechanism based on the total execution time and success rate of the task execution scheme includes: Obtain the working node characteristics of the task execution plan; Based on the working node characteristics of the aforementioned scheme, an abnormal node feature vector is obtained through a multi-dimensional abnormal waveform feature extraction algorithm. The score of the task execution plan is determined by a preset scoring relationship based on the total execution time of the plan, the success rate of the plan, and the feature vector of the abnormal node.
10. The asynchronous task control method according to claim 9, characterized in that, The scoring relationship satisfies: ; Where Q is the score of the solution, and T is the total execution time of the solution. b Let μ be the base time, μ be the time penalty coefficient, ρ be the success reward coefficient, Y be the success rate of the proposed scheme, and ω be the anomaly penalty coefficient. Let ||||2 be the Euclidean norm, θ be the resonance reward coefficient, and Z be the resonance coefficient.
Citation Information
Patent Citations
Multi-queue and multi-cluster task scheduling method and system
CN111831415A
Job scheduling method and device, equipment and storage medium
CN115829263A
Multi-task cooperative processing method and system based on digital employees
CN119179563A
Model training method and device, electronic equipment and storage medium
CN119576536A
Intelligent large-scale task scheduling method and system based on computing power host business characteristics
CN120104276A