Container dispensing method and device, electronic device, and storage medium

By obtaining role information, determining attribute labels and weight data, and allocating role containers in distributed machine learning, the problem of high bandwidth consumption in cloud computing is solved and communication efficiency and resource utilization are improved.

CN113791890BActive Publication Date: 2024-09-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011232654.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-06
Publication Date
2024-09-20
Estimated Expiration
2040-11-06

AI Technical Summary

Technical Problem

In distributed machine learning based on cloud computing, how to allocate high-bandwidth-consuming working nodes to different physical computing nodes to reduce bandwidth pressure and improve communication efficiency has become a problem that needs to be solved.

Method used

By obtaining role information in distributed machine learning tasks, determining its attribute labels and weight data, generating and labeling role containers, and allocating them to different physical computing nodes based on these labels and weight data, ensuring containers with high bandwidth consumption Evenly distribute to reduce bandwidth pressure on a single node.

Benefits of technology

It improves the communication efficiency between physical computing nodes, maximizes resource utilization, alleviates bandwidth bottlenecks, and improves the performance of distributed machine learning tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113791890B
    Figure CN113791890B
Patent Text Reader

Abstract

The present disclosure provides a container allocation method and device, an electronic device, and a storage medium, and relates to the field of computer technology. The container allocation method includes: obtaining a distributed machine learning task, determining the role information in the distributed machine learning task, the attribute tags corresponding to the role information, and the corresponding weight data between the attribute tags of different role information; generating a role container for running the role information, and marking the role container according to the attribute tags and the weight data; based on the attribute tags and the weight data, allocating the marked role containers to different physical computing nodes. The technical solution of the embodiment of the present disclosure can allocate the role container to the corresponding computing node according to the attribute tags corresponding to the role information and the corresponding weight data between the attribute tags of different role information, effectively alleviating the bandwidth pressure of the computing node, thereby improving the communication efficiency between the computing nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] As machine learning is increasingly used in data mining, natural language processing, computer vision, search engines, and other fields, machine training models and training data are increasing. However, the rapid increase in training data makes stand-alone machine learning unable to meet the requirements of the times, and distributed machine learning model training has emerged.

[0003] Given that cloud computing platforms can easily share physical resources, large-scale distributed machine learning model training is performed on cloud computing platforms. However, in distributed machine learning based on cloud computing platforms, there are worker nodes with large bandwidth consumption. How to allocate worker nodes with high bandwidth consumption to different physical computing nodes to reduce the bandwidth pressure of physical computing nodes and thus improve the communication efficiency between physical computing nodes has become an urgent problem to be solved in distributed machine learning scenarios.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the embodiments of the present disclosure is to provide a container allocation method, device, electronic device and computer-readable storage medium, thereby overcoming the problem of computer node bandwidth bottleneck in distributed machine learning tasks at least to a certain extent.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to a first aspect of an embodiment of the present disclosure, a container allocation method is provided, including: obtaining a distributed machine learning task, determining role information in the distributed machine learning task; determining attribute labels corresponding to the role information and weight data corresponding to the attribute labels of different role information; generating a role container for running the role information, and marking the role container according to the attribute labels and the weight data; and allocating the marked role containers to different physical computing nodes based on the attribute labels and the weight data.

[0008] In some example embodiments of the present disclosure, based on the aforementioned scheme, the attribute tags include a role name tag, a resource requirement tag, and a task coding tag; determining the attribute tag corresponding to the role information includes: determining the role name tag through the association information corresponding to the role information; based on the mapping relationship between the role name tag and the resource requirement tag, determining the resource requirement tag corresponding to the role information through the role name tag; and determining the task coding tag corresponding to the role information according to the distributed machine learning task.

[0009] In some example embodiments of the present disclosure, based on the aforementioned scheme, the determining the weight data corresponding to the attribute tags of the role information includes: obtaining a weight configuration file for the role information; wherein the weight configuration file includes a weight mapping relationship between the attribute tags of different role information; determining the weight data corresponding to the attribute tags of different role information based on the attribute tags and the weight mapping relationship to determine the degree of association between the different role information through the weight data.

[0010] In some example embodiments of the present disclosure, based on the aforementioned scheme, the marked role containers are allocated to different physical computing nodes based on the attribute labels and the weight data, including: taking the role container corresponding to the weight data greater than a first weight threshold as an affinity role container, and allocating the affinity role container to a first physical computing node; taking the role container corresponding to the weight data less than a second weight threshold as an anti-affinity role container, and allocating the anti-affinity role container to a second physical computing node.

[0011] In some example embodiments of the present disclosure, based on the aforementioned scheme, the weight data includes role name weight data corresponding to the role name tags, resource requirement weight data corresponding to the resource requirement tags, and task coding weight data corresponding to the task coding tags; based on the attribute tags and the weight data, the marked role containers are allocated to different physical computing nodes, including: based on the preset priorities among the role name weight data, the resource requirement weight data, and the task coding weight data, the marked role containers are allocated to different physical computing nodes.

[0012] In some example embodiments of the present disclosure, based on the aforementioned scheme, before allocating the marked role container to different physical computing nodes based on the attribute label and the weight data, the scheme also includes: determining the computing characteristics corresponding to the role information; and determining the physical computing node to be allocated to the role container corresponding to the role information based on the computing characteristics.

[0013] In some example embodiments of the present disclosure, based on the aforementioned scheme, before obtaining a distributed machine learning task and determining the role information in the distributed machine learning task, the method further includes: adding a target number of target role information belonging to high resource consumption in the resource demand tags according to the quantitative relationship between different role information.

[0014] According to a second aspect of an embodiment of the present disclosure, a container allocation device is provided, including: a role information determination module, used to obtain a distributed machine learning task and determine the role information in the distributed machine learning task; an attribute label determination module, used to determine the attribute label corresponding to the role information and the weight data corresponding between the attribute labels of different role information; a role container marking module, used to generate a role container for running the role information, and mark the role container according to the attribute label and the weight data; a role container allocation module, used to allocate the marked role containers to different physical computing nodes based on the attribute label and the weight data.

[0015] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the attribute label determination module also includes an attribute label determination unit, and the attribute label determination unit is configured to: determine the role name label through the association information corresponding to the role information; based on the mapping relationship between the role name label and the resource requirement label, determine the resource requirement label corresponding to the role information through the role name label; and determine the task coding label corresponding to the role information according to the distributed machine learning task.

[0016] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the attribute label determination unit is further configured to: obtain a weight profile of the role information; wherein the weight profile includes a weight mapping relationship between the attribute labels of different role information; determine the corresponding weight data between the attribute labels of different role information according to the attribute labels and the weight mapping relationship to determine the degree of association between the different role information through the weight data.

[0017] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the role container allocation module also includes a role container allocation unit, and the role container allocation unit is configured to: use the role container corresponding to the weight data greater than the first weight threshold as an affinity role container, and allocate the affinity role container to the first physical computing node; use the role container corresponding to the weight data less than the second weight threshold as an anti-affinity role container, and allocate the anti-affinity role container to the second physical computing node.

[0018] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the role container allocation unit is also configured to: allocate the marked role container to different physical computing nodes based on the priority between the preset role name weight data, the resource requirement weight data and the task coding weight data.

[0019] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the container allocation device also includes a computing characteristic determination unit, which is configured to: determine the computing characteristics corresponding to the role information; and determine the physical computing node to be allocated for the role container corresponding to the role information according to the computing characteristics.

[0020] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the container allocation device also includes a target role information adding unit, and the target role information adding unit is configured to: add a target number of target role information belonging to high resource consumption in the resource demand tags according to the quantitative relationship between different role information.

[0021] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, any one of the container dispensing methods described above is implemented.

[0022] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the container dispensing method according to any one of the above items is implemented.

[0023] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0024] The container allocation method in the example embodiment of the present disclosure obtains a distributed machine learning task, determines role information in the distributed machine learning task; determines attribute labels corresponding to the role information and weight data corresponding to the attribute labels of different role information; generates a role container for running the role information, and marks the role container according to the attribute labels and the weight data; and allocates the marked role containers to different physical computing nodes based on the attribute labels and the weight data. On the one hand, different role containers are marked according to the attribute labels corresponding to different role information and the weight data corresponding to the attribute labels of different role information so that role containers with a higher degree of association are allocated to the same or similar physical computing nodes, thereby improving the management efficiency of role containers; on the other hand, different role containers are marked by the attribute labels corresponding to different role information and the weight data corresponding to the attribute labels of different role information, so that the bandwidth pressure of a single physical computing node can be effectively alleviated by almost evenly allocating role containers with higher bandwidth consumption to multiple physical computing nodes, thereby further improving the communication efficiency between physical computing nodes; on the other hand, different role containers are marked by determining the attribute labels corresponding to different role information and the weight data corresponding to the attribute labels of different roles, and multiple role containers corresponding to the same distributed machine learning task are allocated to the same or similar physical computing nodes as much as possible, thereby reducing the communication cost between physical computing nodes to a certain extent and further maximizing the resource utilization benefits.

[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0027] Figure 1 A schematic diagram schematically illustrates a container dispensing method according to some embodiments of the present disclosure;

[0028] Figure 2 A schematic diagram schematically illustrates a method of determining attribute labels of different roles according to some embodiments of the present disclosure;

[0029] Figure 3 A schematic diagram schematically shows a method of determining weight data corresponding to attribute tags of different role information according to some embodiments of the present disclosure;

[0030] Figure 4 Schematically illustrating a schematic diagram of determining affinity or anti-affinity of different role containers according to some embodiments of the present disclosure;

[0031] Figure 5 A schematic diagram schematically illustrates how to allocate different role containers to different computing nodes according to some embodiments of the present disclosure;

[0032] Figure 6 A schematic diagram schematically shows how to allocate corresponding computing nodes to role containers corresponding to role information of different computing characteristics according to some embodiments of the present disclosure;

[0033] Figure 7 A schematic diagram schematically shows a schematic diagram of adjusting target role information according to some embodiments of the present disclosure;

[0034] Figure 8 Schematically illustrates a schematic diagram of a container dispensing device according to some embodiments of the present disclosure;

[0035] Fig. 9 A schematic diagram schematically shows a structure of a computer system of an electronic device according to some embodiments of the present disclosure;

[0036] Fig.10 A schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure is schematically shown.

[0037] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0038] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.

[0039] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0040] Furthermore, the drawings are only schematic illustrations and are not necessarily drawn to scale. The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0041] In related technical solutions, the communication efficiency between computer nodes is improved by scheduling each container of distributed training to several centralized physical computing nodes, but it does not solve the bandwidth bottleneck of physical computing nodes and the problem of maximizing resource utilization benefits.

[0042] Based on the above problems, in this exemplary embodiment, a container allocation method is first provided. Figure 1 The following is a schematic diagram of the process of the container dispensing method according to some embodiments of the present disclosure. Figure 1 As shown, the container allocation method may include the following steps:

[0043] Step S110, obtaining a distributed machine learning task, and determining role information in the distributed machine learning task;

[0044] Step S120, determining the attribute labels corresponding to the role information and the weight data corresponding to the attribute labels of different role information;

[0045] Step S130, generating a role container for running the role information, and marking the role container according to the attribute tag and the weight data;

[0046] Step S140: allocating the marked role containers to different physical computing nodes based on the attribute labels and the weight data.

[0047] According to the container allocation method in this example embodiment, on the one hand, different role containers are marked according to the attribute tags corresponding to different role information and the weight data corresponding to the attribute tags of different role information so that role containers with a higher degree of association are allocated to the same or similar physical computing nodes, thereby improving the management efficiency of role containers; on the other hand, different role containers are marked by the attribute tags corresponding to different role information and the weight data corresponding to the attribute tags of different role information, so that the bandwidth pressure of a single physical computing node can be effectively alleviated by almost evenly allocating role containers with higher bandwidth consumption to multiple physical computing nodes, thereby further improving the communication efficiency between physical computing nodes; on the other hand, different role containers are marked by determining the attribute tags corresponding to different role information and the weight data corresponding to the attribute tags of different roles, and multiple role containers corresponding to the same distributed machine learning task are allocated to the same or similar physical computing nodes as much as possible, thereby reducing the communication cost between physical computing nodes to a certain extent, and further realizing the maximization of resource utilization benefits.

[0048] Next, the container allocating method in this exemplary embodiment will be further described.

[0049] refer to Figure 1 In step S110, a distributed machine learning task is obtained, and role information in the distributed machine learning task is determined.

[0050] In an example embodiment of the present disclosure, a distributed machine learning task may refer to a task of completing machine model training in a distributed application scenario; role information in a distributed machine learning task may refer to the names of different roles included in the distributed machine learning task, the number of each role, the resources occupied by each role such as CPU (Central Processing Unit) resources, GPU (Graphic Processing Unit) resources, memory size, bandwidth size, functions of each role, and an ID corresponding to the distributed machine learning task. For example, role information may refer to information about a role that executes a machine learning task, such as a worker (work node) responsible for calculating parameter gradients, or a parameter server (parameter server node) responsible for storing model parameters, or a controller (control node) responsible for controlling the task flow. Of course, role information may also refer to information about other roles, and this example embodiment does not specifically limit this.

[0051] For example, to complete the distributed machine learning task 001, the role information may refer to information including 3 workers for calculating parameter gradients, 2 parameter servers for storing model parameters, 1 controller for controlling the task flow, and 1 evaluator for evaluating the task progress (task progress evaluation node), and the parameter server has high bandwidth consumption; of course, the roles in the role information, the number of each role, and the resource occupancy may also be other situations, and this example embodiment does not specifically limit this.

[0052] According to the distributed machine learning tasks, the role information such as the roles required to complete each distributed machine learning task, the number of each role, the resources occupied by each role, etc. can be determined; based on the role information of the distributed machine learning tasks, the types of physical computing nodes required to complete the task, such as CPU computing nodes and GPU computing nodes, and the number of physical computing nodes can be preliminarily determined, and then the number of roles in the role information can be adjusted to improve the communication efficiency between physical computing nodes and maximize the resource utilization benefits.

[0053] refer to Figure 1 In step S120, the attribute labels corresponding to the role information and the weight data corresponding to the attribute labels of different role information are determined.

[0054] In an example embodiment of the present disclosure, an attribute label may refer to a label that distinguishes different role information. For example, an attribute label may be a resource requirement label corresponding to a resource that is particularly required for the role information. For example, if a parameter server node requires a higher bandwidth, the attribute label corresponding to the parameter server may be "high bandwidth consumption". The attribute label may also be an English abbreviation corresponding to the role name in the role information, such as the abbreviation PS for parameter server. The attribute label may also be a task code label corresponding to a distributed machine learning task, such as the task code "ID 001" corresponding to the distributed machine learning task 001. Of course, the attribute label may also be other labels corresponding to the role information, and this example embodiment does not specifically limit this.

[0055] Weight data may refer to data used to measure the closeness between different role information. For example, weight data may be data for distinguishing the closeness between resource requirement labels of multiple role information, or data for distinguishing the closeness between task coding labels of multiple role information. Of course, weight data may also refer to other data for measuring the closeness between different role information, and this embodiment does not specifically limit this.

[0056] For example, distributed machine learning task 001 requires three workers for calculating parameter gradients, such as worker1, worker2, and worker3, and two parameter servers for storing model parameters, such as parameter server1 and parameter server2. The workers need to run on GPU nodes, so the resource requirement label of the workers is "GPU node". The parameter server requires a higher bandwidth, so the resource requirement label of the parameter server is "high bandwidth consumption". The task code label of distributed machine learning task 001 is "ID001". The pre-configured files in distributed machine learning task 001 are as follows:

[0057] Replicas: 2 / / means that 2 ps containers will be generated in batches

[0058] Labels:

[0059] Role:ps

[0060] highIO:true / / Indicates that the resource requirement label of the two ps containers is "high bandwidth consumption"

[0061] instanceID:001 / / Task code label is 001

[0062] affinity: / / affinity options

[0063] key="role", value in "worker", weight: 8

[0064] / / ps and role: The container affinity weight data of the worker label is 8

[0065] key="instanceID", value in "001", weight: 8

[0066] / / ps and instanceID: The container affinity weight data of the 001 label is 8

[0067] anti-affinity: / / anti-affinity options

[0068] key="highIO", value in "true", weight: -100

[0069] / / The container affinity weight data of ps and ps labels is -100

[0070] Replicas: 3 / / means that 3 worker containers will be generated in batches

[0071] labels:

[0072] role:worker

[0073] instanceID:001

[0074] affinity:

[0075] key="role", value in "ps", weight: 8

[0076] / / The container affinity weight data of worker and ps labels is 8

[0077] key="instanceID", value in "001", weight: 8

[0078] / / The container affinity weight data of the worker and instanceID:001 label is 8

[0079] According to the configuration file, the weight data of worker1 and worker2 is 8, the weight data of worker1 and worker3 is 8, the weight data of worker1 and parameter server1 is 8, the weight data of worker1 and parameter server2 is 8, the weight data of worker2 and worker3 is 8, the weight data of worker2 and parameter server1 is 8, the weight data of worker2 and parameter server2 is 8, the weight data of worker3 and parameter server1 is 8, the weight data of worker3 and parameter server2 is 8; the weight data of parameter server1 and parameter server2 is -100.

[0080] Since the parameter server has a high bandwidth consumption indicator in the distributed machine learning task 001, two parameter servers will be deployed on different physical computing nodes to alleviate the bandwidth bottleneck of the physical computing nodes. Specifically, according to the weight data between different role information or attribute labels of different role information in the distributed machine learning task, the closeness between multiple role information can be obtained, and then according to the weight data of the attribute labels of different role information, resources or physical computing nodes can be reasonably allocated.

[0081] refer to Figure 1 In step S130, a role container for running the role information is generated, and the role container is marked according to the attribute label and the weight data.

[0082] In an example embodiment of the present disclosure, a role container may refer to a virtual container that carries role information and data related to the role information. For example, the role container may refer to a parameter server container that carries parameter server information and data related to the parameter server information, or may refer to a worker container that carries work node information and data related to the work node, or may refer to a controller container that carries task flow control information and data related to the task flow control information. Of course, the role container may also refer to other role containers that carry other role information and data related to the role information, and this example embodiment does not specifically limit this.

[0083] According to different role information in different distributed machine learning tasks, a role container corresponding to each role information is generated, and the role container of the role information is marked based on the attribute labels of different role information and the weight data corresponding to the attribute labels of different role information. Different role containers are allocated to different computing nodes according to the weight data between different role information or between the attribute labels of different role information, so as to maximize the resource utilization benefits.

