Task scheduling method and system, electronic equipment and storage medium
By generating local and target task sorting lists in a cloud computing environment and combining historical information and task association information, the problem of subtask relationships not being considered in task scheduling in a cloud computing environment is solved, thereby improving the reliability and efficiency of task execution and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP JIANGSU
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, workflow task scheduling in cloud computing environments fails to effectively consider the relationships between subtasks, resulting in poor continuity, low efficiency, and low execution integrity during task execution.
The cloud server determines a local task sorting list, the scheduling center generates an initial task sorting list based on the local list, and generates a target task sorting list by combining historical information and task association information. Finally, the cloud server executes the tasks according to the target list.
It improves the reliability of task scheduling, reduces the probability of task conflicts, enhances the execution efficiency of cloud servers, and reduces task execution costs.
Smart Images

Figure CN121935019A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a task scheduling method, system, electronic device, and storage medium. Background Technology
[0002] As a business model, cloud computing allows users to dynamically add and release resource servers according to their needs, which results in cloud data centers handling massive workflow tasks every moment. These factors make workflow task scheduling in a cloud computing environment more complex.
[0003] Workflow task scheduling in cloud computing environments is a significant issue in the industry. Current methods allocate workflow subtasks to different resource servers to meet varying scheduling requirements. However, since a workflow comprises multiple interconnected subtasks linked by certain relationships, the scheduling process must consider these relationships. Current scheduling methods, however, do not address this issue, simply prioritizing individual tasks. This negatively impacts the overall continuity of task execution, reducing efficiency and completeness. Therefore, finding a rational method for task prioritization and scheduling is a pressing problem. Summary of the Invention
[0004] This invention provides a task scheduling method, system, electronic device, and storage medium to solve the problem that existing technologies cannot reasonably sort and schedule tasks.
[0005] According to one aspect of the present invention, a task scheduling method is provided, wherein the method is applied to a task scheduling system, the method comprising:
[0006] The cloud server determines a local task sorting list based on the tasks to be executed.
[0007] The scheduling center determines the initial task sorting list based on the sorting lists of each local task, and then determines the task association information of the tasks in the initial task sorting list.
[0008] The scheduling center determines the target task sorting list based on the initial task sorting list, historical information, and task association information.
[0009] The cloud server receives the target task sorting list and executes the tasks to be executed according to the target task sorting list.
[0010] According to another aspect of the present invention, a task scheduling system is provided, wherein the task scheduling system includes at least: a cloud server and a scheduling center;
[0011] The cloud server is used to determine a local task sorting list based on the tasks to be executed.
[0012] The scheduling center is used to determine an initial task sorting list based on each local task sorting list, and to determine the task association information of the tasks in the initial task sorting list.
[0013] The scheduling center is used to determine the target task sorting list based on the initial task sorting list, historical information, and task association information.
[0014] The cloud server is used to receive the target task sorting list and execute the tasks to be executed according to the target task sorting list.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the task scheduling method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the task scheduling method described in any embodiment of the present invention.
[0020] According to another aspect of the present invention, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the task scheduling method of any embodiment of the present invention.
[0021] The technical solution of this invention involves a cloud server determining a partial task sorting list based on the tasks to be executed, a scheduling center determining an initial task sorting list based on each partial task sorting list, and determining the task association information of the tasks in the initial task sorting list. The cloud server then receives the target task sorting list and executes tasks according to it. This approach combines the partial task sorting lists and task association information to generate the target task sorting list, improving the reliability of task scheduling. Furthermore, merging related tasks reduces the probability of task conflicts, thereby improving the execution efficiency of the cloud server and reducing task execution costs.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a task scheduling method provided in Embodiment 1 of the present invention;
[0025] Figure 2 This is a flowchart of a task scheduling method provided according to Embodiment 2 of the present invention;
[0026] Figure 3 This is a flowchart of a task scheduling method provided in Embodiment 3 of the present invention;
[0027] Figure 4 This is a schematic diagram of a task scheduling system according to Embodiment 4 of the present invention;
[0028] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the task scheduling method of this invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a task scheduling method according to Embodiment 1 of the present invention. This embodiment is applicable to the situation of sorting and scheduling tasks on multiple cloud servers. The method can be executed by a task scheduling system, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0033] S110. Determine the local task sorting list based on the tasks to be executed through the cloud server.
[0034] In this context, a cloud server can be understood as a resource server that executes tasks. It is a virtualized computing node with independent computing power, storage, and network resources used to run assigned tasks. Generally, there are multiple cloud servers. Tasks to be executed can be understood as tasks that need to be performed. In actual operation, tasks to be executed are subtasks within the same workflow. There are multiple tasks to be executed, and some may have relationships. The local task sorting list can be understood as a task sorting list obtained by each cloud server through a preliminary sorting of the tasks to be executed. The local task sorting list determined by each cloud server can be different.
[0035] In this embodiment, after the cloud server receives the tasks to be executed, it can sort the task data based on the attribute information of the tasks to obtain a partial task sorting list. In actual operation, the task data can be sorted according to the order of receipt time to form the partial task sorting list. Alternatively, the relationships between the task data can be determined first, and the task data can be sorted according to these relationships to form the partial task sorting list. Another option is to determine the urgency score, value score, span value, and initial arrangement order of each task to be executed, and score each task according to these scores and preset adjustment parameters to obtain a task score. In actual operation, the rules for determining the task score can be preset. Then, the receipt time of each task to be executed is determined, and a task score decay factor is determined according to the receipt time and the preset urgency decay period of the task. The task score decay factor can be used to measure the degree of task score decay over time and can be determined in conjunction with a preset task decay period. Generally, the ratio of the current remaining time to the task decay period can be used as the task score decay factor. Next, determine the number of additional factors for each task to be executed. Generally, additional factors may include the number of resource types required by the task, the number of dependent tasks, etc. Based on pre-set rules, the final score of each task to be executed is determined according to the task score decay factor, the task score value, the number of additional factors, and a preset random uniform sampling value. Then, the tasks to be executed are sorted in descending order of their final scores to obtain a partial task ranking list. In actual operation, a pre-trained performance scoring model can also be used to score the tasks to be executed to obtain a final score, and then the tasks to be executed are sorted according to their final scores to obtain a partial task ranking list.
[0036] S120. The scheduling center determines the initial task sorting list based on the sorting lists of each local task, and determines the task association information of the tasks in the initial task sorting list.
[0037] The scheduling center is the core hub of the task scheduling process, responsible for task aggregation, correlation analysis, determining the target task ranking list, and issuing the target task ranking list. The initial task ranking list can be understood as the task ranking list generated after completely aggregating the local task ranking lists. Task correlation information can be understood as information indicating the relationships between tasks in each initial task ranking list. Generally, task correlation information can include at least data dependency, parallel offsetting degree, and actual benefit. Pre-defined rules exist for determining each type of task correlation information.
[0038] In this embodiment, an initial task sorting list can be obtained by summarizing the sorted lists of each local task through the execution center. Then, the rules for determining the association information of each task are obtained, and the corresponding information is extracted according to the rules. Data dependency, parallel offsetting degree, and actual benefit are calculated respectively. In actual operation, the rule for determining data dependency can be to traverse the tasks to be executed in the initial task sorting list, calculate the content similarity of adjacent tasks to be executed in the execution order, and identify adjacent tasks with a content similarity greater than a preset similarity threshold as dependent tasks. For example, according to the initial task sorting list, the similarity between the first and second tasks to be executed is calculated sequentially, and the similarity between the second and third tasks to be executed is calculated sequentially. When the similarity is greater than the preset similarity threshold, both tasks to be executed are determined as dependent tasks. The initial time dependency, initial resource dependency, and task execution order dependency of each dependent task are extracted respectively. The ratio of the initial resource dependency to the initial time dependency of each dependent task is calculated sequentially as the first ratio. The sum of the first ratios is taken as the first sum. The product of the task execution order dependency and the preset adjustment parameter is determined as the second product. The ratio of the first sum to the preset parameter is taken as the second ratio. The sum of the second ratio and the second product is determined as the data dependency of each task.
[0039] The rules for determining the parallel offset degree can be as follows: determine the preset parallel task pool capacity, i.e., the maximum number of tasks that can be parallelized; determine the product of the preset parallel task pool capacity and the preset minimum competition degree between the tasks to be executed as the initial task for participating in parallelization; determine the ending task according to the task order, the preset parallel task pool capacity, and the initial task; take the tasks between the initial task and the ending task as the tasks participating in parallelization; determine the number of competition conditions for each task participating in parallelization; use the preset offset coefficient as the exponent; determine the exponent power of the number of competition conditions as the first value; determine the sum of the products of each first value and the preset task inverse dependency degree as the base; determine the difference between the preset offset coefficient and 1; use the ratio of the preset offset coefficient and the difference as the exponent; and use the result of the exponentiation operation as the parallel offset degree of the initial task of the tasks participating in parallelization.
[0040] The rules for determining the actual revenue can be as follows: First, determine the sum of the basic operating cost of the cloud server and the additional fees for executing tasks. Then, calculate the difference between this sum and the user's fee reduction amount as the user's quoted price. Next, determine the preset reduction value for each dependent task, the basic operating cost of the cloud server, and the task exclusion cost. Finally, determine the difference between the basic operating cost of the cloud server and the preset reduction value for each dependent task, and sum this difference with the task exclusion cost as the actual revenue. Then, determine the data dependency, parallel offsetting degree, and actual revenue according to the rules for determining data dependency, parallel offsetting degree, and actual revenue respectively. Finally, use data dependency, parallel offsetting degree, and actual revenue as task-related information.
[0041] S130. The scheduling center determines the target task sorting list based on the initial task sorting list, historical information, and task association information.
[0042] Historical information can be understood as a list of target tasks at a historical moment and its associated information. For example, historical information may include historical execution results, such as the historical target task list and historical actual effects. The target task list can be understood as the execution order of each task to be executed in the current operation. In actual operation, the target task list can be in tabular or text form; there is no limitation on this.
[0043] In this embodiment, the initial task sorting list can be optimized based on historical information and task association information to obtain the target task sorting list. In actual operation, historical target task sorting lists associated with tasks in the initial task sorting list can be extracted from historical information, and the initial task sorting list can be adjusted based on the task association information. Alternatively, multiple candidate task sorting lists can be generated based on the initial task sorting list and task association information. Specifically, the initial task sorting list can be reordered to generate multiple candidate task sorting lists by combining data dependency, parallel offsetting degree, and actual benefits. Under the constraints of the actual execution results in historical rounds, the conditional expectation of the candidate task sorting lists can be determined by combining historical benchmark differences. The candidate task sorting list corresponding to the maximum value of the conditional expectation is then used as the target task sorting list. Alternatively, historical uncertainty, historical task association aggregate value, and historical prediction uncertainty can be determined based on historical actual execution results. The difference between the historical uncertainty and the historical task association aggregate value can be used as the historical benchmark difference. A candidate task ranking list set is generated based on the initial task ranking list and task association information. The calibration score of all candidate task ranking lists in the set is determined according to the historical benchmark difference and historical prediction uncertainty. The candidate task ranking list corresponding to the maximum calibration score is selected as the target task execution order target task ranking list. In one embodiment, the rule for determining the calibration score of the candidate task ranking list can be preset.
[0044] S140. Receive the target task sorting list through the cloud server and execute the tasks to be executed according to the target task sorting list.
[0045] In this embodiment, a target task sorting list can be received via a cloud server, tasks associated with the cloud server can be extracted from the target task sorting list, and the corresponding tasks to be executed can be executed according to the target task sorting list.
[0046] In this embodiment of the invention, a cloud server determines a partial task sorting list based on the tasks to be executed. A scheduling center determines an initial task sorting list based on each partial task sorting list, and determines the task association information of the tasks in the initial task sorting list. The scheduling center then determines the initial task sorting list based on each partial task sorting list, and determines the task association information of the tasks in the initial task sorting list. The cloud server receives the target task sorting list and executes tasks according to the target task sorting list. This achieves the generation of the target task sorting list by combining the partial task sorting lists and task association information, improving the reliability of task scheduling. At the same time, merging related tasks further reduces the probability of task conflicts, thereby improving the execution efficiency of the cloud server and reducing task execution costs.
[0047] Example 2
[0048] Figure 2 This is a flowchart of a task scheduling method according to Embodiment 2 of the present invention. This embodiment is a further optimization and extension based on the above embodiments, and can be combined with various optional technical solutions in the above embodiments. Figure 2 As shown, the method includes:
[0049] S210. Determine the urgency score, value score, span value, and initial arrangement order of each task to be executed through the cloud server. Determine the task score of each task to be executed according to the urgency score, value score, span value, initial arrangement order, and preset adjustment parameters.
[0050] The task urgency score can be understood as a score for each task to be executed based on its urgency level; generally, the task urgency score is related to the urgency of the task. The task value score can be understood as a score for each task to be executed based on its value. The initial sorting order refers to the initial order in which the tasks to be executed are arranged, which can be based on the order in which they were received. The preset adjustment parameters are parameters that are pre-set to adjust the task scores. The task scores are used to quantify the tasks to be executed, so that they can be sorted according to their scores. The task scores can be a comprehensive score calculated based on multiple dimensions.
[0051] In one embodiment, the cloud server determines the urgency score, value score, span value, and initial arrangement order of each task to be executed. The task score for each task is then determined based on these factors, along with preset adjustment parameters.
[0052] The initial sorting order is extracted from the cloud server, and the number of pending tasks belonging to each task urgency is determined as the first quantity.
[0053] The preset time decrement value and preset urgency decay period associated with the task urgency are determined by the cloud server. The task urgency score of each task to be executed is determined according to the task urgency, preset time decrement value, preset urgency decay period and first quantity of each task to be executed.
[0054] The task value associated with the task urgency score is determined by the cloud server, and the task value score is determined according to the task value, the task urgency score, the preset urgency decay period, and the preset authenticity adjustment parameters.
[0055] The sum of the task urgency score and the task value score is used as the initial task score for the task to be executed via the cloud server.
[0056] The execution time of the task to be executed and adjacent tasks is determined by the cloud server as the duration span. The task type span and similarity between each task to be executed and adjacent tasks in the initial arrangement order are determined based on the task type. The task span value of the task to be executed is determined according to the task type span, similarity and duration span.
[0057] The first result is determined by the square root of the task span value through the cloud server. The second result is determined by the product of the first result and the preset adjustment parameter. The sum of the second result and the initial task score is used as the task score of the task to be executed.
[0058] The task urgency level indicates the level of urgency of a task to be executed. Generally, the urgency level is set when the task is created. The urgency level can range from 1 to 10, with higher numbers indicating greater urgency. The task value can be understood as a pre-set value for each task. The task type refers to the category of the task. Generally, the urgency, value, and category of each task can be pre-set.
[0059] In this embodiment, the task urgency, task value, task type, and initial sorting order of each task to be executed can be extracted using a cloud server. The number of tasks belonging to the same task urgency level is determined as a first quantity. A preset time decrement value and a preset urgency decay period associated with the task urgency are extracted. The task urgency score of each task to be executed is determined according to its task urgency, preset time decrement value, preset urgency decay period, and the first quantity. In practical applications, this can be achieved through... Determine the task urgency score. Here, cpn represents the task urgency level (range 1-10), and k is the first quantity. The preset time decrease value is Ti, where Ti is the preset urgency decay period. The task urgency score is determined by assigning a task value associated with its urgency level. This value is calculated based on the task value, urgency score, preset urgency decay period, and preset realism adjustment parameters. In practical applications, this can be achieved through... It is confirmed that, among them, Task value is related to task urgency, meaning that the higher the task urgency, the higher the task value. Therefore, task urgency is considered when calculating task value. The evaluation was conducted, with A representing the preset realism adjustment parameter. This is the task urgency decay period. In actual operation... , For high-quality parameters, Inferior parameters, superior parameters, and inferior parameters can be pre-set or adjusted based on historical data. The sum of the task urgency score and task value score is used as the initial task score for the tasks to be executed. Then, based on task type, the task rationality span between each task to be executed and its adjacent tasks is determined, and the similarity between adjacent tasks is determined. In practical applications, the task span value can be... The calculation is performed, where q represents the task type span between the task to be executed and its two adjacent tasks. For tasks of the same type, q is the Euler number e, approximately equal to 2.7, while for tasks of different types, q is 10. x represents the similarity between the two tasks, which can be obtained using existing similarity evaluation methods. The total execution time of two adjacent tasks is the task span. The square root of this span is taken as the first result. The product of this first result and a preset adjustment parameter is calculated as the second result. The sum of the second result and the initial task score is used as the task score for the task to be executed. ;in, , which is the initial task score; Preset adjustment parameters; This represents the task span value. Assign a score to the tasks to be performed.
[0060] S220. Extract the preset task score decay factor and the number of additional factors for each task to be executed through the cloud server, and determine the final score of the task to be executed according to the preset task score decay factor, task score, number of additional factors and preset random uniform collection value.
[0061] The number of additional factors refers to the number of additional factors for the task to be executed. Generally, additional factors may include information such as the number of resource types required by the task and the number of dependent tasks. The preset task score decay factor can be understood as the decay coefficient of the score of each task to be executed over time. In one embodiment, the preset task score decay factor can be different at each time point, and the preset task score decay factor can also be the task score decay factor for the next time point. The preset random uniform sampling value is used to optimize the task score. For example, the preset random uniform sampling value can be a random uniform sampling value within the range of [-1, 1]. The final score refers to the optimized task score.
[0062] In this embodiment, a cloud server can be used to determine the preset task score decay factor and the number of additional factors for each task to be executed, extract a preset random uniform sampling value, and optimize the task score using the preset task score decay factor, the number of additional factors, and the preset random uniform sampling value to obtain the final score of the task to be executed. In actual operation, this can be achieved through... Determine the final score of the task to be performed. Here, r is a preset randomly uniformly collected value within the range [-1, 1]. To preset the task score decay factor, Qj1 is the task score multiplied by 10%, and Qj2 is the task score. Where f is the number of additional factors for executing the current task to be executed. Assign a score to the tasks to be performed. This is the final score for the task to be performed.
[0063] S230. The task list is obtained by sorting the tasks to be executed in descending order of their final scores through the cloud server.
[0064] In this embodiment, the relative sizes of the final scores of each task to be executed can be determined, and the tasks can be sorted in descending order of their final scores to obtain a local task sorting list.
[0065] S240. The scheduling center summarizes the sorting lists of each local task to obtain the initial task sorting list.
[0066] In this embodiment, the cloud server can aggregate the partial task sorting lists from multiple cloud servers to obtain an initial task sorting list.
[0067] S250. The scheduling center determines the data dependency, parallel offset, and actual benefit of the tasks to be executed in the initial task sorting list, and uses the data dependency, parallel offset, and actual benefit as task association information.
[0068] Data dependency refers to the degree of data dependence of the task to be executed during the execution process. Parallel offsetting degree can be understood as an indicator that quantifies the conflict, resource competition, and reverse dependency strength when multiple tasks are executed in parallel. It can directly determine whether a task is suitable for parallel execution and the direction of scheduling strategy adjustment. Actual benefit refers to the benefit of executing the task to be executed.
[0069] In this embodiment, the data dependency, parallel offsetting degree, and actual benefit of each task to be executed in the initial task sorting list can be determined separately, and the data dependency, parallel offsetting degree, and actual benefit can be used as task association information.
[0070] In one embodiment, the scheduling center determines the data dependency, parallel offsetting degree, and actual benefit of the tasks to be executed in the initial task sorting list, including:
[0071] The scheduling center calculates the content similarity between the tasks to be executed and their adjacent tasks in the initial task sorting list according to the execution order, and the tasks to be executed with a content similarity greater than the preset similarity threshold are regarded as dependent tasks.
[0072] The scheduling center determines the initial time dependency, initial resource dependency, and task execution order dependency of the dependent tasks based on their attribute information, and then determines the data dependency based on these factors.
[0073] The scheduling center determines the capacity of the preset parallel task pool, and the tasks participating in parallel execution are determined based on the capacity of the preset parallel task pool and the attribute information of each task to be executed.
[0074] The number of competition conditions for tasks to be executed in parallel is determined by the scheduling center, and the parallel mutual offset degree is determined based on the number of competition conditions, the preset minimum competition degree of tasks, the preset offset coefficient, and the preset reverse dependency degree of tasks.
[0075] The user quote is determined by the basic cost of the cloud server operation by the dispatch center, the additional fee for executing tasks, and the user fee reduction.
[0076] The actual cost of cloud services is determined by the scheduling center based on the initial cost of executing tasks on cloud servers, the cost of reducing computing power overhead, the preset reduction value for each dependent task, and the cost of task exclusion. The difference between the actual cost of cloud services and the user's quoted price is taken as the real revenue.
[0077] Content similarity refers to the degree of similarity between the content of the task to be executed and that of adjacent tasks, and can be determined according to existing similarity calculation methods. The preset similarity threshold can be understood as a critical value used to judge dependent tasks. For example, the preset similarity threshold may include, but is not limited to, 79%, 80%, 85%, etc., and can be set according to business needs. Dependent tasks can be understood as tasks to be executed that have execution dependencies, tasks whose execution order is constrained by other tasks. The preset parallel task pool capacity can be understood as the maximum number of tasks that can be executed synchronously in advance. The number of race conditions can be used to measure the number of potential risk points that may cause anomalies due to shared resource access conflicts when multiple tasks are executed in parallel. Race conditions may include, but are not limited to, shared memory, disk files, database connections, network ports, etc. Initial time dependency can be understood as the degree to which the execution of dependent tasks depends on time; initial resource dependency can be understood as the degree to which the execution of dependent tasks depends on resources; and task execution order dependency can be understood as the degree to which the execution of dependent tasks depends on the execution order. These three dependencies can be quantified into numerical values. Generally, they can be pre-set and extracted from the attribute information of the dependent tasks. The preset minimum task contention level refers to the pre-set minimum threshold for resource contention intensity between tasks; the preset offsetting coefficient is a scaling factor used to adjust the degree of parallel offsetting; and the preset task reverse dependency level is a baseline value for the reverse dependency strength set for different types of tasks. The basic cost refers to the most basic cost of the cloud server executing a task; the additional cost for complex tasks added by the cloud server; the user fee reduction amount determines the user's price, which refers to the fee reduction amount corresponding to different membership levels; the initial cost of the cloud server executing a task refers to the actual cost required to execute the task; the computing power overhead reduction cost refers to the cost reduction due to the possibility of some tasks being dependent on each other during task execution; the preset reduction value refers to the amount of fee reduction that the cloud server applies to the user's payment based on the user's level; the task rejection cost refers to the potential task conflict when the cloud server executes the task, i.e., task rejection occurs when tasks are executed concurrently, preventing the server from executing tasks concurrently, reducing efficiency, and increasing costs.
[0078] In this embodiment, the tasks to be executed in the initial task sorting list can be traversed, and the content similarity between each task and its adjacent tasks can be determined sequentially according to the execution order. Tasks with content similarity greater than a preset similarity threshold are identified as dependent tasks. The initial time dependency, initial resource dependency, and task execution order dependency are extracted from the attribute information of the dependent tasks, and the data dependency is determined using these factors. In actual operation, this can be achieved through... Determine the data dependency, where Fr is the data dependency, RW is the task position of the task to be executed in the initial task sorting list, and n is the number of tasks that depend on the task. Let Fr be the data dependency range control constant, llt be the initial time dependency when executing the dependent task to be executed, and Qc be the initial resource dependency when executing the dependent task to be executed. To adjust the parameters, This refers to the task execution order dependency.
[0079] Next, determine the preset parallel task pool capacity, determine the preset minimum contention level in the attribute information of the tasks to be executed, and use the product of the preset parallel task pool capacity and the preset minimum contention level between the tasks to be executed as the initial task for participating in parallel execution. Determine the ending task according to the task order, the preset parallel task pool capacity, and the initial task. The tasks between the initial and ending tasks are considered as participating tasks in parallel execution. Determine the number of contention conditions for each participating task, and determine the parallel offsetting degree according to the number of contention conditions, the preset parallel task pool capacity, the preset minimum contention level, the preset offsetting coefficient, and the preset reverse dependency degree. In actual operation, this can be achieved through... Determine the parallel offset degree. Wherein, the initial value of the Ku initial task... Q represents the preset capacity of the parallel task pool at time t, and c represents the preset minimum contention level between different tasks to be executed. This refers to the pre-defined reverse dependency between tasks when multiple tasks are to be executed. For example, some tasks need to wait for the output of subsequent tasks before they can start executing. This refers to the number of race conditions that occur during task execution. For example, multiple tasks may need to use the same resource, such as shared memory or shared files. If concurrent access is not properly managed, race conditions will occur, leading to data inconsistency or task crashes. (Parameter) This is the preset offset coefficient.
[0080] To determine the user's quote, obtain the basic operating cost of the cloud server, the additional fee for executing tasks, and the user fee reduction amount; determine the sum of the basic operating cost of the cloud server and the additional fee for executing tasks, and use this sum plus the user fee reduction amount as the user's quote. ;in, Provide quotes to users, Here, j represents the base cost of running the cloud server, j is the cloud server ID, and t is the running time. The cost decreases gradually as the running time increases. The additional fee for task execution is ct1, representing the user's fee reduction. The actual cost of the cloud service is then determined by identifying the initial cost of the cloud server executing the task, the reduced computing power cost, the preset reduction value for each dependent task, and the task exclusion cost. ;in, For cloud server costs, The initial cost of executing a task on a cloud server, typically... j is the cloud server number, and t is the actual time spent executing the task; To reduce computing power costs; ct2 has a preset reduction value for each dependent task. As a discount rate, the server reduces the fee paid by the user based on the user's level. However, for the server, the reduced fee should be calculated as the cost loss of the cloud server. This represents the cost of task rejection. When the server executes this task, task conflict may occur, meaning that task rejection can happen during concurrent task execution, preventing the server from executing tasks concurrently, reducing efficiency, and increasing costs. Let t represent the total number of conflicting tasks within the time period t, v be the theoretical task processing efficiency of the cloud server, and k be the unit cost of the conflicting tasks' downtime. The difference between the actual cost of the cloud service and the user's quoted price is taken as the true revenue. That is, the true revenue is... .
[0081] S260. Obtain historical actual execution results from historical information through the scheduling center, determine historical uncertainty, historical task-related aggregate value, and historical prediction uncertainty according to the historical actual execution results, and determine the historical baseline difference according to the historical uncertainty and historical task-related aggregate value.
[0082] Among them, historical uncertainty is the average deviation between historically predicted task execution results and actual results; historical task correlation aggregation value is the weighted sum of dependencies, offsets, and other correlations among historical tasks; historical prediction uncertainty is the standard deviation of historical prediction deviation, reflecting the dispersion of historical prediction deviation. Historical benchmark difference refers to the intermediate variable connecting historical scheduling experience with current task constraints, used to measure the degree of matching between historical scheduling experience patterns and the actual needs of current tasks.
[0083] In the embodiment, before extraction Within each scheduling cycle, the predicted and actual resource consumption of each task is calculated. The single-task deviation is calculated, and the arithmetic mean of the deviations for all tasks is taken to obtain the historical uncertainty. Based on the historical actual execution results, the number of positive dependencies, negative dependencies, and race conditions for each task are determined. The weighted sum of these three numbers is then used to obtain the historical task correlation aggregate value. The standard deviation of the historical uncertainty is determined as the historical predicted uncertainty. The difference between the historical uncertainty and the historical task correlation aggregate value is determined as the historical baseline difference. Generally, the historical baseline difference is fixed within the same time period.
[0084] S270. The scheduling center generates a set of candidate task ranking lists based on the initial task ranking list and task association information, and determines the calibration score of all candidate task ranking lists in the candidate task ranking list set according to the historical benchmark difference and historical prediction uncertainty.
[0085] The calibration score can be understood as the score of the candidate task ranking list, which is re-ranked according to historical baseline differences and historical prediction uncertainties. Generally, the calibration score for determining the candidate task ranking list can be based on pre-set rules.
[0086] In one embodiment, multiple candidate task ranking lists can be generated based on the initial task ranking list and task association information, resulting in a set of candidate task ranking lists. The calibration score for all candidate task ranking lists in the set is then determined using historical benchmark differences and historical prediction uncertainties. In another embodiment, the initial task ranking list can be reordered by combining data dependency, parallel offsetting degree, and actual benefit to generate multiple candidate task ranking lists, resulting in a set of candidate task ranking lists.
[0087] In one embodiment, determining the calibration score of all candidate task ranking lists in the candidate task ranking list set according to the historical benchmark difference and historical prediction uncertainty includes:
[0088] The scheduling center determines the ratio of the historical baseline difference to the historical prediction uncertainty of each candidate task ranking list as the standardized difference of each candidate task ranking list, and determines the cumulative distribution function value and the probability density function value of the standard normal distribution of the standardized difference.
[0089] The scheduling center determines the first product by multiplying the historical baseline difference and the cumulative distribution function value, and the second product by multiplying the historical prediction uncertainty and the probability density function value. The first and second products are then used as the calibration score for the candidate task ranking list.
[0090] In this embodiment, the ratio of the historical baseline difference to the historical prediction uncertainty of each candidate task ranking list can be determined. This ratio is used as the standardized difference of each candidate task ranking list. The cumulative distribution function value and the probability density function value of the standard normal distribution of the standardized difference are then determined. The historical baseline difference and the cumulative distribution function value are used as the first product, and the product of the historical prediction uncertainty and the probability density function value is used as the second product. The first product and the second product are then used as the calibration score of the candidate task ranking list.
[0091] S280. The candidate task ranking list corresponding to the maximum value of the calibration score is determined by the scheduling center and used as the target task ranking list.
[0092] In this embodiment, the maximum value of the calibration score can be determined by the scheduling center, and the candidate task ranking list corresponding to the maximum value will be used as the target task ranking list.
[0093] S290. Receive the target task sorting list through the cloud server and execute the tasks according to the target task sorting list.
[0094] In this embodiment of the invention, the cloud server determines the urgency, value, type, and initial order of each task to be executed. Based on these parameters, a task score is determined for each task. The cloud server extracts a preset task score decay factor and the number of additional factors for each task. The final score of each task is determined based on the preset task score decay factor, task score, number of additional factors, and a preset random uniform sampling value. The cloud server then sorts the tasks according to their final scores from highest to lowest to obtain a local task sorting list. This ensures accurate determination of the local task sorting list. The cloud server can sort tasks locally without forwarding important task information to other execution nodes, reducing the risk of data leakage and avoiding unnecessary computational power consumption during data forwarding. The scheduling center aggregates the local task sorting lists to obtain an initial task sorting list. It then determines the data dependency, parallel offsetting degree, and actual benefit of each task in the initial task sorting list. These factors are used as task association information. The scheduling center retrieves historical execution results and determines historical uncertainty, historical task association aggregation value, and historical prediction uncertainty based on these results. A historical baseline difference is determined based on the historical uncertainty and historical task association aggregation value. The scheduling center generates a candidate task sorting list set based on the initial task sorting list and task association information. A calibration score is determined for all candidate task sorting lists in the candidate task sorting list set based on the historical baseline difference and historical prediction uncertainty. The scheduling center then determines the candidate task sorting list corresponding to the maximum calibration score as the target task sorting list. The cloud server receives the target task sorting list and executes tasks according to it, thus merging related tasks and improving the rationality of the target task sorting list.
[0095] Example 3
[0096] Figure 3 This is a flowchart of a task scheduling method according to Embodiment 3 of the present invention. This embodiment takes three cloud servers as an example, using the optimal task sorting list L in the cloud as the local task sorting list, and the full information task list as the local task sorting list. Using the initial task sorting list as an example, we will further explain a task scheduling method. The following is an example: Figure 3 As shown, multiple cloud servers sort the tasks to be executed in the cloud to obtain an optimal task sorting list. The cloud servers then send the optimal task sorting list to the scheduling and execution center for task aggregation. The scheduling and execution center analyzes the task information in the optimal task sorting list and extracts and calculates the task association information. The scheduling and execution center determines the order of tasks based on their optimal task ranking lists for different cloud servers, combined with task association information. The method informs different cloud servers of the latest task execution order based on optimal efficiency and benefit. The different cloud servers receive the latest task order and execute the tasks according to the order. This method includes:
[0097] Step 1: Multiple cloud servers sort the tasks to be executed in the cloud to obtain the optimal task sorting list L in the cloud.
[0098] The tasks to be executed are input into a cloud-based task ranking model to sort the tasks in order of execution. This solution constructs a cloud-based task performance scoring model to evaluate and score the tasks, resulting in the optimal task ranking list L for the cloud server. The specific process is as follows:
[0099] Step 1.1: Obtain and generate a sorted list of multiple free tasks. The cloud-based task performance evaluation model generates multiple ranked lists of free tasks based on historical execution data from the cloud. , where u is a list of different random tasks collected under different time gradients.
[0100] Step 1.2: Construct parameters for the priority of task order during the historical task sorting process on the cloud server. Among these, the priority parameters are: Inferior parameters are This parameter can adjust the accuracy of recent ranking results and is used in ranking models.
[0101] Step 1.3: Construct a cloud-based task ranking model and calculate task scores. ; ;in, Assign points to the task; The initial task score is based on the current cloud server's potential task expectations ranking and evaluation, including the task urgency score. Task value score . Among them, the score for task urgency. Where cpn represents the urgency of the task (range 1-10). This refers to the number of tasks with the same urgency (cpn) received within time period T in the same batch of tasks. It is a time-decreasing value. This is the task urgency decay period. Task value score. ,in, Task value is related to task urgency, meaning that the higher the task urgency, the higher the task value. Therefore, task urgency is considered when calculating task value. The optimal parameters for its evaluation are: Inferior parameters are This refers to the parameter used by users to verify the authenticity of task evaluation. This is the task urgency decay period. To preset adjustment parameters, The calculated value is the task span. Specifically, to calculate the task span, the following method is used: The calculation is performed in the following manner, where q is the task type span between the current task and the two adjacent tasks. For tasks of the same type, q is the Euler number e, approximately equal to 2.7, and for tasks of different types, q is 10. The similarity between two tasks can be obtained using existing similarity evaluation methods. The total duration of executing two consecutive tasks, i.e., the duration span of task execution.
[0102] Step 1.4: Score each task. Optimize the settings to obtain the final score. ; Where r is a preset random uniformly collected value within the range [-1, 1]. The preset task score decay factor for the next time step, where Qj1 is the initial task score × 10% and Qj2 is the initial task score. , where f is the number of additional factors for performing the current task.
[0103] Step 1.5: Obtain the optimal task sorting list L for the cloud server.
[0104] Step 2: The cloud server sends the optimal task sorting list L to the scheduling center for task aggregation.
[0105] The scheduling center aggregates the optimal task ranking lists from multiple cloud servers to obtain a sequentially arranged full-information task list containing all task information. For example, a list of tasks with complete information arranged in sequence. As shown in Table 1:
[0106] Table 1. List of tasks with full information arranged in order L'
[0107]
[0108] in, For different task content.
[0109] Step 3: The scheduling center analyzes the task information in the optimal task ranking list, extracts and calculates the task association information. .
[0110] The task identification information is used to distinguish subsequent task objects and task content. Using the task content, the following metrics are extracted: computational data dependency Fr, parallel offsetting degree Ur, and actual revenue SR during task execution. For the actual business scenario of this solution, the task-related information includes data dependency Fr, parallel offsetting degree Ur, and actual revenue SR during task execution.
[0111] The relationship between tasks – the data dependency during task execution – is denoted as Fr. Where RW is the task position in L', and n is the number of tasks with task dependencies. This part can be simply understood as: task content with a similarity of 80% or more obtained by using existing similarity measurement methods is considered to have task dependencies. For example, according to the task list in L', the similarity between the first task and the second task is calculated in turn, the similarity between the second task and the third task, and so on, to calculate the number of tasks that meet the task similarity of 80% or more. Fr is the range control constant, llt is the initial time dependency when executing associated tasks, and Qc is the initial resource dependency when executing tasks. To adjust the parameters, This represents the task execution order dependency. The relationship between tasks – parallel offsetting degree Ur. Where, the initial value of Ku is, Q represents the maximum number of tasks that can be executed synchronously at time t (the preset capacity of the parallel task pool), and c represents the preset minimum level of competition between different tasks. This refers to the degree of inverse dependency between tasks when multiple tasks are executed. For example, some tasks need to wait for the output of subsequent tasks before they can start executing. This refers to the number of race conditions that occur during task execution. For example, multiple tasks may need to use the same resource, such as shared memory or shared files. If concurrent access is not properly managed, race conditions can occur, leading to data inconsistency or task crashes. (Parameter) This is the preset offset coefficient.
[0112] Relationships between tasks - Actual rewards (SR) during task execution. ; ; .in, The user quote is the price quoted by the user for the tasks that the cloud server provides to the user to perform. The actual cost of performing this task for the cloud service is the actual cost of the cloud service; SR is the net profit value of the cloud server, i.e., the real revenue.
[0113] exist middle, Here, j represents the base cost of running the cloud server, j is the cloud server ID, and t is the running time. The cost decreases gradually as the running time increases. This is an additional fee for executing user tasks, specifically for complex tasks added by the cloud server (task execution surcharge). ct1 represents the fee reduction amount for different membership levels. middle, The initial cost of performing this task on a cloud server is typically... j is the cloud server number, and t is the actual time spent executing the task; To reduce computing power costs, during task execution, some tasks may have dependencies. By leveraging these dependencies, computing power can be reduced, thus lowering costs. 'c' represents the dependency coefficient; a higher dependency coefficient results in greater cost reduction. 'ct2' is the preset cost reduction value corresponding to the dependency relationship. As a discount rate, the server reduces the fee paid by the user based on the user's level. However, for the server, the reduced fee should be calculated as the cost loss of the cloud server. This represents the cost of task rejection. When the server executes this task, task conflict may occur, meaning that task rejection can happen during concurrent task execution, preventing the server from executing tasks concurrently, reducing efficiency, and increasing costs. denoted as the total number of conflicting tasks within the time period t, v is the theoretical efficiency of the cloud server in processing tasks, and k is the unit cost of the lost work time for conflicting tasks.
[0114] Step 4: The scheduling center determines the order of tasks based on their ranking in the optimal task sorting list for different cloud servers, combined with task association information. The latest task execution order is communicated to different cloud servers based on optimal efficiency and benefits.
[0115] ;in, This represents the parameter or variable that maximizes a certain expected value E, where E represents the expected value, which is the average of the random variables in the probability distribution. This is the actual result of task execution given by the scheduling center in the first t-1 rounds. is the mean of the actual task execution order after the first t-1 rounds of scheduling, and is the standard deviation between the cloud server sorting result calculated by the radial basis function and the actual execution result of the scheduling center, representing the uncertainty of the task execution order. It is the task relationship calculated by the scheduling center, including .
[0116] Expectations for the scheduling model of the scheduling center Further transformation yields the final scheduling center ranking model; ;in, The cumulative distribution function of the standard normal distribution. Let be the probability density function of the standard normal distribution. Let be the standard deviation of the ordered tasks calculated using the radial basis function, and represent the prediction uncertainty of the ordered tasks. This is achieved using the task ordering model from the scheduling center. The summarized tasks are reordered to obtain the task list LL, and the sorting results are fed back into the full information task list L'.
[0117] Step 5: Different cloud servers receive the latest sorting results corresponding to the tasks in each server (target task sorting list, as shown in Table 2 Task List LL), and execute the tasks according to the (latest task sorting) execution order.
[0118] Table 2 Task List LL
[0119]
[0120] In this solution, different cloud servers employ different task ranking methods. These methods utilize a cloud-based task ranking model, allowing each cloud server to output an optimal task ranking list and calculate task scores. The score is then optimized. The scheduling center decomposes and calculates the task relationships between different cloud servers, and provides the calculated relationships, such as data dependency Fr, parallel offsetting degree Ur, and actual benefit SR, to the scheduling center for task scheduling. Based on the order in the optimal task sorting list provided by different cloud servers, and combined with the task relationship information {Fr, Ur, SR}, the scheduling center calculates and obtains the latest task execution order.
[0121] Example 4
[0122] Figure 4 This is a schematic diagram of the structure of a task scheduling system according to Embodiment 4 of the present invention. Figure 4 As shown, the device includes a cloud server 41 and a scheduling center 42.
[0123] Among them, cloud server 41 is used to determine the local task sorting list based on the tasks to be executed through the cloud server;
[0124] The scheduling center 42 is used to determine the initial task sorting list based on the sorting lists of each local task and to determine the task association information of the tasks in the initial task sorting list.
[0125] The scheduling center 42 is used to determine the target task sorting list based on the initial task sorting list, historical information, and task association information.
[0126] Cloud server 41 is used to receive the target task sorting list and execute the tasks to be executed according to the target task sorting list.
[0127] The technical solution of this invention involves a cloud server determining a partial task sorting list based on the tasks to be executed, a scheduling center determining an initial task sorting list based on each partial task sorting list, and determining the task association information of the tasks in the initial task sorting list. The cloud server then receives the target task sorting list and executes tasks according to it. This approach combines the partial task sorting lists and task association information to generate the target task sorting list, improving the reliability of task scheduling. Furthermore, merging related tasks reduces the probability of task conflicts, thereby improving the execution efficiency of the cloud server and reducing task execution costs.
[0128] In one embodiment, cloud server 41 is used for:
[0129] Determine the urgency score, value score, span value, and initial ranking order for each task to be executed. Then, determine the task score for each task to be executed based on the urgency score, value score, span value, initial ranking order, and preset adjustment parameters.
[0130] Extract the preset task score decay factor and the number of additional factors for each task to be executed, and determine the final score of the task to be executed according to the preset task score decay factor, task score, number of additional factors and preset random uniform collection value.
[0131] The tasks to be executed are sorted in descending order of their final scores to obtain a local task sorting list.
[0132] In one embodiment, cloud server 41 is used for:
[0133] Extract the initial sorting order and determine the number of pending tasks belonging to each task urgency as the first quantity;
[0134] Determine the preset time decrement value and preset urgency decay period associated with the task urgency, and determine the task urgency score of each task to be executed according to the task urgency, preset time decrement value, preset urgency decay period and first quantity of each task to be executed.
[0135] Determine the task value associated with the task urgency score, and determine the task value score according to the task value, task urgency score, preset urgency decay period, and preset authenticity adjustment parameter;
[0136] The sum of the task urgency score and the task value score is used as the initial task score for the task to be executed;
[0137] The execution time of the task to be executed and adjacent tasks is determined as the duration span. Based on the task type, the task type span and similarity between each task to be executed and adjacent tasks in the initial arrangement order are determined. The task span value of the task to be executed is determined according to the task type span, similarity and duration span.
[0138] The square root of the task span value is determined as the first result, the product of the first result and the preset adjustment parameter is determined as the second result, and the sum of the second result and the initial task score is taken as the task score of the task to be executed.
[0139] In one embodiment, the dispatch center 42 is used for:
[0140] Summarize the sorted lists of each local task to obtain the initial task sorted list;
[0141] The data dependency, parallel offsetting degree, and actual benefit of the tasks to be executed in the initial task sorting list are determined respectively, and the data dependency, parallel offsetting degree, and actual benefit are used as task association information.
[0142] In one embodiment, the dispatch center 42 is used for:
[0143] Calculate the content similarity between the tasks to be executed and adjacent tasks in the initial task sorting list according to the execution order, and take the tasks to be executed with content similarity greater than the preset similarity threshold as dependent tasks;
[0144] The initial time dependency, initial resource dependency, and task execution order dependency of the dependent tasks are determined according to the attribute information of the dependent tasks, and the data dependency is determined according to the initial time dependency, initial resource dependency, and task execution order dependency.
[0145] Determine the capacity of the preset parallel task pool, and determine the tasks to participate in parallel execution based on the capacity of the preset parallel task pool and the attribute information of each task to be executed;
[0146] Determine the number of competition conditions for tasks to be executed in parallel, and determine the parallel mutual offset degree based on the number of competition conditions, the preset minimum competition degree of tasks, the preset offset coefficient, and the preset reverse dependency degree of tasks.
[0147] The user quote is determined based on the basic operating cost of the cloud server, the additional fee for executing tasks, and the user fee reduction.
[0148] The actual cost of cloud services is determined based on the initial cost of executing tasks on cloud servers, the cost reduction of computing power, the preset reduction value for each dependent task, and the cost of task exclusion. The difference between the actual cost of cloud services and the user's quoted price is taken as the real revenue.
[0149] In one embodiment, the dispatch center 42 is used for:
[0150] The dispatch center obtains historical actual execution results from historical information, determines historical uncertainty, historical task-related aggregate value, and historical prediction uncertainty based on the historical actual execution results, and determines the historical baseline difference based on the historical uncertainty and historical task-related aggregate value.
[0151] A set of candidate task ranking lists is generated based on the initial task ranking list and task association information. The calibration scores of all candidate task ranking lists in the candidate task ranking list set are determined according to the historical benchmark difference and historical prediction uncertainty.
[0152] The candidate task ranking list corresponding to the maximum calibration score is determined as the target task ranking list.
[0153] In one embodiment, the dispatch center 42 is used for:
[0154] The ratio of the historical baseline difference to the historical prediction uncertainty of each candidate task ranking list is determined as the standardized difference of each candidate task ranking list. The cumulative distribution function value and the probability density function value of the standard normal distribution of the standardized difference are then determined.
[0155] The first product is determined by multiplying the historical baseline difference with the cumulative distribution function value, and the second product is determined by multiplying the historical prediction uncertainty with the probability density function value. The first and second products are then used as the calibration score for the candidate task ranking list.
[0156] The task scheduling system provided in this embodiment of the invention can execute the task scheduling method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0157] Example 5
[0158] Figure 5 This is a schematic diagram of the structure of an electronic device implementing the task scheduling method of an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), 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.
[0159] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0160] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0161] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as task scheduling methods.
[0162] In some embodiments, the task scheduling method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the task scheduling method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the task scheduling method by any other suitable means (e.g., by means of firmware).
[0163] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0164] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0165] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0166] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0167] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0168] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0169] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the task scheduling method of any embodiment of the present invention.
[0170] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0171] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and no limitation is imposed herein.
[0172] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A task scheduling method, characterized in that, Applied to a task scheduling system, the method includes: The cloud server determines a local task sorting list based on the tasks to be executed. The scheduling center determines the initial task sorting list based on the sorting lists of each local task, and then determines the task association information of the tasks in the initial task sorting list. The scheduling center determines the target task sorting list based on the initial task sorting list, historical information, and task association information. The cloud server receives the target task sorting list and executes the tasks to be executed according to the target task sorting list.
2. The method according to claim 1, characterized in that, The process of determining a local task sorting list based on the tasks to be executed via a cloud server includes: The task urgency score, task value score, task span value, and initial arrangement order of each task to be executed are determined by the cloud server. The task score of each task to be executed is determined according to the task urgency score, the task value score, the task span value, the initial arrangement order, and the preset adjustment parameters. The preset task score decay factor and the number of additional factors for each task to be executed are extracted by the cloud server. The final score of the task to be executed is determined according to the preset task score decay factor, the task score, the number of additional factors and the preset random uniform collection value. A partial task sorting list is obtained by sorting the tasks to be executed in descending order of their final scores using a cloud server.
3. The method according to claim 2, characterized in that, The process involves determining the urgency score, value score, span value, and initial arrangement order of each task to be executed via a cloud server, and then determining the task score for each task according to the urgency score, value score, span value, initial arrangement order, and preset adjustment parameters. This includes: The initial sorting order is extracted from the cloud server, and the number of pending tasks belonging to each task urgency is determined as the first quantity. The preset time decrement value and preset urgency decay period associated with the task urgency are determined by the cloud server, and the task urgency score of each task to be executed is determined according to the task urgency, the preset time decrement value, the preset urgency decay period and the first quantity. The task value associated with the task urgency score is determined by the cloud server, and the task value score is determined according to the task value, the task urgency score, the preset urgency decay period and the preset authenticity adjustment parameter. The sum of the task urgency score and the task value score is used as the initial task score for the task to be executed via a cloud server. The execution time of the task to be executed and adjacent tasks is determined by the cloud server as the duration span. Based on the task type, the task type span and similarity between each task to be executed and adjacent tasks in the initial arrangement order are determined. The task span value of the task to be executed is determined according to the task type span, the similarity and the duration span. The first result is determined by using the square root of the task span value as the first result through the cloud server. The product of the first result and the preset adjustment parameter is determined as the second result. The sum of the second result and the initial task score is used as the task score of the task to be executed.
4. The method according to claim 1, characterized in that, The process of determining an initial task sorting list through the scheduling center based on the sorting lists of each local task, and determining the task association information of the tasks in the initial task sorting list, includes: The scheduling center summarizes the sorted lists of each local task to obtain the initial task sorted list; The scheduling center determines the data dependency, parallel offsetting degree, and actual benefit of the tasks to be executed in the initial task sorting list, and uses the data dependency, parallel offsetting degree, and actual benefit as task association information.
5. The method according to claim 4, characterized in that, The process of determining the data dependency, parallel offsetting degree, and actual benefit of the tasks to be executed in the initial task sorting list through the scheduling center includes: The scheduling center calculates the content similarity between the tasks to be executed and adjacent tasks in the initial task sorting list according to the execution order, and the tasks to be executed with a content similarity greater than a preset similarity threshold are regarded as dependent tasks. The scheduling center determines the initial time dependency, initial resource dependency, and task execution order dependency of the dependent tasks according to the attribute information of the dependent tasks, and determines the data dependency according to the initial time dependency, the initial resource dependency, and the task execution order dependency. The scheduling center determines the capacity of the preset parallel task pool, and the tasks participating in parallel execution are determined based on the capacity of the preset parallel task pool and the attribute information of each task to be executed. The number of competition conditions for tasks to be executed in parallel is determined by the scheduling center, and the parallel mutual offset degree is determined based on the number of competition conditions, the preset minimum competition degree of tasks, the preset offset coefficient, and the preset reverse dependency degree of tasks. The user quote is determined by the basic cost of the cloud server operation by the dispatch center, the additional fee for executing tasks, and the user fee reduction. The actual cost of cloud services is determined by the scheduling center based on the initial cost of executing tasks on cloud servers, the cost of reducing computing power overhead, the preset reduction value for each dependent task, and the cost of task exclusion. The difference between the actual cost of cloud services and the user's quoted price is taken as the real revenue.
6. The method according to claim 1, characterized in that, The process of determining the target task sorting list through the scheduling center based on the initial task sorting list, historical information, and task association information includes: The scheduling center obtains historical actual execution results from historical information, determines historical uncertainty, historical task association aggregation value, and historical prediction uncertainty based on the historical actual execution results, and determines historical baseline difference based on the historical uncertainty and the historical task association aggregation value. The scheduling center generates a set of candidate task sorting lists based on the initial task sorting list and task association information, and determines the calibration score of all candidate task sorting lists in the set of candidate task sorting lists according to the historical benchmark difference and the historical prediction uncertainty. The scheduling center determines the candidate task ranking list corresponding to the maximum calibration score as the target task ranking list.
7. The method according to claim 6, characterized in that, The step of determining the calibration score of all candidate task ranking lists in the candidate task ranking list set according to the historical benchmark difference and the historical prediction uncertainty includes: The scheduling center determines the ratio of the historical baseline difference to the historical prediction uncertainty of each candidate task ranking list as the standardized difference of each candidate task ranking list, and determines the cumulative distribution function value and the probability density function value of the standard normal distribution of the standardized difference. The scheduling center determines the historical baseline difference and the cumulative distribution function value as the first product, and determines the product of the historical prediction uncertainty and the probability density function value as the second product. The first product and the second product are used as the calibration score of the candidate task ranking list.
8. A task scheduling system, characterized in that, The task scheduling system includes at least: a cloud server and a scheduling center; The cloud server is used to determine a local task sorting list based on the tasks to be executed. The scheduling center is used to determine an initial task sorting list based on each local task sorting list, and to determine the task association information of the tasks in the initial task sorting list. The scheduling center is used to determine the target task sorting list based on the initial task sorting list, historical information, and task association information. The cloud server is used to receive the target task sorting list and execute the tasks to be executed according to the target task sorting list.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the task scheduling method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the task scheduling method according to any one of claims 1-7.