CN111949400B - Task resource consumption allocation method, device and equipment of business line and storage medium - Google Patents

Task resource consumption allocation method, device and equipment of business line and storage medium Download PDF

Info

Publication number
CN111949400B
CN111949400B CN202010755780.6A CN202010755780A CN111949400B CN 111949400 B CN111949400 B CN 111949400B CN 202010755780 A CN202010755780 A CN 202010755780A CN 111949400 B CN111949400 B CN 111949400B
Authority
CN
China
Prior art keywords
resource consumption
task
consumption data
subtask
leaf
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
CN202010755780.6A
Other languages
Chinese (zh)
Other versions
CN111949400A (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.)
Shanghai Zhongtongji Network Technology Co Ltd
Original Assignee
Shanghai Zhongtongji Network 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 Shanghai Zhongtongji Network Technology Co Ltd filed Critical Shanghai Zhongtongji Network Technology Co Ltd
Priority to CN202010755780.6A priority Critical patent/CN111949400B/en
Publication of CN111949400A publication Critical patent/CN111949400A/en
Application granted granted Critical
Publication of CN111949400B publication Critical patent/CN111949400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a task resource consumption allocation method, device and equipment of a service line and a storage medium, wherein the method comprises the following steps: acquiring a dependency relationship among all tasks and inherent resource consumption data of all tasks, wherein all tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask; if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks; and determining the shared resource consumption data of each leaf task as corresponding business line target resource consumption data and storing the same. The occupation condition of each service line consuming big data computing resource is counted, and data support and decision are provided for big data computing resource allocation optimization and service line cost investment.

Description

Task resource consumption allocation method, device and equipment of business line and storage medium
Technical Field
The invention relates to the technical field of resource allocation and optimization, in particular to a task resource consumption allocation method, device, equipment and storage medium of a service line.
Background
The statistics of the large data computing resources occupied by each service line has important guiding significance for resource allocation optimization and service line cost investment decision. In the related art, a scheme for counting the occupation of big data computing resources by each service line is lacking, so that the distribution optimization of the big data computing resources and the investment decision of the service line cost are imperfect.
Disclosure of Invention
In view of the above, a method, a device, and a storage medium for allocating task resources of a service line are provided to solve the problems of optimization of big data computing resource allocation and imperfect decision-making of service line cost investment in the related art.
The invention adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a task resource consumption allocation method for a service line, where the method includes:
the method comprises the steps of obtaining a dependency relationship among tasks and inherent resource consumption data of the tasks, wherein the tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask in the subtasks;
if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks;
and determining the shared resource consumption data of each leaf task as corresponding business line target resource consumption data and storing the same.
In a second aspect, an embodiment of the present application provides a task resource consumption allocation device for a service line, where the device includes:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the dependency relationship among all tasks and the inherent resource consumption data of all tasks, wherein all tasks are divided into a root task, a subtask and a leaf task, the subtask is divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask in the subtask;
the shared resource consumption data calculation module is used for calculating the shared resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data when the scheduling operation of the leaf task is detected, wherein the leaf task is a task without a subsequent task;
and the target resource consumption data determining module is used for determining and storing the allocated resource consumption data of each leaf task as corresponding business line target resource consumption data.
In a third aspect, embodiments of the present application provide an apparatus, including:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the task resource consumption allocation method of the service line according to the first aspect of the embodiment of the application;
the processor is configured to invoke and execute the computer program in the memory.
In a fourth aspect, an embodiment of the present application provides a storage medium, where a computer program is stored, where the computer program is executed by a processor to implement each step in a task resource consumption allocation method of a service line according to the first aspect.
According to the technical scheme, the calculation resource consumption of each task in the task workflow is distributed layer by layer until the task is left, the resource consumption data of each service line is finally calculated, the occupation condition of the large data calculation resource consumed by each service line is effectively counted, and data support and decision are provided for the large data calculation resource allocation optimization and service line cost investment.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that 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 resource consumption apportionment method of a service line provided by an embodiment of the invention;
FIG. 2 is a diagram of a system architecture suitable for use in embodiments of the present invention;
FIG. 3 is a schematic diagram of an allocation principle applicable to the embodiment of the present invention;
fig. 4 is a schematic structural diagram of a task resource consumption allocation device of a service line according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, based on the examples herein, which are within the scope of the invention as defined by the claims, will be within the scope of the invention as defined by the claims.
Examples
Fig. 1 is a flowchart of a method for allocating task resources of a service line according to an embodiment of the present invention, where the method may be executed by an apparatus for allocating task resources of a service line according to an embodiment of the present invention, and the apparatus may be implemented in software and/or hardware. Referring to fig. 1, the method may specifically include the steps of:
s101, acquiring a dependency relationship among all tasks and inherent resource consumption data of all tasks, wherein all tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask.
Specifically, the relation among the tasks is the dependency relation of the task workflow, the preposed task relation and the subsequent task relation, and the relation can also comprise the service line identification corresponding to each task. The dependency relationship between each task and the inherent resource consumption data of each task are stored in a database, and in addition, the unique identification of each task can be stored in the database. The type of each task is determined according to the dependency relationship between each task, for example, a root task, a subtask or a leaf task, and in addition, in order to distinguish each subtask, the subtask of the root task is called a first subtask, and other subtasks are called second subtasks.
S102, if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks.
The current resource consumption data of each task is called as inherent resource consumption data, and in addition, the inherent resource consumption data of the root task is equal to the allocated resource consumption data, and the allocated sub-resource consumption data of the subtask and the leaf task are related to the allocated resource consumption data of the front task, the number of the subsequent tasks of the front task and the inherent resource consumption data of the current sub-node or the leaf node.
Specifically, when the scheduling operation of the leaf task is detected, a resource allocation algorithm of a business line corresponding to the leaf task is triggered, so that the allocation resource consumption data of each leaf task is calculated according to the dependency relationship and the inherent resource consumption data.
S103, determining the shared resource consumption data of each leaf task as corresponding business line target resource consumption data and storing the data.
The service line corresponding to each leaf task is determined according to the service line identifier corresponding to each task, the allocated resource consumption data of each leaf task is determined to be the target allocated resource consumption data of the corresponding service line, and the target allocated resource consumption data is stored in a database.
In a specific example, fig. 2 shows a system architecture diagram in which dependency relationships between respective tasks, inherent resource consumption data of respective tasks, and target resource consumption data of respective business lines are all stored in a database.
According to the technical scheme, the calculation resource consumption of each task in the task workflow is distributed layer by layer until the task is left, the resource consumption data of each service line is finally calculated, the occupation condition of the large data calculation resource consumed by each service line is effectively counted, and data support and decision are provided for the large data calculation resource allocation optimization and service line cost investment.
In a specific example, fig. 3 shows a schematic diagram of an allocation principle, and a calculation process of allocation resource data is described with reference to fig. 3, wherein circles represent tasks and arrow directions represent subsequent dependencies of the tasks.
The calculation of the shared resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data can be realized by the following specific steps: based on the dependency relationship; the apportioned resource consumption data of each first subtask is calculated according to the inherent resource consumption data of the root task and the inherent resource consumption data of each first subtask.
Referring to fig. 3, the tasks are A, B, C, D, E, F, G, H and I, respectively, and their inherent resource consumption data are 100, 40, 200, 40, 120, 40, 80, 60 and 50, respectively, denoted by Ca1, cb1, cc1, cd1, ce1, cf1, cg1, ch1 and Ci1, respectively, wherein the inherent resource consumption data and the apportioned resource consumption data of the root task are the same. These may also be referred to as task identifications. According to the dependency relationship, determining that the task A and the task F are root tasks, the subtasks of the task A are the task B and the task C, the subtasks of the task F are the task C and the task G, the leaf task of the task B is the task D, the leaf task of the task C is the task E, the subtasks of the task D and the task I, the subtasks of the task G are the task H, and the leaf task of the task H is the task I. Therefore, the root task is task A and task F, and the first subtask is task B, task C and task G; the second subtask is task H; the leaf tasks are task D, task E and task I.
In detail, for each first subtask, the ratio of the inherent resource consumption data of the root task to the number of subsequent tasks of the root task is added to the inherent resource consumption data of the first subtask, and the allocated resource consumption data of each first subtask is calculated.
In this particular example, task A and task F are root tasks, which may also be referred to as start tasks, i.e., tasks that have no pre-dependencies. The inherent resource consumption data of the task B is 40, and B only has one front task A, and the task A has two subsequent tasks, so that the shared resource consumption data of the first subtask B is Cb 2:40+100/2=90; the inherent resource consumption data of the task C is 200, and the shared resource consumption data of the first subtask C is Cc2:200+100/2+40/2=270 because the task C has two prepositioned tasks A and F and each task A and F has two successor tasks; the inherent resource consumption data of the task G is 80, and since the task G has one preceding task F and the task F has two subsequent tasks, the shared resource consumption data of the first sub-task G is Cg 2:80+40/2=100.
Illustratively, the apportioned resource consumption data for each second subtask is calculated based on the apportioned resource consumption data for each first subtask and the inherent resource consumption data for the second subtask.
In detail, for each second subtask, the ratio of the inherent resource consumption data of the front task of the second subtask to the number of the subsequent tasks of the front task is added with the inherent resource consumption data of the second subtask, and the allocated resource consumption data of each second subtask is calculated.
Specifically, in this specific example, the second subtask is H, where H has a preceding task G and a succeeding task H, and task G has a succeeding task, and thus the allocated resource consumption data of the second subtask H is ch2:60+100=160.
In the actual application process, the number of layers and the number of tasks involved in a specific service line are determined by the service condition. The second subtask is a generic term for distinguishing from the first subtask, and the second subtask does not represent a subtask of the second layer. In addition, if the second subtask is not a leaf task, the calculation of the apportioned resource consumption data continues according to the method, and so on, until a leaf task is calculated.
Illustratively, the apportioned resource consumption data for each leaf task is calculated based on the apportioned resource consumption data for each second sub-task and the inherent resource consumption data for the leaf task.
In detail, for each leaf task, the ratio of the inherent resource consumption data of the front task of the leaf task to the number of the subsequent tasks of the front task is added to the inherent resource consumption data of the leaf task, and the allocated resource consumption data of each leaf task is calculated.
Specifically, the inherent resource consumption data of the task D is 40, the leaf task D has two prepositioned tasks B and C, the task B has one successor task, and the task C has three successor tasks, so the apportioned resource consumption data of the leaf task D is Cd2:40+90+270/3=220; the inherent resource consumption data of the leaf task E is 120, and the task E has a preposed task C, and the task C has three subsequent tasks, so that the allocated resource consumption data of the leaf task E is Ce2:120+270/3=210; the inherent resource consumption data of task I is 50, while task I has a preceding task H and task H has a succeeding task, so the apportioned resource consumption data of leaf task I is ch2:50+160+270/3=300.
In summary, according to the dependency relationship between each task and the unique identifier of the service line, the target resource consumption data of each service line is determined. In the above specific example, the service line 1 has a leaf task D, and thus, the target resource consumption data of the service line 1 is 220; business line 2 has a leaf task E, so the target resource consumption data of business line 2 is 210; the service line 3 has a leaf task I, and thus, the target resource consumption data of the service line 3 is 300. In the actual application process, the total resource consumption is not changed due to allocation, that is, the target resource consumption data sum of each business line is the same as the inherent resource consumption data sum of each task. In this particular example, the target resource consumption data sum of each service line is 220+210+300=730; the sum of the inherent resource consumption data of the respective tasks is the same as 100+40+40+200+80+40+120+60+50=730.
In addition, the embodiment of the application has the following beneficial effects: in a big data task scheduling system, tasks are associated according to a dependency relationship in a DAG (Directed acyclic graph ) graph mode, and the scheduling system schedules each task according to the dependency relationship, so that the current task is scheduled after all the front-end tasks are completed.
Fig. 4 is a schematic structural diagram of a task resource consumption allocation device for a service line according to an embodiment of the present invention, where the device is suitable for executing a task resource consumption allocation method for a service line according to an embodiment of the present invention. As shown in fig. 4, the apparatus may specifically include an acquisition module 401, an allocated resource consumption data calculation module 402, and a target resource consumption data determination module 403.
The acquiring module 401 is configured to acquire a dependency relationship between each task and inherent resource consumption data of each task, where each task is divided into a root task, a subtask and a leaf task, the subtask is divided into a first subtask and a second subtask, the first subtask includes a subtask of the root task, and the second subtask includes other subtasks except the first subtask in the subtask; an allocated resource consumption data calculation module 402, configured to calculate, when a scheduling operation of a leaf task is detected, allocated resource consumption data of each leaf task according to a dependency relationship and inherent resource consumption data, where the leaf task is a task without a subsequent task; the target resource consumption data determining module 403 is configured to determine and store the allocated resource consumption data of each leaf task as corresponding business line target resource consumption data.
According to the technical scheme, the calculation resource consumption of each task in the task workflow is distributed layer by layer until the task is left, the resource consumption data of each service line is finally calculated, the occupation condition of the large data calculation resource consumed by each service line is effectively counted, and data support and decision are provided for the large data calculation resource allocation optimization and service line cost investment.
Optionally, the dependency relationship includes a pre-task relationship, a subsequent task relationship, and service line identifiers corresponding to the tasks.
Optionally, the shared resource consumption data calculation module 402 is specifically configured to:
the first computing sub-module is used for computing the allocated resource consumption data of each first sub-task according to the inherent resource consumption data of the root task and the inherent resource consumption data of each first sub-task based on the dependency relationship;
the second calculation sub-module is used for calculating the allocated resource consumption data of each second subtask according to the allocated resource consumption data of each first subtask and the inherent resource consumption data of the second subtask based on the dependency relationship;
and the third calculation sub-module is used for calculating the allocated resource consumption data of each leaf task according to the allocated resource consumption data of each second sub-task and the inherent resource consumption data of the leaf task based on the dependency relationship.
Optionally, the first computing submodule is specifically configured to: for each first subtask, adding the ratio of the inherent resource consumption data of the root task to the number of subsequent tasks of the root task and the inherent resource consumption data of the first subtask, and calculating the allocated resource consumption data of each first subtask;
the second calculation submodule is specifically configured to: for each second subtask, adding the ratio of the inherent resource consumption data of the front task of the second subtask to the number of the subsequent tasks of the front task to the inherent resource consumption data of the second subtask, and calculating the allocated resource consumption data of each second subtask;
the third calculation sub-module is specifically configured to: and adding the ratio of the inherent resource consumption data of the front task of each leaf task to the number of the subsequent tasks of the front task and the inherent resource consumption data of the leaf task to each leaf task, and calculating the allocated resource consumption data of each leaf task.
Optionally, the target resource consumption data determining module 403 is specifically configured to:
determining service lines corresponding to each leaf task according to service line identifiers corresponding to each task;
and determining the allocated resource consumption data of each leaf task as target allocated resource consumption data of the corresponding business line.
The task resource consumption allocation device of the service line provided by the embodiment of the invention can execute the task resource consumption allocation method of the service line provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
An embodiment of the present invention further provides an apparatus, referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus, as shown in fig. 5, where the apparatus includes: a processor 510 and a memory 520 connected to the processor 510; the memory 520 is configured to store a computer program at least for executing the task resource consumption allocation method of the service line in the embodiment of the present invention; processor 510 is used to invoke and execute the computer program in the memory; the task resource consumption allocation method of the service line at least comprises the following steps: the method comprises the steps of obtaining a dependency relationship among tasks and inherent resource consumption data of the tasks, wherein the tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask; if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks; and determining the shared resource consumption data of each leaf task as corresponding business line target resource consumption data and storing the same.
The embodiment of the invention also provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the method realizes the steps in the task resource consumption allocation method of the service line as in the embodiment of the invention: the method comprises the steps of obtaining a dependency relationship among tasks and inherent resource consumption data of the tasks, wherein the tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask; if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks; and determining the shared resource consumption data of each leaf task as corresponding business line target resource consumption data and storing the same.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present invention, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "plurality" means at least two.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (7)