[0084] For example, distributed machine learning task 001 requires three workers for calculating parameter gradients, such as worker11, worker12, and worker13, and two parameter servers for storing model parameters, such as parameter server11 and parameter server12. The workers need to run on GPU nodes, and the parameter server requires a higher bandwidth. According to the pre-configured files in distributed machine learning task 001, the role containers generated by distributed machine learning task 001 are: worker11 container, worker12 container, worker13 container, parameter server11 container, and parameter server12 container. At the same time, the resource requirement labels of worker11 container, worker12 container, and worker13 container are all "GPU node", the task coding labels are all "ID001", and the affinity weight data between worker11 container, worker12 container, and worker13 container are all 8. In addition, the resource requirement labels of parameter server11 container and parameter server12 container are both "high bandwidth consumption", the task coding labels are both "ID001", and the parameter server11 container and parameter server12 container are both "high bandwidth consumption". The affinity weight data between the server12 container is -100, and the affinity weight data between the parameter server11 container and the parameter server12 container and the worker11 container, worker12 container, and worker13 container is 8.

[0085] According to the role information in the distributed machine learning task, a role container corresponding to the role information is generated, that is, one role information corresponds to one role container; through different role information and weight data corresponding to the attribute labels of different role information, resources can be effectively allocated and the role containers can be allocated to the corresponding physical computing nodes, thereby alleviating the bandwidth pressure of the physical computing nodes, thereby improving the communication efficiency between computing nodes, and ultimately maximizing the resource utilization benefits.

[0086] refer to Figure 1 In step S140, based on the attribute label and the weight data, the marked role container is allocated to different physical computing nodes.

[0087] In an example embodiment of the present disclosure, role containers generated based on role information are marked according to attribute tags corresponding to different role information and weight data corresponding to the attribute tags of different role information, and the degree of association between multiple role containers is determined according to the weight data of the attribute tags of different role containers, and then the role containers with higher association are allocated to the same or similar physical computing nodes to maximize resource utilization benefits.

[0088] For example, according to the five role containers generated in the previous example, worker11 container, worker12 container, worker13 container, parameter server11 container, parameter server12 container, and one physical computing node can store three worker containers. Since worker11 container, worker12 container, and worker13 container have affinity, worker11 container, worker12 container, and worker13 container are placed on the same physical computing node N1, and physical computing node N1 schedules parameter server1 container; since parameter server11 container, parameter server12 container and worker11 container, worker12 container, and worker13 container have affinity, and the weight data between each parameter server and each worker container is 8, the weight data between each worker container is also 8, and each parameter server has anti-affinity, that is, the affinity weight data is -100, according to each worker container and parameter The sum of the weight data between the server containers, the sum of the weight data between each parameterserver container and each worker container, and the sum of the weight data between each parameter server container and each parameter server container. The sum of the weight data of the five role containers is less than 0, that is, there is no affinity between the parameter server12 container and the physical computing node N1. The parameterserver12 container needs to be stored on a physical computing node other than the physical computing node N1.

[0089] Therefore, according to the attribute labels of worker11 container, worker12 container, worker13 container, parameter server11 container, parameter server12 container and the weight data corresponding to the attribute labels, worker11 container, worker12 container and parameter server11 container can be placed on physical computing node N1, and parameterserver12 container can be placed on other physical computing nodes, thereby avoiding placing parameter server11 container and parameter server12 container with high bandwidth consumption on the same physical computing node, resulting in bandwidth bottleneck of the computing node, thereby reducing the communication efficiency between parameter server and worker and the speed of machine training.

[0090] Figure 2 A schematic diagram of determining attribute labels of different roles according to some embodiments of the present disclosure is schematically shown. Figure 2 The steps in determine the attribute labels of different role information:

[0091] refer to Figure 2 , step S210, determining the role name tag through the associated information corresponding to the role information;

[0092] Step S220, based on the mapping relationship between the role name tag and the resource requirement tag, determining the resource requirement tag corresponding to the role information through the role name tag;

[0093] Step S230: determine the task coding label corresponding to the role information according to the distributed machine learning task.

[0094] Among them, the associated information can refer to information related to the role information. For example, the associated information can be a timestamp determined by the role information, or it can be recorded data information before and after the role information is updated, such as the resources occupied by the role information. Of course, the associated information can also refer to other information, and this example embodiment does not make any special limitations on this.

[0095] The role name tag can refer to the identification information of the role name. For example, the role name tag can be the role name, or the English name corresponding to the role name, or the English abbreviation corresponding to the role name. Of course, the role name tag can also refer to other tags related to the role name, and this example embodiment does not make any special limitations on this.

[0096] Specifically, according to the configuration file corresponding to the distributed machine learning task, the associated information corresponding to the role information can be obtained, and then the role name label can be determined according to the associated information. For example, the configuration file of the distributed machine learning task records that the resource requirement label of role information A is a GPU computing node, and the function of the role is to calculate the gradient of the parameter, but does not record the role name corresponding to the role information A. Then, according to the resource requirement label and the function of the role, it can be judged that the role name label corresponding to the resource requirement label is worker. Of course, this is just an example to illustrate that the role name label can be determined according to the associated information of the role information, and this example embodiment does not specifically limit the associated information.

[0097] After determining the role label of the role information, the resource requirement label corresponding to the role name label can be determined according to the correspondence between the role name and the resource requirement label. For example, the role name of the parameter server-parameter server is "ps". Based on the configuration file of the distributed machine learning task, it can be determined that the resource requirement corresponding to the role information with the role name "ps" is "high bandwidth", and then the resource requirement label of the parameter server-parameter server is "high bandwidth". Of course, the parameter server can also correspond to other resource requirement labels, and this embodiment does not make special restrictions on this. At the same time, when obtaining the configuration file of the distributed machine learning task, the encoding corresponding to the distributed machine learning task can be obtained, and then the task coding label of the distributed machine learning task can be determined; according to the task coding labels of different distributed machine learning tasks, different distributed machine learning tasks are distinguished, which helps to reasonably allocate resources for each distributed machine learning task and maximize the benefits of resource utilization.

[0098] Figure 3 A schematic diagram schematically shows a schematic diagram of determining weight data corresponding to attribute labels of different role information according to some embodiments of the present disclosure, which can be obtained by Figure 3 The steps shown are to determine the weight data corresponding to the attribute labels of different role information:

[0099] refer to Figure 3 As shown, step S310, obtaining a weight configuration file of the role information; wherein the weight configuration file includes a weight mapping relationship between the attribute tags of different role information;

[0100] Step S320: determining weight data corresponding to the attribute tags of different role information according to the attribute tags and the weight mapping relationship, so as to determine the degree of association between the different role information through the weight data.

