WO2017054650A1 - 任务分发方法、装置及系统 - Google Patents

任务分发方法、装置及系统 Download PDF

Info

Publication number
WO2017054650A1
WO2017054650A1 PCT/CN2016/099289 CN2016099289W WO2017054650A1 WO 2017054650 A1 WO2017054650 A1 WO 2017054650A1 CN 2016099289 W CN2016099289 W CN 2016099289W WO 2017054650 A1 WO2017054650 A1 WO 2017054650A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
resource quantity
resources
execution node
execution
Prior art date
Application number
PCT/CN2016/099289
Other languages
English (en)
French (fr)
Inventor
刘鹏
Original Assignee
阿里巴巴集团控股有限公司
刘鹏
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 阿里巴巴集团控股有限公司, 刘鹏 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017054650A1 publication Critical patent/WO2017054650A1/zh

Links

Images

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]

Definitions

  • the present application relates to the field of automation technologies, and in particular, to a task distribution method, apparatus, and system.
  • the task execution system is a system for processing tasks, and the task execution system can execute tasks sent by each service line, wherein the service line is a collective name of a plurality of machines that send tasks to the task execution system.
  • the service line is a collective name of a plurality of machines that send tasks to the task execution system.
  • FIG. 1 a structural diagram of a task execution system, wherein a master control machine is represented by a master control node, and an execution machine is represented by an execution node; specifically, a master control node 11 and a plurality of execution nodes connected to the master control node 11 12, a plurality of service lines 13 connected to the master control node 11; a plurality of execution nodes 12 adopting an execution node 1, an execution node 2, ... an execution node N, and a plurality of service lines 13 adopt a service line 1, a service line 2, ...
  • the line of business M represents where N and M are both non-zero natural numbers.
  • the business process of the task execution system is: the master control node receives tasks from each line of business, and places all tasks in their own execution queues in order. Then, the master control node randomly sends the received task to the execution node connected to it according to the sequence of the tasks in the execution queue, so that the execution node performs the task.
  • the tasks of the respective service lines are not isolated on the master control node, that is, the tasks of any service line can use all the execution nodes to perform their tasks, which results in the service line of the single line of business when there are too many tasks.
  • the task will occupy the execution queue, so that the master control node can only handle the tasks of the line of business, but cannot handle the tasks of other line of business, thereby affecting the execution of other line of business tasks.
  • the present application provides a task distribution method, device, and system.
  • the method can be used to perform isolation operations on different service line tasks, so that tasks of each service line can be mutually indiscriminate.
  • a task distribution method includes:
  • Target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is required for processing the target task. Number of resources;
  • each service line corresponds to one service line identifier
  • each service line identifier corresponds to one resource group
  • each resource group includes The first available resource quantity currently available for a service line, and the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate that the service line can be used simultaneously.
  • the target first available resource quantity is not less than the target required resource quantity, distributing the target task to an execution node connected to the master control node.
  • the method further includes:
  • target first available resource quantity is less than the target required resource quantity, storing the target task into an execution queue until the target first available resource quantity is not less than the target required resource quantity.
  • the distributing the target task to an execution node connected to the master control node comprises:
  • each type of execution node set corresponds to one cluster,
  • Each cluster includes an execution node identifier of each execution node in the set of execution nodes corresponding to itself; each cluster corresponds to a service line identifier of one or more service lines using a set of execution nodes of a corresponding type;
  • each execution node identifier corresponds to a second available resource quantity
  • the total available resource quantity of each cluster is the sum of the second available resource numbers of the respective execution node identifiers included therein; Determining, as the target execution node identifier, an execution node identifier of the target cluster, including:
  • one of the one or more execution node identifiers is determined to be the target execution node identifier.
  • the method further includes:
  • the target task is stored in an execution queue until the one or more execution node identities are present.
  • the process of determining the total available resources of the target cluster is not less than the required resource quantity of the target, including:
  • the total number of available resources of the target cluster is greater than or equal to the sum of the first rated resource numbers of the respective resource groups corresponding to the target cluster, determining that the total available resources of the target cluster is not less than the The amount of resources required for the target; or,
  • the total available resource quantity of the target cluster is smaller than the sum of the first rated resource quantity of each service line in the target cluster, determining whether the total available resource quantity of the target cluster is not less than the target required resource The quantity, if yes, determines that the total amount of available resources is not less than the number of required resources of the target.
  • the method further includes:
  • the target task If it is determined that the total available resource quantity of the target cluster is less than the target required resource quantity, storing the target task into an execution queue until determining that the total available resource quantity of the target cluster is not less than The amount of resources required for the target.
  • the method further includes:
  • the total available resource quantity of the target cluster, the target first available resource quantity of the target resource group, and the second available resource of the target execution node increases the amount of resources required for the target.
  • the distributing the target task to an execution node connected to the master control node comprises:
  • each execution node identifier corresponds to one second available resource quantity, and each execution node is second available
  • the number of resources has a second rated resource quantity, and each second rated resource quantity is used to indicate an upper limit value of the number of resources that the execution node can simultaneously use
  • the method further includes:
  • the target execution node After the target execution node completes the execution of the target task, increasing the target first available resource quantity of the target resource group and the second available resource quantity of the target execution node by the target required resource quantity .
  • a task distribution device comprising:
  • a receiving unit configured to receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is to process the target The amount of resources required for the task;
  • An acquiring unit configured to acquire a target first available resource quantity in the target resource group corresponding to the target service line identifier, where each service line corresponds to one service line identifier, and each service line identifier corresponds to one resource group, and each The resource group includes the first available resource quantity currently available for one service line, and the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to represent the service line.
  • a distribution unit configured to distribute the target task to an execution node connected to the master control node if the target first available resource quantity is not less than the target required resource quantity.
  • the method further includes:
  • a first storage unit configured to store the target task into an execution queue if the target first available resource quantity is less than the target required resource quantity, until the target first available resource quantity is not less than the The amount of resources required for the target.
  • the distribution unit comprises:
  • Determining a cluster unit configured to determine a target cluster corresponding to the target line of service identifier; wherein, in a case where all execution nodes connected to the master control node are a plurality of types of execution node sets, each type of execution The node set corresponds to one cluster, each cluster includes an execution node identifier of each execution node in the execution node set corresponding to itself; each cluster corresponds to a service line identifier of one or more service lines that use a corresponding type of execution node set;
  • a first determining node unit configured to determine an execution node identifier in the target cluster as a target execution node identifier
  • a distribution task unit configured to distribute the target task to a target execution node corresponding to the target execution node identifier.
  • each execution node identifier corresponds to a second available resource quantity
  • the total available resource quantity of each cluster is the sum of the second available resource numbers of the respective execution node identifiers included therein;
  • a first determining quantity unit configured to determine that the total available resource quantity of the target cluster is not less than the target required resource quantity
  • a first determining unit configured to determine, if the total number of available resources of the target cluster is not less than the target required resource quantity, whether there is one of the second available resource quantity not less than the target required resource quantity Or multiple execution node identifiers;
  • a second determining node unit configured to determine, as the target execution node identifier, one of the one or more execution node identifiers if the one or more execution node identifiers are present.
  • the method further includes:
  • a second storage unit configured to store the target task into the execution queue if the one or more execution node identifiers are not present until the one or more execution node identifiers exist.
  • the first determined quantity unit comprises:
  • a second determining quantity unit configured to determine, in a case where the total available resource quantity of the target cluster is greater than or equal to a sum of the first rated resource numbers of the respective resource groups corresponding to the target cluster, The total amount of available resources is not less than the required amount of resources for the target; or,
  • a third determining quantity unit configured to determine, according to a sum of a total available resource quantity of the target cluster that is smaller than a first rated resource quantity of each service line in the target cluster, whether the total available resource quantity of the target cluster is Not less than the required amount of resources of the target, and if so, determining that the total available resources is not less than the target required amount of resources.
  • the method further includes:
  • a third storage unit configured to: if the total available resource quantity of the target cluster is smaller than the target required resource quantity, store the target task into an execution queue until determining the target cluster The total amount of available resources is not less than the amount of resources required for the target.
  • the method further includes:
  • a first reducing unit configured to subtract the total available resource quantity of the target cluster, the target first available resource quantity of the target resource group, and the second available resource quantity of the target execution node by the target The amount of resources required;
  • a first adding unit configured to: after the target execution node completes execution of the target task, the total available resource quantity of the target cluster, the target first available resource quantity of the target resource group, and the target The number of second available resources of the execution node increases the amount of resources required by the target.
  • the distribution unit comprises:
  • a second determining unit configured to determine whether there is one or more execution node identifiers that the second available resource quantity is not less than the target required resource quantity; wherein each execution node identifier corresponds to a second available resource quantity, and The second available resource quantity of each execution node has a second rated resource quantity, and each second rated resource quantity is used to indicate an upper limit value of the number of resources that the execution node can simultaneously use;
  • a third determining node unit configured to determine, as the target execution node identifier, one of the one or more execution node identifiers if the one or more execution node identifiers are present;
  • a second distribution task unit configured to distribute the target task to a target execution node corresponding to the target execution node identifier.
  • the method further includes:
  • a second reducing unit configured to subtract the target first available resource quantity of the target resource group and the second available resource quantity of the target execution node by the target required resource quantity
  • a second adding unit configured to increase a target first available resource quantity of the target resource group and a second available resource quantity of the target execution node after the target execution node completes execution of the target task The amount of resources required for the target.
  • a task distribution system comprising:
  • a master control node a server connected to the master control node, a plurality of execution nodes connected to the master control node, and a plurality of service lines connected to the master control node; one of the plurality of service lines is Target line of business;
  • the target service line is configured to send target data information to the master control node
  • the server is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line, and The first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line;
  • the master control node is configured to receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is processed.
  • the number of resources to be used by the target task in the server connected to the master control node, obtaining the target first available resource quantity in the target resource group corresponding to the target service line identifier; if the target is first available If the number of resources is not less than the required number of resources of the target, the target task is distributed to the execution node connected to the master control node.
  • a task distribution system comprising:
  • a master control node a master control node, a plurality of execution nodes connected to the master control node, and a plurality of service lines connected to the master control node; one of the plurality of service lines is a target service line;
  • the target service line is configured to send target data information to the master control node
  • the total control node is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line, Moreover, the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate that the service line can simultaneously use the quantity of resources.
  • target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is The number of resources required to process the target task; the number of the first available resources in the target resource group corresponding to the target service line identifier is obtained in the server connected to the master control node; If the number of available resources is not less than the required number of resources of the target, the target task is distributed to the execution node connected to the master control node.
  • the present application sets a resource group for each service line, and sets a first rated resource quantity for each resource group, where the first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line;
  • the present application utilizes a resource group to isolate the tasks of each service line, and uses the first rated resource quantity to limit the maximum amount of resources that a service line can occupy.
  • the master control node performs the task sent by the service line only when the number of the first available resources of the corresponding resource group of the service line is not less than the required number of resources.
  • the number of the first available resources in the corresponding resource group of one service line is smaller than the required number of resources, indicating that the number of resources occupied by the service line has reached or nearly reached the rated resource quantity, and no additional resources are allocated for the service line at this time. Avoid the business line taking up too much resources.
  • the application uses the resource group to isolate the tasks of each service line, and sets a rated resource quantity for each resource group to limit the maximum number of resources that the service line can occupy, thereby avoiding when there are too many tasks in one line of business.
  • Most of the resources of the master control node are used to process the tasks of the service line, and the tasks of other service lines are ignored. Therefore, tasks of each service line can be task-isolated, and the tasks of each service line do not affect each other.
  • FIG. 1 is a schematic structural diagram of a task execution system disclosed in the prior art
  • FIGS. 2a-2b are schematic structural diagrams of a task distribution system disclosed in an embodiment of the present application.
  • FIG. 3 is a flowchart of a task distribution method according to an embodiment of the present application.
  • FIG. 5 is a flowchart of still another task distribution method according to an embodiment of the present application.
  • FIG. 6 is a flowchart of still another task distribution method according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a task distribution apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a distribution unit in a task distribution apparatus according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a first determining node unit in a task distribution apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of still another task distribution apparatus according to an embodiment of the present application.
  • FIG. 11 is another schematic structural diagram of a distribution unit in a task distribution apparatus according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of still another task distribution apparatus according to an embodiment of the present application.
  • the system includes: a master control node 100, a server 200 connected to the master control node 100, and multiple executions connected to the master control node 100.
  • the system includes: the system includes: a master control node 100, a plurality of execution nodes 300 connected to the master control node 100, and the A plurality of service lines 400 connected by the master control node 100.
  • a plurality of execution nodes 300 adopt an execution node 1, an execution node 2, ... an execution node N, and N is a non-zero natural number;
  • a plurality of service lines 400 adopt a service line 1, a service line 2, ... Line of business M indicates that M is a non-zero natural number.
  • the master control node 100 is used to indicate that the task transmitted by the service line is received and the master machine of the execution machine is scheduled.
  • the execution node 300 is used to represent the execution machine that executes the task, and the service line is a general term for a series of machines for generating tasks.
  • Each execution node 300 has a certain execution capability, and the execution capability of the execution node 300 can be represented by the number of resources that the execution node has, that is, the execution node has a higher number of resources, and the execution capability of the execution node is higher, and execution is performed.
  • a node has a low number of resources, and the execution capability of the execution node is low. Since each execution node can perform the tasks distributed by the master control node, the number of resources of each execution node can be used as the total number of resources of the master control node, and the sum of the resources of all the execution nodes is the number of resources of the master control node. sum.
  • the purpose of the present application is to set a service line for each service line to indicate the amount of resources that can be used by the service line.
  • the resource group, and the resource group corresponding to each service line is allocated a maximum value of the number of resources that can be used, that is, the first rated resource quantity, according to the total number of resources of the total control node.
  • the service line On the basis of the foregoing resource group and the first rated resource quantity, when it is determined that the number of resources occupied by one service line is less than the first rated resource quantity, it indicates that the service line can also occupy resources, and therefore, the service line is sent. task. When the number of resources occupied by a service line is not less than the number of the first rated resources, it indicates that the service line has reached the upper limit of the number of resources that it can occupy. At this time, the task sent by the service line cannot be executed.
  • the application uses the resource group to isolate the tasks of each service line, and sets a rated resource quantity for each resource group to limit the maximum number of resources that the service line can occupy, thereby avoiding the task in one line of business. For a long time, most of the resources of the master control node are used to process the tasks of the service line, and the tasks of other service lines are ignored; thus, the tasks of each service line can be separated, and the tasks of the service lines are not affected.
  • the configuration of the first execution node is: CPU48 core, memory 96G
  • the configuration of the second execution node is CPU24 core, memory 48G
  • the configuration of the third execution node is CPU48 core, Memory 96G.
  • the slot is 100, that is, the number of resources is 100.
  • the slot number is 50, that is, the number of resources is 50.
  • the slot of the third execution node is 100, that is, the number of resources is 100.
  • the number of resources may indicate the number of tasks that the execution node can process simultaneously. For example, when the number of resources is 100, it may indicate that the execution node can perform 100 tasks simultaneously.
  • the first rated resource quantity of each line of business is used to indicate the maximum amount of resources that each line of service can occupy. It can be understood that the first rated resource quantity of each service line does not exceed the total number of resources of the master control node. Therefore, before determining the first rated resource quantity of each service line, it is first necessary to determine the sum of the resources of the master control node.
  • a first rated resource quantity may be set for the resource group corresponding to each service line. It can be understood that the same first rated resource quantity can be used for each service line, and different first rated resource quantities can also be set. That is, different first rated resource quantities can be set for each service line according to the number of tasks per service line and the importance of the task.
  • the total number of resources of the master control node is 250.
  • the first service line is more important and the number of tasks is larger.
  • the first service line can be allocated 100 slots, that is, the first rated resource quantity is 100.
  • the second line of business and the third line of business are equally important and the number of services is not much different. Therefore, the second line of service can be allocated 70 slots, that is, the first rated resource is 70; the third is The service line is allocated 80 slots, that is, the first rated resource number is 80.
  • the sum of the first rated resources of the three service lines is the sum of the resources of the master control node.
  • the first service line can be allocated 100 slots, that is, the first rated resource quantity is 100; the second service line can be allocated 80 slots, that is, the first rated resource quantity is 80; The service line is allocated 80 slots, which is the first rated resource. The number is 80.
  • the sum of the first rated resources of the three service lines is greater than the sum of the resources of the total control nodes, that is, the oversold strategy is adopted. This case will be described in detail in the following examples.
  • the number of resources for each line of business can be registered on the server. That is, the server 200 is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line, and The first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line.
  • the amount of resources for each line of service can be stored on the master control node. That is, the master control node 100 is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line. And, the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that the service line can use simultaneously.
  • the master control node only needs to execute the software program provided later in this application.
  • the master control node has to perform subsequent software programs as well as the amount of resources for each line of service. This has higher requirements for the master control node, so the preferred method is the system shown in Figure 2a.
  • the present application provides a task distribution method, and the method is applied to a master control node.
  • the master control node can receive the data information sent by each service line and process the data information to implement the task distribution process.
  • the present application provides a first embodiment of a task distribution method.
  • the number of resources of each service line needs to be registered on the master control node or the server.
  • the resource group corresponding to the service line identifier of each service line is registered on the master control node or the server, and each resource group maintains a first available resource quantity; the first available resource quantity is used to indicate the quantity of resources currently available for the service line. Moreover, the first rated resource quantity of each resource group is also registered on the master control node or the server, and the first rated resource quantity is used to indicate the maximum value of the first available resource quantity of each service line.
  • the master control node includes three service lines: a first service line, a second service line, and a third service line; the first service line corresponds to the service line identifier 1, the resource group 1, and the first available resource quantity.
  • the first rated resource quantity is 100; the second service line corresponds to the service line identifier 2, the resource group 2, and the first available resource quantity 2, and the first rated resource quantity is 70; the third service line corresponds to the service line identifier 3 , resource group 3 and the first available resource number 3, the first rated resource quantity is 80. See Table 1 for the content of the master control node or server after registration.
  • the number of the first available resources corresponding to the service line is the maximum number of resources that can be used by the service line, that is, the first The number of rated resources.
  • the service line has an execution node performing a task, it indicates that the service line occupies resources; then, the first available resource quantity is the first rated resource quantity minus the occupied resource quantity. Since the amount of resources already occupied is currently in use, the remaining number of resources that can be used is the number of first rated resources minus the number of resources remaining after the number of occupied resources.
  • the first available resource quantity is the first rated resource quantity 100.
  • the first service line has a task that is being executed by the execution node, it indicates that the task has occupied a part of the resource quantity, which is assumed to be 20 resource quantities; then, the first available resource quantity of the first service line is 80.
  • the first embodiment specifically includes the following steps:
  • Step S301 Receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is to process the target task. The amount of resources to use.
  • the master control node can receive the target data information sent by the target service line, the target data information includes the target task, and the target task is the task to be distributed to the execution node; the required resource quantity of the target is the quantity of resources required for the execution node to process the target task.
  • the target line of business is identified as the identity of the target line of business that sent the target task.
  • Step S302 Obtain a target first available resource quantity in the target resource group corresponding to the target service line identifier, where each service line identifier corresponds to one service line identifier, and each service line identifier corresponds to one resource group, and each The resource group includes the first available resource quantity currently available for one service line, and the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to represent the service line
  • the upper limit of the number of resources can be used at the same time.
  • the total number of available resources that each service line can currently use is stored in the master control node or the server, and the first available resource quantity of each service line has a one-to-one correspondence with the service line identifier.
  • the target service line identifier obtained in step S301 is used to perform a search on the master control node or the server, and obtain the target first available resource quantity corresponding to the target service line identifier.
  • the target first available resource quantity is used to indicate the amount of resources currently available to the target line of business.
  • Step S303 determining whether the target first available resource quantity is less than the target required resource quantity, if not, proceeding to step S304; otherwise, proceeding to step S305.
  • step S301 the number of required resources required for processing the target task can be known, and in step S302, the number of available first target resources of the target service line can be known; it can be understood that only the target The number of first available resources is not less than the required amount of resources, and the target line of business can have sufficient resources to handle the target tasks. Therefore, this step determines that the target is the first If the number of resources used is smaller than the number of resources required for the target, if it is less than, the process proceeds to step S305, and if not, the process proceeds to step S304.
  • Step S304 If the target first available resource quantity is not less than the target required resource quantity, distribute the target task to an execution node connected to the master control node.
  • the target first available resource quantity is not less than the target required resource quantity, it indicates that the target service line has sufficient resource quantity to process the target task, so the target service line can be allocated resources to perform the target service line target task.
  • the master node can then distribute the target task to the execution node to which it is connected in order to execute the node to perform the target task.
  • Step S305 The target task is stored in the execution queue, and the process proceeds to step S303.
  • target first available resource quantity is less than the target required resource quantity, storing the target task into an execution queue until the target first available resource quantity is not less than the target required resource quantity.
  • the target first available resource quantity is less than the target required resource quantity, it indicates that the target service line does not have sufficient resource quantity to process the target task, and if the target service line is continuously allocated resources, the execution of other service lines may be affected. Therefore, the target task is stored in the execution queue of the master control node, waiting for the target line of business to have a sufficient amount of resources. That is, the target task needs to wait for the target first available resource quantity not less than the target required resource quantity, and then the target task can be distributed to the execution node.
  • the master node updates the total number of resources on the master node or server.
  • the number of target first available resources of the target resource group is subtracted from the target required resource quantity on the master control node or the server. After the execution of the target task is completed, the target first resource available quantity of the target resource group is increased by the target required resource quantity on the master control node or the server.
  • the target service line is allocated resources. Therefore, the number of the first available resources of the target needs to be reduced by the corresponding amount of resources; after the target task execution of the target execution node is completed, the required amount of resources of the target is released. Resources, so the number of resources available for the target can be increased by the number of resources available.
  • an instruction update A In the process of the number of resources, A needs to be locked, so that other instructions cannot update the amount of resources of A at the same time, so as to prevent multiple instructions from being merged together, and the number of resources of A is disordered.
  • the master control node or the server needs to have a distributed lock function, so a software program of a distributed lock is also required at the master control node or the server, so that multiple execution nodes simultaneously update the same situation.
  • ZooKeeper in the prior art can provide distributed lock service.
  • ZooKeeper is a distributed, open source distributed application coordination service. It is an open source implementation of Google's Chubby, so use ZooKeeper. The process of updating the number of resources of the same parameter by multiple instructions can be easily performed, and the server in this application can be implemented by ZooKeeper.
  • the present application sets a resource group for each service line, and sets a first rated resource quantity for each resource group, where the first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line;
  • the present application utilizes a resource group to isolate the tasks of each service line, and uses the first rated resource quantity to limit the maximum amount of resources that a service line can occupy.
  • the master control node performs the task sent by the service line only when the number of the first available resources of the corresponding resource group of the service line is not less than the required number of resources.
  • the number of the first available resources in the corresponding resource group of one service line is smaller than the required number of resources, indicating that the number of resources occupied by the service line has reached or nearly reached the rated resource quantity, and no additional resources are allocated for the service line at this time. Avoid the business line taking up too much resources.
  • the application uses the resource group to isolate the tasks of each service line, and sets a rated resource quantity for each resource group to limit the maximum number of resources that the service line can occupy, thereby avoiding the total number of tasks in a service line.
  • Most of the resources of the control node are used to process the tasks of the service line, and the tasks of other service lines are ignored. Therefore, tasks of each service line can be task-isolated, and the tasks of each service line are not affected.
  • step S304 distributing the target task to the execution node connected to the master control node, since the number of resources of each execution node is not known, it may be possible to distribute the target task to the execution node that has no resource quantity. Other execution nodes have a resource amount, which causes the target task to not execute faster, so this will reduce the processing efficiency of the target task.
  • the present application provides a second embodiment of the task distribution method.
  • the number of resources of each service line and the number of resources of each execution node need to be registered on the master control node or the server.
  • the application adds the second available resource number corresponding to each execution node identifier on the basis of the total control node or server content shown in Table 1, and the second available resource quantity of each execution node has a second rating.
  • the number of resources, each second rated resource quantity is used to indicate the upper limit of the number of resources that the execution node can use simultaneously.
  • Each execution node has an execution node identifier, and the execution node identifier corresponds to a second available resource quantity.
  • the second available resource quantity is used to indicate the number of resources that the execution node can currently use, and the maximum value of the second available resource quantity is the second rated resource quantity.
  • the second available resource quantity of the execution node is the second rated resource quantity, and after performing the node processing task, the second available resource quantity of the execution node is the second rated resource quantity minus Go to the number of resources that have been used.
  • the number of slots of the first execution node is 100, and the identifier is the execution node identifier 1.
  • the second available resource number 1 corresponding to the execution node identifier 1 is stored on the master control node or the server, and the second rated resource number of the execution node identifier 1 is 100.
  • the second available resource quantity is 100; if the execution node 1 processes the task and the occupied resource quantity is 30, the remaining second available resources of the execution node is 70.
  • the identifier corresponding to the second execution node is the execution node identifier 2, the second available resource number 2, and the second rated resource number is 50; the identifier corresponding to the third execution node is the execution node identifier 3, and the second available resource number 3 And the number of second rated resources is 100.
  • the second embodiment specifically includes the following steps:
  • Step S401 Receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is a target task. The amount of resources to use.
  • Step S402 Acquire a target first available resource quantity in the target resource group corresponding to the target service line identifier, where each service line identifier corresponds to one service line identifier, and each service line identifier corresponds to one resource group, and each The resource group includes the first available resource quantity currently available for one service line, and the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to represent the service line The upper limit of the number of resources can be used at the same time.
  • Step S403 Determine whether the target first available resource quantity is less than the target required resource quantity. If not, proceed to step S404; otherwise, after performing step S407, proceed to step S403.
  • target first available resource quantity is less than the target required resource quantity, storing the target task into an execution queue until the target first available resource quantity is not less than the target required resource quantity.
  • the steps S401, S402, and S403 are the same as the S301, S302, and S303 of the embodiment, and are not described herein again.
  • Step S404 determining whether there is one or more execution node identifiers that the second available resource quantity is not less than the target required resource quantity; each execution node identifier corresponds to one second available resource quantity, and each execution node is second.
  • the number of available resources has a second rated resource quantity, each number The two nominal resource quantities are used to indicate the upper limit of the number of resources that the execution node can use simultaneously. If yes, go to step S402, otherwise go to step S407 and go to step S404.
  • the target first available resource quantity is not less than the target required resource quantity, it indicates that the target service line has sufficient resource quantity to process the target task, so the target service line can be allocated resources to perform the target service line target task.
  • the master node can then distribute the target task to the execution node to which it is connected in order to execute the node to perform the target task.
  • each execution node connected to the master control node Since the number of second available resources of each execution node connected to the master control node is different, some execution nodes may have no second available resources, and some execution nodes may have enough second available resources. It can be understood that only the execution node whose second available resources is not less than the required amount of resources of the target can process the target task in time.
  • the present application determines, in the master control node or the server, whether there is one or more execution node identifiers whose number of second available resources is not less than the target required resource quantity; if yes, proceeds to step S405; otherwise, after step S407 Going to step S404 again.
  • the target task is stored in the execution queue until the number of second available resources that are present in the one or more execution node identifiers is not less than the target required resources. Quantity.
  • Step S405 If the one or more execution node identifiers are present, determine one of the one or more execution node identifiers as the execution node identifier.
  • the number of the second available resources of the one or more execution node identifiers is not less than the target required resource quantity, it indicates that the one or more execution node identifiers have sufficient resource quantity to process the target task; A randomly selected one of the one or more execution node identifiers is determined to be the target execution node identifier.
  • Step S406 Distribute the target task to a target execution node corresponding to the target execution node identifier.
  • the master control node may distribute the target task to the execution node connected thereto, In order to execute the node to perform the target task.
  • Step S407 Store the target task into an execution queue.
  • the master node updates the total number of resources on the master node or server. Specifically: on the master control node or server, the target is The target first available resource quantity of the resource group and the second available resource quantity of the target execution node are both subtracted from the target required resource quantity.
  • the target service line is allocated resources, the number of the first available resources of the target needs to be reduced by the corresponding number of resources; since the target execution node performs the target task, the target first execution resource of the target execution node is subtracted from the corresponding number of resources. The amount of resources.
  • the target execution node completes the execution of the target task, on the master control node or the server, the target first resource available quantity of the target resource group, and the target execution node number
  • the number of available resources increases the amount of resources required for the target.
  • the resource of the target required resource quantity may be released, so that the corresponding first resource quantity may be increased for the target first available resource quantity, and the target first available resource quantity of the target execution node may be increased.
  • the corresponding amount of resources may be released, so that the corresponding first resource quantity may be increased for the target first available resource quantity, and the target first available resource quantity of the target execution node may be increased. The corresponding amount of resources.
  • the target task since the target task is not blindly distributed to the execution node, but the target execution node having a sufficient amount of resources is selected to process the target task, since the target task can be processed immediately by the target execution node without Waiting for the execution node has a sufficient amount of resources, so the processing efficiency of the target task can be improved.
  • the examples shown in FIG. 3 and FIG. 4 are all executed on the basis that the execution node is a type machine, that is, any execution node connected to the master control node can perform the task of the service line transmission.
  • the service lines are divided into different types, and all the execution nodes connected to the master control node are also divided into different types, and the tasks of one type of service line must be processed by the same type of execution nodes.
  • the use of the above-described embodiments shown in FIGS. 3 and 4 cannot achieve the purpose of distributing tasks by service line type and execution node type.
  • a cluster corresponding to each type of execution node set is added one by one, and each cluster includes An execution node identifier of each execution node in the execution node set corresponding to itself; each cluster corresponds to a service line identifier of one or more service lines of a corresponding type of execution node set. That is, the type of the execution node in a cluster is consistent with the type of the service line.
  • the present application provides a third embodiment of the task distribution method.
  • the number of resources of each service line, the cluster corresponding to the service line, and the cluster include are required to be registered on the master control node or the server. Execution node.
  • the three execution nodes have two types: type A and type B.
  • the A type corresponds to the execution node set A
  • the execution node set A includes the first execution node (execution node identifier 1)
  • the execution node set A must be used as the first service line (traffic line identifier 1)
  • the B type corresponds to the execution node Set B
  • the execution node set B includes a second execution node (execution node identifier 2) and a third execution node (execution node identifier 3); and, must use the execution node set B as the second service line (line of service identification 2) And the third line of business (line of business line 3). See Table 3 for the content of the master control node or server after registration.
  • the total resource quantity of the cluster A is the second rated resource quantity 100 of the execution node identifier 1
  • the total resource quantity of the cluster B is 150, that is, the second rated resource quantity of the execution node identifier 2 is 50.
  • the cluster A corresponds to the resource group 1 of the service line identifier 1
  • the first rated resource number of the resource group 1 is 100
  • the cluster B corresponds to the resource group 2 of the service line identifier 2
  • the first rated resource number of the resource group 2 is 70.
  • the cluster B also corresponds to the resource group 3 of the service line identifier 3, and the first rated resource quantity of the resource group 3 is 80, and the sum of the first rated resource quantity of the resource group 2 and the first rated resource quantity of the resource group 3 is equal to The total number of resources in cluster B.
  • the above is a distribution of the first rated resource quantity of the resource group.
  • the following describes another allocation of the first rated resource quantity of the resource group. See Table 4 for the content of the master control node or server after registration.
  • Table 4 differs from Table 3 only in that the number of first rated resources of resource group 2 is changed from 70 to 80, which results in oversold phenomenon of total resource number 150 of cluster B, that is, the first of resource group 2 and resource group 3. The sum of the rated resources is greater than the total resources of cluster B. Tables 3 and 4 show only the case of all the execution nodes connected to the master control node by specific examples.
  • the third embodiment specifically includes the following steps:
  • Step S501 Receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is a target task. The amount of resources to use.
  • Step S502 Acquire a target first available resource quantity in the target resource group corresponding to the target service line identifier, where each service line identifier corresponds to one service line identifier, and each service line identifier corresponds to one resource group, and each The resource group includes the first available resources currently available to a line of business. And, the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that the service line can use simultaneously.
  • Step S503 Determine whether the target first available resource quantity is less than the target required resource quantity. If not, proceed to step S504; otherwise, after performing step S507, proceed to step S503.
  • Step S504 determining a target cluster corresponding to the target service line identifier; wherein, in a case where all execution nodes connected to the master control node are multiple types of execution node sets, each type of execution node set corresponds to A cluster, each cluster includes an execution node identifier of each execution node in the set of execution nodes corresponding to itself; each cluster corresponds to a service line identifier of one or more service lines of a corresponding type of execution node set.
  • the target cluster corresponding to the target service line identifier is searched in the master control node or the server, and the execution node identifier and the target service line included in the target cluster are of one type. Therefore, the execution nodes in the target cluster can satisfy the conditions for processing the target task.
  • Step S505 Determine an execution node identifier of the target cluster as a target execution node identifier.
  • An execution node identifier is randomly selected in the target cluster, and the node identifier is determined to be the target execution.
  • the execution node corresponding to the target execution node identifier must be consistent with the type of the target service line. Therefore, the target execution node corresponding to the target execution node identifier may be used as the execution node of the processing target task.
  • Step S506 Distribute the target task to a target execution node corresponding to the target execution node identifier.
  • Step S507 Store the target task into an execution queue.
  • target first available resource quantity is less than the target required resource quantity, storing the target task into an execution queue until the target first available resource quantity is not less than the target required resource quantity.
  • the master node updates the total number of resources on the master node or server.
  • the number of target first available resources of the target resource group is subtracted from the target required resource quantity on the master control node or the server. After the execution of the target task is completed, at And on the master control node or the server, increase the target first resource quantity of the target resource group by the target required resource quantity.
  • the target service line is allocated resources. Therefore, the number of the first available resources of the target needs to be reduced by the corresponding amount of resources; after the target task execution of the target execution node is completed, the required amount of resources of the target is released. Resources, so the number of resources available for the target can be increased by the number of resources available.
  • a cluster is set up for each type of service line and each type of execution node on the master control node or server, thereby performing physical physics for each type of service line and each type of execution node. Isolation allows the same type of line of business to be tasked only in the same type of execution node, thus achieving the purpose of distributing tasks by type.
  • one of the target clusters is determined to be the target execution node identifier, and the same may be faced because the number of resources of each execution node is unclear, so The problem of distributing the target task to an execution node that does not already have a resource amount is generated; this causes the target task to fail to execute faster, and thus this reduces the processing efficiency of the target task.
  • the number of second available resources corresponding to each execution node identifier is increased, and the total available resource number of each cluster is identified by each execution node identifier thereof.
  • the sum of the second available resources See Table 5 and Table 6 for the contents of the master control node or server after registration.
  • step S505 in the embodiment shown in FIG. 5 specifically includes:
  • Step S601 Determine that the total available resource quantity of the target cluster is not less than the target required resource quantity, and if yes, go to step S602, otherwise go to step S604, and then return to step S601.
  • the determining that the total available resources of the target cluster is not less than the required resource quantity of the target may be classified into two cases:
  • the total available resource quantity of the target cluster is greater than or equal to the sum of the first rated resource numbers of the respective resource groups corresponding to the target cluster, the total available resources of the target cluster may be determined.
  • the number is not less than the amount of resources required for the target.
  • the second case is: if the total available resource quantity of the target cluster is smaller than the sum of the first rated resources of each service line in the target cluster, determining whether the total available resource quantity of the target cluster is not less than Determining the amount of resources required by the target, and if so, determining that the total amount of available resources is not less than the amount of resources required by the target.
  • step S503 it is determined in step S503 that the target resource group has a sufficient number of resources, there is not necessarily a sufficient number of resources in the cluster. Therefore, it is necessary to determine whether there is a sufficient amount of resources in the cluster, that is, whether the total number of resources of the target cluster is not less than the required amount of resources.
  • the target task is stored in the execution queue until it is determined that the total available resources of the target cluster are not Less than the amount of resources required for the target.
  • Step S602 In a case that determining that the total available resource quantity of the target cluster is not less than the target required resource quantity, determining whether there is one or more executions that the second available resource quantity is not less than the target required resource quantity Node ID. If yes, go to step S603, otherwise go to step S604, and then return to step S602.
  • the target task is stored in an execution queue until the one or more execution node identities are present.
  • Step S603 If the one or more execution node identifiers are present, determine one of the one or more execution node identifiers as the execution node identifier.
  • Step S604 Store the target task into an execution queue.
  • the step of updating the total number of resources in the master control node or the server is also included.
  • the target first resource available quantity of the target resource group and the second available resource quantity of the target execution node are both subtracted from the target required resource quantity.
  • the target service line is allocated resources, the number of the first available resources of the target needs to be reduced by the corresponding number of resources; since the target execution node performs the target task, the target first execution resource of the target execution node is subtracted from the corresponding number of resources. The amount of resources.
  • the target execution node completes the execution of the target task, on the master control node or the server, the target first resource available quantity of the target resource group, and the target execution node number
  • the number of available resources increases the amount of resources required for the target.
  • the resource of the target required resource quantity may be released, so that the corresponding first resource quantity may be increased for the target first available resource quantity, and the target first available resource quantity of the target execution node may be increased.
  • the corresponding amount of resources may be released, so that the corresponding first resource quantity may be increased for the target first available resource quantity, and the target first available resource quantity of the target execution node may be increased. The corresponding amount of resources.
  • the purpose of the task isolation of the service line can be realized, the purpose of distributing the task according to the service line type, and the purpose of distributing the task according to the number of remaining resources of the execution node are achieved, so in FIG. Most of the current requirements for task distribution can be implemented in the illustrated embodiment, thereby improving the efficiency of task distribution.
  • the present application provides a task distribution apparatus, including:
  • the receiving unit 71 is configured to receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the target required resource quantity is processed. The amount of resources required for the target task.
  • the obtaining unit 72 is configured to acquire a target first available resource quantity in the target resource group corresponding to the target service line identifier, where one service line identifier corresponding to each service line, and each service line identifier corresponding to one resource group
  • Each resource group includes a first available resource quantity currently available for one service line, and each first resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to represent The upper limit of the amount of resources that can be used simultaneously by the line of business.
  • the determining unit 73 is configured to determine whether the target first available resource quantity is smaller than the target required resource quantity.
  • the distribution unit 74 is configured to distribute the target task to the execution node connected to the master control node if the target first available resource quantity is not less than the target required resource quantity.
  • the task distribution device further includes:
  • the first storage unit 75 is configured to store the target task in an execution queue if the target first available resource quantity is less than the target required resource quantity, until the target first available resource quantity is not Less than the amount of resources required for the target.
  • the distribution unit 73 includes:
  • Determining a cluster unit 81 configured to determine a target cluster corresponding to the target service line identifier; wherein, in a case where all execution nodes connected to the master control node are multiple types of execution node sets, each type The execution node set corresponds to one cluster, each cluster includes an execution node identifier of each execution node in the execution node set corresponding to itself; each cluster corresponds to a service line identifier of one or more service lines using a corresponding type of execution node set .
  • the first determining node unit 82 is configured to determine one of the target clusters as the target execution node identifier.
  • the distribution task unit 83 is configured to distribute the target task to a target execution node corresponding to the target execution node identifier.
  • the master control node or server further stores: a second available resource quantity corresponding to each execution node identifier, and the total available resource quantity of each cluster is the sum of the second available resource numbers of each execution node identifier included therein;
  • the first determining node unit 82 includes:
  • the first determining quantity unit 91 is configured to determine that the total available resource quantity of the target cluster is not less than the target required resource quantity.
  • a first determining unit 92 configured to determine, if the total number of available resources of the target cluster is not less than the target required resource quantity, whether the second available resource quantity is not less than the target required resource quantity One or more execution node IDs.
  • the second determining node unit 93 is configured to determine, as the target execution node identifier, one of the one or more execution node identifiers if the one or more execution node identifiers are present.
  • the second storage unit 94 is configured to store the target task into the execution queue if the one or more execution node identifiers are not present until the one or more execution node identifiers exist.
  • the first certain quantity unit 91 includes:
  • the second determining quantity unit 911 is configured to determine the target cluster if the total available resource quantity of the target cluster is greater than or equal to the sum of the first rated resource numbers of the respective resource groups corresponding to the target cluster.
  • the total amount of available resources is not less than the required amount of resources for the target; or,
  • a third determining quantity unit 912 configured to determine, according to a sum of a total available resource quantity of the target cluster that is smaller than a first rated resource quantity of each service line in the target cluster, a total available resource quantity of the target cluster Whether it is not less than the required resource quantity of the target, and if yes, determining that the total available resource quantity is not less than the target required resource quantity.
  • a third storage unit configured to: if the total available resource quantity of the target cluster is smaller than the target required resource quantity, store the target task into an execution queue until determining the target cluster The total amount of available resources is not less than the amount of resources required for the target.
  • the task distribution apparatus further includes:
  • a first reducing unit 101 configured to subtract the total available resource quantity of the target cluster, the target first available resource quantity of the target resource group, and the second available resource quantity of the target execution node by the target The amount of resources required;
  • a first adding unit 102 configured to: after the target execution node completes the target task, complete a total available resource quantity of the target cluster, a target first available resource quantity of the target resource group, and the The number of second available resources of the target execution node increases the amount of resources required by the target.
  • the distribution unit 73 includes:
  • a second determining unit 111 configured to determine whether there is one or more execution node identifiers that the second available resource quantity is not less than the target required resource quantity; each execution node identifier corresponds to one second available resource quantity, and each The second available resource quantity of the execution node has a second rated resource quantity, and each second rated resource quantity is used to indicate an upper limit value of the number of resources that the execution node can simultaneously use;
  • a third determining node unit 112 configured to determine, as the target execution node identifier, one of the one or more execution node identifiers if the one or more execution node identifiers are present;
  • the second distribution task unit 113 is configured to distribute the target task to a target execution node corresponding to the target execution node identifier.
  • the task distribution apparatus further includes:
  • a second reducing unit 121 configured to subtract the target first available resource quantity of the target resource group and the second available resource quantity of the target execution node by the target required resource quantity;
  • a second adding unit 122 configured to: after the target execution node completes the execution of the target task, the target first resource available quantity of the target resource group, and the second available resource quantity of the target execution node Increase the amount of resources required for the target.
  • the present application provides a task distribution system, where the system includes:
  • the master control node 100 The master control node 100, the server 200 connected to the master control node 100, a plurality of execution nodes 300 connected to the master control node 100, and a plurality of service lines 400 connected to the master control node 100.
  • the plurality of execution nodes 300 adopt the execution node 1, the execution node 2, the execution node N, and the N is a non-zero natural number
  • the plurality of service lines 400 are represented by the service line 1, the service line 2, the service line M, and the M is Non-zero natural number. Any of the multiple lines of business is the target line of business.
  • the target service line 400 is configured to send target data information to the master control node.
  • the server 200 is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line, and The first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line.
  • the master control node 100 is configured to receive target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is The number of resources required to process the target task; the number of target first available resources in the target resource group corresponding to the target service line identifier; wherein each service line corresponds to a service line identifier, and each service The line identifier corresponds to a resource group, each resource group includes a first available resource quantity currently available for one service line, and the first available resource quantity of each resource group has a first rated resource quantity, each first The rated resource quantity is used to indicate an upper limit value of the number of resources that can be used simultaneously by the service line; and if the target first available resource quantity is not less than the target required resource quantity, the execution node connected to the total control node Distribute the target task.
  • the present application further provides a task distribution system, where the system includes:
  • the master control node 100 a plurality of execution nodes 300 connected to the master control node 100, and a plurality of service lines 400 connected to the master control node 100.
  • the plurality of execution nodes 300 adopt the execution node 1, the execution node 2, the execution node N, and the N is a non-zero natural number
  • the plurality of service lines 400 are represented by the service line 1, the service line 2, the service line M, and the M is Non-zero natural number. Any of the multiple lines of business is the target line of business.
  • the target service line 400 is configured to send target data information to the master control node.
  • the master control node 100 is configured to store each service line identifier corresponding to each service line, and a resource group corresponding to each service line identifier, where each resource group includes a first available resource quantity currently available for one service line. And, the first available resource quantity of each resource group has a first rated resource quantity, and each first rated resource quantity is used to indicate an upper limit value of the number of resources that can be simultaneously used by the service line; and, also used for Receiving target data information sent by a target service line, where the target data information includes a target task, a required resource quantity of the target, and a target service line identifier, where the required resource quantity is required for processing the target task.
  • the number of resources; the number of the first available resources in the target resource group corresponding to the target service line identifier is obtained in the server connected to the master control node; if the target first available resource quantity is not less than the target location If the amount of resources is required, the target task is distributed to the execution node connected to the master control node.
  • the functions described in the method of the present embodiment can be stored in a computing device readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, a portion of the embodiments of the present application that contributes to the prior art or a portion of the technical solution may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a
  • the computing device (which may be a personal computer, server, mobile computing device, or network device, etc.) performs all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Multi Processors (AREA)

Abstract

一种任务分发方法、装置及系统,其中方法包括:接收一个目标业务线发送的目标数据信息(S301);获取与目标业务线标识对应的目标资源组中的目标第一可用资源数量(S302);若目标第一可用资源数量不小于目标所需资源数量(S303),则向与总控节点相连的执行节点分发目标任务(S304)。所述方法利用资源组来对各个业务线的任务进行隔离,并为每个资源组设定一个额定资源数量来限制业务线最多能够占用的资源数量,从而避免一个业务线的任务过多时,总控节点大部分资源用来处理该业务线的任务,而忽略其它业务线的任务;从而可以实现各个业务线的任务进行任务隔离,达到各个业务线的任务互不影响的目的。

Description

任务分发方法、装置及系统 技术领域
本申请涉及自动化技术领域,尤其涉及任务分发方法、装置及系统。
背景技术
任务执行系统为处理任务的系统,任务执行系统可以执行各个业务线发送的任务,其中,业务线为向任务执行系统发送任务的多台机器的统称。随着各个业务线的任务数量不断增长,任务执行系统需要处理的任务数量越来越多,因此任务执行系统需要很多执行机器来共同完成任务;为了协调各个执行机器,可以利用一台总控机器负责调度这些执行机器。
参见图1,为任务执行系统的结构图,其中,总控机器采用总控节点来表示,执行机器采用执行节点来表示;具体包括总控节点11、与总控节点11相连的多个执行节点12,与总控节点11相连的多个业务线13;多个执行节点12采用执行节点1、执行节点2……执行节点N表示,多个业务线13采用业务线1、业务线2……业务线M表示,其中N和M均为非零自然数。
任务执行系统的业务流程为:总控节点接收来自于各个业务线的任务,并将所有任务按先后顺序放置于自身的执行队列中。然后总控节点按执行队列中各个任务的先后顺序,将接收到的任务随机下发到与之相连的执行节点中,以便执行节点执行任务。
但是,目前总控节点上未对各个业务线的任务进行隔离,即任一业务线的任务均可以利用所有执行节点来执行其任务,这导致在单个业务线的任务过多时,该业务线的任务会占据执行队列,使得总控节点仅能够处理该业务线的任务,而无法处理其它业务线的任务,进而影响到其它业务线任务的执行。
因此,现在需要一种任务分发方法,可以对不同业务线任务进行隔离操作,以便可以使得各个业务线的任务互不影响。
发明内容
本申请提供了一种任务分发方法、装置及系统,使用本方法可以不同业务线任务进行隔离操作,以便可以使得各个业务线的任务互不影响。
为了实现上述目的,本申请提供以下技术手段:
一种任务分发方法,包括:
接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;
获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应一个各个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
优选的,还包括:
若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
优选的,所述向与所述总控节点相连的执行节点分发所述目标任务,包括:
确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群与使用对应类型的执行节点集合的一个或多个业务线的业务线标识对应;
将所述目标集群中的一个执行节点标识,确定为目标执行节点标识;
向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
优选的,每个执行节点标识对应一个第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和;则 所述将所述目标集群中的一个执行节点标识,确定为目标执行节点标识,包括:
在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;
若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
优选的,还包括:
若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
优选的,目标集群的总可用资源数量不小于所述目标所需资源数量的确定过程,包括:
在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;或者,
在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
优选的,还包括:
若在确定所述目标集群的总可用资源数量小于所述目标所需资源数量的情况下,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
优选的,在向与所述总控节点相连的执行节点分发所述目标任务之后,还包括:
将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
在所述目标执行节点将所述目标任务执行完成之后,将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
优选的,所述向与所述总控节点相连的执行节点分发所述目标任务,包括:
判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;其中,每个执行节点标识对应一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值;
若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识;
向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
优选的,在向与所述总控节点相连的执行节点分发所述目标任务之后,还包括:
将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
在所述目标执行节点将所述目标任务执行完成之后,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
一种任务分发装置,包括:
接收单元,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;
获取单元,用于获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
分发单元,用于若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
优选的,还包括:
第一存储单元,用于若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
优选的,所述分发单元,包括:
确定集群单元,用于确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群与使用对应类型的执行节点集合的一个或多个业务线的业务线标识对应;
第一确定节点单元,用于将所述目标集群中的一个执行节点标识,确定为目标执行节点标识;
分发任务单元,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
优选的,每个执行节点标识对应一个第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和;则所述第一确定节点单元,包括:
第一确定数量单元,用于确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;
第一判断单元,用于在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;
第二确定节点单元,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
优选的,还包括:
第二存储单元,用于若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
优选的,所述第一确定数量单元,包括:
第二确定数量单元,用于在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;或者,
第三确定数量单元,用于在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
优选的,还包括:
第三存储单元,用于若在确定所述目标集群的总可用资源数量小于所述目标所需资源数量的情况下,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
优选的,还包括:
第一减少单元,用于将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
第一增加单元,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
优选的,所述分发单元,包括:
第二判断单元,用于判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;其中,每个执行节点标识对应的一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值;
第三确定节点单元,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识;
第二分发任务单元,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
优选的,还包括:
第二减小单元,用于将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
第二增加单元,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
一种任务分发系统,包括:
总控节点、与所述总控节点相连的服务器、与所述总控节点相连的多个执行节点以及与所述总控节点相连的多个业务线;多个业务线中的一个业务线为目标业务线;
其中,目标业务线,用于向所述总控节点发送目标数据信息;
所述服务器,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
所述总控节点,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;在与总控节点相连的服务器中,获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
一种任务分发系统,包括:
总控节点、与所述总控节点相连的多个执行节点以及与所述总控节点相连的多个业务线;多个业务线中的一个业务线为目标业务线;
其中,目标业务线,用于向所述总控节点发送目标数据信息;
所述总控节点,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的 上限值;并且,还用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;在与总控节点相连的服务器中,获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
本申请为每个业务线设置一个资源组,并为每个资源组设定一个第一额定资源数量,该第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;即本申请利用资源组来对各个业务线的任务进行隔离,利用第一额定资源数量来限制一个业务线最多能够占用的资源数量。总控节点仅在一个业务线对应资源组的第一可用资源数量不小于所需资源数量时,才执行业务线发送的任务。在一个业务线对应资源组的第一可用资源数量小于所需资源数量,说明该业务线所占用的资源数量已经或者临近达到额定资源数量,此时不再为该业务线分配额外的资源,从而避免该业务线占用过多的资源。
即本申请利用资源组来对各个业务线的任务进行隔离,并为每个资源组设定一个额定资源数量来限制业务线最多能够占用的资源数量,从而避免在一个业务线的任务过多时,总控节点的大部分资源用来处理该业务线的任务,而忽略其它业务线的任务;从而可以实现各个业务线的任务进行任务隔离,达到各个业务线的任务互不影响的目的。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术公开的任务执行系统的结构示意图;
图2a-2b为本申请实施例公开的任务分发系统的结构示意图;
图3为本申请实施例公开的任务分发方法的流程图;
图4为本申请实施例公开的又一任务分发方法的流程图;
图5为本申请实施例公开的又一任务分发方法的流程图;
图6为本申请实施例公开的又一任务分发方法的流程图;
图7为本申请实施例公开的任务分发装置的结构示意图;
图8为本申请实施例公开的任务分发装置中分发单元的一种结构示意图;
图9为本申请实施例公开的任务分发装置中第一确定节点单元的结构示意图;
图10为本申请实施例公开的又一任务分发装置的结构示意图;
图11为本申请实施例公开的任务分发装置中分发单元的另一种结构示意图;
图12为本申请实施例公开的又一任务分发装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在介绍本申请实施例之前首先介绍任务分发系统,以方便本领域技术人员更容易理解本申请实施例的应用场景。
如图2a所示,为任务分发系统的一种实现方式,所示系统包括:总控节点100、与所述总控节点100相连的服务器200、与所述总控节点100相连的多个执行节点300以及与所述总控节点100相连的多个业务线400。
如图2b所示,为任务分发系统的另一种实现方式,所述系统包括:所示系统包括:总控节点100、与所述总控节点100相连的多个执行节点300以及与所述总控节点100相连的多个业务线400。
在图2a和图2b所示,多个执行节点300采用执行节点1、执行节点2……执行节点N表示,N为非零自然数;多个业务线400采用业务线1、业务线2……业务线M表示,M为非零自然数。
其中,总控节点100用于表示接收业务线发送的任务并调度执行机器的总控机器,执行节点300用于表示执行任务的执行机器,业务线即用于产生任务的一系列机器的统称。
每个执行节点300均有执行一定的执行能力,执行节点300的执行能力可以采用执行节点所具有资源数量来表示,即执行节点具有的资源数量较高,则执行节点的执行能力较高,执行节点具有的资源数量较低,则执行节点的执行能力较低。由于每个执行节点均可以执行总控节点分发的任务,所以每个执行节点的资源数量均可以作为总控节点的资源数量,所有执行节点的资源数量之和,即为总控节点的资源数量总和。
为了对各个业务线的任务进行任务隔离、达到各个业务线的任务互不影响的目的,本申请技术人员设想:可以为每个业务线设定一个用于表示该业务线所能使用资源数量的资源组,并可以依据总控节点的资源数量总和,为每个业务线对应的资源组分配一个可以使用的资源数量的最大值,即第一额定资源数量。
在上述资源组和第一额定资源数量的基础上,当判定出一个业务线所占用的资源数量小于第一额定资源数量时,则表示该业务线还可以占用资源,因此执行该业务线发送的任务。当一个业务线所占用的资源数量不小于第一额定资源数量时,表示该业务线已经达到其所能占用的资源数量的上限值,此时不能再执行该业务线发送的任务。
也就是说:本申请利用资源组来对各个业务线的任务进行隔离,并为每个资源组设定一个额定资源数量来限制业务线最多能够占用资源数量,从而避免在一个业务线的任务过多时,总控节点的大部分资源用来处理该业务线的任务,而忽略其它业务线的任务;从而可以实现各个业务线的任务进行任务隔离,达到各个业务线的任务互不影响的目的。
为了按上述思路实现本申请的目的,首先需要执行一些预先处理过程:
(1)量化各个执行节点的资源数量。
可以理解的是,一个执行节点的配置越高,其执行能力越高,对应的资源数量也越高;一个执行节点的配置越低,其执行能力越低,对应的资源数量也越低。因此,可以根据每个执行节点的配置高低,来量化各个执行节点的资源数量。
例如,以三个执行节点为例,第一个执行节点的配置为:CPU48核、内存96G,第二个执行节点的配置为CPU24核、内存48G,第三个执行节点的配置为CPU48核、内存96G。假设将第一执行节点的配置作为标准配置,设 定其槽位为100,即其资源数量为100;那么,根据第一个执行节点的配置,衡量第二个执行节点的配置以及第三个执行节点的配置,则可以得到第二个执行节点的槽位为50,即其资源数量为50;第三个执行节点的槽位为100,即其资源数量为100。资源数量可以表示执行节点可以同时处理的任务数量,例如,当资源数量为100时,可以表示该执行节点可以同时执行100个任务。
(2)确定每个业务线对应的资源组第一额定资源数量。
每个业务线的第一额定资源数量,用于表示每个业务线所能够占用的最大资源数量。可以理解的是,每个业务线的第一额定资源数量均不会超过总控节点的资源数量总和。因此,在确定每个业务线的第一额定资源数量之前,首先需要确定总控节点的资源数量总和。
由于与总控节点相连的所有执行节点均具有处理任务的资源数量,所以总控节点的资源数量总和可以为:与总控节点相连的所有执行节点的资源数量之和。例如,延续上述举例,则总控节点的资源数量总和为100+50+100=250个槽位,即总控节点的资源数量为250,即可以允许250个任务同时执行。
在确定总控节点的资源数量总和之后,可以为每个业务线对应的资源组设定一个第一额定资源数量。可以理解的是,可以为每个业务线相同的第一额定资源数量,也可以设定不同的第一额定资源数量。即,可以依据每个业务线的任务数量的多少以及任务的重要程度,来为每个业务线设定不同的第一额定资源数量。
例如,延续上述举例,总控节点的资源数量总和为250。假设与总控节点相连的有三个业务线,第一个业务线较为重要其任务数量也较多,那么则可以为第一个业务线分配100个槽位,即第一额定资源数量为100;第二个业务线和第三个业务线同等重要且两者的业务数量相差不大,因此可以为第二个业务线分配70个槽位,即第一额定资源数量为70;为第三个业务线分配80个槽位,即第一额定资源数量为80。三个业务线的第一额定资源数量之和即为总控节点的资源数量总和。
当然,还可以采用其它分配方式。比如,可以为第一个业务线分配100个槽位,即第一额定资源数量为100;可以为第二个业务线分配80个槽位,即第一额定资源数量为80;为第三个业务线分配80个槽位,即第一额定资源 数量为80。三个业务线的第一额定资源数量之和大于总控节点的资源数量总和,即采用超卖策略。该情况将在下述实施例中进行详细说明。
为了实现本申请中任务分发方法,需要存储各个业务线的资源数量。由于本申请提供了两种任务分发系统,所以针对不同的系统,各个业务线的资源数量的存储位置也有所不同:
在图2a所示的系统中,可以在服务器上注册各个业务线的资源数量。即,服务器200,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
在图2b所示的系统中,可以在总控节点上存储各个业务线的资源数量。即,总控节点100,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
在图2a所示的系统中,总控节点仅需要执行本申请后续所提供的软件程序即可。在图2b所示的系统中,总控节点既要执行后续的软件程序,还需要存储各个业务线的资源数量。这对总控节点的要求较高,因此较优的方式为图2a所示的系统。在上述图2a或图2b所示的一种任务分发系统基础上,本申请提供了一种任务分发方法,本方法应用于总控节点。总控节点可以接收各个业务线发送的数据信息,并对数据信息进行处理,以实现任务分发的过程。由于总控节点对每个业务线发送的数据信息的处理过程均是一致的,因此本申请仅以各个业务线中的一个目标业务线为例,进行详细说明,其它业务线的处理过程不再赘述。可以理解的是,其它业务线的处理过程与本申请提供的目标业务线的处理过程一致。
如图3所示,本申请提供一种任务分发方法的实施例一,在本实施例一具体执行之前,需要在总控节点或者服务器上注册各个业务线的资源数量。
在总控节点或者服务器上注册各个业务线的业务线标识对应的资源组,每个资源组维护一个第一可用资源数量;第一可用资源数量用于表示该业务线目前可使用的资源数量。并且,在总控节点或者服务器上还注册有每个资源组的第一额定资源数量,第一额定资源数量用于表示每个业务线的第一可用资源数量的最大值。
例如,延续上述举例,总控节点包括三个业务线分别为第一业务线、第二业务线和第三业务线;第一业务线对应业务线标识1、资源组1以及第一可用资源数量1,其第一额定资源数量为100;第二业务线对应业务线标识2、资源组2以及第一可用资源数量2,其第一额定资源数量为70;第三业务线对应业务线标识3、资源组3以及第一可用资源数量3,其第一额定资源数量为80。参见表1,为注册后总控节点或者服务器的内容示意图。
表1
Figure PCTCN2016099289-appb-000001
在一个业务线上不具有执行节点正在执行的任务时,即该业务线不占用资源时,与该业务线对应第一可用资源数量即为该业务线可以使用资源数量的最大值,即第一额定资源数量。当该业务线上具有执行节点正在执行任务时,说明该业务线占用资源;那么,第一可用资源数量则为第一额定资源数量减去已占用的资源数量。因为已占用的资源数量目前正在使用,所以剩余可使用的资源数量为第一额定资源数量减去已占用资源数量后剩余的资源数量。
例如,以第一业务线为例,当第一业务线上不具有执行节点正在执行的任务时,其第一可用资源数量为第一额定资源数量100。当第一业务线上具有执行节点正在执行的任务时,说明该任务已占用一部分资源数量,假设为20个资源数量;那么,目前第一业务线的第一可用资源数量为80。
在表1所示的总控节点或者服务器基础上,本实施例一具体包括以下步骤:
步骤S301:接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量。
总控节点可以接收目标业务线发送的目标数据信息,目标数据信息包含目标任务,目标任务即为待分发至执行节点的任务;目标所需资源数量为执行节点处理目标任务所需使用的资源数量;目标业务线标识为发送目标任务的目标业务线的标识。
步骤S302:获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应的一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
从表1中可以看出,总控节点或者服务器中存储有各个业务线目前可以使用的第一可用资源数量,每个业务线的第一可用资源数量与该业务线标识一一对应。利用步骤S301中获得的目标业务线标识,在总控节点或者服务器上进行搜索,并获得与目标业务线标识对应的目标第一可用资源数量。该目标第一可用资源数量用于表示目标业务线目前可以使用的资源数量。
步骤S303:判断所述目标第一可用资源数量是否小于所述目标所需资源数量,若否,则进入步骤S304;否则进入步骤S305。
在步骤S301中可以得知处理目标任务所需要使用的目标所需资源数量,在步骤S302中可以得知目标业务线所剩余可使用的目标第一可用资源数量;可以理解的是,只有在目标第一可用资源数量不小于目标所需资源数量,目标业务线才能够有足够资源去处理目标任务。因此,本步骤判断目标第一可 用资源数量是否小于目标所需资源数量,若小于,则进入步骤S305,若不小于则进入步骤S304。
步骤S304:若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
若目标第一可用资源数量不小于所述目标所需资源数量,则说明目标业务线具有足够的资源数量来处理目标任务,因此可以为目标业务线分配资源,以便执行目标业务线的目标任务。然后,总控节点可以将目标任务分发至与之相连的执行节点,以便执行节点执行目标任务。
步骤S305:将所述目标任务存储至执行队列中,进入步骤S303。
若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
若目标第一可用资源数量小于所述目标所需资源数量,则说明目标业务线不具有足够的资源数量来处理目标任务,若继续为目标业务线分配资源,则会影响其它业务线的执行。因此,将目标任务存储至总控节点的执行队列中,等待目标业务线具有足够的资源数量。即目标任务需要等待目标第一可用资源数量不小于所述目标所需资源数量,然后才可以向执行节点分发目标任务。
在分发目标任务至执行节点之后,则总控节点会更新总控节点或者服务器上的资源数量。
具体的为:在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量减去所述目标所需资源数量。在所述目标任务执行完成之后,在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量增加所述目标所需资源数量。
在分发目标任务之后则为目标业务线为分配资源,所以,需要将目标第一可用资源数量减少相应的资源数量;在目标执行节点的目标任务执行完成之后,则会释放目标所需资源数量的资源,因此可以目标第一可用资源数量增加相应的资源数量。
由于在实际应用中,会同时有多个更新资源数量的指令,那么,为了保证更新资源的过程中不出现差错,需要利用分布式锁。例如,一个指令更新A 的资源数量的过程中,需要将A锁住,使得其它指令不能够同时更新A的资源数量,以免多个指令汇合在一起,出现A的资源数量错乱的情况。
因此,需要总控节点或者服务器具有分布式锁功能,因此需要总控节点或者服务器上还设有分布式锁的软件程序,以实现多个执行节点同时更新同一的情况。
而现有技术中的分布式应用程序协调服务ZooKeeper便可以提供分布式锁服务,ZooKeeper是一个分布式的、开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,因此利用ZooKeeper可以轻松完成多个指令更新同一参数的资源数量的过程,本申请中的服务器可以采用ZooKeeper来实现。
由本申请提供的实施例一,可以看出本申请具有以下有益效果:
本申请为每个业务线设置一个资源组,并为每个资源组设定一个第一额定资源数量,该第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;即本申请利用资源组来对各个业务线的任务进行隔离,利用第一额定资源数量来限制一个业务线最多能够占用资源数量。总控节点仅在一个业务线对应资源组的第一可用资源数量不小于所需资源数量时,才执行业务线发送的任务。在一个业务线对应资源组的第一可用资源数量小于所需资源数量,说明该业务线所占用的资源数量已经或者临近达到额定资源数量,此时不再为该业务线分配额外的资源,从而避免该业务线占用过多的资源。
即本申请利用资源组来对各个业务线的任务进行隔离,并为每个资源组设定一个额定资源数量来限制业务线最多能够占用资源数量,从而避免在一个业务线的任务过多时,总控节点的大部分资源用来处理该业务线的任务,而忽略其它业务线的任务;从而可以实现各个业务线的任务进行任务隔离,达到各个业务线的任务互不影响的目的。
在上述步骤S304向与所述总控节点相连的执行节点分发所述目标任务中,由于不清楚各个执行节点的资源数量情况,所以可能会产生将目标任务分发至已经不具有资源数量的执行节点,而其它执行节点具有资源数量,这会导致目标任务无法较快的执行,因此这会降低目标任务的处理效率。
为此,本申请提供一种任务分发方法的实施例二,在本实施例二具体执行之前,需要在总控节点或者服务器上注册各个业务线的资源数量以及各个执行节点的资源数量。
本申请在表1所示的总控节点或者服务器内容的基础上,增加了与每个执行节点标识对应的第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值。
每个执行节点均有一个执行节点标识,该执行节点标识对应一个第二可用资源数量。该第二可用资源数量用于表示该执行节点目前可以使用的资源数量,并且,该第二可用资源数量的最大值为第二额定资源数量。该一个执行节点未处理任务时,该执行节点的第二可用资源数量即为第二额定资源数量,在执行节点处理任务之后,该执行节点的第二可用资源数量即为第二额定资源数量减去已使用的资源数量。
例如,以总控节点相连的三个执行节点为例,第一执行节点的槽位数量为100,其标识为执行节点标识1。那么,在总控节点或者服务器上存储有与执行节点标识1对应的第二可用资源数量1,并且,该执行节点标识1的第二额定资源数量为100。在执行节点1未处理任务时,第二可用资源数量为100;假设执行节点1处理任务,占用的资源数量为30,则执行节点剩余的第二可用资源数量为70。同理,第二执行节点对应的标识为执行节点标识2、第二可用资源数量2和第二额定资源数量为50;第三执行节点对应的标识为执行节点标识3、第二可用资源数量3和第二额定资源数量为100。
参见表2,为注册后总控节点或者服务器的内容示意图。
Figure PCTCN2016099289-appb-000002
Figure PCTCN2016099289-appb-000003
在表1所示的总控节点或者服务器基础上,如图4所示,本实施例二具体包括以下步骤:
步骤S401:接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量。
步骤S402:获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应的一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
步骤S403:判断所述目标第一可用资源数量是否小于所述目标所需资源数量,若否,则进入步骤S404;否则执行步骤S407之后,再进入步骤S403。
若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
步骤S401、S402和S403与实施例一种S301、S302和S303一致,在此不再赘述。
步骤S404:判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;每个执行节点标识对应一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第 二额定资源数量用于表示执行节点所能同时使用资源数量的上限值。如存在,则进入步骤S402,否则进入步骤S407再进入步骤S404。
若目标第一可用资源数量不小于所述目标所需资源数量,则说明目标业务线具有足够的资源数量来处理目标任务,因此可以为目标业务线分配资源,以便执行目标业务线的目标任务。然后,总控节点可以将目标任务分发至与之相连的执行节点,以便执行节点执行目标任务。
由于与总控节点相连的各个执行节点的第二可用资源数量不同,有的执行节点可能已无第二可用资源数量,有的执行节点可能具有足够的第二可用资源数量。可以理解的是,只有第二可用资源数量不小于目标所需资源数量的执行节点,才能够及时处理目标任务。
因此,本申请在总控节点或者服务器中判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;如果存在,则进入步骤S405;否则执行步骤S407后再进入步骤S404。
即若不存在所述一个或多个执行节点标识,将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识的第二可用资源数量不小于所述目标所需资源数量。
步骤S405:若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
若存在所述一个或多个执行节点标识的第二可用资源数量不小于所述目标所需资源数量,则说明该一个或多个执行节点标识均具备足够的资源数量处理目标任务;因此在该一个或多个执行节点标识中随机选择一个执行节点标识确定为目标执行节点标识。
步骤S406:向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。在确定目标第一可用资源数量不小于所述目标所需资源数量的情况下,即目标业务线具有足够的资源数量的情况下,总控节点可以将目标任务分发至与之相连的执行节点,以便执行节点执行目标任务。
步骤S407:将所述目标任务存储至执行队列中。
在将目标任务分配至目标执行节点之后,则总控节点会更新总控节点或者服务器上的资源数量。具体的为:在总控节点或者服务器上,将所述目标 资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量。
由于为目标业务线为分配资源,所以,需要将目标第一可用资源数量减少相应的资源数量;由于为目标执行节点执行目标任务,所以,目标执行节点的目标第一可用资源数量减去相应的资源数量。
可以理解的是,在所述目标执行节点将所述目标任务执行完成之后,在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
在目标执行节点的目标任务执行完成之后,则可以释放目标所需资源数量的资源,因此可以为将目标第一可用资源数量增加相应的资源数量,为目标执行节点的目标第一可用资源数量增加相应的资源数量。
在图4所示的实施例中,由于没有盲目将目标任务分发至执行节点中,而是选择具有足够资源数量的目标执行节点处理目标任务,由于目标任务可以被目标执行节点立即处理,而无需等待执行节点有足够资源数量,因此可以提高目标任务的处理效率。
图3以及图4所示的实例均站在执行节点为一个类型机器的基础上执行的,即在总控节点相连的任一执行节点均可以执行业务线发送的任务。但是,在一些情况下,业务线分为不同类型,与总控节点相连的所有执行节点也分为不同类型,一个类型业务线的任务必须由相同类型的执行节点进行处理。但是,利用上述图3及图4所示的实施例无法实现按业务线类型和执行节点类型分发任务的目的。
为了实现按业务线类型和执行节点类型分发任务的目的,在表1所示的总控节点或者服务器的基础上,增加与每个类型的执行节点集合一一对应的集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群对应使用对应类型的执行节点集合的一个或多个业务线的业务线标识。即一个集群中的执行节点的类型,与业务线的类型是一致的。
为此,本申请提供一种任务分发方法的实施例三,在本实施例三具体执行之前,需要在总控节点或者服务器上注册各个业务线的资源数量、业务线对应的集群、集群包含的执行节点。
例如,以与总控节点相连的有三个执行节点为例,三个执行节点具有两个类型:A类型和B类型。A类型对应执行节点集合A,执行节点集合A包括第一执行节点(执行节点标识1),并且,必须使用执行节点集合A的为第一业务线(业务线标识1);B类型对应执行节点集合B,执行节点集合B包括第二执行节点(执行节点标识2)和第三执行节点(执行节点标识3);并且,必须使用执行节点集合B的为第二业务线(业务线标识2)和第三业务线(业务线标识3)。参见表3,为注册后总控节点或者服务器的内容示意图。
表3
Figure PCTCN2016099289-appb-000004
从表3中可以看出,集群A的总资源数量即为执行节点标识1的第二额定资源数量100,集群B的总资源数量为150,即为执行节点标识2的第二额定资源数量50与执行节点标识3的第二额定资源数量100的和值。集群A对应业务线标识1的资源组1,其资源组1的第一额定资源数量为100,集群B对应业务线标识2的资源组2,其资源组2的第一额定资源数量为70,集群B还对应业务线标识3的资源组3,其资源组3的第一额定资源数量为80,资源组2的第一额定资源数量与资源组3的第一额定资源数量的和值,等于集群B的总资源数量。
上述为资源组的第一额定资源数量的一种分配情况,下面介绍资源组第一额定资源数量另一分配情况。参见表4,为注册后总控节点或者服务器的内容示意图。
Figure PCTCN2016099289-appb-000005
表4与表3的区别仅在于,资源组2的第一额定资源数量由70改为80,这导致集群B的总资源数量150存在超卖现象,即资源组2和资源组3的第一额定资源总和大于集群B的总资源数量。表3和表4仅以具体实例表示与总控节点相连的所有执行节点的情况。
在表3或表4所示的总控节点或者服务器基础上,如图5所示,本实施例三具体包括以下步骤:
步骤S501:接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量。
步骤S502:获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应的一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数 量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
步骤S503:判断所述目标第一可用资源数量是否小于所述目标所需资源数量,若否,则进入步骤S504;否则执行步骤S507之后,再进入步骤S503。
步骤S504:确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群对应使用对应类型的执行节点集合的一个或多个业务线的业务线标识。
在获得目标业务线标识之后,在总控节点或者服务器中查找与目标业务线标识对应的目标集群,目标集群包括的执行节点标识与目标业务线是一个类型的。因此,在目标集群中的执行节点均可以满足处理目标任务的条件。
步骤S505:将所述目标集群中的一个执行节点标识,确定为目标执行节点标识。
在目标集群中随机选择一个执行节点标识,确定为目标执行节点标识。该目标执行节点标识对应的执行节点必然与目标业务线的类型是一致的,因此可以将目标执行节点标识对应的目标执行节点作为处理目标任务的执行节点。
步骤S506:向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
步骤S507:将所述目标任务存储至执行队列中。
若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
在分发目标任务至执行节点之后,则总控节点会更新总控节点或者服务器上的资源数量。
具体的为:在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量减去所述目标所需资源数量。在所述目标任务执行完成之后,在 总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量增加所述目标所需资源数量。
在分发目标任务之后则为目标业务线为分配资源,所以,需要将目标第一可用资源数量减少相应的资源数量;在目标执行节点的目标任务执行完成之后,则会释放目标所需资源数量的资源,因此可以目标第一可用资源数量增加相应的资源数量。在图5所示的实施例中,在总控节点或者服务器上为每个类型的业务线以及各个类型的执行节点设置一个集群,从而对每个类型的业务线以及各个类型的执行节点进行物理隔离,使得同一类型的业务线仅能够在同一类型的执行节点中进行任务分发,从而实现按类型分发任务的目的。
在图5所示的实施例中,在步骤S505将所述目标集群中的一个执行节点标识,确定为目标执行节点标识中,同样会面临由于不清楚各个执行节点的资源数量情况,所以可能会产生将目标任务分发至已经不具有资源数量的执行节点的问题;这会导致目标任务无法较快的执行,因此这会降低目标任务的处理效率。
为此,在图表3或表4所示的总控节点或者服务器,增加与每个执行节点标识对应的第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和。参见表5和表6为,为为注册后总控节点或者服务器的内容示意图。
表5
Figure PCTCN2016099289-appb-000006
Figure PCTCN2016099289-appb-000007
表6
Figure PCTCN2016099289-appb-000008
在表5或表6所示的总控节点或者服务器基础上,如图6所示,图5所示实施例中步骤S505具体包括:
步骤S601:判断所述目标集群的总可用资源数量不小于所述目标所需资源数量,若是,则进入步骤S602,否则进入步骤S604,再返回步骤S601。
其中,确定所述目标集群的总可用资源数量不小于所述目标所需资源数量,可以分为两种情况:
第一种情况:在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
即在表5对应的情况下,以集群B为例,资源组2的第一额定资源数量和资源组3的第一额定资源数量总和(70+80=150)等于集群B的总资源数量(50+100=150),即不存在超卖现象。因此,在步骤S503中判定与所述目标业务线标识对应的目标第一可用资源数量不小于所述目标所需资源数量时,即目标资源组具有足够资源数量的情况下,可以直接确定与目标业务线对应的集群中也同样存在足够的资源数量。
第二种情况:在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
即在表6对应的情况下存在超卖现象,在步骤S503中确定目标资源组具有足够资源数量的情况下,集群中不一定存在足够的资源数量。因此,需要判断一下集群中是否存在具有足够资源数量,即判断目标集群的总资源数量是否不小于目标所需资源数量。
若目标集群的总资源数量是否大于目标所需资源数量,则确定目标集群不具有足够的资源数量,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
步骤S602:在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识。若是则进入步骤S603,否则进入步骤S604之后,则返回步骤S602。
若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
步骤S603:若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
步骤S604:将所述目标任务存储至执行队列中。
在将目标任务分发至目标执行节点之后,还包括更新总控节点或者服务器中资源数量的步骤。
具体的为:在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量。
由于为目标业务线为分配资源,所以,需要将目标第一可用资源数量减少相应的资源数量;由于为目标执行节点执行目标任务,所以,目标执行节点的目标第一可用资源数量减去相应的资源数量。
可以理解的是,在所述目标执行节点将所述目标任务执行完成之后,在总控节点或者服务器上,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
在目标执行节点的目标任务执行完成之后,则可以释放目标所需资源数量的资源,因此可以为将目标第一可用资源数量增加相应的资源数量,为目标执行节点的目标第一可用资源数量增加相应的资源数量。
在图6所示的实施例中,既可以实现业务线的任务隔离的目的,实现按业务线类型分发任务的目的,实现按执行节点的剩余资源数量情况分发任务的目的,因此在图6所示的实施例中可以实现目前对任务分发的大部分需求,从而可以提高任务的分发效率。
如图7所示,本申请提供了一种任务分发装置,包括:
接收单元71,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量。
获取单元72,用于获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应的一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
判断单元73,用于判断所述目标第一可用资源数量是否小于所述目标所需资源数量。
分发单元74,用于若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
此外,所述任务分发装置还包括:
所述第一存储单元75,用于若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
如图8所示,所述分发单元73,包括:
确定集群单元81,用于确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群与使用对应类型的执行节点集合的一个或多个业务线的业务线标识对应。
第一确定节点单元82,用于将所述目标集群中的一个执行节点标识,确定为目标执行节点标识。
分发任务单元83,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
所述总控节点或服务器还存储有:与每个执行节点标识对应的第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和;如图9所示,所述第一确定节点单元82,包括:
第一确定数量单元91,用于确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
第一判断单元92,用于在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识。
第二确定节点单元93,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
第二存储单元94,用于若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
其中,所述第一确定数量单元91,包括:
第二确定数量单元911,用于在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;或者,
第三确定数量单元912,用于在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
第三存储单元,用于若在确定所述目标集群的总可用资源数量小于所述目标所需资源数量的情况下,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
如10所示,所述任务分发装置还包括:
第一减少单元101,用于将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
第一增加单元102,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
如图11所示,所述分发单元73,包括:
第二判断单元111,用于判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;每个执行节点标识对应一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值;
第三确定节点单元112,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识;
第二分发任务单元113,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
此外,如图12所示,所述任务分发装置,还包括:
第二减小单元121,用于将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
第二增加单元122,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
参见图2a,本申请提供了一种任务分发系统,所述系统包括:
总控节点100、与所述总控节点100相连的服务器200、与所述总控节点100相连的多个执行节点300以及与所述总控节点100相连的多个业务线400。其中,多个执行节点300采用执行节点1、执行节点2……执行节点N表示,N为非零自然数;多个业务线400采用业务线1、业务线2……业务线M表示,M为非零自然数。多个业务线中任一业务线为目标业务线。
其中,目标业务线400,用于向所述总控节点发送目标数据信息;
所述服务器200,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值。
所述总控节点100,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应的一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
参见图2b所示,本申请还提供了一种任务分发系统,所述系统包括:
总控节点100、与所述总控节点100相连的多个执行节点300以及与所述总控节点100相连的多个业务线400。其中,多个执行节点300采用执行节点1、执行节点2……执行节点N表示,N为非零自然数;多个业务线400采用业务线1、业务线2……业务线M表示,M为非零自然数。多个业务线中任一业务线为目标业务线。
其中,目标业务线400,用于向所述总控节点发送目标数据信息;
所述总控节点100,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;并且,还用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;在与总控节点相连的服务器中,获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
本实施例方法所述的功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算设备可读取存储介质中。基于这样的理解,本申请实施例对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一台计算设备(可以是个人计算机,服务器,移动计算设备或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (22)

  1. 一种任务分发方法,其特征在于,包括:
    接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;
    获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应一个各个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
    若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
  2. 如权利要求1所述的方法,其特征在于,还包括:
    若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
  3. 如权利要求1所述的方法,其特征在于,所述向与所述总控节点相连的执行节点分发所述目标任务,包括:
    确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群与使用对应类型的执行节点集合的一个或多个业务线的业务线标识对应;
    将所述目标集群中的一个执行节点标识,确定为目标执行节点标识;
    向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
  4. 如权利要求3所述的方法,其特征在于,每个执行节点标识对应一个第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和;则所述将所述目标集群中的一个执行节点标识,确定为目标执行节点标识,包括:
    在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;
    若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
  5. 如权利要求4所述的方法,其特征在于,还包括:
    若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
  6. 如权利要求4所述的方法,其特征在于,目标集群的总可用资源数量不小于所述目标所需资源数量的确定过程,包括:
    在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;或者,
    在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
  7. 如权利要求4中任一项所述的方法,其特征在于,还包括:
    若在确定所述目标集群的总可用资源数量小于所述目标所需资源数量的情况下,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
  8. 如权利要求4-7任一项项所述的方法,其特征在于,在向与所述总控节点相连的执行节点分发所述目标任务之后,还包括:
    将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
    在所述目标执行节点将所述目标任务执行完成之后,将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
  9. 如权利要求1所述的方法,其特征在于,所述向与所述总控节点相连的执行节点分发所述目标任务,包括:
    判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;其中,每个执行节点标识对应一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值;
    若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识;
    向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
  10. 如权利要求9所述的方法,其特征在于,在向与所述总控节点相连的执行节点分发所述目标任务之后,还包括:
    将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
    在所述目标执行节点将所述目标任务执行完成之后,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
  11. 一种任务分发装置,其特征在于,包括:
    接收单元,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;
    获取单元,用于获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;其中,每个业务线对应一个业务线标识,每个业务线标识对应一个资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
    分发单元,用于若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
  12. 如权利要求11所述的装置,其特征在于,还包括:
    第一存储单元,用于若所述目标第一可用资源数量小于所述目标所需资源数量,则将所述目标任务存储至执行队列中,直到所述目标第一可用资源数量不小于所述目标所需资源数量。
  13. 如权利要求11所述的装置,其特征在于,所述分发单元,包括:
    确定集群单元,用于确定与所述目标业务线标识对应的目标集群;其中,在与所述总控节点相连的所有执行节点为多个类型的执行节点集合的情况下,每个类型的执行节点集合对应一个集群,每个集群包括与自身对应的执行节点集合中各个执行节点的执行节点标识;每个集群与使用对应类型的执行节点集合的一个或多个业务线的业务线标识对应;
    第一确定节点单元,用于将所述目标集群中的一个执行节点标识,确定为目标执行节点标识;
    分发任务单元,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
  14. 如权利要求13所述的装置,其特征在于,每个执行节点标识对应一个第二可用资源数量,每个集群的总可用资源数量为其包含的各个执行节点标识的第二可用资源数量的总和;则所述第一确定节点单元,包括:
    第一确定数量单元,用于确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;
    第一判断单元,用于在确定所述目标集群的总可用资源数量不小于所述目标所需资源数量的情况下,判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;
    第二确定节点单元,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识。
  15. 如权利要求14所述的装置,其特征在于,还包括:
    第二存储单元,用于若不存在所述一个或多个执行节点标识,则将所述目标任务存储至执行队列中,直到存在所述一个或多个执行节点标识。
  16. 如权利要求14所述的装置,其特征在于,所述第一确定数量单元,包括:
    第二确定数量单元,用于在所述目标集群的总可用资源数量大于或等于所述目标集群对应的各个资源组的第一额定资源数量之和的情况下,则可确定所述目标集群的总可用资源数量不小于所述目标所需资源数量;或者,
    第三确定数量单元,用于在所述目标集群的总可用资源数量小于所述目标集群中各个业务线的第一额定资源数量之和的情况下,判断所述目标集群的总可用资源数量是否不小于所述目标所需资源数量,若是,则确定所述总可用资源数量不小于所述目标所需资源数量。
  17. 如权利要求14中任一项所述的装置,其特征在于,还包括:
    第三存储单元,用于若在确定所述目标集群的总可用资源数量小于所述目标所需资源数量的情况下,则将所述目标任务存储至执行队列中,直到确定所述目标集群的总可用资源数量不小于所述目标所需资源数量。
  18. 如权利要求14-17任一项项所述的装置,其特征在于,还包括:
    第一减少单元,用于将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
    第一增加单元,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标集群的总可用资源数量、所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
  19. 如权利要求11所述的装置,其特征在于,所述分发单元,包括:
    第二判断单元,用于判断是否存在第二可用资源数量不小于所述目标所需资源数量的一个或多个执行节点标识;其中,每个执行节点标识对应的一个第二可用资源数量,并且每个执行节点的第二可用资源数量均有第二额定资源数量,每个第二额定资源数量用于表示执行节点所能同时使用资源数量的上限值;
    第三确定节点单元,用于若存在所述一个或多个执行节点标识,则将所述一个或多个执行节点标识中的一个执行节点标识,确定为所述目标执行节点标识;
    第二分发任务单元,用于向与所述目标执行节点标识对应的目标执行节点,分发所述目标任务。
  20. 如权利要求19所述的装置,其特征在于,还包括:
    第二减小单元,用于将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均减去所述目标所需资源数量;
    第二增加单元,用于在所述目标执行节点将所述目标任务执行完成之后,将所述目标资源组的目标第一可用资源数量,以及所述目标执行节点的第二可用资源数量均增加所述目标所需资源数量。
  21. 一种任务分发系统,其特征在于,包括:
    总控节点、与所述总控节点相连的服务器、与所述总控节点相连的多个执行节点以及与所述总控节点相连的多个业务线;多个业务线中的一个业务线为目标业务线;
    其中,目标业务线,用于向所述总控节点发送目标数据信息;
    所述服务器,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;
    所述总控节点,用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;在与总控节点相连的服务器中,获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
  22. 一种任务分发系统,其特征在于,包括:
    总控节点、与所述总控节点相连的多个执行节点以及与所述总控节点相连的多个业务线;多个业务线中的一个业务线为目标业务线;
    其中,目标业务线,用于向所述总控节点发送目标数据信息;
    所述总控节点,用于存储与各个业务线对应的各个业务线标识,以及与每个业务线标识对应的资源组,每个资源组包括一个业务线目前可使用的第 一可用资源数量,并且,每个资源组的第一可用资源数量均有一个第一额定资源数量,每个第一额定资源数量用于表示业务线所能同时使用资源数量的上限值;并且,还用于接收一个目标业务线发送的目标数据信息;其中,所述目标数据信息包括目标任务、目标所需资源数量以及目标业务线标识,所述目标所需资源数量为处理所述目标任务所需使用的资源数量;在与总控节点相连的服务器中,获取与所述目标业务线标识对应的目标资源组中的目标第一可用资源数量;若所述目标第一可用资源数量不小于所述目标所需资源数量,则向与所述总控节点相连的执行节点分发所述目标任务。
PCT/CN2016/099289 2015-09-28 2016-09-19 任务分发方法、装置及系统 WO2017054650A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510628406.9A CN106557366B (zh) 2015-09-28 2015-09-28 任务分发方法、装置及系统
CN201510628406.9 2015-09-28

Publications (1)

Publication Number Publication Date
WO2017054650A1 true WO2017054650A1 (zh) 2017-04-06

Family

ID=58416624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099289 WO2017054650A1 (zh) 2015-09-28 2016-09-19 任务分发方法、装置及系统

Country Status (2)

Country Link
CN (1) CN106557366B (zh)
WO (1) WO2017054650A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432497A (zh) * 2020-03-30 2020-07-17 京信通信系统(中国)有限公司 资源分配方法、装置、计算机设备和存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193650B (zh) * 2017-04-17 2021-01-19 北京奇虎科技有限公司 一种在分布式集群中调度显卡资源的方法和装置
CN108965362B (zh) * 2017-05-19 2023-03-24 腾讯科技(深圳)有限公司 一种数据处理方法、服务器及存储介质
CN108287694B (zh) * 2017-08-08 2021-01-19 深圳壹账通智能科技有限公司 应用程序构建方法、系统、计算机设备和存储介质
CN108363615B (zh) 2017-09-18 2019-05-14 清华大学 用于可重构处理系统的任务分配方法和系统
CN110968410B (zh) * 2019-11-29 2023-08-08 深圳前海环融联易信息科技服务有限公司 任务失败重试方法、装置、计算机设备及存储介质
CN113806097A (zh) * 2021-09-29 2021-12-17 杭州网易云音乐科技有限公司 一种数据处理方法、装置、电子设备以及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567086A (zh) * 2010-12-30 2012-07-11 中国移动通信集团公司 一种任务调度的方法、设备和系统
CN102902587A (zh) * 2011-07-28 2013-01-30 中国移动通信集团四川有限公司 分布式任务调度方法、系统和装置
CN103699443A (zh) * 2013-12-16 2014-04-02 北京神州绿盟信息安全科技股份有限公司 任务分发方法及扫描器
US20140189695A1 (en) * 2012-12-28 2014-07-03 Futurewei Technologies, Inc. Methods for Packet Scheduling with Order in Software-Based Parallel Processing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100542139C (zh) * 2006-12-31 2009-09-16 华为技术有限公司 一种基于任务分组的资源分配方法和装置
CN102387173B (zh) * 2010-09-01 2015-02-04 中国移动通信集团公司 一种MapReduce系统及其调度任务的方法和装置
US9348648B2 (en) * 2012-09-12 2016-05-24 Salesforce.Com, Inc. Providing a routing framework for facilitating dynamic workload scheduling and routing of message queues for fair management of resources for application servers in an on-demand services environment
CN103810045B (zh) * 2012-11-09 2016-12-21 阿里巴巴集团控股有限公司 资源分配方法、资源管理器、资源服务器及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567086A (zh) * 2010-12-30 2012-07-11 中国移动通信集团公司 一种任务调度的方法、设备和系统
CN102902587A (zh) * 2011-07-28 2013-01-30 中国移动通信集团四川有限公司 分布式任务调度方法、系统和装置
US20140189695A1 (en) * 2012-12-28 2014-07-03 Futurewei Technologies, Inc. Methods for Packet Scheduling with Order in Software-Based Parallel Processing
CN103699443A (zh) * 2013-12-16 2014-04-02 北京神州绿盟信息安全科技股份有限公司 任务分发方法及扫描器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432497A (zh) * 2020-03-30 2020-07-17 京信通信系统(中国)有限公司 资源分配方法、装置、计算机设备和存储介质
CN111432497B (zh) * 2020-03-30 2022-11-01 京信网络系统股份有限公司 资源分配方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN106557366A (zh) 2017-04-05
CN106557366B (zh) 2020-09-08

Similar Documents

Publication Publication Date Title
WO2017054650A1 (zh) 任务分发方法、装置及系统
CN107612840B (zh) 一种四层负载均衡设备的数据处理方法及装置
US20170024251A1 (en) Scheduling method and apparatus for distributed computing system
US20190222633A1 (en) Distributed partitioned map reduce using a data fabric
US9027028B2 (en) Controlling the use of computing resources in a database as a service
US11544100B2 (en) Hardware acceleration method and related device
US10686728B2 (en) Systems and methods for allocating computing resources in distributed computing
JP2015144020A5 (zh)
CN106712981B (zh) 一种节点变更通知方法及装置
US20160142336A1 (en) Periodic advertisements of host capabilities in virtual cloud computing infrastructure
CN105592110A (zh) 一种资源调度方法及装置
CN105791254B (zh) 网络请求处理方法、装置及终端
US9141677B2 (en) Apparatus and method for arranging query
US10379906B2 (en) Method and apparatus for system call command batch processing
CN110187960A (zh) 一种分布式资源调度方法及装置
WO2022142666A1 (zh) 数据处理方法、装置、终端设备及存储介质
TW201405308A (zh) 用於s列表分配之系統與方法
CN110750339B (zh) 一种线程调度方法、装置及电子设备
CN113010286A (zh) 并行任务调度方法、装置、计算机设备和存储介质
CN115525434A (zh) 资源分配方法、容器管理组件和资源分配系统
CN108028806A (zh) 网络功能虚拟化nfv网络中分配虚拟资源的方法和装置
CN113626173B (zh) 调度方法、装置及存储介质
CN103823712A (zh) 一种多cpu虚拟机系统的数据流处理方法和装置
CN107526632B (zh) 进程池扩充方法和装置
CN111382141A (zh) 主从架构配置方法、装置、设备以及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16850274

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16850274

Country of ref document: EP

Kind code of ref document: A1