1. The task resource consumption allocation method of the service line is characterized by comprising the following steps of:
the method comprises the steps of obtaining a dependency relationship among tasks and inherent resource consumption data of the tasks, wherein the tasks are divided into root tasks, subtasks and leaf tasks, the subtasks are divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask in the subtasks;
if the scheduling operation of the leaf tasks is detected, calculating the allocated resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data, wherein the leaf tasks are tasks without subsequent tasks;
determining and storing the allocated resource consumption data of each leaf task as corresponding business line target resource consumption data;
the calculating the shared resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data comprises the following steps:
based on the dependency relationship;
calculating the allocated resource consumption data of each first subtask according to the inherent resource consumption data of the root task and the inherent resource consumption data of each first subtask;
calculating the allocated resource consumption data of each second subtask according to the allocated resource consumption data of each first subtask and the inherent resource consumption data of the second subtask;
calculating the allocated resource consumption data of each leaf task according to the allocated resource consumption data of each second subtask and the inherent resource consumption data of the leaf task;
the calculating the allocated resource consumption data of each first subtask according to the inherent resource consumption data of the root task and the inherent resource consumption data of each first subtask comprises the following steps:
for each first subtask, adding the ratio of the inherent resource consumption data of the root task to the number of subsequent tasks of the root task and the inherent resource consumption data of the first subtask, and calculating the allocated resource consumption data of each first subtask;
the calculating the allocated resource consumption data of each second subtask according to the allocated resource consumption data of each first subtask and the inherent resource consumption data of the second subtask comprises the following steps:
for each second subtask, adding the ratio of the inherent resource consumption data of the front task of the second subtask to the number of the subsequent tasks of the front task to the inherent resource consumption data of the second subtask, and calculating the allocated resource consumption data of each second subtask;
the calculating the allocated resource consumption data of each leaf task according to the allocated resource consumption data of each second subtask and the inherent resource consumption data of the leaf task comprises the following steps:
and adding the ratio of the inherent resource consumption data of the front task of each leaf task to the number of the subsequent tasks of the front task and the inherent resource consumption data of the leaf task to each leaf task, and calculating the allocated resource consumption data of each leaf task.
2. The method of claim 1, wherein the dependency relationship comprises a pre-task relationship, a post-task relationship, and a business line identifier corresponding to each task.
3. The method of claim 2, wherein determining and storing the apportioned resource consumption data for each leaf task as corresponding business line target resource consumption data comprises:
determining service lines corresponding to each leaf task according to service line identifiers corresponding to each task;
and determining the allocated resource consumption data of each leaf task as target allocated resource consumption data of the corresponding business line.
4. A task resource consumption apportionment device for a service line, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the dependency relationship among all tasks and the inherent resource consumption data of all tasks, wherein all tasks are divided into a root task, a subtask and a leaf task, the subtask is divided into a first subtask and a second subtask, the first subtask comprises the subtask of the root task, and the second subtask comprises other subtasks except the first subtask in the subtask;
the shared resource consumption data calculation module is used for calculating the shared resource consumption data of each leaf task according to the dependency relationship and the inherent resource consumption data when the scheduling operation of the leaf task is detected, wherein the leaf task is a task without a subsequent task;
the target resource consumption data determining module is used for determining and storing the allocated resource consumption data of each leaf task as corresponding business line target resource consumption data;
the apportioned resource consumption data calculation module includes:
the first calculation sub-module is used for calculating the allocated resource consumption data of each first sub-task according to the inherent resource consumption data of the root task and the inherent resource consumption data of each first sub-task based on the dependency relationship;
the second calculation sub-module is used for calculating the allocated resource consumption data of each second subtask according to the allocated resource consumption data of each first subtask and the inherent resource consumption data of the second subtask based on the dependency relationship;
the third calculation sub-module is used for calculating the allocated resource consumption data of each leaf task according to the allocated resource consumption data of each second sub-task and the inherent resource consumption data of the leaf task based on the dependency relationship;
the first computing submodule is specifically configured to: for each first subtask, adding the ratio of the inherent resource consumption data of the root task to the number of subsequent tasks of the root task and the inherent resource consumption data of the first subtask, and calculating the allocated resource consumption data of each first subtask;
the second calculation submodule is specifically configured to: for each second subtask, adding the ratio of the inherent resource consumption data of the front task of the second subtask to the number of the subsequent tasks of the front task to the inherent resource consumption data of the second subtask, and calculating the allocated resource consumption data of each second subtask;
the third calculation sub-module is specifically configured to: and adding the ratio of the inherent resource consumption data of the front task of each leaf task to the number of the subsequent tasks of the front task and the inherent resource consumption data of the leaf task to each leaf task, and calculating the allocated resource consumption data of each leaf task.
5. The apparatus of claim 4, wherein the dependency relationship comprises a pre-task relationship, a post-task relationship, and a line of business identifier corresponding to each task.
6. An apparatus, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the task resource consumption allocation method of the business line according to any one of claims 1 to 3;
the processor is configured to invoke and execute the computer program in the memory.
7. A storage medium storing a computer program which, when executed by a processor, performs the steps of the method of allocating task resource consumption of a service line according to any one of claims 1 to 3.
CN202010755780.6A 2020-07-31 2020-07-31 Task resource consumption allocation method, device and equipment of business line and storage medium Active CN111949400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010755780.6A CN111949400B (en) 2020-07-31 2020-07-31 Task resource consumption allocation method, device and equipment of business line and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010755780.6A CN111949400B (en) 2020-07-31 2020-07-31 Task resource consumption allocation method, device and equipment of business line and storage medium