[0101] Among them, the weight configuration file may refer to a file containing weight mapping relationships between different role information and weight mapping relationships corresponding to attribute tags of different role information. Of course, the weight configuration file may also contain weight mapping relationships of other information of different role information, and this embodiment does not specifically limit this. According to the weight configuration file, the weight data between different role information and the weight data between resource requirement tags of different role information may be determined, and then the degree of association between different role information may be determined based on the weight data between different role information and the weight data between resource requirement tags of different role information. Generally speaking, the higher the degree of association between different role information, the more it is necessary to place multiple role information with a high degree of association on the same computing node to reduce the communication cost of cross-machine communication, and thus improve the communication efficiency between different role information.

[0102] Specifically, according to the weight configuration file in the distributed machine learning task, the affinity / anti-affinity and weight data between different role containers are determined, and then the different role containers are allocated to the corresponding physical computing nodes, reducing the bandwidth bottleneck of the same physical computing node and maximizing the resource utilization benefits.

[0103] Figure 4 The schematic diagram of determining the affinity or anti-affinity of different role containers according to some embodiments of the present disclosure is schematically shown. Figure 4 The steps shown below determine the affinity or anti-affinity of containers of different roles:

[0104] refer to Figure 4 As shown, step S410, taking the role container corresponding to the weight data greater than the first weight threshold as an affinity role container, and allocating the affinity role container to the first physical computing node;

[0105] Step S420: Use the role container corresponding to the weight data less than the second weight threshold as an anti-affinity role container, and allocate the anti-affinity role container to the second physical computing node.

[0106] Among them, the first weight threshold can refer to a weight value that measures the degree of association between role containers. For example, the first weight threshold can be 0.9 or 0.8. Of course, the first weight threshold can also refer to other weight values ​​that measure the affinity between role containers. This embodiment does not make any special limitation to this.

[0107] An affinity role container may refer to a role container with a high degree of association. For example, a worker needs to obtain parameters from a parameter server, calculate the gradient of the parameters, and return the gradient of the parameters to the parameter server. That is, the worker has a high degree of association with the parameter server. The worker container and the parameter server container are affinity role containers to each other. An affinity role container may also refer to other role containers with affinity, such as a controller container and a worker container. This embodiment does not specifically limit this.

[0108] When the system detects that the weight data between multiple role information is greater than the first weight threshold, the containers corresponding to these role information can be marked as affinity role containers, and the affinity containers can be allocated to the same computing node or multiple similar computing nodes to improve the communication efficiency between the nodes corresponding to the affinity role containers.

[0109] The second weight threshold may refer to a weight value representing the degree of association between role containers. The second weight threshold may be 0.4 or 0.3. Of course, the second weight threshold may also refer to other weight values ​​for measuring the degree of anti-affinity between role containers. This embodiment does not specifically limit this.

[0110] An anti-affinity role container may refer to multiple role containers with a low degree of association. For example, parameterserver is a role container with high bandwidth consumption. Placing multiple parameter server containers on the same computing node will cause a bandwidth bottleneck on the computing node, thereby affecting the communication efficiency between other role containers on the same computing node. That is, multiple parameter server containers all have anti-affinity, and multiple parameter server containers are mutually anti-affinity role containers. Of course, anti-affinity containers may also refer to other role containers with anti-affinity, and this embodiment does not make any special limitation to this.

[0111] For example, distributed machine learning task 001 requires three workers for calculating parameter gradients, such as worker11, worker12, and worker13, and two parameter servers for storing model parameters, such as parameter server11 and parameter server12. Based on five different role information, five role containers are generated, namely, worker11 container, worker12 container, worker13 container, parameter server11 container, and parameter server12 container. The five role containers are labeled according to the attribute labels of different role information and the weight data of the attribute labels of different role information. The labeled five role containers are as follows:

[0112] Worker11 container: The weight data of worker11 and worker12 is 67%, the weight data of worker11 and worker13 is 48%, the weight data of worker11 and parameter server11 is 80%, and the weight data of worker11 and parameter server12 is 5%.

[0113] Worker12 container: The weight data of worker12 and worker11 is 67%, the weight data of worker12 and worker13 is 42%, the weight data of worker12 and parameter server11 is 70%, and the weight data of worker12 and parameter server12 is 3%.

[0114] Worker13 container: The weight data of worker13 and worker11 is 48%, the weight data of worker13 and worker12 is 42%, the weight data of worker13 and parameter server11 is 30%, and the weight data of worker13 and parameter server12 is 93%.

[0115] Parameter server11 container: The weight data of parameter server11 and worker11 is 80%, the weight data of parameter server11 and worker12 is 70%, the weight data of parameter server11 and worker13 is 30%, and the weight data of parameter server11 and parameter server12 is 1%.

[0116] Parameter server12 container: The weight data of parameter server12 and worker11 is 5%, the weight data of parameter server12 and worker12 is 3%, the weight data of parameter server12 and worker13 is 93%, and the weight data of parameter server12 and parameter server11 is 1%.

[0117] Assume that the first weight threshold is 60%, since the weight data of worker11 and worker12 is 67%, the weight data of worker11 and parameter server11 is 80%, and the weight data of worker12 and parameter server11 is 70%, that is, the weight data of worker11 and worker12, the weight data of worker11 and parameter server11, and the weight data of worker12 and parameter server11 are all greater than the first weight threshold, then the worker11 container and the worker12 container are affinity role containers to each other, the worker11 container and the parameter server11 container are affinity containers to each other, and the worker12 container and the parameter server11 container are affinity role containers to each other; furthermore, the worker11 container, the worker12 container, and the parameter server11 container can be placed on the same physical computing node. Similarly, if the second weight threshold is 40%, since the weight data of worker 11 and parameter server 12 is 5%, the weight data of worker 12 and parameter server 12 is 3%, and the weight data of parameter server 11 and parameter server 12 is 1%, that is, the weight data of worker 11 and parameter server 12, the weight data of worker 12 and parameter server 12, and the weight data of parameter server 11 and parameter server 12 are all less than the second weight threshold, then the worker 11 container and the parameter server 12 container are mutually anti-affinity role containers, and the parameter server 12 container and the worker 12 container are mutually anti-affinity containers; furthermore, the parameter server 12 container needs to be placed on a physical computing node different from the worker 11 container and the worker 12 container; for example, the worker 11 container, the worker 12 container, and the parameter server 11 container can be placed in the physical computing node 001, and the parameter server 12 container can be placed in the physical computing node 002.

