Task scheduling method and device and electronic equipment
By transforming the task scheduling model into a multidimensional tensor model and combining it with the quantum annealing algorithm, the global optimization problem of multi-task and multi-resource scheduling in cloud computing environments is solved, achieving optimal resource allocation and efficient task completion.
Patent Information
- Application Number
- CN202510900937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-11-25
AI Technical Summary
In heterogeneous cloud computing environments, it is difficult to achieve global optimization of multi-task and multi-resource scheduling, resulting in low resource utilization and insufficient stability.
By transforming the task scheduling model into a multidimensional tensor model and combining quantum optimization and dynamic adaptive mechanisms, quantum annealing algorithm optimization is performed to achieve globally optimal scheduling of tasks, resources, time, and energy consumption.
It improves resource utilization, ensures efficient and stable operation in complex and ever-changing environments, can flexibly respond to dynamic environmental changes, and achieves optimal resource allocation and efficient task completion.
Smart Images

Figure CN121010002A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure belongs to the field of quantum computing, and particularly relates to a task scheduling method and device and electronic equipment. BACKGROUND
[0002] In a modern cloud computing technology system, task scheduling, as a core link of resource management, its efficiency directly determines the overall service quality of the platform. With the deep popularization of cloud computing applications, task characteristics and resource forms are undergoing significant changes: on the one hand, the complexity of business scenarios has given rise to diversified task types, from traditional CPU-intensive computing to emerging GPU-accelerated deep learning tasks, different tasks present highly differentiated characteristics in resource demand, execution period and priority attributes; on the other hand, the widespread application of heterogeneous computing architectures has resulted in resource pools covering CPU, GPU, FPGA and other computing units, as well as memory, storage, network bandwidth and other supporting resources, forming a multi-dimensional resource supply system.
[0003] Traditional task scheduling mechanisms mainly rely on rule engines or heuristic strategies, and such methods can achieve fast response when dealing with small-scale task sets, but they have obvious limitations when facing large-scale distributed computing environments. Due to the lack of real-time perception and dynamic modeling capabilities of global resource states, traditional algorithms are prone to fall into local optimal solutions, leading to unbalanced resource allocation, and thus causing systematic problems such as low resource utilization, prolonged task completion time and excessive energy consumption.
[0004] In related technologies, although heuristic scheduling algorithms are simple and easy to implement, they are prone to fall into local optimal solutions when facing complex, multi-task and multi-resource cloud computing environments, making it difficult to achieve global optimization, resulting in low resource utilization and task delay.
[0005] Evolutionary algorithms such as genetic algorithms and particle swarm optimization, while improving scheduling effectiveness, have slow convergence speed and are prone to fall into local optimal solutions, making it impossible to guarantee global optimal solutions. In addition, these algorithms are very sensitive to initial conditions and parameter settings, resulting in poor stability.
[0006] Dynamic load balancing methods reduce resource overload and task delay by adjusting task allocation in real time, but due to the lack of a global perspective, they cannot achieve optimal resource configuration in complex scenarios, which may lead to insufficient resource utilization or improper scheduling. Although scheduling algorithms based on machine learning can make predictions and decisions based on historical data, they rely on a large amount of data training, and have limited adaptive ability when facing real-time dynamic changes, making it difficult to make the best decisions in rapidly changing environments.
[0007] In summary, in a heterogeneous cloud computing environment, it is difficult to achieve global optimization of multi-task and multi-resource scheduling, and the running stability is insufficient. SUMMARY
[0008] The purpose of the present disclosure is to propose a task scheduling method, device and electronic equipment, in a heterogeneous cloud computing environment, through quantum optimization and dynamic adaptive mechanism, to realize global optimization of multi-task and multi-resource scheduling, and to ensure that the system can still run efficiently and stably in a complex and variable environment.
[0009] To this end, in a first aspect, the present disclosure provides a task scheduling method, comprising the following steps: converting a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task scheduling result;
[0010] decomposing the first task scheduling result to form a second task scheduling result, the second task scheduling result being determined by at least one factor of task, resource, time and energy consumption;
[0011] quantum optimization processing the second task scheduling result to obtain a globally optimal task scheduling result;
[0012] executing task scheduling based on the globally optimal task scheduling result.
[0013] Optionally, the constraint conditions include at least one of:
[0014] a unique allocation constraint for uniquely allocating each task to a resource;
[0015] a resource load constraint for making the load of each resource not exceed its capacity;
[0016] a time and energy consumption constraint for making the allocation of tasks in time and energy consumption meet the preset requirements.
[0017] Optionally, the converting a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task scheduling result comprises:
[0018] constructing a multi-dimensional tensor according to the cost of allocating the plurality of to-be-processed tasks to the resources and the cost and energy consumption generated by allocating the tasks to the resources in the time slice to form the first task scheduling result.
[0019] Optionally, it further comprises dynamically updating the second task scheduling result through real-time monitoring and error feedback.
[0020] Optionally, the quantum optimization processing the second task scheduling result to obtain a globally optimal task scheduling result comprises:
[0021] constructing a Hamiltonian according to the factor, and obtaining a globally optimal task scheduling result based on a quantum annealing algorithm.
[0022] Optionally, the method further comprises monitoring the globally optimal task scheduling result in real time, and dynamically adjusting the parameters of the Hamiltonian for quantum optimization adaptive processing.
[0023] Optionally, the method further comprises monitoring and evaluating during the process of performing task scheduling to obtain real-time feedback.
[0024] Optionally, the monitoring and evaluating during the process of performing task scheduling to obtain real-time feedback comprises:
[0025] monitoring the task progress, resource usage, and energy consumption, and detecting abnormalities; and analyzing and feeding back the monitored data after the task execution ends.
[0026] In a second aspect, a cloud computing task scheduling apparatus is provided, comprising:
[0027] a dimension conversion module configured to convert a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task scheduling result;
[0028] a dimension decomposition module configured to decompose the first task scheduling result to form a second task scheduling result composed of a plurality of factors with weights;
[0029] a global optimization module configured to perform quantum optimization processing on the second task scheduling result to obtain a globally optimal task scheduling result;
[0030] an execution module configured to perform task scheduling based on the globally optimal task scheduling result.
[0031] In a third aspect, an electronic device is provided, comprising a memory and a processor.
[0032] The memory stores computer execution instructions.
[0033] The processor executes the computer execution instructions stored in the memory, so that the processor performs the task scheduling method.
[0034] Advantages:
[0035] (1) The present disclosure provides a task scheduling method, apparatus and electronic device, which converts a task scheduling model into a multi-dimensional tensor model to finely manage tasks and resources, thereby improving resource utilization, and performs quantum global optimization according to the multi-dimensional tensor model to achieve globally optimal scheduling in a complex environment of multiple tasks and multiple resources, and ensures the best configuration of resources and efficient completion of tasks.
[0036] (2) The present disclosure realizes real-time feedback by monitoring and evaluating the process of task scheduling, to achieve dynamic adaptive technology, real-time monitoring of task execution status and resource utilization, and dynamic adjustment of scheduling strategy according to real-time feedback, so as to flexibly cope with dynamic changes of the environment, such as resource load fluctuation or task priority adjustment, and ensure that the system is always in the optimal state.
[0037] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art without creative labor.
[0039] Figure 1 Method flowchart of a task scheduling method in the present disclosure;
[0040] Figure 2 Method flowchart of an embodiment of a task scheduling method in the present disclosure;
[0041] Figure 3 Method flowchart of a sub-step of S300 of a task scheduling method in the present disclosure;
[0042] Figure 4 Method flowchart of a sub-step of S320 of a task scheduling method in the present disclosure;
[0043] Figure 5 Method flowchart of a sub-step of S400 of a task scheduling method in the present disclosure;
[0044] Figure 6 Method flowchart of a sub-step of S420 of a task scheduling method in the present disclosure;
[0045] Figure 7 Method flowchart of a sub-step of S600 of a task scheduling method in the present disclosure;
[0046] Figure 8 Method flowchart of a sub-step of S620 of a task scheduling method in the present disclosure;
[0047] Figure 9 Method flowchart of another embodiment of a task scheduling method in the present disclosure;
[0048] Figure 10 This is a system architecture diagram of a computing requirements collection and task generation device according to the present disclosure;
[0049] Figure 11 This is a system architecture diagram of an electronic device according to the present disclosure.
[0050] In the diagram, 101-Dimensional Transformation Module, 102-Dimensional Decomposition Module, 103-Global Optimization Module, 104-Execution Module, 105-Monitoring and Analysis Module, 200-Electronic Device, 201-Processor, 202-Memory, 203-Communication Component, 204-Bus. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate. For example, without departing from the scope of this document, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.
[0053] Depending on the context, the word "if" as used here can be interpreted as "when," "when," or "in response to determination."
[0054] Furthermore, as used herein, the singular forms “a,” “one,” and “the” are intended to also include the plural forms, unless the context indicates otherwise.
[0055] It should be further understood that the terms “comprising” or “including” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups.
[0056] The terms "or" and "and / or" as used herein are to be interpreted as inclusive, or meaning any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C." An exception to this definition will occur only when a combination of elements, functions, steps or acts are in some way inherently mutually exclusive.
[0057] The prior art has the problems of difficulty in achieving global optimization of multi-task and multi-resource scheduling, low resource utilization, and insufficient stability in a cloud computing environment.
[0058] As shown in Figure 1 The present disclosure provides a task scheduling method, comprising the following steps:
[0059] The plurality of to-be-processed tasks are converted according to a plurality of constraint conditions of task scheduling to form a first task mobilization result;
[0060] The first task mobilization result is decomposed to form a second task mobilization result, and the second task mobilization result is determined by at least one of the factors of task, resource, time and energy consumption;
[0061] The second task mobilization result is subjected to quantum optimization processing to obtain a globally optimal task scheduling result;
[0062] The task scheduling is performed based on the globally optimal task scheduling result.
[0063] By converting the task scheduling model into a multi-dimensional tensor model to finely manage the tasks and resources, the resource utilization is improved, and quantum global optimization is performed according to the multi-dimensional tensor model to achieve globally optimal scheduling in a complex environment of multi-task and multi-resource, and to ensure the optimal allocation of resources and the efficient completion of tasks.
[0064] In some embodiments of the present disclosure, as shown in Figure 2 The present disclosure provides a task scheduling method, comprising the following steps:
[0065] Step S100, converting a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result;
[0066] Task scheduling is to reasonably allocate tasks to different computing resources in a multi-task parallel processing environment to maximize system efficiency and reduce costs. Specifically, for N tasks T i and M resources R j , the workload of each task T i is w i , and the capacity of the resource R j is C jA corresponding cost matrix C = {c ij} is defined as follows:
[0067] C = {c ij | i = 1, 2, …, N; j = 1, 2, …, M}
[0068] According to the cost of assigning multiple tasks to be processed to resources and the cost and energy consumption generated by the assignment of tasks to resources in time slices, a multi-dimensional tensor is constructed to form a first task mobilization result, which is used to determine the task assignment result X = {x ij} that minimizes the total cost:
[0069]
[0070] The resource constraints include at least one of the following:
[0071] A unique assignment constraint is used to uniquely assign each task to one resource; that is, at any time, a task is only assigned to one resource and cannot be assigned to multiple resources. The unique assignment constraint is represented by the following formula:
[0072]
[0073] A resource load constraint is used to ensure that the load of each resource does not exceed its capacity; the resource load constraint is used to ensure that the resources work within a reasonable range and avoid overload. The resource load constraint is represented by the following formula:
[0074]
[0075] A time and energy consumption constraint is used to ensure that the assignment of tasks in time and energy consumption meets the preset requirements. The time and energy consumption constraint ensures that the system completes the task within the specified time and maintains high efficiency in terms of energy consumption.
[0076] In order to minimize the total cost while meeting the resource constraints, a multi-dimensional tensor is constructed according to the cost of assigning tasks to resources and the cost and energy consumption generated by the assignment of tasks to resources in time slices to form a first task mobilization result. By converting the task scheduling problem into a multi-dimensional tensor, subsequent optimization calculations are facilitated.
[0077] Taking a four-order tensor T constructed based on the relationship between tasks, resources, time and energy consumption as an example, the elements T ijkl are defined as follows:
[0078] T ijkl = c ij · x ijkl
[0079] Where i is the task T i , j is the task Rj , k is a time slice, l is an energy consumption dimension, c ij is the cost of task T i allocated to resource R j , x ijkl represents the cost and energy consumption generated by task i allocated to resource j at time slice k.
[0080] The fourth-order tensor T represents all the dimensional information in task scheduling, and provides a basis for subsequent tensor decomposition and optimization.
[0081] Step S200, decompose the first task mobilization result to form a second task mobilization result;
[0082] The step S200 includes: decomposing the multi-dimensional tensor in the first task mobilization result into a second task mobilization result composed of multiple weighted factors through a decomposition algorithm; the second task mobilization result is determined by at least one factor of task, resource, time and energy consumption.
[0083] Since the calculation complexity of high-dimensional tensor is high, in order to improve the calculation efficiency, the high-dimensional tensor T is decomposed into multiple factors through tensor decomposition, each factor simplifies the complex multi-dimensional relationship into a product of a group of low-rank tensors, thereby reducing the calculation complexity and improving the solving efficiency, and the importance of each factor is controlled through the weight.
[0084] In one embodiment, the high-dimensional tensor T is decomposed into:
[0085]
[0086] Where, λ r is the decomposition weight, A ir B jr C kr D lr respectively represent the factor matrix of task, resource, time and energy consumption. Through decomposition, the complex multi-dimensional relationship is simplified into a product of a group of low-rank tensors, thereby reducing the calculation complexity and improving the solving efficiency.
[0087] Step S300, real-time monitoring and error feedback to dynamically update the second task mobilization result;
[0088] As shown in the step S300, it includes: Figure 3
[0089] Step S310, obtaining an error vector through the predicted value and the actual value of the factor matrix;
[0090] During the task execution, the system monitors the execution state of the task, the utilization of resources and the energy consumption in real time. To this end, through the error feedback mechanism, by comparing the difference between the observed actual value and the predicted value obtained by the model prediction, the result of tensor decomposition is dynamically adjusted. Define the error vector ∈(t) as:
[0091]
[0092] Where is the predicted tensor value according to the current factor matrix, T ijkl (t) is the actual measured value. The error feedback mechanism ensures that the tensor model can adaptively respond to changes in the dynamic environment, ensuring that the task scheduling remains optimal in actual operation.
[0093] Step S320, iteratively update the factor matrix according to the error vector.
[0094] In order to further optimize the effect of tensor decomposition, the factor matrix is updated.
[0095] As shown in Figure 4 , step 320 includes:
[0096] Step S321, initialize the parameters of the factor matrix and the Adam optimizer;
[0097] Where the Adam optimizer can adaptively adjust the learning rate to adapt to different gradient changes, improve the stability and convergence speed of the optimization process.
[0098] In one embodiment, the parameters of the factor matrix A ir , B jr , C kr , D lr and the Adam optimizer are initialized, including the learning rate η, the first moment estimate m0=0, the second moment estimate v0=0, the bias correction parameters β1, β2 and ∈.
[0099] Step S322, get the gradient of each factor matrix according to the error vector;
[0100] Based on the error vector, the gradient of each factor matrix is calculated.
[0101] In one embodiment, for the factor matrix A ir , the gradient calculation is:
[0102]
[0103] Where ∈(t) is the error vector, A ir is the factor matrix.
[0104] For the factor matrix B jr, C kr , D lr Similar calculations are performed.
[0105] Step S323, updating the matrix estimate according to the gradient of each factor matrix;
[0106] Wherein the matrix estimate includes a first-order moment estimate and a second-order moment estimate.
[0107] The first-order moment estimate is a momentum term, which is beneficial to smooth gradient updates and prevent the factor matrix from fluctuating too much in the gradient with large noise.
[0108]
[0109] The second-order moment estimate is a weighted average of the gradient square, which is used to adaptively adjust the learning rate, so that it decreases when the gradient changes greatly, and increases when the gradient changes little.
[0110]
[0111] Step S324, bias correction of the factor matrix according to the matrix estimate, to obtain a new estimate value;
[0112] Each time the first-order moment estimate and the second-order moment estimate are updated, bias correction is performed to obtain a more accurate estimate value:
[0113]
[0114] Wherein, m t is the momentum term at the current time, β1 is the decay rate of the first-order momentum, usually taking the value of 0.9. v t is the second-order moment estimate at the current time, β2 is the decay rate of the second-order momentum, usually taking the value of 0.999. The bias-corrected and Provide more accurate gradient information, especially in the early stages of training, which helps to stabilize the update of the factor matrix.
[0115] Step S325, updating the factor matrix according to the new estimate value;
[0116] On the basis of the corrected gradient estimate, the factor matrix is updated using the following formula:
[0117]
[0118] Wherein, η is the learning rate, ∈ is a constant, for example, 10 -8 . For other factor matrices B jr ,C kr ,D lr Similar updates are also performed.
[0119] Step S326, recalculate the factor matrix according to the updated factor matrix, and repeat the iteration until the error vector converges within the error threshold range.
[0120] After each update of the factor matrix, the tensor T is recalculated ijkl and compared with the actual observation data to verify the accuracy of the model. The specific steps are as follows:
[0121]
[0122] Calculate the new error vector and determine whether it converges within the error threshold range. If the error exceeds the error threshold range, re-execute S242 to continue adjusting the factor matrix until the error vector converges within the error threshold range.
[0123] Through the above steps, the update process of the factor matrix can adaptively respond to the dynamic changes of tasks and resources, ensuring that the results of tensor decomposition remain optimal under different load conditions.
[0124] Step S400, quantum optimization processing is performed on the second task mobilization result to obtain a globally optimal task scheduling result;
[0125] Quantum annealing is an optimization algorithm that uses quantum tunneling effects to find a globally optimal solution. Unlike traditional annealing algorithms, quantum annealing can more effectively avoid local optimal solutions and directly find a globally optimal solution when faced with complex multi-dimensional optimization problems.
[0126] In the quantum annealing algorithm, the task scheduling problem is converted into an energy state problem of a quantum system. By constructing the Hamiltonian and gradually cooling in the quantum system, the energy state of the system tends to be the lowest, thereby finding the optimal task allocation result.
[0127] By constructing the Hamiltonian of the quantum system and using the quantum annealing algorithm, the task scheduling result is dynamically optimized to ensure that the system can always find a globally optimal solution under different load conditions.
[0128] As shown in Figure 5 , step S400 includes:
[0129] Step S410, construct a Hamiltonian according to the factors, and obtain a globally optimal task scheduling result based on the quantum annealing algorithm.
[0130] The Hamiltonian H(x) is the energy function of the quantum system, and the task scheduling model is represented as a minimization problem of a total Hamiltonian. The total Hamiltonian is composed of a problem Hamiltonian H B and a driving Hamiltonian H PThe mathematical expression of which is:
[0131] H(x) = H B + λH P
[0132] Hamiltonian H B represents the complexity of the task and the state of resource allocation, and drives the Hamiltonian H P is used to guide the system to evolve from the initial state to the target optimal state step by step. By dynamically adjusting the parameter λ, the system can adaptively perform energy minimization search within the quantum state space, thereby determining the optimal task allocation result.
[0133] Hamiltonian H P is expressed as:
[0134]
[0135] where N represents the total number of tasks, M represents the total number of resources, K and L represent the discretization indexes of time slices and energy consumption dimensions respectively, T ijkl represents a four-dimensional tensor, and the elements of the four-dimensional tensor contain the cost and energy consumption generated by allocating task i to resource j at time slice k. x ijkl is a task allocation decision variable, x ijkl represents the specific operation of task i being allocated to resource j at time slice k.
[0136] By integrating multi-dimensional information, the quantum annealing algorithm provides quantitative guidance for search in the parameter space, thereby helping the system to find the task allocation result with the lowest energy, i.e. the globally optimal task scheduling result.
[0137] Step S420, real-time monitoring the globally optimal task scheduling result, and dynamically adjusting the parameter of the Hamiltonian for quantum optimization adaptive processing.
[0138] The quantum optimization adaptive processing is a processing method combining the quantum annealing algorithm with a dynamic feedback mechanism. In actual application, the task scheduling can dynamically change. By real-time monitoring the energy state of the quantum system and the task execution, the parameter λ in the driving Hamiltonian is dynamically adjusted to adapt to the changes of tasks and resources, and finally the global optimization and energy consumption control of task scheduling in the cloud computing environment are realized.
[0139] As shown in Figure 6 , step S420 includes:
[0140] Step S421, setting an initial state;
[0141] At the beginning of task scheduling, the initial driving Hamiltonian H P and the problem Hamiltonian H Nand initialize the state of the quantum system.
[0142] Step S422, evolve the quantum state;
[0143] As the task is executed, the quantum system evolves gradually under the guidance of the driving Hamiltonian. The energy state of the system will tend to the globally optimal state.
[0144] Step S423, real-time monitoring and feedback;
[0145] During the execution of the task, the energy state of the system and the effect of task execution are monitored in real time, and the actual execution result is compared with the model prediction result.
[0146] Step S424, adjust parameters;
[0147] According to the result of real-time monitoring, dynamically adjust the parameter λ to ensure that the quantum system can adapt to changes in tasks and resources, and continuously optimize the task scheduling result.
[0148] Step S425, iterative optimization:
[0149] Repeat the above steps until the energy state of the quantum system reaches the globally optimal state, and determine the best task allocation result.
[0150] Step S500, execute task scheduling based on the globally optimal task scheduling result.
[0151] After the task scheduling optimization is completed, the system enters the resource allocation and execution phase. Based on the optimized globally optimal task scheduling result, through effective resource management and scheduling execution strategy, efficient scheduling of tasks is realized. The optimized globally optimal task scheduling result can be executed through the following resource allocation formula:
[0152]
[0153] where x ijkl represents the specific operation of task i on time slice k allocated to resource j. Through this formula, the system can decompose the specific execution steps of each task into multiple subtasks and allocate them to appropriate resources.
[0154] Based on the optimized allocation matrix x ijkl tasks are allocated to specific resources. In this process, through the division of time slices and energy consumption constraints, the utilization rate of resources is ensured to be optimal, and the energy consumption is controlled within the predetermined range.
[0155] After the task is executed, the execution result is fed back to the scheduling control center. The feedback information includes the actual completion time of the task, the actual utilization of resources, and the energy consumption index. The feedback information is used to further optimize the task scheduling strategy. By collecting and analyzing the feedback data, the scheduling strategy is adjusted to adapt to different workloads and resource states.
[0156] Step S600, monitoring and evaluation are performed during the process of task scheduling, and real-time feedback is obtained.
[0157] As shown in Figure 7 , step S600 includes,
[0158] Step S610, monitoring task progress, resource usage, and energy consumption during the process of task scheduling, and detecting abnormalities;
[0159] Among them, the task progress monitoring includes: the system monitors the progress of each task in real time during the task execution process, and the progress of the task includes the start time, end time and execution time of the task. These data are used to calculate the task completion time and scheduling accuracy.
[0160]
[0161] Resource usage monitoring includes: real-time monitoring of the usage of various resources in the system, including CPU load, memory usage, storage space occupation, etc. By monitoring these data, the resource utilization can be accurately evaluated, and dynamic adjustment can be made when necessary.
[0162]
[0163] Energy consumption monitoring includes: real-time recording of energy consumption data of each task during execution. These data are used to calculate energy consumption efficiency and provide basis for subsequent energy consumption optimization.
[0164]
[0165] Abnormality detection includes: when the system has abnormal conditions, such as resource overload, task delay, etc., timely alarm is sent out, and preset emergency response mechanism is started to adjust the scheduling strategy or resource allocation to minimize the impact on system performance.
[0166] Step S620, analyzing and feeding back the data obtained by monitoring after the task execution ends;
[0167] After the task execution ends, the performance data obtained is analyzed, and the scheduling strategy is adjusted according to the analysis result.
[0168] As shown in Figure 8 , step S620 includes:
[0169] Step S621, data induction and statistics;
[0170] The real-time monitoring data is induced and counted to generate reports of various performance indicators. These reports provide basic data for subsequent performance optimization.
[0171] Step S622, bottleneck analysis;
[0172] Through analysis of performance data, bottlenecks in task execution process are identified, such as low resource utilization or high energy consumption. Improvement suggestions are made for these bottlenecks.
[0173] Step S623, scheduling strategy adjustment;
[0174] According to real-time performance data, parameters in scheduling algorithm are dynamically adjusted, such as weight parameter γ in objective function, to adapt to different task types and resource conditions.
[0175]
[0176] Among them, the weight parameter γ is a parameter for balancing task completion time and energy efficiency, which is adjusted according to the needs of specific application scenarios.
[0177] In some embodiments of the present disclosure, as shown in Figure 9 The present disclosure provides a task scheduling method, comprising:
[0178] Step A1, establishing a task scheduling model;
[0179] The optimization objective is to minimize the total task completion time (TTT), maximize the resource utilization (RU), and reduce the energy efficiency (EE). On this basis, constraint conditions are set, including: each task can only be allocated to one resource, the load of each resource cannot exceed its capacity, and the energy consumption and execution time of the task must be within the specified range.
[0180] Among them, the total task completion time TTT is:
[0181] TTT = T1 + T2 + T3
[0182] Wherein T1, T2, T3 are the completion times of single tasks.
[0183] The resource utilization RU is:
[0184]
[0185] Among them, U jactual load of the jth resource, C j upper limit of capacity of the jth resource, T max the largest task completion time or uniform time period among all resources.
[0186] Energy efficiency EE is:
[0187]
[0188] wherein W1, W2, W3 are energy consumptions of single tasks, E total total energy consumption.
[0189] Step A2, the plurality of to-be-processed tasks are multi-dimensionally converted according to a plurality of constraint conditions of task scheduling, to form a first task mobilization result; the first task mobilization result is decomposed to form a second task mobilization result composed of a plurality of factors with weights;
[0190] A four-order tensor T ijkl is constructed to represent the relationship among tasks, resources, time and energy consumption:
[0191] T ijkl = c ij ·x ijkl
[0192] In this embodiment, for example, task T1 is allocated to resource R1, the time slice is 0-2 hours, and the energy consumption E 11 = 150 kilowatt hours. Task T2 is allocated to resource R2, the time slice is 2-6 hours, and the energy consumption E 22 = 400 kilowatt hours. Task T3 is allocated to resource R3, the time slice is 6-9 hours, and the energy consumption E 31 = 400 kilowatt hours.
[0193] Step A3, the second task mobilization result is subjected to quantum optimization processing to obtain a globally optimal task scheduling result;
[0194] The quantum annealing algorithm is used to optimize the above tensor decomposition to obtain an optimal task scheduling result. The problem Hamiltonian is constructed:
[0195]
[0196] And by adjusting the parameter λ(t), the system evolves to a globally optimal state. For example, λ(0) = 0.1 initially, and λ(T) = 1 finally. For example, the result of quantum optimization is: T1 is allocated to R1, the time slice is 0-2 hours. T2 is allocated to R2, the time slice is 2-6 hours. T3 is allocated to R3, the time slice is 6-9 hours.
[0197] Step A4, performing task scheduling based on the globally optimal task scheduling result;
[0198] The system performs a globally optimal task scheduling result: task 1 is allocated to GPU node R1 in time slice 0-2 hours, task 2 is allocated to GPU node R2 in time slice 2-6 hours, and task 3 is allocated to GPU node R3 in time slice 6-9 hours.
[0199] The system schedules tasks according to the optimization result, prioritizes high-priority tasks, and can dynamically adjust the time slice.
[0200] If the energy consumption of GPU node R1 rises during the execution of task 1, the system can adjust part of the load to GPU node R2.
[0201] Step A5, monitoring and evaluation during task scheduling process, real-time feedback is obtained.
[0202] After the completion of task execution, the system performs performance evaluation, including:
[0203] Total task completion time TTT: evaluate whether the total task completion time meets the expectation.
[0204] Resource utilization rate RU: evaluate the resource utilization rate to determine whether the expected resource utilization rate is achieved.
[0205] Energy efficiency EE: evaluate the energy efficiency to calculate whether the actual energy consumption is within the expected range. The system adjusts the scheduling strategy according to the evaluation result. For example, if the resource utilization rate is lower than expected, the system may increase the task load or adjust the time slice allocation. Through adaptive learning mechanism, the system optimizes task scheduling to continuously improve performance.
[0206] In some embodiments of the present disclosure, as shown in Figure 10 The present disclosure provides a task scheduling device, comprising:
[0207] The dimension conversion module 101 is configured to perform multi-dimensional conversion on a plurality of tasks to be processed according to a plurality of constraint conditions of task scheduling, to form a first task scheduling result.
[0208] The dimension decomposition module 102 is configured to decompose the first task scheduling result to form a second task scheduling result composed of a plurality of weighted factors.
[0209] The global optimization module 103 is configured to perform quantum optimization processing on the second task scheduling result to obtain a globally optimal task scheduling result.
[0210] The execution module 104 is configured to execute task scheduling based on the globally optimal task scheduling result.
[0211] The task scheduling device further comprises a monitoring and analyzing module 105 for monitoring and evaluating during the process of task scheduling to obtain real-time feedback.
[0212] The method for using the task scheduling device is the same as the foregoing method, and thus no further description is provided herein.
[0213] In a third aspect, as shown in the accompanying drawings, Figure 11 The electronic device comprises a memory and a processor.
[0214] The memory stores computer execution instructions.
[0215] The processor executes the computer execution instructions stored in the memory, so that the processor executes the method described above.
[0216] In one embodiment, the electronic device 200 comprises at least one processor 201 and a memory 202. Optionally, the electronic device 200 further comprises a communication component 203. The processor 201, the memory 202 and the communication component 203 are connected through a bus 204.
[0217] In the process of implementation, the at least one processor 201 executes the computer execution instructions stored in the memory 202, so that the at least one processor 201 executes the method described above.
[0218] The specific implementation process of the processor 201 can refer to the method embodiments described above, which has similar implementation principles and technical effects, and thus no further description is provided herein.
[0219] In the embodiments described above, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as the execution of the hardware processor, or the execution of the combination of hardware and software modules in the processor.
[0220] The memory can contain a random access memory (RAM), and can also include a non-volatile memory (NVM), such as at least one disk memory.
[0221] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0222] It should finally be noted that the disclosure contemplates that, and the embodiments can be carried out with, other specific groupings of matter or substances not expressly listed or otherwise claimed. It is therefore seen that the scope of the disclosure is to be understood not solely by the preferred and exemplary embodiments but also by the potential alterations, modifications, and improvements of the disclosed technology and by the proper applicability of the principles of the disclosure to other uses, conditions, structures, applications, and embodiments. The scope of the disclosure is therefore both the appended claims and whatever can be made within the meaning of the claims and normal practice in the art.
Claims
1. A task scheduling method, characterized by, The method comprises the following steps: transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result; decomposing the first task mobilization result to form a second task mobilization result, the second task mobilization result being determined by at least one factor of task, resource, time and energy consumption; performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result; executing task scheduling based on the globally optimal task scheduling result.
2. The method of claim 1, wherein the constraint conditions comprise at least one of the following: a unique allocation constraint for uniquely allocating each task to a resource; a resource load constraint for limiting the load of each resource to not exceed its capacity; a time and energy consumption constraint for limiting the allocation of tasks in time and energy consumption to meet preset requirements. The step of transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result comprises the following steps:
3. The task scheduling method of claim 2, wherein, constructing a multi-dimensional tensor according to the cost of allocating the plurality of to-be-processed tasks to the resources and the cost and energy consumption generated by allocating the tasks to the resources in time slices to form the first task mobilization result. The method further comprises dynamically updating the second task mobilization result through real-time monitoring and error feedback.
4. The task scheduling method of claim 3, wherein, The step of performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result comprises the following steps:
5. The method of claim 1, wherein, constructing a Hamiltonian according to the factors and obtaining a globally optimal task scheduling result based on a quantum annealing algorithm. The method further comprises performing real-time monitoring on the globally optimal task scheduling result and dynamically adjusting the parameters of the Hamiltonian for quantum optimization adaptive processing.
6. The task scheduling method of claim 5, wherein, The method further comprises monitoring and evaluating during the execution of task scheduling to obtain real-time feedback.
7. The method of claim 1, wherein, The step of monitoring and evaluating during the execution of task scheduling to obtain real-time feedback comprises the following steps:
8. The task scheduling method of claim 7, wherein, monitoring the task progress, resource usage and energy consumption, and detecting abnormalities; and analyzing and feeding back the monitored data after the execution of the task. The method comprises the following steps:
9. A cloud computing task scheduling apparatus, characterized by comprising: a transformation module for transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result; a decomposition module for decomposing the first task mobilization result to form a second task mobilization result composed of a plurality of factors with weights; an optimization module for performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result; an execution module for executing task scheduling based on the globally optimal task scheduling result. The method comprises a memory and a processor; 10. An electronic device, comprising: the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-9. The method comprises the following steps: transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result; decomposing the first task mobilization result to form a second task mobilization result, the second task mobilization result being determined by at least one factor of task, resource, time and energy consumption; performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result; executing task scheduling based on the globally optimal task scheduling result.
2. The method of claim 1, wherein the constraint conditions comprise at least one of the following: a unique allocation constraint for uniquely allocating each task to a resource; a resource load constraint for limiting the load of each resource to not exceed its capacity; a time and energy consumption constraint for limiting the allocation of tasks in time and energy consumption to meet preset requirements. The step of transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result comprises the following steps: constructing a multi-dimensional tensor according to the cost of allocating the plurality of to-be-processed tasks to the resources and the cost and energy consumption generated by allocating the tasks to the resources in time slices to form the first task mobilization result. The method further comprises dynamically updating the second task mobilization result through real-time monitoring and error feedback. The step of performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result comprises the following steps: constructing a Hamiltonian according to the factors and obtaining a globally optimal task scheduling result based on a quantum annealing algorithm. The method further comprises performing real-time monitoring on the globally optimal task scheduling result and dynamically adjusting the parameters of the Hamiltonian for quantum optimization adaptive processing. The method further comprises monitoring and evaluating during the execution of task scheduling to obtain real-time feedback. The step of monitoring and evaluating during the execution of task scheduling to obtain real-time feedback comprises the following steps: monitoring the task progress, resource usage and energy consumption, and detecting abnormalities; and analyzing and feeding back the monitored data after the execution of the task. The method comprises the following steps: a transformation module for transforming a plurality of to-be-processed tasks according to a plurality of constraint conditions of task scheduling to form a first task mobilization result; a decomposition module for decomposing the first task mobilization result to form a second task mobilization result composed of a plurality of factors with weights; an optimization module for performing quantum optimization processing on the second task mobilization result to obtain a globally optimal task scheduling result; an execution module for executing task scheduling based on the globally optimal task scheduling result. The method comprises a memory and a processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-9.