A task processing method and related device
By calculating the execution order and probability of tasks, the concurrent execution target tasks are determined, and the problems of low resource utilization and high cost in the existing technology are solved, and refined management and resource optimization are achieved.
Patent Information
- Application Number
- CN202111163122.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-09-30
AI Technical Summary
The prior art cannot manage tasks with limited network resources and server resources, resulting in low resource utilization and high cost.
By obtaining the execution parameters of the task, the execution order and probability of the task are calculated, and the target task is determined based on these parameters for concurrent execution, including comprehensive considerations of factors such as server resource consumption, network resource consumption, task time and priority.
It realizes refined management and control of tasks under limited resource conditions, improves the utilization rate of network resources and server resources, and reduces costs.
Smart Images

Figure CN114020422B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of server technology, and in particular to a task processing method; and also to a task processing device, equipment, and computer-readable storage medium. Background Art
[0002] In the era of cloud computing, with the surge in the number of Internet users and the development of 5G technology, network data has experienced explosive growth, and the demand for servers has also increased day by day. A crude increase in server and network resources will result in enormous cost consumption. How to utilize limited network and server resources to meet user usage and access needs and reduce costs has become a problem that needs to be continuously addressed. In response to the above problems, existing operation and maintenance platforms, management software, or backend services mostly achieve parallel control of tasks by controlling the number of tasks when running tasks on the server, and are unable to achieve refined processing. At the same time, as the server runs for a long time, single task control can no longer meet the increasing demand. Therefore, how to perform refined control of tasks under limited network and server resources has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0003] The purpose of this application is to provide a task processing method that can perform refined management and control of tasks under limited network resources and server resources, thereby improving the utilization of network resources and server resources and reducing costs. Another purpose of this application is to provide a task processing device, equipment, and computer-readable storage medium, all of which have the above-mentioned technical effects.
[0004] To solve the above technical problems, this application provides a task processing method, including:
[0005] Obtaining execution parameters of each task from the task list; the execution parameters at least include server resource consumption and network resource consumption;
[0006] Calculating the execution order and execution probability of each task according to the execution parameters corresponding to the tasks;
[0007] Determine the target task according to the execution order and the execution probability;
[0008] The target tasks are executed concurrently.
[0009] Optionally, the execution parameters also include task duration and task priority.
[0010] Optionally, calculating the execution order of each task according to the execution parameters corresponding to the task includes:
[0011] Calculating the order value of each task according to the server resource consumption, the network resource consumption, the task time consumption, the task priority, and a preset functional relationship;
[0012] The tasks are sorted according to the sequence values to obtain the execution order of the tasks.
[0013] Optionally, calculating the execution probability of each task according to the execution parameters corresponding to the task includes:
[0014] Calculating a first execution probability of the current server executing the task based on the server resource consumption corresponding to the task and a first preset condition constraint;
[0015] A second execution probability of the current server executing the task is calculated based on the network resource consumption corresponding to the task and a second preset condition constraint.
[0016] Optionally, determining the target task according to the execution order and the execution probability:
[0017] obtaining a first quantity according to the first execution probability;
[0018] obtaining a second quantity according to the second execution probability;
[0019] comparing the first amount to the second amount;
[0020] If the first number is greater than the second number, selecting the second number of tasks from the tasks as the target tasks according to the execution order;
[0021] If the first number is less than or equal to the second number, the first number of tasks are selected from the tasks as the target tasks according to the execution order.
[0022] Optionally, also include:
[0023] After executing the task, counting the task time, server resource consumption and network resource consumption during the execution of the task;
[0024] The task time consumption, the server resource consumption, and the network resource consumption during the task execution are recorded in a historical task list.
[0025] Optionally, also include:
[0026] Calculating the average value of the server resource consumption of the tasks in the historical task list and the average value of the network resource consumption of the tasks in units of preset time lengths;
[0027] The average value of the server resource consumption and the average value of the network resource consumption are updated into the task list.
[0028] To solve the above technical problems, the present application also provides a task processing device, comprising:
[0029] An acquisition module, configured to acquire execution parameters of each task from the task list; the execution parameters at least include server resource consumption and network resource consumption;
[0030] A calculation module, configured to calculate the execution order and execution probability of each task according to the execution parameters corresponding to the task;
[0031] A determination module, configured to determine a target task according to the execution order and the execution probability;
[0032] An execution module is used to concurrently execute the target tasks.
[0033] To solve the above technical problems, the present application also provides a task processing device, including:
[0034] memory for storing computer programs;
[0035] A processor is configured to implement the steps of any of the above task processing methods when executing the computer program.
[0036] To solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the task processing method as described in any one of the above items are implemented.
[0037] The task processing method provided in the present application includes: obtaining the execution parameters of each task from a task list; the execution parameters include at least server resource consumption and network resource consumption; according to the execution parameters corresponding to the tasks, respectively calculating the execution order and execution probability of each task; determining the target task according to the execution order and the execution probability; and concurrently executing the target tasks.
[0038] It can be seen that the task processing method provided in this application determines the task to be executed, that is, the target task, based on the server resource consumption and network resource consumption of the task, and then executes each target task concurrently. In this way, it is possible to achieve refined control of tasks under limited server resources and network resources, improve the utilization rate of network resources and server resources, and reduce costs.
[0039] The task processing device, equipment, and computer-readable storage medium provided in this application all have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0041] Figure 1 A flowchart of a task management method provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a task management device provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of a task management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The core of this application is to provide a task processing method that can perform refined task management and control under limited network and server resources, improve the utilization of network and server resources, and reduce costs. Another core of this application is to provide a task processing device, equipment, and computer-readable storage medium, all of which have the above-mentioned technical effects.
[0045] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0046] Please refer to Figure 1 , Figure 1 A flowchart of a task processing method provided in an embodiment of the present application is provided. Figure 1 As shown, the method mainly includes:
[0047] S101: Acquire execution parameters of each task from a task list; the execution parameters at least include server resource consumption and network resource consumption;
[0048] Specifically, create a task list, which includes a task number field, a name field, a task time field, a server resource consumption field, a network resource consumption field, and a task priority field. In addition, create a historical task list, which includes a task number field, a task time field, a server resource consumption field, and a network resource consumption field. Enter the task number, name, task time, server resource consumption, network resource consumption, and task priority into the task list (the higher the level of the task priority, the smaller the value of the task priority). Among them, if the task has never been run before when it is first entered, the estimated task time, estimated server resource consumption, and estimated network resource consumption of the task will be entered into the task list.
[0049] After creating a task list and entering the task number, name, task duration, server resource consumption, etc., at least the server resource consumption and network resource consumption of each task are obtained from the task list, so that subsequent steps can be executed based on the server resource consumption and network resource consumption of the task.
[0050] Server resources can include CPU resources, memory resources, and hard disk resources. Network resources can include network bandwidth and traffic. Server resource consumption refers to the amount of server resources required to execute a task, while network resource consumption refers to the amount of network resources required to execute a task.
[0051] In a specific implementation, the execution parameters further include: task duration and task priority.
[0052] Specifically, in addition to obtaining the server resource consumption and network resource consumption of the task, this embodiment also obtains the task time and task priority of the task, and then executes subsequent steps based on the server resource consumption, network resource consumption, task time and task priority of the task.
[0053] S102: Calculating the execution order and execution probability of each task according to the execution parameters corresponding to the task;
[0054] On the basis of obtaining the execution parameters corresponding to each task, the execution order and execution probability of each task are further calculated according to the obtained execution parameters.
[0055] In a specific implementation, the execution order of each task may be calculated based on the execution parameters corresponding to the task:
[0056] Calculating the order value of each task according to the server resource consumption, the network resource consumption, the task time consumption, the task priority, and a preset functional relationship;
[0057] The tasks are sorted according to the sequence values to obtain the execution order of the tasks.
[0058] Among them, the preset functional relationship can be set differently, and this application does not make a unique limitation on this. For example, the preset functional relationship can be 0 j =αT j +βS j +γN j +δP j ;O j Represents the order value, T j Indicates the time taken for the task, S j Indicates the server resource consumption, N j Represents the network resource consumption, P j represents the task priority, the subscript j represents the task number, and α, β, γ and δ all represent weighting coefficients.
[0059] Therefore, for each task, the order value of the task is calculated based on the above functional relationship and the task time, server resource consumption, network resource signal and task priority corresponding to the task. Then, the tasks can be sorted in order from small to large according to the order value to obtain the execution order of each task. The smaller the order value, the higher the task is ranked. α, β, γ and δ can take values between 0 and 1, and α+β+γ+δ=1. For the specific values of each weighting coefficient, different settings can be made on the basis of satisfying α+β+γ+δ=1.
[0060] In addition, in a specific embodiment, the execution probability of each task may be calculated based on the execution parameters corresponding to the task:
[0061] Calculating a first execution probability of the current server executing the task based on the server resource consumption corresponding to the task and a first preset condition constraint;
[0062] A second execution probability of the current server executing the task is calculated based on the network resource consumption corresponding to the task and a second preset condition constraint.
[0063] Specifically, a specific implementation method of calculating the first execution probability of the task according to the server resource consumption corresponding to the task is as follows:
[0064] Initialize the remaining server resources of the current server node i to R i =S i ;S i is the estimated total server resource of the current server node i. Get the first execution probability X of the current server node i executing task number j j Formula (1) is the first preset condition constraint, and Г(j) is the set of all server nodes that meet the server resources required for task number j. If the above formula has no solution, then the first execution probability X of the current server node i executing task number j is j Equal to 1.
[0065] Further, solve After obtaining the first execution probability of task number j, the remaining server resources of the current server node i are updated as follows:
[0066]
[0067] A specific implementation method of calculating the second execution probability of the task according to the network resource consumption corresponding to the task is as follows:
[0068] Initialize the remaining network resources of the current server node to M i =N i N i is the estimated total amount of network resources of the current server node. Get the second execution probability Y of the current server node i executing task number j j Formula (2) is the second preset condition constraint, where Ψ(j) is the set of all server nodes that meet the network resources required for task number j. If the above formula has no solution, then the second execution probability Y of the current server node i executing task number j is j Equal to 1.
[0069] Further, solve After obtaining the second execution probability of task number j, the remaining network resources of the current server node i are updated as follows:
[0070]
[0071] S103: Determine the target task according to the execution order and execution probability;
[0072] Specifically, this step aims to determine the target task. The so-called target task refers to the task that the current server node needs to perform.
[0073] In a specific implementation, a method of determining the target task according to the execution probability may be:
[0074] obtaining a first quantity according to the first execution probability;
[0075] obtaining a second quantity according to the second execution probability;
[0076] comparing the first amount to the second amount;
[0077] If the first number is greater than the second number, selecting the second number of tasks from the tasks as the target tasks according to the execution order;
[0078] If the first number is less than or equal to the second number, the first number of tasks are selected from the tasks as the target tasks according to the execution order.
[0079] Specifically, for any server node i, let J = {c1, c2, ..., c |J|} is a set of tasks that satisfy the above formula (1) and the above formula (2). |J| It represents a set of tasks that satisfy the above formula (1) and the above formula (2).
[0080] if The calculation is satisfied The maximum value of l is the first quantity. At the same time, according to the execution order of each task, the execution probability of the l+1th task is adjusted to At this time, X is satisfied l+1 >X′ l+1 , then the first execution probability of the l+1th task and the tasks following the l+1th task is 0.
[0081] if The calculation is satisfied The maximum value of k is the second number. At the same time, according to the execution order of each task, the second execution probability of the k+1th task is adjusted to At this time, Y k+1 >Y′ k+1 , then the second execution probability of the k+1th task and the tasks following the k+1th task is 0.
[0082] Comparing a first quantity with a second quantity. If the first quantity is greater than the second quantity, selecting the second quantity of tasks from the tasks as the target tasks according to the execution order; and if the first quantity is less than or equal to the second quantity, selecting the first quantity of tasks from the tasks as the target tasks according to the execution order.
[0083] S104: Execute the target tasks concurrently.
[0084] Specifically, after the target tasks are determined, that is, the tasks that the current server node needs to execute are determined, the current server node executes the target tasks concurrently.
[0085] Furthermore, based on the above embodiment, as a specific implementation method, the following is further included:
[0086] After executing the task, counting the task time, server resource consumption and network resource consumption during the execution of the task;
[0087] The task time consumption, the server resource consumption, and the network resource consumption during the task execution are recorded in a historical task list.
[0088] Furthermore, based on the above embodiment, as a specific implementation method, the following is further included:
[0089] Calculating the average value of the server resource consumption of the tasks in the historical task list and the average value of the network resource consumption of the tasks in units of preset time lengths;
[0090] The average value of the server resource consumption and the average value of the network resource consumption are updated into the task list.
[0091] Specifically, this embodiment provides a function of automatically adjusting the execution parameters in the task list. By automatically calculating the average of the server resource consumption of the tasks in the historical task list and the average of the network resource consumption of the tasks, and updating the average of the server resource consumption and the average of the network resource consumption to the task list, the execution parameters in the task list can be made more accurate and reliable.
[0092] Among them, this application does not make any unique restrictions on the specific values of the above-mentioned preset time lengths, and can be set accordingly according to actual application needs.
[0093] For example, the preset duration is set to one day, and thus the average server resource consumption of the tasks in the historical task list and the average network resource consumption of the tasks are calculated in units of one day, and the average server resource consumption and the average network resource consumption are updated to the task list.
[0094] In summary, the task processing method provided by the present application includes: obtaining the execution parameters of each task from the task list; the execution parameters include at least server resource consumption and network resource consumption; according to the execution parameters corresponding to the tasks, respectively calculating the execution order and execution probability of each task; determining the target task according to the execution order and the execution probability; and executing the target task concurrently. It can be seen that the task processing method provided by the present application determines the task to be executed, i.e., the target task, based on the server resource consumption and network resource consumption of the task, and then executes each target task concurrently. In this way, it is possible to achieve refined control of tasks under limited server resources and network resources, improve the utilization rate of network resources and server resources, and reduce costs.
[0095] This application also provides a task processing device, which can be referred to in conjunction with the method described above. Figure 2 , Figure 2 A schematic diagram of a task processing device provided in an embodiment of the present application, combined with Figure 2 As shown, the device includes:
[0096] The acquisition module 10 is used to obtain the execution parameters of each task from the task list; the execution parameters at least include server resource consumption and network resource consumption;
[0097] A calculation module 20, configured to calculate the execution order and execution probability of each task according to the execution parameters corresponding to the task;
[0098] A determination module 30, configured to determine a target task according to the execution order and the execution probability;
[0099] The execution module 40 is used to concurrently execute the target tasks.
[0100] Based on the above embodiment, as a specific implementation method, the execution parameters also include task duration and task priority.
[0101] Based on the above embodiment, as a specific implementation, the calculation module 20 includes:
[0102] a calculation unit, configured to calculate the order value of each task according to the server resource consumption, the network resource consumption, the task time consumption, the task priority, and a preset functional relationship;
[0103] The sorting unit is used to sort the tasks according to the sequence values to obtain the execution order of the tasks.
[0104] Based on the above embodiment, as a specific implementation, the calculation module 20 includes:
[0105] A first execution probability calculation unit, configured to calculate a first execution probability of the current server executing the task according to the server resource consumption corresponding to the task and a first preset condition constraint;
[0106] The second execution probability calculation unit is configured to calculate a second execution probability of the current server executing the task according to the network resource consumption corresponding to the task and a second preset condition constraint.
[0107] Based on the above embodiment, as a specific implementation, the determining module 30 includes:
[0108] a first quantity calculation unit, configured to obtain a first quantity according to the first execution probability;
[0109] a second quantity calculation unit, configured to obtain a second quantity according to the second execution probability;
[0110] a comparing unit, configured to compare the first quantity with the second quantity;
[0111] a first determining unit, configured to select the second number of tasks from the tasks as the target tasks according to the execution order if the first number is greater than the second number;
[0112] A second determining unit is configured to select the first number of tasks from the tasks as the target tasks according to the execution order if the first number is less than or equal to the second number.
[0113] Based on the above embodiment, as a specific implementation method, the following is also included:
[0114] A statistics module is used to count the task time, server resource consumption and network resource consumption during the execution of the task after the task is executed;
[0115] The recording module is used to record the task time consumption, the server resource consumption and the network resource consumption during the execution of the task into a historical task list.
[0116] Based on the above embodiment, as a specific implementation method, the following is also included:
[0117] an average calculation module, configured to calculate, based on a preset duration, an average of the server resource consumption of the tasks in the historical task list and an average of the network resource consumption of the tasks;
[0118] An updating module is used to update the average value of the server resource consumption and the average value of the network resource consumption into the task list.
[0119] The task processing device provided in this application determines the task to be executed, i.e., the target task, based on the server resource consumption and network resource consumption of the task, and then executes each target task concurrently. In this way, it can achieve refined control of tasks under limited server resources and network resources, improve the utilization rate of network resources and server resources, and reduce costs.
[0120] This application also provides a task processing device, reference Figure 3 As shown, the device includes a memory 1 and a processor 2 .
[0121] Memory 1, for storing computer programs;
[0122] Processor 2 is configured to execute a computer program to implement the following steps:
[0123] Obtain execution parameters for each task from a task list; the execution parameters include at least server resource consumption and network resource consumption; calculate the execution order and execution probability of each task based on the execution parameters corresponding to the task; determine a target task based on the execution order and the execution probability; and execute the target tasks concurrently.
[0124] For an introduction to the equipment provided in this application, please refer to the above method embodiments, and this application will not go into details here.
[0125] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the following steps can be implemented:
[0126] Obtain execution parameters for each task from a task list; the execution parameters include at least server resource consumption and network resource consumption; calculate the execution order and execution probability of each task based on the execution parameters corresponding to the task; determine a target task based on the execution order and the execution probability; and execute the target tasks concurrently.
[0127] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.
[0128] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0129] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. References to the common and similar parts between the various embodiments are sufficient. The devices, apparatuses, and computer-readable storage media disclosed in the embodiments are described briefly because they correspond to the methods disclosed in the embodiments. For relevant details, refer to the description of the methods.
[0130] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0131] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0132] The task processing method, apparatus, device, and computer-readable storage medium provided by the present application are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A task processing method, characterized in that: include: Obtaining execution parameters of each task from the task list; the execution parameters at least include server resource consumption and network resource consumption; Calculating the execution order and execution probability of each task according to the execution parameters corresponding to the tasks; Determine the target task according to the execution order and the execution probability; concurrently executing the target tasks; Calculating the execution probability of each task according to the execution parameters corresponding to the task includes: Calculating a first execution probability of the current server executing the task based on the server resource consumption corresponding to the task and a first preset condition constraint; Calculating a second execution probability of the current server executing the task based on the network resource consumption corresponding to the task and a second preset condition constraint; Among them, the first preset condition constraint is , For the current server node The estimated total server resources; For the current server node The execution task number is The first execution probability of the task, is the set of all server nodes that meet the server resources required for task number j; S j represents the server resource consumption of task number j, R i is the remaining server resources of the current server node i. When initialized, the remaining server resources of the current server node i are R i =S i ; Solve the first preset condition constraint to obtain the first execution probability; if there is no solution, determine the first execution probability to be 1; The second precondition constraint is , is the estimated total amount of network resources of the current server node, Is the current server node The execution task number is The second execution probability of the task, To meet the task number The set of all server nodes that need network resources for the task; N j Indicates the network resource consumption of task number j, M i Represents the remaining network resources of the current server node i. When initialized, the remaining network resources of the current server node are M i =N i Solve the second preset condition constraint to obtain the second execution probability; if there is no solution, determine the second execution probability to be 1; Determining the target task according to the execution order and the execution probability includes: Obtain a first quantity according to the first execution probability; obtain a second quantity according to the second execution probability; compare the first quantity with the second quantity; if the first quantity is greater than the second quantity, select the second quantity of tasks from the tasks as the target tasks according to the execution order; if the first quantity is less than or equal to the second quantity, select the first quantity of tasks from the tasks as the target tasks according to the execution order.
2. The task processing method according to claim 1, characterized in that: The execution parameters also include task duration and task priority.
3. The task processing method according to claim 2, characterized in that: Calculating the execution order of each task according to the execution parameters corresponding to the tasks includes: Calculating the order value of each task according to the server resource consumption, the network resource consumption, the task time consumption, the task priority, and a preset functional relationship; The tasks are sorted according to the sequence values to obtain the execution order of the tasks.
4. The task processing method according to claim 2, characterized in that: Also includes: After executing the task, counting the task time, server resource consumption and network resource consumption during the execution of the task; The task time consumption, the server resource consumption, and the network resource consumption during the task execution are recorded in a historical task list.
5. The task processing method according to claim 4, characterized in that: Also includes: Calculating the average value of the server resource consumption of the tasks in the historical task list and the average value of the network resource consumption of the tasks in units of preset time lengths; The average value of the server resource consumption and the average value of the network resource consumption are updated into the task list.
6. A task processing device, characterized in that: include: An acquisition module, configured to acquire execution parameters of each task from the task list; the execution parameters at least include server resource consumption and network resource consumption; A calculation module, configured to calculate the execution order and execution probability of each task according to the execution parameters corresponding to the task; A determination module, configured to determine a target task according to the execution order and the execution probability; An execution module, configured to concurrently execute the target tasks; The calculation module includes: A first execution probability calculation unit, configured to calculate a first execution probability of the current server executing the task according to the server resource consumption corresponding to the task and a first preset condition constraint; The second execution probability calculation unit is used to calculate the second execution probability of the current server executing the task according to the network resource consumption corresponding to the task and the second preset condition constraint; wherein the first preset condition constraint is , For the current server node The estimated total server resources; For the current server node The execution task number is The first execution probability of the task, To meet the task number The set of all server nodes that need server resources for the task; S j represents the server resource consumption of task number j, R i is the remaining server resources of the current server node i. When initialized, the remaining server resources of the current server node i are R i =S i ; Solve the first preset condition constraint to obtain the first execution probability; if there is no solution, determine the first execution probability to be 1; The second precondition constraint is , is the estimated total amount of network resources of the current server node, Is the current server node The execution task number is The second execution probability of the task, To meet the task number The set of all server nodes that need network resources for the task; N j Indicates the network resource consumption of task number j, M i Represents the remaining network resources of the current server node i. When initialized, the remaining network resources of the current server node are M i =N i Solve the second preset condition constraint to obtain the second execution probability; if there is no solution, determine the second execution probability to be 1; Identify modules, including: a first quantity calculation unit, configured to obtain a first quantity according to the first execution probability; a second quantity calculation unit, configured to obtain a second quantity according to the second execution probability; a comparing unit, configured to compare the first quantity with the second quantity; a first determining unit, configured to select the second number of tasks from the tasks as the target tasks according to the execution order if the first number is greater than the second number; A second determining unit is configured to select the first number of tasks from the tasks as the target tasks according to the execution order if the first number is less than or equal to the second number.
7. A task processing device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the task processing method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the task processing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Data processing method, data processing device, storage medium and electronic equipment
CN111582408A
Task execution method and device
CN113238861A