[0118] In addition, the role container whose weight data is between the first weight threshold and the second weight threshold can be placed in the affinity role container or the anti-affinity role container. For example, the weight data of worker13 and worker11 is 48%, and the weight data of worker13 and worker12 is 42%. Since the weight data of worker13 and worker11 and the weight data of worker13 and worker12 are between the first weight threshold and the second weight threshold, the worker13 container can be placed in the physical computing node containing the worker11 container, the worker12 container, and the parameter server11 container, or the worker13 container can be placed in the physical computing node 002 containing the parameter server12 container.

[0119] Generally speaking, placing multiple affinity role containers on the same physical computing node and placing multiple anti-affinity role containers on different physical computing nodes can effectively avoid the bandwidth bottleneck of a single computing node, thereby improving the communication efficiency between the nodes corresponding to multiple role containers in the computing node and maximizing resource utilization benefits.

[0120] Preferably, when the first weight threshold and the second weight threshold are equal, for example, when the first weight threshold and the second weight threshold are both 50%, the role containers whose weight data between role containers is greater than 50% are placed on the same physical computing node, and the role containers whose weight data between role containers is less than 50% are placed separately on multiple nearby physical computing nodes to alleviate the bandwidth burden of a single physical computing node, thereby improving the communication efficiency between physical computing nodes and maximizing resource utilization benefits.

[0121] Figure 5 A schematic diagram schematically shows how to allocate different role containers to different computing nodes according to some embodiments of the present disclosure. Figure 5 Assign different role containers to different computing nodes as shown in the following steps:

[0122] refer to Figure 5 , step S510, determining the priority among the role name weight data, the resource requirement weight data and the task code weight data;

[0123] Step S520 , allocating the marked role containers to different physical computing nodes based on the preset priorities among the role name weight data, the resource requirement weight data and the task code weight data.

[0124] Among them, the role name weight data can refer to the weight data between multiple role names, such as the weight data between parameterserver and worker, the weight data between worker and worker, and the weight data between parameter server and parameter server. Of course, the role name weight data can also refer to the weight data between other role names, and this example embodiment does not make any special limitation on this.

[0125] Resource requirement weight data may refer to weight data between multiple role names and resource requirement labels. For example, the resource requirement label of the parameter server is "high bandwidth consumption", and the weight data between the worker and "high bandwidth consumption" is 56%. Of course, the resource requirement label may also refer to weight data between other role names and resource requirement labels corresponding to other role information. This embodiment does not specifically limit this.

[0126] Task coding weight data may refer to weight data between different task coding labels, such as the weight data between a task with a task coding label of 001 in distributed machine learning and a task with a task coding label of 011 in distributed machine learning. Of course, task coding weight data may also refer to weight data between other task coding labels, and this embodiment does not specifically limit this.

[0127] By using the priority between the role name weight data, the resource requirement weight data and the task coding weight data, multiple role containers in the same task can be reasonably allocated to the same or similar physical computing nodes, thereby reducing the bandwidth for communication between role containers and the cost of cross-machine communication required for multiple role containers for the same task, thereby improving the communication efficiency between the nodes corresponding to the multiple role containers.

[0128] For example, the priority among role name weight data, resource requirement weight data and task code weight data is task code weight data, role name weight data and resource requirement weight data; in distributed machine learning tasks, workers need to run on GPU nodes and parameter servers need to consume higher bandwidth.

[0129] Distributed machine learning task 001, i.e., the distributed machine learning task with the task coding label ID 001, requires 3 workers for calculating parameter gradients, such as worker11, worker12, and worker13, and 2 parameter servers for storing model parameters, such as parameter server11 and parameter server12; at the same time, distributed machine learning task 002, i.e., the task coding label ID: 002, requires 2 workers for calculating parameter gradients, such as worker21 and worker22, and 1 parameter server for storing model parameters, such as parameter server21; in distributed machine learning task 001, based on 5 different role information, 5 role containers are generated, i.e., worker11 container, worker12 container, worker13 container, parameter server11 container, and parameter server12 container; according to the attribute labels of different role information and the weight data of the attribute labels of different role information, the 5 role containers are marked, and the marked 5 role containers are as follows:

[0130] worker11 container: the weight data of worker11 and worker12 is 80%, the weight data of worker11 and worker13 is 48%, the weight data of worker11 and parameter server11 is 67%, the weight data of worker11 and parameter server12 is 5%, the weight data of worker11 and ID001 is 80%, the weight data of worker11 and worker21 is 60%, the weight data of worker11 and worker22 is 40%, the weight data of worker11 and parameter server21 is 82%, and the weight data of worker11 and ID002 is 16%.

[0131] worker12 container: the weight data of worker12 and worker11 is 80%, the weight data of worker12 and worker13 is 42%, the weight data of worker12 and parameter server11 is 70%, the weight data of worker12 and parameter server12 is 3%, the weight data of worker12 and ID001 is 78%, the weight data of worker12 and worker21 is 66%, the weight data of worker12 and worker22 is 34%, the weight data of worker12 and parameter server21 is 87%, and the weight data of worker12 and ID002 is 40%.

[0132] worker13 container: the weight data of worker13 and worker11 is 48%, the weight data of worker13 and worker12 is 42%, the weight data of worker13 and parameter server11 is 70%, the weight data of worker13 and parameter server12 is 93%, the weight data of worker13 and ID001 is 88%, the weight data of worker13 and worker21 is 59%, the weight data of worker13 and worker22 is 59%, the weight data of worker13 and parameter server21 is 54%, and the weight data of worker13 and ID 002 is 70%.

[0133] parameter server11 container: the weight data of parameter server11 and worker11 is 67%, the weight data of parameter server11 and worker12 is 70%, the weight data of parameter server11 and parameterserver12 is 1%, the weight data of parameter server11 and ID001 is 80%, the weight data of parameterserver11 and worker21 is 66%, the weight data of parameter server11 and worker22 is 34%, the weight data of parameter server11 and parameter server21 is 57%, and the weight data of parameterserver11 and ID 002 is 2%.

[0134] parameter server12 container: the weight data of parameter server12 and worker11 is 5%, the weight data of parameter server12 and worker12 is 3%, the weight data of parameter server12 and worker13 is 93%, the weight data of parameter server12 and parameter server11 is 1%, the weight data of parameterserver12 and ID001 is 65%, the weight data of parameter server12 and worker21 is 66%, the weight data of parameter server12 and worker22 is 67%, the weight data of parameter server12 and parameterserver21 is 17%, and the weight data of parameter server12 and ID 002 is 52%.

[0135] In distributed machine learning task 002, three role containers are generated based on three different role information, namely, worker21 container, worker22 container, and parameter server21 container. The three role containers are labeled according to the attribute labels of different role information and the weight data of the attribute labels of different role information. The three labeled role containers are as follows:

[0136] Worker21 container: The weight data of worker21 and worker11 is 60%, the weight data of worker21 and worker12 is 66%, the weight data of worker21 and worker13 is 59%, the weight data of worker21 and worker22 is 43%, the weight data of worker21 and parameter server21 is 47%, the weight data of worker21 and ID 001 is 64%, and the weight data of worker21 and ID 002 is 91%.

[0137] Worker22 container: The weight data of worker22 and worker11 is 40%, the weight data of worker22 and worker12 is 34%, the weight data of worker22 and worker13 is 59%, the weight data of worker22 and worker21 is 43%, the weight data of worker22 and parameter server21 is 7%, the weight data of worker12 and ID 001 is 23%, and the weight data of worker22 and ID 002 is 64%.

[0138] parameter server21 container: the weight data of parameter server21 and worker11 is 82%, the weight data of parameter server21 and worker12 is 87%, the weight data of parameter server21 and worker13 is 54%, the weight data of parameter server21 and parameter server11 is 57%, the weight data of parameterserver21 and parameter server12 is 17%, the weight data of parameter server21 and worker21 is 47%, the weight data of parameter server21 and worker22 is 7%, the weight data of parameter server21 and ID 001 is 8%, and the weight data of parameter server21 and ID002 is 70%.

[0139] If the first weight threshold of the task encoding weight data is 50% and the second weight threshold is also 50%, in the distributed machine learning task 001, the role containers greater than the first weight threshold are: worker11 container, worker12 container, worker13 container, parameter server11 container, parameter server12 container, worker21 container; in the distributed machine learning task 002, the role containers greater than the first weight threshold are: worker13 container, parameterserver12 container, worker21 container, worker22 container, parameter server21 container.

[0140] Next, after the role containers are arranged according to the task coding weight data, if the first weight threshold of the role name weight data is 50%, in the distributed machine learning task 001, the role containers greater than the first weight threshold are: worker11 container, worker12 container, parameter server11 container, worker21 container; in the distributed machine learning task 002, the role containers greater than the first weight threshold are: worker13 container, parameter server12 container, worker22 container, parameter server21 container.

[0141] Due to the priority order of task coding weight data and role name weight data, different role containers of different tasks can be clearly assigned to corresponding physical computing nodes; that is, according to the above example, worker11 container, worker12 container, parameter server11 container, and worker21 container can be assigned to one physical computing node, and worker13 container, parameter server12 container, worker22 container, and parameter server21 container can be assigned to another physical computing node, wherein the physical computing nodes assigned to worker11 container, worker12 container, parameterserver11 container, and worker21 container and the physical computing nodes assigned to worker13 container, parameterserver12 container, worker22 container, and parameter server21 container can be geographically close, so as to reduce the cost of cross-machine communication and the communication bandwidth pressure of a single computing node, thereby improving the communication efficiency of the computing nodes and maximizing the resource utilization benefits.

[0142] Figure 6 A schematic diagram schematically shows the allocation of corresponding computing nodes to role containers corresponding to role information of different computing characteristics according to some embodiments of the present disclosure, which can be achieved by Figure 6 The steps shown are used to allocate corresponding computing nodes to role containers corresponding to role information with different computing characteristics:

[0143] refer to Figure 6 , step S610, determining the computing characteristics corresponding to the role information;

[0144] Step S620: Determine the physical computing node to be allocated to the role container corresponding to the role information according to the computing characteristics.

[0145] Among them, the computing characteristics can refer to data that measures the size of computing resources required for role information. For example, the worker used to calculate the parameter gradient requires larger computing resources, and it is necessary to allocate a physical computing node with larger computing resources, such as a physical computing node with a GPU with stronger computing power, to the worker container. At the same time, the parameter server container needs to pass more parameters to the worker container, and the parameter server container can be allocated to a physical node with a CPU with computing power. The computing characteristics of the controller container are general, and a physical computing node with a CPU with computing power can be allocated to the controller container. Of course, a physical computing node with a GPU with stronger computing power can also be allocated to the parameter server container. Of course, the computing characteristics can also refer to the characteristics of the computing power corresponding to other role containers, and this example embodiment does not make any special limitations on this.

[0146] In summary, the worker container can be assigned to the physical computing node containing the GPU. If there are idle physical computing nodes containing the GPU, the parameter server container can be assigned to the physical computing node containing the GPU, and other role containers can be uniformly assigned to the physical computing node containing the CPU. Through this optimized container allocation technology, the performance of distributed machine learning model training can be improved by about 40%, while also saving valuable computing node resources containing the GPU, thereby achieving the results of cost reduction and efficiency improvement.

[0147] Figure 7 The schematic diagram of adjusting the target role information according to some embodiments of the present disclosure is schematically shown. Before obtaining the distributed machine learning task and determining the role information in the distributed machine learning task, according to Figure 7 Adjust the target role information according to the steps in:

[0148] refer to Figure 7 , step S710, determining the quantitative relationship between different role information;

[0149] Step S720: adding target number of target role information belonging to high resource consumption in the resource demand tags according to the quantity relationship between the different role information.

[0150] In an example embodiment of the present disclosure, the target role information may refer to the role information that needs to be adjusted. For example, in the distributed machine learning task 001, 3 workers are required, but there is only 1 parameter server. However, one computing node cannot fully carry 3 workers, and a computing node needs to be added. Then, the role information that needs to be adjusted is the parameter server, that is, the number of parameter servers needs to be increased by 1, that is, the target role information is the parameter server with high bandwidth consumption. Of course, in this example embodiment, the target role information may also be other role information, and the target number may also be other numbers. This example embodiment does not specifically limit this.

[0151] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0152] In addition, in this exemplary embodiment, a container dispensing device is also provided. Figure 8 As shown, the container allocation device 800 includes: a role information determination module 810, an attribute label determination module 820, a role container marking module 830, and a role container allocation module 840; wherein: the role information determination module 810 is used to obtain a distributed machine learning task and determine the role information in the distributed machine learning task; the attribute label determination module 820 is used to determine the attribute label corresponding to the role information and the weight data corresponding to the attribute labels of different role information; the role container generation module 830 is used to generate a role container for running the role information, and mark the role container according to the attribute label and the weight data; the role container allocation module 840 is used to allocate the marked role container to different physical computing nodes based on the attribute label and the weight data.

