[go: up one dir, main page]

CN114020422B - A task processing method and related device - Google Patents

A task processing method and related device

Info

Publication number
CN114020422B
CN114020422B CN202111163122.9A CN202111163122A CN114020422B CN 114020422 B CN114020422 B CN 114020422B CN 202111163122 A CN202111163122 A CN 202111163122A CN 114020422 B CN114020422 B CN 114020422B
Authority
CN
China
Prior art keywords
task
execution
resource consumption
tasks
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111163122.9A
Other languages
Chinese (zh)
Other versions
CN114020422A (en
Inventor
刘程程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202111163122.9A priority Critical patent/CN114020422B/en
Publication of CN114020422A publication Critical patent/CN114020422A/en
Application granted granted Critical
Publication of CN114020422B publication Critical patent/CN114020422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请公开了一种任务处理方法,包括:从任务列表中获取各任务的执行参数;所述执行参数至少包括服务器资源消耗与网络资源消耗;根据所述任务对应的所述执行参数,分别计算得到各所述任务的执行顺序与执行概率;根据所述执行顺序与所述执行概率确定目标任务;并发执行所述目标任务。应用该方法能够在有限的网络资源与服务器资源的情况下,对任务进行精细化管控,提高网络资源与服务器资源的利用率,降低成本。本申请还公开了一种任务处理装置、设备以及计算机可读存储介质,均具有上述技术效果。

The present application discloses a task processing method, comprising: obtaining the execution parameters of each task from a task list; the execution parameters include at least 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 task; determining the target task according to the execution order and the execution probability; and executing the target task concurrently. The application of this method can achieve refined management and control of tasks under limited network resources and server resources, improve the utilization rate of network resources and server resources, and reduce costs. The present application also discloses a task processing device, equipment, and computer-readable storage medium, all of which have the above-mentioned technical effects.

Description

Task processing method and related device
Technical Field
The present application relates to the field of server technologies, and in particular, to a task processing method, and a task processing device, apparatus, and computer readable storage medium.
Background
In the cloud computing era, with the proliferation of the number of netizens and the development of 5G technology, the network data realizes the explosive growth, and meanwhile, the demand of servers is also increased. The rough increase of server resources and network resources brings about great cost consumption. How to use limited network resources and server resources to meet the use and access requirements of users and reduce the cost has become a problem to be continuously solved. Aiming at the problems, when the existing operation and maintenance platform, management software or background service runs tasks on a server, the number of the tasks is controlled to realize parallel management and control of the tasks, so that the fine processing cannot be realized. Meanwhile, with long-time operation of the server, single task control cannot meet increasing demands. Therefore, how to finely manage tasks under the condition of limited network resources and server resources is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a task processing method which can finely control tasks under the condition of limited network resources and server resources, improve the utilization rate of the network resources and the server resources and reduce the cost. Another object of the present application is to provide a task processing device, apparatus, and computer-readable storage medium, each having the above technical effects.
In order to solve the technical problems, the application provides a task processing method, which comprises the following steps:
acquiring execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption;
according to the execution parameters corresponding to the tasks, respectively calculating the execution sequence and the execution probability of each task;
determining a target task according to the execution sequence and the execution probability;
And concurrently executing the target tasks.
Optionally, the execution parameters further include task time consumption and task priority.
Optionally, the calculating the execution sequence of each task according to the execution parameters corresponding to the task includes:
According to the server resource consumption, the network resource consumption, the task time consumption, the task priority and a preset functional relation, respectively calculating to obtain the sequence value of each task;
and sequencing the tasks according to the sequence values to obtain the execution sequence of the tasks.
Optionally, the calculating the execution probability of each task according to the execution parameters corresponding to the task includes:
According to the server resource consumption corresponding to the task and a first preset condition constraint, calculating to obtain a first execution probability of executing the task by the current server;
And calculating a second execution probability of executing the task by the current server according to the network resource consumption corresponding to the task and a second preset condition constraint.
Optionally, the determining the target task according to the execution sequence and the execution probability:
obtaining a first number according to the first execution probability;
Obtaining a second number according to the second execution probability;
comparing the first number to the second number;
If the first number is larger than the second number, selecting the second number of tasks from the tasks according to the execution sequence as the target task;
And if the first number is smaller than or equal to the second number, selecting the tasks with the first number from the tasks according to the execution sequence as the target tasks.
Optionally, the method further comprises:
After the task is executed, counting task time consumption, server resource consumption and network resource consumption when the task is executed;
and recording the task time consumption, the server resource consumption and the network resource consumption when the task is executed into a historical task list.
Optionally, the method further comprises:
Calculating the average value of the server resource consumption of the task and the average value of the network resource consumption of the task in the historical task list by taking a preset duration as a unit;
and updating the average value of the server resource consumption and the average value of the network resource consumption into the task list.
In order to solve the technical problem, the present application further provides a task processing device, including:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring execution parameters of each task from a task list, and the execution parameters at least comprise server resource consumption and network resource consumption;
The calculation module is used for respectively calculating the execution sequence and the execution probability of each task according to the execution parameters corresponding to the tasks;
The determining module is used for determining a target task according to the execution sequence and the execution probability;
And the execution module is used for concurrently executing the target task.
In order to solve the technical problem, the present application further provides a task processing device, including:
a memory for storing a computer program;
A processor for implementing the steps of the task processing method as claimed in any one of the preceding claims when executing the computer program.
To solve the above technical problem, the present application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the task processing method as described in any one of the above.
The task processing method comprises the steps of obtaining execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption, respectively calculating to obtain execution sequence and execution probability of each task according to the execution parameters corresponding to the tasks, determining a target task according to the execution sequence and the execution probability, and concurrently executing the target task.
Therefore, the task processing method provided by the application determines the task to be executed, namely the target task based on the server resource consumption and the network resource consumption of the task, and further executes each target task concurrently, so that the task can be finely managed and controlled under the condition of limited server resources and network resources, the utilization rate of the network resources and the server resources is improved, and the cost is reduced.
The task processing device, the equipment and the computer readable storage medium provided by the application have the technical effects.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a task management method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a task management device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a task management device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a task processing method, which can finely control tasks under the condition of limited network resources and server resources, improve the utilization rate of the network resources and the server resources and reduce the cost. Another core of the present application is to provide a task processing device, apparatus, and computer-readable storage medium, which all have the above technical effects.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flow chart of a task processing method according to an embodiment of the present application, and referring to fig. 1, the method mainly includes:
s101, acquiring execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption;
Specifically, a task list is created, and the task list includes a task number field, a name field, a task time consumption field, a server resource consumption field, a network resource consumption field, and a task priority field. In addition, a historical task list is created, the historical task list including a task number field, a task time consuming field, a server resource consumption field, and a network resource consumption field. The task number, name, task time consumption, server resource consumption, network resource consumption, and task priority (the higher the level of task priority, the smaller the value of task priority) are entered into the task list. If the task is recorded for the first time and never runs, the estimated task time consumption, the estimated server resource consumption and the estimated network resource consumption of the task are recorded into a task list.
Based on creating a task list and inputting a task number, a name, task time consumption, server resource consumption and the like, at least obtaining the server resource consumption and the network resource consumption of each task from the task list so as to execute subsequent steps according to the server resource consumption and the network resource consumption of the task.
The server resources may include CPU resources, memory resources, hard disk resources, and the like. Network resources may include network bandwidth and traffic. Server resource consumption refers to how much server resources are consumed to perform a task, and network resource consumption refers to how much network resources are consumed to perform a task.
In a specific embodiment, the execution parameters further comprise task time consumption and task priority.
Specifically, in this embodiment, besides the server resource consumption and the network resource consumption of the task, the task time consumption and the task priority of the task are also obtained, and further, the subsequent steps are executed based on the server resource consumption, the network resource consumption, the task time consumption and the task priority of the task.
S102, respectively calculating the execution sequence and the execution probability of each task according to the execution parameters corresponding to the tasks;
on the basis of acquiring the execution parameters corresponding to each task, further, the execution sequence and the execution probability of each task are respectively calculated according to the acquired execution parameters.
In a specific embodiment, the manner of calculating the execution sequence of each task according to the execution parameters corresponding to the task may be:
According to the server resource consumption, the network resource consumption, the task time consumption, the task priority and a preset functional relation, respectively calculating to obtain the sequence value of each task;
and sequencing the tasks according to the sequence values to obtain the execution sequence of the tasks.
The preset functional relationship can be set differently, which is not limited by the present application. For example, the preset functional relationship may be that O j=αTj+βSj+γNj+δPj;Oj represents the order value, T j represents the task time consumption, S j represents the server resource consumption, N j represents the network resource consumption, P j represents the task priority, subscript j represents the task number, and α, β, γ, and δ all represent weighting coefficients.
Thus, for each task, the order value of the task is calculated according to the functional relation and the task time consumption, the server resource consumption, the network resource signal and the task priority corresponding to the task. Then, the tasks can be ordered according to the order of the order values from small to large, and the execution order of the tasks is obtained. The smaller the order value, the earlier the task ordering. The values of α, β, γ and δ may be 0 to 1, and α+β+γ+δ=1. For specific numerical values of the respective weighting coefficients, differential setting may be performed on the basis of satisfying α+β+γ+δ=1.
In addition, in a specific embodiment, the manner of calculating the execution probability of each task according to the execution parameters corresponding to the task may be:
According to the server resource consumption corresponding to the task and a first preset condition constraint, calculating to obtain a first execution probability of executing the task by the current server;
And calculating a second execution probability of executing the task by the current server according to the network resource consumption corresponding to the task and a second preset condition constraint.
Specifically, according to the server resource consumption corresponding to the task, the specific implementation manner of calculating the first execution probability of the task is as follows:
and initializing the residual server resources of the current server node i as the estimated total server resources of the current server node i by using R i=Si;Si. Solving for A first execution probability X j of the current server node i executing the task with the task number j is obtained. Equation (1) is a first preset condition constraint, and f (j) is a set of all server nodes that satisfy server resources required for a task with a task number j. If the above equation has no solution, the first execution probability X j of the task with the task number j by the current server node i is equal to 1.
Further, solve forAfter obtaining the first execution probability of the task with the task number j, updating the residual server resources of the current server node i in the following updating mode:
According to the network resource consumption corresponding to the task, the specific implementation mode of calculating the second execution probability of the task is as follows:
and initializing the residual network resources of the current server node as the estimated total network resources of the current server node by using M i=Ni Ni. Solving for A second execution probability Y j that the current server node i executes the task with the task number j is obtained. Equation (2) is a second preset condition constraint, and ψ (j) is a set of all server nodes satisfying network resources required for the task with the task number j. If the above equation has no solution, the second execution probability Y j of the task with the task number j by the current server node i is equal to 1.
Further, solve forAfter obtaining the second execution probability of the task with the task number j, updating the residual network resources of the current server node i in the following way:
s103, determining a target task according to the execution sequence and the execution probability;
Specifically, this step is intended to determine the target task. The target task refers to a task that the current server node needs to execute.
In a specific embodiment, the method for determining the target task according to the execution probability may be:
obtaining a first number according to the first execution probability;
Obtaining a second number according to the second execution probability;
comparing the first number to the second number;
If the first number is larger than the second number, selecting the second number of tasks from the tasks according to the execution sequence as the target task;
And if the first number is smaller than or equal to the second number, selecting the tasks with the first number from the tasks according to the execution sequence as the target tasks.
Specifically, for any one of the server nodes i, j= { c 1,c2,…,c|J| } is set as a set of tasks satisfying the above-described formula (1) and the above-described formula (2). c |J| represents a set of one kind of tasks satisfying the above formula (1) and the above formula (2).
If it isThen the calculation is satisfiedI, i.e. the first number. Meanwhile, according to the execution sequence of each task, the execution probability of the (1+1) th task is adjusted to beAt this time, X l+1>X′l+1 is satisfied, and the first execution probability of the (i+1) th task and the tasks arranged after the (i+1) th task is 0.
If it isThen the calculation is satisfiedThe maximum value of k is the second number. Meanwhile, according to the execution sequence of each task, the second execution probability of the (k+1) th task is adjusted to beWhen Y k+1>Y′k+1 is satisfied, the second execution probability of the (k+1) th task and the tasks arranged after the (k+1) th task is 0.
The first number is compared with the second number. If the first number is larger than the second number, selecting the second number of tasks from the tasks according to the execution sequence as the target task; and if the first number is smaller than or equal to the second number, selecting the first number of tasks from the tasks according to the execution sequence as the target task.
And S104, concurrently executing the target task.
Specifically, after determining the target task, that is, the task that needs to be executed by the current server node, the current server node concurrently executes each target task.
Further, on the basis of the above embodiment, as a specific implementation manner, the method further includes:
After the task is executed, counting task time consumption, server resource consumption and network resource consumption when the task is executed;
and recording the task time consumption, the server resource consumption and the network resource consumption when the task is executed into a historical task list.
Further, on the basis of the above embodiment, as a specific implementation manner, the method further includes:
Calculating the average value of the server resource consumption of the task and the average value of the network resource consumption of the task in the historical task list by taking a preset duration as a unit;
and updating the average value of the server resource consumption and the average value of the network resource consumption into the task list.
Specifically, the embodiment sets a function of automatically adjusting the execution parameters in the task list, and by automatically calculating the average value of the server resource consumption of the task and the average value of the network resource consumption of the task in the history task list and updating the average value of the server resource consumption and the average value of the network resource consumption into the task list, the execution parameters in the task list can be more accurate and reliable.
The specific value of the preset duration is not limited only, and the application can be adaptively set according to the actual application requirement.
For example, a preset time period is set for one day, whereby a mean value of the server resource consumption of the task and a mean value of the network resource consumption of the task in the history task list are calculated in units of one day, and the mean value of the server resource consumption and the mean value of the network resource consumption are updated into the task list.
In summary, the task processing method provided by the application comprises the steps of obtaining execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption, respectively calculating to obtain the execution sequence and the execution probability of each task according to the execution parameters corresponding to the tasks, determining a target task according to the execution sequence and the execution probability, and concurrently executing the target task. Therefore, the task processing method provided by the application determines the task to be executed, namely the target task based on the server resource consumption and the network resource consumption of the task, and further executes each target task concurrently, so that the task can be finely managed and controlled under the condition of limited server resources and network resources, the utilization rate of the network resources and the server resources is improved, and the cost is reduced.
The application also provides a task processing device which can be referred to in the following in correspondence with the method described above. Referring to fig. 2, fig. 2 is a schematic diagram of a task processing device according to an embodiment of the present application, and in combination with fig. 2, the task processing device includes:
The acquisition module 10 is used for acquiring execution parameters of each task from the task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption;
The calculation module 20 is configured to calculate an execution sequence and an execution probability of each task according to the execution parameters corresponding to the tasks;
a determining module 30, configured to determine a target task according to the execution order and the execution probability;
And the execution module 40 is used for concurrently executing the target task.
On the basis of the above embodiment, as a specific implementation manner, the execution parameters further include task time consumption and task priority.
On the basis of the above embodiment, as a specific implementation manner, the calculating module 20 includes:
The computing unit is used for respectively computing the sequence value of each task according to the server resource consumption, the network resource consumption, the task time consumption, the task priority and a preset function relation;
And the sequencing unit is used for sequencing the tasks according to the sequence values to obtain the execution sequence of the tasks.
On the basis of the above embodiment, as a specific implementation manner, the calculating module 20 includes:
The first execution probability calculation unit is used for calculating the first execution probability of executing the task by the current server according to the server resource consumption corresponding to the task and a first preset condition constraint;
And the second execution probability calculation unit is used for calculating the second execution probability of executing the task by the current server according to the network resource consumption corresponding to the task and a second preset condition constraint.
On the basis of the above embodiment, as a specific implementation manner, the determining module 30 includes:
A first number calculation unit, configured to obtain a first number according to the first execution probability;
A second number calculation unit, configured to obtain a second number according to the second execution probability;
A comparison unit for comparing the first number with the second number;
The first determining unit is used for selecting the second number of tasks from the tasks according to the execution sequence as the target tasks if the first number is larger than the second number;
And the second determining unit is used for selecting the first number of tasks from the tasks according to the execution sequence as the target tasks if the first number is smaller than or equal to the second number.
On the basis of the above embodiment, as a specific implementation manner, the method further includes:
the statistics module is used for counting task time consumption, server resource consumption and network resource consumption when the task is executed after the task is executed;
And the recording module is used for recording the task time consumption, the server resource consumption and the network resource consumption in the historical task list when the task is executed.
On the basis of the above embodiment, as a specific implementation manner, the method further includes:
The average value calculation module is used for calculating the average value of the server resource consumption of the task in the historical task list and the average value of the network resource consumption of the task by taking a preset duration as a unit;
And the updating module is used for updating the average value of the server resource consumption and the average value of the network resource consumption into the task list.
The task processing device provided by the application determines the task to be executed, namely the target task based on the server resource consumption and the network resource consumption of the task, and further executes each target task concurrently, so that the task can be finely managed and controlled under the condition of limited server resources and network resources, the utilization rate of the network resources and the server resources is improved, and the cost is reduced.
The application also provides a task processing device comprising a memory 1 and a processor 2, as shown with reference to figure 3.
A memory 1 for storing a computer program;
a processor 2 for executing a computer program to perform the steps of:
the method comprises the steps of obtaining execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption, respectively calculating to obtain execution sequence and execution probability of each task according to the execution parameters corresponding to the tasks, determining a target task according to the execution sequence and the execution probability, and concurrently executing the target task.
For the description of the apparatus provided by the present application, refer to the above method embodiment, and the description of the present application is omitted herein.
The present application also provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of:
the method comprises the steps of obtaining execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption, respectively calculating to obtain execution sequence and execution probability of each task according to the execution parameters corresponding to the tasks, determining a target task according to the execution sequence and the execution probability, and concurrently executing the target task.
The computer readable storage medium may include a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc. various media that can store program codes.
For the description of the computer-readable storage medium provided by the present application, refer to the above method embodiments, and the disclosure is not repeated here.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the apparatus, device and computer readable storage medium of the embodiment disclosure, since it corresponds to the method of the embodiment disclosure, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The task processing method, device, equipment and computer readable storage medium provided by the application are described above in detail. The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present application and its core ideas. It should be noted that it will be apparent to those skilled in the art that various changes and modifications can be made herein without departing from the principles of the application, which are also intended to fall within the scope of the appended claims.

Claims (8)

1. A method of task processing, comprising:
acquiring execution parameters of each task from a task list, wherein the execution parameters at least comprise server resource consumption and network resource consumption;
according to the execution parameters corresponding to the tasks, respectively calculating the execution sequence and the execution probability of each task;
determining a target task according to the execution sequence and the execution probability;
concurrently executing the target task;
the calculation of the execution probability of each task according to the execution parameters corresponding to the task comprises the following steps:
According to the server resource consumption corresponding to the task and a first preset condition constraint, calculating to obtain a first execution probability of executing the task by the current server;
according to the network resource consumption corresponding to the task and a second preset condition constraint, calculating to obtain a second execution probability of executing the task by the current server;
wherein the first preset condition constraint is that ,For the current server nodeThe total amount of server resources is estimated; for the current server node Execution task number isIs a first probability of execution of the task of (c),A set of all server nodes for satisfying the server resources required for the task with task number j; S j represents the consumption of server resources with the task number j, R i is the residual server resources of the current server node i, and the residual server resources of the current server node i are R i=Si during initialization;
The second preset condition is constrained as follows ,The estimated total amount of network resources for the current server node,Is the current server nodeExecution task number isIs a second probability of execution of the task of (c),Numbering to meet tasksN j represents the network resource consumption of the task number j, M i represents the residual network resource of the current server node i, and the residual network resource of the current server node is M i=Ni during initialization;
the determining the target task according to the execution sequence and the execution probability comprises the following steps:
The method comprises the steps of obtaining a first quantity according to a first execution probability, obtaining a second quantity according to a second execution probability, comparing the first quantity with the second quantity, selecting the second quantity of tasks from the tasks to serve as the target tasks according to the execution sequence if the first quantity is larger than the second quantity, and selecting the first quantity of tasks from the tasks to serve as the target tasks according to the execution sequence if the first quantity is smaller than or equal to the second quantity.
2. The method of claim 1, wherein the execution parameters further comprise task time consumption and task priority.
3. The task processing method according to claim 2, wherein calculating an execution order of each task according to the execution parameters corresponding to the task includes:
According to the server resource consumption, the network resource consumption, the task time consumption, the task priority and a preset functional relation, respectively calculating to obtain the sequence value of each task;
and sequencing the tasks according to the sequence values to obtain the execution sequence of the tasks.
4. The task processing method according to claim 2, characterized by further comprising:
After the task is executed, counting task time consumption, server resource consumption and network resource consumption when the task is executed;
and recording the task time consumption, the server resource consumption and the network resource consumption when the task is executed into a historical task list.
5. The task processing method according to claim 4, characterized by further comprising:
Calculating the average value of the server resource consumption of the task and the average value of the network resource consumption of the task in the historical task list by taking a preset duration as a unit;
and updating the average value of the server resource consumption and the average value of the network resource consumption into the task list.
6. A task processing device, comprising:
The system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring execution parameters of each task from a task list, and the execution parameters at least comprise server resource consumption and network resource consumption;
The calculation module is used for respectively calculating the execution sequence and the execution probability of each task according to the execution parameters corresponding to the tasks;
The determining module is used for determining a target task according to the execution sequence and the execution probability;
The execution module is used for concurrently executing the target task;
The calculation module comprises:
The first execution probability calculation unit is used for calculating the first execution probability of executing the task by the current server according to the server resource consumption corresponding to the task and a first preset condition constraint;
A second execution probability calculation unit, configured to calculate, according to the network resource consumption corresponding to the task and a second preset condition constraint, a second execution probability of executing the task by the current server, where the first preset condition constraint is that ,For the current server nodeThe total amount of server resources is estimated; for the current server node Execution task number isIs a first probability of execution of the task of (c),Numbering to meet tasksS j represents the consumption of server resources with the task number j, R i is the residual server resources of the current server node i, and the residual server resources of the current server node i are R i=Si during initialization;
The second preset condition is constrained as follows ,The estimated total amount of network resources for the current server node,Is the current server nodeExecution task number isIs a second probability of execution of the task of (c),Numbering to meet tasksN j represents the network resource consumption of the task number j, M i represents the residual network resource of the current server node i, and the residual network resource of the current server node is M i=Ni during initialization;
A determination module, comprising:
A first number calculation unit, configured to obtain a first number according to the first execution probability;
A second number calculation unit, configured to obtain a second number according to the second execution probability;
A comparison unit for comparing the first number with the second number;
The first determining unit is used for selecting the second number of tasks from the tasks according to the execution sequence as the target tasks if the first number is larger than the second number;
And the second determining unit is used for selecting the first number of tasks from the tasks according to the execution sequence as the target tasks if the first number is smaller than or equal to the second number.
7. A task processing device, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the task processing method according to any one of claims 1 to 5 when executing said computer program.
8. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the task processing method as claimed in any one of claims 1 to 5.
CN202111163122.9A 2021-09-30 2021-09-30 A task processing method and related device Active CN114020422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111163122.9A CN114020422B (en) 2021-09-30 2021-09-30 A task processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111163122.9A CN114020422B (en) 2021-09-30 2021-09-30 A task processing method and related device

Publications (2)

Publication Number Publication Date
CN114020422A CN114020422A (en) 2022-02-08
CN114020422B true CN114020422B (en) 2025-09-02

Family

ID=80055482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111163122.9A Active CN114020422B (en) 2021-09-30 2021-09-30 A task processing method and related device

Country Status (1)

Country Link
CN (1) CN114020422B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582408A (en) * 2020-06-19 2020-08-25 拉扎斯网络科技(上海)有限公司 Data processing method, data processing apparatus, storage medium and electronic device
CN113238861A (en) * 2021-05-08 2021-08-10 北京天空卫士网络安全技术有限公司 Task execution method and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2873830B1 (en) * 2004-07-30 2008-02-22 Commissariat Energie Atomique TASK PROCESSING ORDERING METHOD AND DEVICE FOR CARRYING OUT THE METHOD
US8560365B2 (en) * 2010-06-08 2013-10-15 International Business Machines Corporation Probabilistic optimization of resource discovery, reservation and assignment
CN108255595A (en) * 2018-01-16 2018-07-06 北京中关村科金技术有限公司 A kind of dispatching method of data task, device, equipment and readable storage medium storing program for executing
CN109408215B (en) * 2018-11-07 2021-10-01 郑州云海信息技术有限公司 A task scheduling method and device for computing nodes
CN111459628B (en) * 2020-03-12 2023-11-28 大庆市凯德信信息技术有限公司 Spark platform task scheduling method based on improved quantum ant colony algorithm
CN111880922A (en) * 2020-08-07 2020-11-03 北京达佳互联信息技术有限公司 Processing method, device and equipment for concurrent tasks
CN112667376A (en) * 2020-12-23 2021-04-16 数字广东网络建设有限公司 Task scheduling processing method and device, computer equipment and storage medium
CN112882809A (en) * 2021-02-23 2021-06-01 国汽(北京)智能网联汽车研究院有限公司 Method and device for determining computing terminal of driving task and computer equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582408A (en) * 2020-06-19 2020-08-25 拉扎斯网络科技(上海)有限公司 Data processing method, data processing apparatus, storage medium and electronic device
CN113238861A (en) * 2021-05-08 2021-08-10 北京天空卫士网络安全技术有限公司 Task execution method and device

Also Published As

Publication number Publication date
CN114020422A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN112835698B (en) Dynamic load balancing method for request classification processing based on heterogeneous clusters
US10761897B2 (en) Predictive model-based intelligent system for automatically scaling and managing provisioned computing resources
CN110928689B (en) Self-adaptive resource management method and device for distributed reinforcement learning training
CN108845874B (en) Dynamic resource allocation method and server
CN112990958B (en) Data processing method, device, storage medium and computer equipment
CN111429142A (en) Data processing method and device and computer readable storage medium
CN109976901A (en) A kind of resource regulating method, device, server and readable storage medium storing program for executing
CN114064262A (en) Method, apparatus and program product for managing computing resources in a storage system
CN106464733A (en) Method and device for adjusting virtual resources in cloud computing
CN113543160A (en) 5G slice resource allocation method and device, computing equipment and computer storage medium
CN112312299A (en) Service unloading method, device and system
CN112416568A (en) Duration estimation method and duration estimation device for audio and video transcoding task
CN117539648A (en) Service quality management method and device for electronic government cloud platform
CN113326132A (en) Information adjusting method, equipment and storage medium
CN115269182B (en) Resource adjustment method, device, server and storage medium
CN112669091A (en) Data processing method, device and storage medium
CN118502967B (en) A delay-aware container scheduling method, system and terminal for cluster upgrade
CN118301002B (en) Edge DPU computing force collaborative optimization unloading method for demand self-adaptive prediction
CN114020422B (en) A task processing method and related device
CN116566829B (en) Service function chain reliability deployment method, system and device based on deep learning
CN110312272B (en) Network service block resource allocation method and storage medium
Felsy et al. Actor‐Critic Optimization Based Adaptive Task Scheduling Using Deep Double Dueling Q Network for Heterogeneous Cloud Environments
CN120499018B (en) Multi-domain Internet of things task allocation optimization model training method, device, equipment and medium
CN119759582B (en) Cloud server resource allocation method and system
CN120011002B (en) A cloud server virtual machine management method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant