Task deployment method and device, equipment and storage medium

By determining the deployment relationship between nodes in multiple deployment levels and deploying tasks in a layered manner, the problem of low task deployment efficiency between central nodes among multiple execution nodes is solved, and the efficiency of task deployment is achieved.

CN119960930APending Publication Date: 2025-05-09BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411841562.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

When a central node deploys tasks to multiple execution nodes, if the number of execution nodes deployed by the target exceeds the maximum number of deployments that the central node can deploy in a single time, it needs to be deployed in batches, resulting in low deployment efficiency.

Method used

By obtaining the configuration information and number of target deployment nodes, as well as the resource overhead of the task, the deployment relationship between nodes at each level in multiple deployment hierarchies and their adjacent hierarchies and deploying the task based on this relationship.

Benefits of technology

By deploying tasks downwards at multiple levels in parallel, the deployment efficiency of tasks is improved and the delay caused by batch deployment is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960930A_ABST
    Figure CN119960930A_ABST
Patent Text Reader

Abstract

The invention relates to a task deployment method and device, equipment and a storage medium. The method comprises the steps of obtaining configuration information and the number of nodes of target deployment and task information of tasks of target deployment; based on the number of the nodes, the configuration information and the resource overhead of the task, determining nodes on each deployment hierarchy in the plurality of deployment hierarchies and a deployment relationship between the nodes on the adjacent deployment hierarchies; according to the method, tasks are deployed based on deployment hierarchies and deployment relationships between nodes on adjacent deployment hierarchies, so that in the adjacent deployment hierarchies, the tasks of the nodes on the next deployment hierarchies can be deployed by the nodes, having the deployment relationships with the nodes, on the previous hierarchies, and the tasks are deployed downwards in parallel through the nodes on the multiple hierarchies; and the task deployment efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of task deployment, and in particular to a task deployment method, apparatus, device, and storage medium. Background Art

[0002] In related technologies, when a central node deploys tasks to multiple execution nodes, if the number of target execution nodes exceeds the maximum number that the central node can deploy at a single time, the central node needs to be deployed in multiple batches, and the next batch can only be deployed after the current batch is deployed, resulting in low deployment efficiency. Summary of the Invention

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a task deployment method, apparatus, device and storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a task deployment method, the method comprising:

[0005] Obtaining configuration information and quantity of target deployed nodes and task information of the target deployed tasks, wherein the task information includes information on resource overhead of the tasks;

[0006] Determining, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and between nodes on adjacent deployment levels;

[0007] Deploying the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels;

[0008] In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the node.

[0009] Optionally, the target deployment tasks include multiple types of tasks;

[0010] The determining, based on the number and configuration information of the nodes and the resource overhead of the task, the deployment relationship between the nodes at each deployment level in the multiple deployment levels and the nodes at adjacent deployment levels, includes:

[0011] Based on the number and configuration information of the nodes and the maximum resource overheads of the multiple types of tasks, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and between nodes on adjacent deployment levels is determined.

[0012] Optionally, determining, based on the number and configuration information of the nodes and the maximum resource overhead of the multiple types of tasks, a deployment relationship between nodes at each deployment level in the multiple deployment levels and nodes at adjacent deployment levels includes:

[0013] For a first node at any deployment level, obtaining information about a first available resource of the first node from configuration information of the first node, where the first node is any node at the deployment level;

[0014] Determining, based on information about first available resources of the first node and maximum resource overheads of the multiple types of tasks, a first number of second nodes on a next deployment level for deploying tasks by the first node;

[0015] The first number of nodes are selected from the nodes of the target deployment as the second nodes at the next deployment level.

[0016] Optionally, before deploying the task based on the deployment level and the deployment relationship between nodes on adjacent deployment levels, the method further includes:

[0017] Acquire resource usage information of the first node, the resource usage information including resource utilization and second available resources;

[0018] In response to the resource utilization of the first node being within a preset threshold range, determining a second number of nodes to which the first node can deploy tasks based on the second available resources and maximum resource overheads of the multiple types of tasks;

[0019] In response to the second number being smaller than the first number, the deployment relationship between the first node and the second node is modified to a deployment relationship between a third node and the second node, wherein the third node and the first node belong to the same deployment level, and the available resources of the third node are the largest in the deployment level.

[0020] Optionally, the method further includes:

[0021] In response to the resource utilization of the first node exceeding the maximum value of the preset threshold range, the deployment relationship between the first node and the second node is modified to a deployment relationship between a fourth node and the second node, the fourth node and the first node belong to the same deployment level, and the available resources of the fourth node are the largest in the deployment level.

[0022] Optionally, the method further includes:

[0023] For any node at any deployment level, if the node fails, the deployment tasks of the node to the next deployment level will be migrated to other nodes in the deployment level where the node is located.

[0024] Optionally, the number of nodes is selected from different regions, different computer rooms or different racks.

[0025] In a second aspect, an embodiment of the present disclosure provides a task deployment device, the device comprising:

[0026] A first acquisition module is configured to acquire configuration information and quantity of target deployed nodes and task information of the target deployed tasks, wherein the task information includes information on resource overhead of the task;

[0027] A first determining module is configured to determine, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and between nodes on adjacent deployment levels;

[0028] an execution module, configured to deploy the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels;

[0029] In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the node.

[0030] Optionally, the target deployed tasks include multiple types of tasks;

[0031] The first determination module is used to determine the deployment relationship between the nodes on each deployment level in multiple deployment levels and the nodes on adjacent deployment levels based on the number and configuration information of the nodes and the maximum resource overhead of the multiple types of tasks.

[0032] Optionally, the first determining module is configured to obtain, for a first node at any deployment level, information about first available resources of the first node from configuration information of the first node, where the first node is any node at the deployment level;

[0033] Determining, based on information about first available resources of the first node and maximum resource overheads of the multiple types of tasks, a first number of second nodes on a next deployment level for deploying tasks by the first node;

[0034] The first number of nodes are selected from the nodes of the target deployment as the second nodes at the next deployment level.

[0035] Optionally, the task deployment device may further include:

[0036] A second acquisition module is configured to acquire resource usage information of the first node, where the resource usage information includes resource utilization and a second available resource;

[0037] a second determining module, configured to determine, in response to the resource utilization of the first node being within a preset threshold range, a second number of nodes to which the task can be deployed by the first node based on the second available resources and maximum resource overheads of the multiple types of tasks;

[0038] A first modification module is used to modify the deployment relationship between the first node and the second node to a deployment relationship between a third node and the second node in response to the second number being less than the first number, wherein the third node and the first node belong to the same deployment level and the available resources of the third node are the largest in the deployment level.

[0039] Optionally, the task deployment device may further include:

[0040] The second modification module is used to modify the deployment relationship between the first node and the second node to a deployment relationship between a fourth node and the second node in response to the resource utilization of the first node exceeding the maximum value of the preset threshold range, wherein the fourth node and the first node belong to the same deployment level, and the available resources of the fourth node are the largest in the deployment level.

[0041] Optionally, the task deployment device may further include:

[0042] The migration module is used to migrate the deployment tasks of any node at any deployment level to other nodes at the deployment level where the node is located if the node fails.

[0043] Optionally, the number of nodes is selected from different regions, different computer rooms or different racks.

[0044] In a third aspect, an embodiment of the present disclosure provides a computer device, the computer device comprising:

[0045] Memory;

[0046] processor; and

[0047] computer programs;

[0048] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect.

[0049] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described in the first aspect.

[0050] The task deployment method, apparatus, device and storage medium provided by the embodiments of the present disclosure obtain the configuration information and number of target deployed nodes and the task information of the target deployed tasks; determine the deployment relationship between the nodes on each deployment level and the nodes on adjacent deployment levels in multiple deployment levels based on the number and configuration information of the nodes and the resource overhead of the tasks; deploy tasks based on the deployment levels and the deployment relationship between the nodes on adjacent deployment levels, so that in adjacent deployment levels, the tasks of the nodes on the latter deployment level can be deployed by the nodes on the previous level that have a deployment relationship with the nodes, thereby deploying tasks downward in parallel through the nodes on multiple levels, thereby improving the deployment efficiency of tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0052] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0053] Figure 1 This is a flowchart of a task deployment method provided by an embodiment of the present disclosure;

[0054] Figure 2 is a schematic diagram of a node selection method provided by an embodiment of the present disclosure;

[0055] Figure 3 is a schematic diagram of another node selection method provided by an embodiment of the present disclosure;

[0056] Figure 4 This is a flow chart of a method for modifying a deployment relationship provided by an embodiment of the present disclosure;

[0057] Figure 5 is a schematic diagram of a task migration provided by an embodiment of the present disclosure;

[0058] Figure 6 is a structural diagram of a task deployment device provided by an embodiment of the present disclosure;

[0059] Figure 7 A schematic diagram of the structure of a computer device embodiment provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0060] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0062] For example, Figure 1 This is a flowchart of a task deployment method provided by an embodiment of the present disclosure. The method can be exemplarily executed by a computer device, which can be exemplarily understood as any device equipped with a task deployment tool (such as Ansible, but not limited to Ansible). Figure 1 As shown, in some implementations, the method provided by the embodiment of the present disclosure may include: steps 101 to 103.

[0063] Step 101: Obtain configuration information and quantity of target deployed nodes and task information of target deployed tasks, where the task information includes information on resource overhead of the task.

[0064] In the embodiment of the present disclosure, nodes in different regions, computer rooms, and racks can be aggregated into a certain group or cluster based on preset grouping conditions.

[0065] The deployment task can be exemplarily understood as deploying the task to one or more groups or clusters of nodes, which can be understood as target deployment nodes. That is to say, in some embodiments, multiple target deployment nodes can be selected from different regions, different computer rooms, or different racks. For example, a group has 2,000 machines (i.e., nodes), which are selected from different regions, different computer rooms, or different racks. The deployment task is to deploy the task to these 2,000 machines, and each of these 2,000 machines can be understood as a target deployment node. Of course, this is only an example of a target deployment node, not a sole limitation. In practice, any node to which the task target is deployed can be referred to as a target deployment node.

[0066] The tasks referred to in the embodiments of the present disclosure may exemplarily include at least one of the following types of tasks: instruction execution tasks (Task command ), file distribution task (Task file ), configure update tasks (Task template), message transmission task (Task message ). The number of any type of tasks included in the tasks referred to in the embodiments of the present disclosure may be one or more.

[0067] The task information referred to in the embodiments of the present disclosure may exemplarily include information on the type of one or more tasks, information on resource costs, and the number of tasks of a certain type. The resource costs of a task may exemplarily include at least one of CPU costs, storage costs, and bandwidth costs.

[0068] The configuration information of the target deployed node may include, for example, the node IP address. IP ), Node domain name (Node domain ), Node room distribution (Node IDC ), Node network card type / bandwidth (Node CNI In an exemplary embodiment, the configuration information of the target deployed nodes can be obtained from a preset node description file. Alternatively, in some embodiments, the number of target deployed nodes can also be obtained from the above-mentioned node description file.

[0069] Step 102: Determine the deployment relationship between nodes on each deployment level and nodes on adjacent deployment levels in the multiple deployment levels based on the number and configuration information of the nodes and the resource overhead of the tasks.

[0070] For example, when the target deployment tasks include multiple types of tasks, the deployment relationship between the nodes on each deployment level in the multiple deployment levels and the nodes on adjacent deployment levels is determined based on the number and configuration information of the nodes and the resource overhead of the tasks. This can be exemplarily understood as: based on the number and configuration information of the nodes and the average or maximum resource overhead of multiple types of tasks, the deployment relationship between the nodes on each deployment level in the multiple deployment levels and the nodes on adjacent deployment levels is determined.

[0071] Taking the maximum resource cost as an example, it is assumed that the tasks referred to in the embodiment of the present disclosure include instruction execution tasks (Task command ), file distribution task (Task file ), configure update tasks (Task template ), message transmission task (Task message ). The maximum resource overhead of multiple types of tasks can be expressed as follows:

[0072] RS max =(RS cpu ,RS memory ,RS network )

[0073]

[0074] Among them, RS cpu ,RS memory ,RS network Respectively represent the maximum CPU overhead, maximum storage overhead, and maximum bandwidth overhead of multiple types of tasks.

[0075] Furthermore, for the root node (which can be exemplarily understood as the central node, i.e., the node for the first batch of deployment tasks, which can be any node among the target deployment nodes), the number of nodes that the root node can deploy can be determined based on the available resources of the root node and the aforementioned maximum resource overhead. For example, in some examples, the number of nodes that the root node can deploy can be exemplarily expressed by the following expression:

[0076]

[0077] in, Indicates finding the minimum value, Respectively represent the CPU resources, storage resources, and bandwidth resources available to the root node.

[0078] For example, if there is only one root node available, the upper limit of available resources is 8 cores, 16G memory, and 1G bandwidth, then node number It can be expressed as follows:

[0079]

[0080] Right now

[0081] That is, the root node can deploy tasks for the 40 nodes in the first deployment level. Furthermore, less than or equal to 40 nodes (for example, the 40 nodes with the best performance or the most idle resources, but not limited to the selection method listed here) can be selected from the target deployment nodes as the nodes in the first deployment level.

[0082] Among them, if the target deployment nodes can be classified into multiple Internet data centers (IDCs), then the corresponding number of nodes can be selected from different IDCs to form nodes with a deployment relationship with the root node, for example, Figure 2 is a schematic diagram of a node selection method provided by an embodiment of the present disclosure, such as Figure 2Assuming that the target deployed nodes can be divided into N (N is an integer greater than or equal to 1) IDCs, nodes can be selected from at least some of the IDCs. The number of nodes selected in each IDC can be set as needed. The specifications of the nodes selected in each IDC can be the same or different. After selecting nodes from each IDC, the number of remaining undeployed nodes in the target deployed nodes (Node_number) is calculated.

[0083] It should be noted that if the nodes of the target deployment can be divided into multiple IDCs, the nodes can be selected based on the ratio of the number of nodes in each IDC to the total number of nodes in the target deployment. Assuming that the nodes of the target deployment can be divided into 3 IDCs, the total number of nodes in the target deployment is:

[0084]

[0085] is the number of nodes in the i-th IDC, and the node ratio of the i-th IDC is:

[0086]

[0087] For the nodes in the first deployment level, the number of nodes corresponding to each IDC can be To do the segmentation;

[0088] For example, there are three IDCs, the first IDC has 1000 nodes, the second IDC has 800 nodes, and the third IDC has 200 nodes; therefore, there is α idc-1 0.5, α idc-2 =0.4,α idc-3 = 0.1, then the nodes in the first deployment level are 20 nodes selected from the first IDC, 16 nodes selected from the second IDC, and 4 nodes selected from the third IDC. The method for selecting nodes from each IDC can be set as needed, such as selecting based on performance or idle resources, but is not limited to the selection methods listed here.

[0089] By selecting nodes from different IDCs in proportion, load balancing of IDCs can be ensured.

[0090] Furthermore, for each node on the first deployment level, a method similar to the root node can be used to determine the number of nodes to which the node can deploy tasks, such as Figure 3 is a schematic diagram of another node selection method provided by an embodiment of the present disclosure, such as Figure 3As shown, after determining the number of nodes deployed in the next deployment level for each node on the deployment level f1, the number of nodes deployed in the next deployment level f2 for all nodes in f1 can be summed up (i.e. Figure 3 (Sum Node_number1, Node_number1, ..., up to Node_numberm). If the sum is less than the remaining value after subtracting the root node and the number of nodes on f1 from the total number of nodes to be deployed, a node is selected from the remaining nodes as the node on f2. For example, if the idle resources of any node on f1 are 96 cores, 512GB of 8TB of storage, and 25GB of bandwidth, and 8.5% of the idle resources are available, then:

[0091]

[0092] Right now If the sum of the number of nodes deployed by all nodes in f1 in the next deployment level f2 is less than the remaining value after deducting the number of root nodes and nodes on f1 from the total number of nodes in the target deployment, 40 nodes can be selected from the remaining nodes to establish a deployment relationship between the above-mentioned "any node" and the 40 nodes.

[0093] It should be noted that each deployment level can determine the deployment relationship of nodes on the deployment level and nodes between adjacent levels through the above method until the total number of nodes on all deployment levels is equal to the number of nodes in the target deployment.

[0094] For example, if the number of nodes on the first deployment level is f1, then:

[0095] The number of nodes f2 distributed on the second deployment level is: in, The number of nodes deployed on the second deployment level that the i-th node on the first deployment level is responsible for.

[0096] The number of nodes f3 distributed at the third deployment level is: The number of nodes deployed on the third deployment level that the i-th node on the second deployment level is responsible for.

[0097] Similarly, the number of nodes distributed on the jth deployment level is f j for: The number of nodes deployed at the jth deployment level that the i-th node at the j-1th deployment level is responsible for.

[0098] The total number of nodes to be deployed is:

[0099] Referring to the above method for determining the deployment relationship between nodes on a deployment level and nodes on adjacent levels, it can be seen that in some exemplary expressions, the above method for determining the deployment relationship between nodes on a deployment level and nodes on adjacent levels can be exemplarily expressed as: for the first node on any deployment level, obtain the information of the first available resources of the first node from the configuration information of the first node, where the first node is any node on the deployment level; based on the information of the first available resources of the first node and the maximum resource overhead of multiple types of tasks, determine the first number of second nodes for deploying tasks by the first node on the next deployment level; select the first number of nodes from the target deployed nodes as the second nodes on the next deployment level.

[0100] Step 103: Deploy tasks based on the deployment levels and the deployment relationships between nodes on adjacent deployment levels.

[0101] In the disclosed embodiments, except for the root node and nodes at the last deployment level, every node is both an execution node for executing tasks and a node responsible for allocating tasks. For a node at any deployment level, the task sent to that node includes both the task to be executed by the node and information about nodes in the next deployment level that have a deployment relationship with the node, such as IP addresses and domain names. Based on these deployment relationships, the node then deploys the task to the nodes at the next deployment level.

[0102] The embodiments of the present disclosure obtain the configuration information and number of target deployed nodes and the task information of the target deployed tasks; determine the deployment relationship between the nodes on each deployment level in multiple deployment levels and the nodes on adjacent deployment levels based on the number and configuration information of the nodes and the resource overhead of the tasks; and deploy tasks based on the deployment levels and the deployment relationship between the nodes on adjacent deployment levels, thereby improving the utilization rate of the nodes on each deployment level, so that each node on each level can deploy tasks to the next level, thereby deploying tasks downward in parallel through the nodes on multiple levels, thereby improving the deployment efficiency of tasks.

[0103] In some implementations, before deploying tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels, a step of modifying the deployment relationship may also be included. For example, Figure 4 This is a flow chart of a method for modifying a deployment relationship provided by an embodiment of the present disclosure. Figure 4 As shown, in some implementations, the deployment relationship modification method of the embodiment of the present disclosure may include steps 401 to 403.

[0104] Step 401: Obtain resource usage information of a first node at any deployment level, where the resource usage information includes resource utilization and a second available resource.

[0105] The first node can be understood as any node at the deployment level where it is located.

[0106] The second available resource can be understood as the real-time available resource of the first node, which is less than or equal to the idle resource of the first node. Resource usage information such as the resource utilization rate of the first node and the second available resource can be obtained from the first node.

[0107] The resource utilization of the first node may illustratively include one or more of CPU utilization, storage space utilization, and bandwidth utilization. Alternatively, in some embodiments, the resource utilization of the first node may also be understood as the average of the CPU utilization, storage space utilization, and bandwidth utilization. Alternatively, in another embodiment, the resource utilization of the first node may also be understood to include the average utilization of the CPU utilization, storage space utilization, and bandwidth utilization within a preset time length. Of course, this is only an example and not the only limitation on resource utilization.

[0108] Step 402: In response to the resource utilization of the first node being within a preset threshold range, determine a second number of nodes to which the first node can deploy tasks based on the second available resource and maximum resource overheads of multiple types of tasks.

[0109] For example, assuming that the average utilization of any one of the CPU utilization, storage space utilization, and bandwidth utilization of the first node within a preset time length (such as 6 hours but not limited to 6 hours) does not exceed a preset threshold, such as 10% but not limited to 10%, there is no need to modify the deployment relationship between the first node and the second node.

[0110] If the average utilization of any one of the CPU utilization, storage space utilization, and bandwidth utilization is within a preset threshold range (e.g., 10%-60%, but not limited to the range listed here), it is necessary to recalculate the second number of nodes to which the first node can deploy tasks. code =96C.512G.8T.25G is online node, and its CPU resources are being used Storage resources Bandwidth resources The node reserves 20% of the resources, then the second number of nodes that can deploy tasks by the first node is It can be calculated by the following expression:

[0111]

[0112] Step 403: In response to the second number being less than the first number of second nodes that can be deployed by the first node obtained in the last calculation, the deployment relationship between the first node and the second node is modified to a deployment relationship between a third node and a second node, wherein the third node and the first node belong to the same deployment level, and the available resources of the third node are the largest in the deployment level.

[0113] Continuing from the above example, Greater than There is no need to modify the deployment relationship between the first node and the second node. If the second number is less than the first number, the deployment relationship between the first node and the second node can be modified to a deployment relationship between a third node and a second node, where the third node and the first node belong to the same deployment level and the third node has the largest available resources in the deployment level.

[0114] For example, in some embodiments, if the resource utilization of the first node exceeds the maximum value of a preset threshold range, such as any one of the CPU resource utilization, storage resource utilization, and bandwidth resource utilization of the first node exceeds the maximum value of the preset threshold range, such as 60% but not limited to 60%, then the number of nodes that can be deployed by the first node may not be recalculated, but the deployment relationship between the first node and the second node may be directly modified to the deployment relationship between the fourth node and the second node, wherein the fourth node and the first node belong to the same deployment level, and the available resources of the fourth node are the largest in the deployment level.

[0115] By reconfirming the deployment capability of each node before deploying a task, we can confirm that the deployment task is carried out smoothly and ensure the reliability of task deployment.

[0116] For example, in some implementations, if any node on any deployment level fails, the deployment tasks of that node to the next deployment level can be migrated to other nodes in the deployment level where the node is located, such as the node with the highest specifications, the node with the largest available resources, the node with the most idle resources, etc., which is not limited here. Figure 5 is a schematic diagram of a task migration provided by an embodiment of the present disclosure, such as Figure 5As shown in the example, if List-Node(1,2) on the J1 layer fails, and List-Node(1,2) is responsible for deploying tasks to the next-level node, Node(3,2,b), and List-Node(1,1) on the J1 layer is responsible for deploying tasks to the next-level node, Node(3,1,a), then the J1 layer can be modified so that List-Node(1,1) on the J1 layer deploys tasks to the next-level nodes, Node(3,1,a) and Node(3,2,b). This is of course an example and not a limitation. In practice, the deployment tasks for the failed node can also be split into multiple parts, and different parts can be migrated to different nodes.

[0117] By migrating the deployment tasks of the node to the next deployment level to other nodes at the same level when a node fails, the correct execution of the deployment tasks can be guaranteed and reliability can be improved.

[0118] Figure 6 is a structural diagram of a task deployment device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the task deployment device 60 may include:

[0119] A first acquisition module 61 is configured to acquire configuration information and quantity of target deployed nodes and task information of the target deployed tasks, wherein the task information includes information on resource overhead of the task;

[0120] A first determining module 62 is configured to determine, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes at each deployment level in a plurality of deployment levels and between nodes at adjacent deployment levels;

[0121] An execution module 63, configured to deploy the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels;

[0122] In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the node.

[0123] Optionally, the target deployed tasks include multiple types of tasks;

[0124] The first determination module 62 is used to determine the deployment relationship between the nodes on each deployment level in multiple deployment levels and the nodes on adjacent deployment levels based on the number and configuration information of the nodes and the maximum resource overhead of the multiple types of tasks.

[0125] Optionally, the first determining module 62 is configured to obtain, for a first node at any deployment level, information about first available resources of the first node from configuration information of the first node, where the first node is any node at the deployment level;

[0126] Determining, based on information about first available resources of the first node and maximum resource overheads of the multiple types of tasks, a first number of second nodes on a next deployment level for deploying tasks by the first node;

[0127] The first number of nodes are selected from the nodes of the target deployment as the second nodes at the next deployment level.

[0128] Optionally, the task deployment device may further include:

[0129] A second acquisition module is configured to acquire resource usage information of the first node, where the resource usage information includes resource utilization and a second available resource;

[0130] a second determining module, configured to determine, in response to the resource utilization of the first node being within a preset threshold range, a second number of nodes to which the task can be deployed by the first node based on the second available resources and maximum resource overheads of the multiple types of tasks;

[0131] A first modification module is used to modify the deployment relationship between the first node and the second node to a deployment relationship between a third node and the second node in response to the second number being less than the first number, wherein the third node and the first node belong to the same deployment level and the available resources of the third node are the largest in the deployment level.

[0132] Optionally, the task deployment device may further include:

[0133] The second modification module is used to modify the deployment relationship between the first node and the second node to a deployment relationship between a fourth node and the second node in response to the resource utilization of the first node exceeding the maximum value of the preset threshold range, wherein the fourth node and the first node belong to the same deployment level, and the available resources of the fourth node are the largest in the deployment level.

[0134] Optionally, the task deployment device may further include:

[0135] The migration module is used to migrate the deployment tasks of any node at any deployment level to other nodes at the deployment level where the node is located if the node fails.

[0136] Optionally, the number of nodes is selected from different regions, different computer rooms or different racks.

[0137] The device provided in the embodiments of the present disclosure can execute the method of any of the above method embodiments, and its execution method and beneficial effects are similar and will not be repeated here.

[0138] It should also be noted that the division of modules in the above-mentioned task deployment device in the embodiments of the present disclosure is schematic and is only a logical functional division. In actual implementation, there may be other division methods. In addition, the functional modules in the various embodiments of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into a single module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.

[0139] If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present disclosure.

[0140] Figure 7 This is a schematic diagram of the structure of a computer device embodiment provided by the present disclosure. Figure 7 As shown, the computer device includes a memory 121 and a processor 122 .

[0141] Memory 121 is used to store programs. In addition to the aforementioned programs, memory 121 may also be configured to store various other data to support operations on the computer device. Examples of such data include instructions for any application or method operating on the computer device, contact member data, phonebook member data, messages, images, videos, etc.

[0142] The memory 121 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0143] The processor 122 is coupled to the memory 121 and executes the program stored in the memory 121 to:

[0144] Obtaining configuration information and quantity of target deployed nodes and task information of the target deployed tasks, wherein the task information includes information on resource overhead of the tasks;

[0145] Determining, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and between nodes on adjacent deployment levels;

[0146] Deploying the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels;

[0147] In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the node.

[0148] Further, if Figure 7 As shown, the computer device may further include: a communication component 123, a power component 124, an audio component 125, a display 126 and other components. Figure 7 Only some components are shown schematically, which does not mean that the computer equipment only includes Figure 7 Components shown.

[0149] The communication component 123 is configured to facilitate wired or wireless communication between the computer device and other devices. The computer device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 123 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 123 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared member data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0150] The power supply component 124 provides power to various components of the computer device. The power supply component 124 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the computer device.

[0151] The audio component 125 is configured to output and / or input audio signals. For example, the audio component 125 includes a microphone (MIC), which is configured to receive external audio signals when the computer device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 121 or transmitted via the communication component 123. In some embodiments, the audio component 125 also includes a speaker for outputting audio signals.

[0152] The display 126 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0153] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the method described in any of the above method embodiments.

[0154] In the embodiments of the present disclosure, the above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs)), etc.

[0155] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, the embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0156] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0157] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A task deployment method, characterized in that: The method comprises: Obtaining configuration information and quantity of target deployed nodes and task information of target deployed tasks, wherein the task information includes information on resource overhead of the task; Determine, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and nodes on adjacent deployment levels; Deploy the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels; In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the any node.

2. The method according to claim 1, characterized in that The target deployed tasks include multiple types of tasks; The determining, based on the number and configuration information of the nodes and the resource overhead of the task, the deployment relationship between the nodes on each deployment level in the multiple deployment levels and the nodes on adjacent deployment levels comprises: Based on the number and configuration information of the nodes and the maximum resource overhead of the multiple types of tasks, a deployment relationship between nodes on each deployment level in the multiple deployment levels and nodes on adjacent deployment levels is determined.

3. The method according to claim 2, characterized in that The determining, based on the number and configuration information of the nodes and the maximum resource overhead of the multiple types of tasks, the deployment relationship between the nodes on each deployment level in the multiple deployment levels and the nodes on adjacent deployment levels comprises: For a first node at any deployment level, obtaining information about a first available resource of the first node from configuration information of the first node, where the first node is any node at the deployment level; Determine, based on information about first available resources of the first node and maximum resource overheads of the multiple types of tasks, a first number of second nodes on a next deployment level where the first node deploys tasks; The first number of nodes are selected from the nodes of the target deployment as the second nodes at the next deployment level.

4. The method according to claim 3, characterized in that: Before deploying the task based on the deployment level and the deployment relationship between the nodes on the adjacent deployment levels, the method further includes: Acquire resource usage information of the first node, where the resource usage information includes resource utilization and a second available resource; In response to the resource utilization of the first node being within a preset threshold range, determining a second number of nodes to which the first node can deploy tasks based on the second available resources and maximum resource overheads of the multiple types of tasks; In response to the second number being smaller than the first number, the deployment relationship between the first node and the second node is modified to a deployment relationship between a third node and the second node, wherein the third node and the first node belong to the same deployment level and the available resources of the third node are the largest in the deployment level.

5. The method according to claim 4, characterized in that The method further comprises: In response to the resource utilization of the first node exceeding the maximum value of the preset threshold range, the deployment relationship between the first node and the second node is modified to a deployment relationship between a fourth node and the second node, the fourth node and the first node belong to the same deployment level, and the available resources of the fourth node are the largest in the deployment level.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: For any node at any deployment level, if the node fails, the deployment task of the node to the next deployment level will be migrated to other nodes at the deployment level where the node is located.

7. The method according to claim 1, characterized in that The number of nodes is selected from different regions, different computer rooms or different racks.

8. A task deployment device, characterized in that: include: A first acquisition module is used to acquire configuration information and quantity of target deployed nodes and task information of target deployed tasks, wherein the task information includes information on resource overhead of the task; A first determination module, configured to determine, based on the number and configuration information of the nodes and the resource overhead of the task, a deployment relationship between nodes on each deployment level in a plurality of deployment levels and nodes on adjacent deployment levels; An execution module, configured to deploy the tasks based on the deployment level and the deployment relationship between nodes on adjacent deployment levels; In adjacent deployment levels, tasks of any node on the latter deployment level are deployed by nodes on the previous level that have a deployment relationship with the any node.

9. A computer device, characterized in that: The computer device comprises: Memory; Processor; and Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.