[0153] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the attribute label determination module 820 also includes an attribute label determination unit, and the attribute label determination unit is configured to: determine the role name label through the association information corresponding to the role information; based on the mapping relationship between the role name label and the resource requirement label, determine the resource requirement label corresponding to the role information through the role name label; and determine the task coding label corresponding to the role information according to the distributed machine learning task.

[0154] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the attribute label determination unit is further configured to: obtain a weight profile of the role information; wherein the weight profile includes a weight mapping relationship between the attribute labels of different role information; determine the corresponding weight data between the attribute labels of different role information according to the attribute labels and the weight mapping relationship to determine the degree of association between the different role information through the weight data.

[0155] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the role container allocation module 840 also includes a role container allocation unit, which is configured to: use the role container corresponding to the weight data greater than the first weight threshold as an affinity role container, and allocate the affinity role container to the first physical computing node; use the role container corresponding to the weight data less than the second weight threshold as an anti-affinity role container, and allocate the anti-affinity role container to the second physical computing node.

[0156] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the role container allocation unit is also configured to: allocate the marked role container to different physical computing nodes based on the priority between the preset role name weight data, the resource requirement weight data and the task coding weight data.

[0157] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the container allocation device 800 further includes a computing characteristic determination unit, which is configured to: determine the computing characteristics corresponding to the role information; and determine the physical computing node to be allocated for the role container corresponding to the role information according to the computing characteristics.

[0158] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the container allocation device 800 also includes a target role information adding unit, and the target role information adding unit is configured to: add a target number of target role information belonging to high resource consumption in the resource demand tags according to the quantitative relationship between different role information.

[0159] The specific details of each module of the container dispensing device mentioned above have been described in detail in the corresponding container dispensing method, so they will not be repeated here.

[0160] It should be noted that, although several modules or units of the container dispensing device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0161] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above container dispensing method is also provided.

[0162] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0163] Refer to the following Fig. 9 hereinafter describes an electronic device 900 according to such an embodiment of the present disclosure. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0164] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.

[0165] The storage unit stores a program code, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform the following steps: Figure 1 In step S110 shown in the figure, a distributed machine learning task is obtained, and role information in the distributed machine learning task is determined; in step S120, attribute labels corresponding to the role information and weight data corresponding to the attribute labels of different role information are determined; in step S130, a role container for running the role information is generated, and the role container is marked according to the attribute labels and the weight data; in step S140, the marked role containers are allocated to different physical computing nodes based on the attribute labels and the weight data.

[0166] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 921 and / or a cache memory unit 922 , and may further include a read-only memory unit (ROM) 923 .

[0167] The storage unit 920 may also include a program / utility 924 having a set (at least one) of program modules 925, such program modules 925 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0168] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0169] The electronic device 900 may also communicate with one or more external devices 970 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0170] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0171] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0172] refer to Fig.10 As shown, a program product 1000 for implementing the above container dispensing method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0173] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0174] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0175] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0176] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0177] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0178] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0179] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0180] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A container dispensing method, characterized in that: include: Obtaining a distributed machine learning task, and determining role information in the distributed machine learning task; Determine the attribute label corresponding to the role information and the weight data corresponding to the attribute labels of different role information; The attribute tags include role name tags, resource requirement tags and task code tags; The determining of the attribute label corresponding to the role information includes: determining the role name label through the association information corresponding to the role information; determining the resource requirement label corresponding to the role information through the role name label based on the mapping relationship between the role name label and the resource requirement label; and determining the task coding label corresponding to the role information according to the distributed machine learning task; generating a role container for running the role information, and marking the role container according to the attribute tag and the weight data; The role container corresponding to the weight data greater than the first weight threshold is used as an affinity role container, and the affinity role container is allocated to the first physical computing node; the role container corresponding to the weight data less than the second weight threshold is used as an anti-affinity role container, and the anti-affinity role container is allocated to the second physical computing node.

2. The container dispensing method according to claim 1, characterized in that: The determining of the weight data corresponding to the attribute tag of the role information includes: Acquire a weight configuration file of the role information; wherein the weight configuration file includes a weight mapping relationship between the attribute tags of different role information; The weight data corresponding to the attribute tags of different role information is determined according to the attribute tags and the weight mapping relationship, so as to determine the degree of association between the different role information through the weight data.

3. The container dispensing method according to claim 1, characterized in that: The weight data includes the role name weight data corresponding to the role name tags, the resource requirement weight data corresponding to the resource requirement tags, and the task code weight data corresponding to the task code tags; the method further includes: Based on the preset priorities among the role name weight data, the resource requirement weight data and the task code weight data, the affinity role container is allocated to a first physical computing node or the anti-affinity role container is allocated to a second physical computing node.

4. The container dispensing method according to claim 1, characterized in that: Before allocating the marked role containers to different physical computing nodes based on the attribute labels and the weight data, the solution further includes: Determining a computing characteristic corresponding to the role information; A physical computing node to be allocated to the role container corresponding to the role information is determined according to the computing characteristic.

5. The container dispensing method according to claim 1, characterized in that: Before obtaining the distributed machine learning task and determining the role information in the distributed machine learning task, the method further includes: According to the quantitative relationship between the different role information, target role information with high resource consumption in the resource demand tags of a target number is added.

6. A container dispensing device, characterized in that: include: A role information determination module, used to obtain a distributed machine learning task and determine role information in the distributed machine learning task; An attribute label determination module, used to determine the attribute label corresponding to the role information and the weight data corresponding to the attribute labels of different role information; The attribute tags include role name tags, resource requirement tags and task code tags; The determining of the attribute label corresponding to the role information includes: determining the role name label through the association information corresponding to the role information; determining the resource requirement label corresponding to the role information through the role name label based on the mapping relationship between the role name label and the resource requirement label; and determining the task coding label corresponding to the role information according to the distributed machine learning task; A role container marking module, used for generating a role container for running the role information, and marking the role container according to the attribute label and the weight data; A role container allocation module is used to use the role container corresponding to the weight data greater than a first weight threshold as an affinity role container, and allocate the affinity role container to a first physical computing node; use the role container corresponding to the weight data less than a second weight threshold as an anti-affinity role container, and allocate the anti-affinity role container to a second physical computing node.

7. An electronic device comprising: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions are executed by the processor to implement the container dispensing method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the container dispensing method according to any one of claims 1 to 5.