Publications (2)

Publication Number Publication Date
CN111949400A CN111949400A (en) 2020-11-17
CN111949400B true CN111949400B (en) 2024-04-09

Family

ID=73338946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010755780.6A Active CN111949400B (en) 2020-07-31 2020-07-31 Task resource consumption allocation method, device and equipment of business line and storage medium

Country Status (1)

Country Link
CN (1) CN111949400B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170861A (en) * 2018-01-25 2018-06-15 曲逸文 A kind of distributed data base system cooperative optimization method based on Dynamic Programming
CN110784374A (en) * 2019-10-25 2020-02-11 上海中通吉网络技术有限公司 Method, device, equipment and system for monitoring operation state of service system
CN111290852A (en) * 2018-12-06 2020-06-16 富士通株式会社 Method, system and computer readable medium for scheduling task graph operations
CN111339643A (en) * 2020-02-14 2020-06-26 北京字节跳动网络技术有限公司 Resource consumption evaluation method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123184B (en) * 2013-04-28 2017-12-22 国际商业机器公司 A kind of method and system for being used to distribute resource for the task in building process

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170861A (en) * 2018-01-25 2018-06-15 曲逸文 A kind of distributed data base system cooperative optimization method based on Dynamic Programming
CN111290852A (en) * 2018-12-06 2020-06-16 富士通株式会社 Method, system and computer readable medium for scheduling task graph operations
CN110784374A (en) * 2019-10-25 2020-02-11 上海中通吉网络技术有限公司 Method, device, equipment and system for monitoring operation state of service system
CN111339643A (en) * 2020-02-14 2020-06-26 北京字节跳动网络技术有限公司 Resource consumption evaluation method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向优先级任务的移动边缘计算资源分配方法;董思岐,吴嘉慧,李海龙,屈毓锛,胡磊;《计算机工程》;20200421;第46卷(第3期);第1-6页 *

Also Published As

Publication number Publication date
CN111949400A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
US20170046201A1 (en) Backfill scheduling for embarrassingly parallel jobs
WO2016078008A1 (en) Method and apparatus for scheduling data flow task
CN102722417B (en) Distribution method and device for scan task
US8392926B2 (en) Scheduling heterogeneous partitioned resources with sharing constraints
US20110246998A1 (en) Method for reorganizing tasks for optimization of resources
US20110264482A1 (en) Resource matching
US8869148B2 (en) Concurrency identification for processing of multistage workflows
CN110866687A (en) Task allocation method and device
CN115934362B (en) Deep learning-oriented server non-perception computing cluster scheduling method and product
Xu et al. Resource allocation vs. business process improvement: How they impact on each other
CN111949400B (en) Task resource consumption allocation method, device and equipment of business line and storage medium
CN110088730B (en) Task processing method, device, medium and equipment
CN116151582A (en) Automatic version scheduling method and device based on resource identification and storage medium
CN115496373A (en) Task allocation method and device applied to agile management platform
CN106055862A (en) Novel efficient heuristic-type two-stage parallel branch-and-bound method
CN110928649A (en) Resource scheduling method and device
CN110008002B (en) Job scheduling method, device, terminal and medium based on stable distribution probability
CN112766719A (en) Task allocation method and device
Yao et al. Efficient cost optimization for workflow scheduling on grids
CN112085396A (en) Algorithm model configuration method based on state-of-the-earth space planning current situation evaluation index
Li et al. Workflow scheduling algorithm based on control structure reduction in cloud environment
Toporkov et al. Budget and Cost-aware Resources Selection Strategy in Cloud Computing Environments
Yuan et al. Efficient scheduling of DAG tasks on multi-core processor based parallel systems
CN112379998B (en) Switching time delay optimization method based on task fusion and task scheduling
CN116401030A (en) Method, device and equipment for intelligently scheduling computing resources

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
GR01 Patent grant