Equipment selection method and device for model training and computing equipment

By introducing a device selection method in the data system, the computing node sends computing power requests to the switch and determines the data transmission path through the root node election, solving the problem of insufficient resource utilization in the prior art and achieving efficient resource utilization of model training.

CN119514715APending Publication Date: 2025-02-25HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311084582.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to flexibly and fully utilize resources in data systems, especially when parameter aggregation is performed during model training.

Method used

By introducing a device selection method in the data system, the method sends computing power requests to the switch based on computing power requirements, and the switch determines the data transmission path through the root node election, thereby realizing flexible utilization of resources.

Benefits of technology

This method can effectively utilize resources in the data system, improve the efficiency and resource utilization of model training, and avoid the risk of single point failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514715A_ABST
    Figure CN119514715A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment selection method and device for model training, computing equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method relates to a computing node and a switch in a data system, and the computing node sends a computing power request to the switch in the data system based on a computing power demand of a computing cluster. A switch in a data system selects a target switch based on a received computing power request so as to determine a data transmission path taking the target switch as a device for executing aggregation, and issues related information of the data transmission path to each switch and a computing node on the data transmission path. Therefore, the computing cluster can complete the model training task of the computing cluster through the target switch. According to the method, the switch carries out root node election, the target switch is selected, the data transmission path is further determined, and resources in a data system can be flexibly and fully utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a device selection method, apparatus, computing device and storage medium for model training. Background Art

[0002] With the development of machine learning, the amount of computation in the model training process is increasing, and multiple computing nodes are needed to jointly complete the computing tasks of model training. These computing nodes realize parameter aggregation in the calculation through switches. However, there are many switches in the large-scale computing clusters in the data center. These switches can form a variety of switch combinations that meet the parameter aggregation requirements, and it is necessary to select the switch combination.

[0003] The current switch combination selection method is that a centralized manager calculates a fixed switch combination in advance, and during model training, the centralized manager allocates a switch combination that can meet the parameter aggregation requirements to the computing nodes.

[0004] The device selection method provided by the above method is difficult to flexibly and fully utilize the resources in the data system. Summary of the invention

[0005] The embodiment of the present application provides a device selection method, apparatus, computing device and storage medium for model training, and the device selection method can flexibly and fully utilize the resources in the data system. The technical solution is as follows.

[0006] In a first aspect, a device selection method for model training is provided, which is executed by a first node device in a data system, and the method includes: receiving a computing power request from a computing cluster, the computing power request carrying the computing power requirement of the computing cluster in the data system, and the computing power requirement indicating the computing power required for the computing cluster to perform parameter aggregation during the model training process; if the first node device meets the computing power requirement, and the first node device receives computing power requests from all computing nodes in the computing cluster within a first time period, a first root election message is sent to multiple second node devices that send computing power requests, and the first root election message indicates the computing power provided by the first node device; if a first confirmation message is received from any second node device, a first topology confirmation message is sent to multiple second node devices, and the first confirmation message indicates that the first node device is elected as a root node, and the first topology confirmation message indicates the data transmission path of the computing cluster in the data system.

[0007] The embodiment of the present application provides a device selection method for model training, which can achieve the purpose of flexibly and fully utilizing the resources in the data system. The device selection method involves computing nodes and switches in the data system, and the computing nodes send computing power requests to the switches in the data system based on the computing power requirements of the computing cluster. The switches in the data system perform root node elections based on the received computing power requests, thereby electing a target switch, so as to determine the data transmission path with the target switch as the device for performing aggregation, and send the relevant information of the data transmission path to each switch and computing node on the data transmission path, so that the computing cluster can complete the model training task of the computing cluster through the target switch. In this method, the switch performs root node election, selects the target switch, and then determines the data transmission path with the target switch as the device for performing aggregation, so that the devices in the data transmission path can flexibly and fully utilize the resources in the data system.

[0008] In some embodiments, the computing power request carries the total number of computing nodes in the computing cluster and information of the first computing node, which is the computing node that sends the computing power request. The method also includes: recording the total number of computing nodes and information of the first computing node; within the first time period, each time a computing power request from any second computing node in the computing cluster is received, recording the information of the second computing node, and based on the recorded total number of computing nodes and information of the computing nodes, determining whether computing power requests from all computing nodes in the computing cluster have been received.

[0009] In the above process, after receiving the computing power request, the node device first compares the number of the computing cluster carried in the computing power request with the number of the computing cluster stored in the node device, determines whether the computing power request comes from the above-mentioned first computing node or the above-mentioned second computing node, and then performs the corresponding operation.

[0010] In some embodiments, the method further includes: if the first node device does not meet the computing power requirement, forwarding the computing power request to a third node device connected to the first node device.

[0011] Among them, the first node device compares the computing power demand carried by the computing power request with the remaining resources of the first node device to determine whether the first node device can meet the computing power demand.

[0012] In some embodiments, the method also includes: if the first node device meets the computing power requirements and the first node device has not received computing power requests from all computing nodes in the computing cluster within a first time period, forwarding the received computing power request to a third node device connected to the first node device.

[0013] Among them, when the first node device receives the computing power request of the computing cluster for the first time and meets the computing power demand carried by the computing power request, it reserves the resources corresponding to the computing power demand. In the above process of forwarding the computing power request, the computing power request can be forwarded to any switch connected to the first node device, so that the computing power request can be forwarded to a large number of switches. This transmission method between switches does not limit the control device to the same device, thus avoiding the risk of single point failure.

[0014] In some embodiments, forwarding a received computing power request to a third node device connected to the first node device includes: if the received computing power request is one, forwarding the computing power request to the third node device connected to the first node device; if the received computing power requests are multiple, aggregating the computing power requests received by the first node device to obtain an aggregated computing power request, and forwarding the aggregated computing power request to the third node device connected to the first node device.

[0015] The numbers of computing nodes carried in the aggregated computing power request include the numbers of computing nodes carried in all computing power requests before aggregation.

[0016] In some embodiments, the method also includes: if a second root election message is received from at least two third node devices within a second time period, based on the second root election message from at least two third node devices, a target node device is selected from at least two third node devices, and a second confirmation message is sent to the target node device, the second confirmation message indicating that the target node device is elected as the root node, and the target node device complies with a preset policy.

[0017] The node device receiving the root election message stores a preset strategy, and the node device selects a target node device according to the preset strategy and the information in the root election message. Since different computing clusters may correspond to different preset strategies, the process of selecting a target root node that meets the conditions of the corresponding computing cluster through the preset strategy can achieve the purpose of flexibly utilizing resources in the data system.

[0018] In some embodiments, the method also includes: if the number of second root election messages received within the second time period is 1, a third node device that sends the second root election message is determined as a target node device, and a second confirmation message is sent to the target node device, wherein the second confirmation message indicates that the target node device is elected as the root node, and the target node device complies with a preset policy.

[0019] In some embodiments, the method further includes: if a second topology confirmation message is received, recording the root node carried by the second topology confirmation message, modifying the root node in the second topology confirmation message to the first node device, and forwarding the modified second topology confirmation message.

[0020] In some embodiments, the method further includes: receiving model parameters of any computing node in the computing cluster, and sending the received model parameters to the recorded root node; receiving aggregated model parameters sent by any node device, and sending the received aggregated model parameters to the second node device.

[0021] The above method is executed by node devices other than the target node device in the data transmission path during the model training process.

[0022] In some embodiments, the method further includes: receiving model parameters of all computing nodes in the computing cluster, aggregating the received model parameters to obtain aggregated model parameters, and sending the aggregated model parameters through a data transmission path.

[0023] The above method is executed by the target node device during the model training process.

[0024] In a second aspect, a device selection method for model training is provided, which is executed by a computing node in a data system, and the method includes: sending a computing power request to a first node device in the data system, the computing power request carrying the computing power requirement of a computing cluster in the data system, and the computing power requirement indicating the computing power required for the computing cluster to perform parameter aggregation during the model training process; receiving a first topology confirmation message, which is sent when the first node device meets the computing power requirement and is elected as the root node of the data transmission path, and the first topology confirmation message indicates the data transmission path of the computing cluster in the data system.

[0025] In some embodiments, the method further includes: sending model parameters, and transmitting the model parameters to the first node device according to the data transmission path; receiving aggregated model parameters, and performing model training according to the aggregated model parameters.

[0026] In a third aspect, a device selection apparatus for model training is provided, which is used to execute the device selection method for model training. Specifically, the device selection apparatus for model training includes a functional module for executing the device selection method for model training provided by the first aspect or any optional method of the first aspect and executed by the first node device in the data system.

[0027] In a fourth aspect, a device selection apparatus for model training is provided, which is used to execute the device selection method for model training. Specifically, the device selection apparatus for model training includes a functional module for executing the device selection method for model training provided by the second aspect or any optional manner of the second aspect and executed by a computing node in a data system.

[0028] In a fifth aspect, a computing device or a computing device cluster is provided, which includes a processor for executing program code so that the computing device or the computing device cluster executes to implement the operations performed by the device selection method for model training executed by the first node device in the data system or the device selection method for model training executed by the computing node in the data system as described above.

[0029] In a sixth aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the program code is read by a processor to enable a computing device to perform operations such as the device selection method for model training performed by the first node device in the data system or the device selection method for model training performed by the computing node in the data system.

[0030] In the seventh aspect, a computer program product or a computer program is provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computing device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computing device executes the methods provided in various optional implementations of the first and second aspects above.

[0031] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a schematic diagram of a data system provided in an embodiment of the present application;

[0033] Figure 2 It is a data format of a computing power request provided in an embodiment of the present application;

[0034] Figure 3 is a flow chart of a device selection method for model training provided in an embodiment of the present application;

[0035] Figure 4 It is a data format of a computing power request stored in a switch provided in an embodiment of the present application;

[0036] Figure 5 is a flow chart of a root election method provided by an embodiment of the present application;

[0037] Figure 6 It is a structural diagram of a specific data system provided in an embodiment of the present application;

[0038] Figure 7 It is a data interaction diagram of a device selection method for model training provided in an embodiment of the present application;

[0039] Figure 8 It is a structural schematic diagram of a device selection apparatus for model training provided in an embodiment of the present application;

[0040] Fig. 9 It is a structural schematic diagram of another device selection apparatus for model training provided in an embodiment of the present application;

[0041] Fig.10 It is a structural diagram of a node device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0043] Figure 1 is a schematic diagram of a data system provided in an embodiment of the present application, see Figure 1 The data system provided in the embodiment of the present application is composed of multiple computing nodes and switches, which are collectively referred to as node devices. Among them, the computing node can be a GPU (graphics processing unit), a virtual machine instance, or a container instance, and the switch has a computing function.

[0044] The above system includes multiple levels, wherein the first level is composed of computing nodes, and the remaining multiple levels are composed of switches. The computing nodes of the first level are connected to the switches of the adjacent second level, and one switch can connect multiple computing nodes. The switches of adjacent levels can be connected to each other, and one switch can connect multiple switches of adjacent levels. The above data system can use topological structures such as Fat-tree and Clos to realize the connection between node devices. The topological structure can be 2-layer or 3-layer, wherein the 2-layer topological structure means that the topological structure has one layer of computing nodes and two layers of switches, and the 3-layer topological structure means that the topological structure has one layer of computing nodes and three layers of switches, and the above computing nodes are all located in the first level.

[0045] When the above data system is used for model training, a model task can be assigned to multiple computing nodes, which form a computing cluster. The computing nodes in the computing cluster use distributed parallel training to train the model. The computing nodes in the computing cluster send the trained model parameters to the switch, which receives and aggregates these model parameters and then sends them to the computing nodes, which then perform subsequent training on the model.

[0046] In an embodiment of the present application, the device selection method involves computing nodes and switches in a data system, and the computing nodes send computing power requests to switches in the data system based on the computing power requirements of the computing cluster. The switches in the data system perform root node elections based on the received computing power requests, thereby electing a target switch, so as to determine a data transmission path with the target switch as the device for performing aggregation, and send relevant information of the data transmission path to each switch and computing node on the data transmission path, so that the computing cluster can complete the model training task of the computing cluster through the target switch.

[0047] To this end, the data format of the computing power request in the embodiment of the present application is defined, and the computing power request carries the number of the computing cluster, the total number of computing nodes in the computing cluster, and the information of the computing nodes. Figure 2 As shown, the computing power request includes the following fields:

[0048] Len, the message length field, is used to indicate the length of the message;

[0049] Resv, resource reservation field, used to indicate whether the computing node has the authority to request the switch to reserve resources;

[0050] Confirm (C), the tree establishment confirmation field, is used to indicate that the root node has been elected. This field is set to 1 in the confirmation message and the topology confirmation message;

[0051] Root election (RE), root election field, used to indicate that the switch has entered the root election state. This field is set to 1 in the root election message and confirmation message;

[0052] Group ID: The computing cluster ID field is used to identify different computing clusters.

[0053] Data Source ID, the computing node ID field, is used to identify different computing nodes in the computing cluster;

[0054] SN, shortest path length field, used to indicate the shortest path length, which refers to the length of the shortest reachable path between the switch and any computing node in the computing cluster, where a reachable path refers to the number of hops required from one device to another;

[0055] Weight: Root election weight field, used to indicate the weight generated according to the preset policy, used to select the target switch in the root election phase;

[0056] TTL, the transmission length field, is used to indicate the time or number of hops allowed for the computing power request to be transmitted. The transmission length field is reduced by one for each additional hop. When the field is zero, the transmission is stopped. When computing power requests are aggregated, the transmission length field carried by the aggregated computing power request is the minimum transmission length field in the computing power request before aggregation;

[0057] Data Source, the total number of computing nodes field, which is used to indicate the total number of computing nodes in the computing cluster;

[0058] Data Source bitmap, computing node field, used to indicate the number of different computing node numbers carried by the computing power request. The computing power request can be a computing power request issued by a computing node or an aggregate computing power request issued by a switch. In some embodiments, the data structure of the computing node field is a bitmap data structure. The length of the computing node field is greater than or equal to the total number of computing nodes in the computing cluster. In the computing power request issued by the computing node, only the value of the position corresponding to the computing node in the computing node field is 1, and the computing power request only carries the number of one computing node. The aggregate computing power request issued by the switch carries the numbers of multiple computing nodes, and these computing node numbers correspond to multiple computing nodes. In the computing node field of the aggregate computing power request, the value of the position corresponding to the multiple computing nodes is 1. The number of 1s in the computing node field of the aggregate computing power request represents the number of different computing nodes carried by the aggregate computing power request.

[0059] Resource requirement (RSR), a computing power requirement field, is used to indicate the computing power required by the computing cluster to perform parameter aggregation during model training.

[0060] It should be noted that the above-mentioned computing power requirement field includes: the size of the memory space required for parameter aggregation, the number of operators required for parameter aggregation, etc., which are not limited in this application.

[0061] Figure 3 For Figure 1 The flowchart of the method is illustrated by taking a switch in the system as an example. The computing power request received by the switch may be sent by a computing node or a switch in the system. Figure 3 , the method comprises the following steps:

[0062] 301. The switch receives a computing power request from a computing cluster. The computing power request carries the computing power requirement of the computing cluster in the data system. The computing power requirement indicates the computing power required by the computing cluster to perform parameter aggregation during the model training process.

[0063] The computing power request carries the number of the computing cluster, the total number of computing nodes in the computing cluster, the number of the computing node, and the shortest path length. In the embodiment of the present application, carrying the computing power demand in the computing power request enables the switch to know the computing power demand of the computing cluster, that is, to realize the perception of the computing power of the node devices in the data system.

[0064] 302. Determine whether the switch receives the computing power request of the computing cluster for the first time. If the switch receives the computing power request of the computing cluster for the first time, execute step 303. If the switch does not receive the computing power request of the computing cluster for the first time, execute step 304 or step 306.

[0065] After receiving the computing power request, the switch compares the number of the computing cluster carried in the computing power request with the number of the computing cluster stored in the switch to determine whether the switch has stored the number of the computing cluster. If the switch does not store the number of the computing cluster, it means that the switch has not received the computing power request of the computing cluster, and step 303 is executed. If the switch stores the number of the computing cluster, it means that the switch has received the computing power request of the computing cluster and meets the computing power requirement of the computing cluster, and step 304 or step 306 is executed.

[0066] 303. Determine whether the switch meets the computing power requirement carried by the computing power request. If the switch meets the computing power requirement, start timing and record the total number of computing nodes and information about the computing nodes. If the switch does not meet the computing power requirement, forward the computing power request to a switch connected to the switch.

[0067] Compare the computing power requirement carried by the computing power request with the remaining resources in the switch to determine whether the switch can meet the computing power requirement of the computing cluster. If the remaining resources in the switch are greater than or equal to the computing power requirement, it means that the switch meets the computing power requirement of the computing cluster, start timing, reserve resources corresponding to the computing power requirement on the switch, store the computing power request and the port that receives the computing power request, add 1 to the shortest path length of the computing power request, and store the shortest path length. If the remaining resources in the switch are less than the computing power requirement, it means that the switch cannot meet the computing power requirement of the computing cluster, and forward the computing power request to the switch connected to the switch.

[0068] For any switch, it can determine whether it can meet the computing power demand carried by the received computing power request and the remaining resources in the switch. If it does, a candidate switch for aggregation is found for the computing node. If it does not, the computing power request can be sent to other switches in time to continue looking for candidate switches, which can ensure that a suitable candidate switch is found in the data system.

[0069] In some embodiments, the contents stored by the switch are as follows: Figure 4 As shown, including the following information:

[0070] Subnode IP, the source address field for sending the computing power request, used for ingress checking and sending messages;

[0071] Group ID: The computing cluster ID field is used to identify different computing clusters.

[0072] Data Source ID, the computing node ID field, is used to identify different computing nodes in the computing cluster;

[0073] Data Source (DS), the total number of computing nodes field, is used to indicate the total number of computing nodes in the computing cluster;

[0074] Leaf: downstream node field, used to indicate the node device that sends the computing power request. The node device can be a computing node or a switch.

[0075] Weight: Root election weight field, used to indicate the weight generated according to the preset policy, used to select the target switch in the root election phase;

[0076] SN, shortest path length field, used to indicate the shortest path length, which refers to the length of the shortest reachable path between the switch and any computing node in the computing cluster, where a reachable path refers to the number of hops required from one device to another;

[0077] Root IP, root node address field, used to indicate the root node address. Before the root node is found, this field is set to 0xFF. In some embodiments, switches in the data system are also numbered, and the root node address field can be represented by the number of the root node switch;

[0078] Root Candidate, root node identification field, used to identify the switch as a candidate root, only required in the root election process;

[0079] TTL, the transmission length field, is used to indicate the time or number of hops allowed for the computing power request to be transmitted. The transmission length field is reduced by one for each additional hop. When the field is zero, the transmission is stopped. When computing power requests are aggregated, the transmission length field carried by the aggregated computing power request is the minimum transmission length field in the computing power request before aggregation;

[0080] Data Source bitmap, computing node field, used to indicate the number of different computing nodes carried by the computing power request.

[0081] 304. If the above switch meets the computing power requirement and the switch receives computing power requests from all computing nodes in the computing cluster within the first time period, a root election message is sent to multiple node devices that send the computing power requests, and the root election message indicates the computing power provided by the switch.

[0082] Among them, the node device can be a computing node or a switch. During the above-mentioned first time period, each time a computing power request is received from any node device in the computing cluster, the switch records the information of the node device, and based on the total number of recorded computing nodes and the information of the computing nodes, determines whether the computing power requests of all computing nodes in the computing cluster have been received.

[0083] In the above process, the switch receives computing power requests from other node devices, compares the number of the computing cluster carried in the computing power request with the number of the computing cluster stored in the switch, and finds that the switch has already stored the number of the computing cluster, indicating that the switch has received the computing power request of the computing cluster and meets the computing power requirements of the computing cluster. Therefore, the shortest path length carried by the computing power request is compared with the shortest path length stored in the switch to determine whether the computing power request needs to be discarded.

[0084] When the switch receives the computing power request from the computing cluster for the first time, it increases the shortest path length carried by the computing power request by 1 and stores the shortest path length in the switch. When the switch receives other computing power requests from the computing cluster, it updates the shortest path length stored in the switch.

[0085] If the shortest path length carried by the computing power request is greater than the shortest path length stored in the switch, the computing power request is discarded, and the switch with the longer path can be discarded to obtain the switch with the shortest path, thereby reducing the transmission time without occupying additional bandwidth, thereby improving the utilization of resources in the data system.

[0086] If the shortest path length carried by the computing power request is less than or equal to the shortest path length stored by the switch, the information of the node device is recorded, that is, the port storing the computing power request and receiving the computing power request is compared, and the total number of computing nodes in the computing cluster stored by the switch is compared with the number of computing nodes that have been received, to determine whether the switch has received the computing power requests of all computing nodes in the computing cluster. If the total number of computing nodes in the computing cluster stored by the switch is equal to the number of computing nodes that have been received, it means that the switch has received the computing power requests of all computing nodes in the computing cluster, and the root candidate field in the switch is set to 1, indicating that the switch has entered the root election state, and a root election message is sent to the node device that has sent the computing power request to the switch.

[0087] It should be noted that after the root node is elected, the switch serving as the root node will no longer forward computing power requests. Therefore, computing power requests will not traverse all node devices in the data system. Therefore, the coverage of computing power requests is small and the interaction time is short, which reduces resource consumption.

[0088] The root election message carries the number of the computing cluster, the root node information, the total number of computing nodes in the computing cluster, the computing power provided by the root node, and the shortest path length. After the switch stores the number of the computing cluster carried by the computing power request, each time it stores the computing power request of the computing nodes in the computing cluster, it must determine whether the switch has received the computing power requests of all computing nodes in the computing cluster.

[0089] In addition, when the shortest path length carried by the computing power request is less than the shortest path length stored in the switch, the shortest path length stored in the switch is updated to the shortest path length in the computing power request plus 1; when the shortest path length carried by the computing power request is equal to the shortest path length stored in the switch, the above-mentioned first duration is extended to receive other computing power requests of the computing cluster.

[0090] In some embodiments, the computing node field uses a bitmap data structure to record information about the computing node that sends the computing power request. When the values ​​of corresponding positions in the computing node field stored in the switch are all 1, the switch receives computing power requests from all computing nodes in the computing cluster.

[0091] 305. If the switch receives a confirmation message from any node device, it sends a topology confirmation message to multiple node devices that have sent computing power requests to the switch, and the confirmation message indicates that the switch is elected as the root node. The topology confirmation message indicates the data transmission path of the computing cluster in the data system.

[0092] The node device may be a computing node or a switch.

[0093] In an embodiment of the present application, after the switch sends a root election message, the timing starts. Within the third time period, if the switch receives a confirmation message, the switch is elected as the root node, and a topology confirmation message is sent to multiple node devices that have sent computing power requests to the switch. Within the third time period, if the switch does not receive a topology confirmation message, it means that the switch has not been elected as the root node, and exits the root election state. The third time period ensures that the length of time the switch is in the root election state is within an allowable range by causing the switch to exit the root election state.

[0094] The confirmation message indicates that the switch is elected as the root node, and the confirmation message carries the number of the computing cluster and the number of the node device that sends the confirmation message.

[0095] 306. If the switch meets the computing power requirement and the switch has not received computing power requests from all computing nodes in the computing cluster within the first time period, forward the received computing power request to a switch connected to the switch.

[0096] For a switch, it may receive one or more computing power requests. Accordingly, when the first time period ends, if the switch has received one computing power request, the computing power request will be forwarded to the switch connected to the switch; if the switch has received multiple computing power requests, the computing power requests received by the switch will be aggregated to obtain an aggregated computing power request, and the aggregated computing power request will be forwarded to the switch connected to the switch. By aggregating multiple computing power requests, signaling interactions can be reduced, and multiple computing power requests can be forwarded through one signaling.

[0097] The number of the computing node carried by the aggregate computing power request includes the number of the computing node carried by the received computing power request. The first duration can ensure that the switch will not wait to receive the computing power request, but forward the aggregate computing power request to other switches, thereby ensuring that the duration of device selection is within an acceptable range. This method of transmission between switches does not limit the control device to the same device, thus avoiding the risk of single point failure.

[0098] The above steps 301 to 306 illustrate the process of the switch becoming the root node. Figure 1 Taking a switch in the system shown in the figure as an example, the process of selecting the root node by the switch receiving the root election message is explained. Figure 5 , the process includes Figure 5 Steps shown:

[0099] 501. The switch receives the root election message, selects a target switch, and sends a confirmation message to the target switch.

[0100] The switch receives the root election message sent by other switches, compares the number of the computing cluster carried in the root election message with the number of the computing cluster stored in the switch, and determines whether the switch has stored the root election message carrying the number of the computing cluster.

[0101] If the switch does not store the root election message carrying the number of the computing cluster, it means that the switch has not received the root election message of the computing cluster, and the root election message is stored and the timing starts. If the switch stores the root election message carrying the number of the computing cluster, it means that the switch has received the root election message of the computing cluster, and the root election message is stored, and the second time length is extended to continue to receive the root election messages of other switches.

[0102] If root election messages are received from at least two switches within the second time period, a target switch is selected from the at least two switches based on the root election messages from the at least two switches, and a confirmation message is sent to the target switch, indicating that the target switch is elected as the root node and that the target switch complies with the preset policy.

[0103] Among them, when the switch has received at least two root election messages of the computing cluster, the information carried by these root election messages is compared according to the preset strategy to determine the root election message that complies with the preset strategy. The switch corresponding to the root election message is the target switch, and a confirmation message is sent to the target switch.

[0104] In some embodiments, the switch deletes the root election message that does not comply with the preset policy during the root election process.

[0105] If the number of root election messages received within the second time period is 1, the switch sending the root election message is determined as the target switch, and a confirmation message is sent to the target switch, indicating that the target switch is elected as the root node and the target switch complies with the preset policy.

[0106] After the second duration ends, the switch stops receiving the root election message of the computing cluster. The second duration ensures that the duration of the root election is within an allowable range by stopping receiving the root election message.

[0107] In some embodiments, the preset strategy includes: the memory space provided by the switch is the largest, the memory space provided by the switch is the smallest, the shortest path length corresponding to the switch is the shortest, etc. The preset strategy can also digitize the elements in the root election message, assign weights to these elements, calculate the score of the root election message according to the weight, compare the scores, and select the root election message that meets the preset strategy. For example, if the preset strategy is that the memory space provided by the switch is the largest, then the memory space size in the root election message is assigned a weight of 1. After calculating the score of the root election message according to the weight, the root election message with the highest score is selected. If the preset strategy is that the memory space provided by the switch is the smallest, then the root election message with the lowest score is selected. Since different computing clusters may correspond to different preset strategies, the above process of selecting a target root node that meets the conditions of the corresponding computing cluster through the preset strategy can achieve the purpose of flexibly utilizing resources in the data system.

[0108] exist Figure 1 In the system shown, if a switch in the system receives a topology confirmation message, it records the root node carried by the topology confirmation message, modifies the root node in the topology confirmation message to the switch, and forwards the modified topology confirmation message, thereby indicating the data transmission path for the computing node or switch that receives the modified topology confirmation message.

[0109] In this method, the computing node sends a computing power request to the switch in the data system based on the computing power demand of the computing cluster. The switch in the data system selects the target switch through root election based on the computing power request and the preset strategy, and then determines the data transmission path with the target switch as the device for executing aggregation, wherein the target switch is a switch that complies with the preset strategy, and the data transmission path is the shortest data transmission path. Therefore, the devices in the data transmission path can flexibly and fully utilize the resources in the data system. The above method enables the switch to know the computing power demand of the computing cluster by carrying the computing power demand in the computing power request, that is, to realize the perception of the computing power of the switch in the data system. Moreover, in the above method, the computing power request can be sent to any connected switch, so that the computing power request can be forwarded to a large number of switches. This transmission method between switches does not limit the control device to the same device, thus avoiding the risk of single point failure. Moreover, in the process of searching for the target switch, the above-mentioned computing power request also carries the shortest path length. By discarding the computing power request whose shortest path length is larger than the shortest path length stored in the switch, the longer path can be discarded and the shorter path can be retained, so that the model parameters do not pass through redundant paths during data transmission, thereby not occupying additional bandwidth, and improving the utilization rate of resources in the data system. After finding the root node, the root node no longer forwards the computing power request. Therefore, the computing power request will not traverse all switches in the data system, and only in the first round of model training, it is necessary to send and receive control signals such as computing power requests. Therefore, the coverage range of the control signaling is small, and the interaction time of the control signaling is short, which reduces the consumption of resources in the data system. When performing the root election, since different computing clusters may correspond to different preset strategies, the above-mentioned process of selecting the target root node that meets the conditions of the corresponding computing cluster through the preset strategy can achieve the purpose of flexibly utilizing the resources in the data system. In summary, the device selection method provided in the embodiment of the present application can flexibly and fully utilize the resources in the data system.

[0110] The following is an example of a device selection process in a data system 600. Figure 6 The data system includes a computing cluster Group1 and switches S1, S2, S3, and S4. The computing cluster Group1 includes computing nodes CN1 to CN4. The computing nodes CN1 and CN2 are connected to the switch S1, the computing nodes CN3 and CN4 are connected to the switch S2, the switch S1 is connected to the switches S3 and S4, and the switch S2 is connected to the switches S3 and S4. Figure 7 FIG. 1 is a flow chart of a device selection method provided in an embodiment of the present application. Figure 6 The system architecture and Figure 7, to introduce the device selection method provided in the embodiment of the present application.

[0111] 701. Computing nodes CN1 and CN2 send a computing power request to switch S1, and computing nodes CN3 and CN4 send a computing power request to switch S2. The computing power request carries the computing power requirement of computing cluster Group1 in the data system, and the computing power requirement indicates the computing power required for computing cluster Group1 to perform parameter aggregation during model training.

[0112] In the embodiment of the present application, taking computing node CN1 as an example, the computing power request of computing node CN1 carries the number 1 of computing cluster Group1, the computing power requirement of computing cluster Group1, the number CN1 of computing node CN1, the total number of computing nodes in computing cluster Group1 4, and the shortest path length 0.

[0113] 702. Switch S1 receives computing power requests from computing nodes CN1 and CN2 within the first time period, aggregates the computing power requests from computing nodes CN1 and CN2, obtains an aggregate computing power request R1, and forwards the aggregate computing power request R1 to switches S3 and S4.

[0114] In the embodiment of the present application, the switch S1 can receive the computing power request of some computing nodes, but fails to receive the computing power request of all computing nodes in the computing cluster within the predetermined time. For this process, step 702 includes steps 7021 to 7023.

[0115] 7021. Switch S1 receives the computing power request from computing node CN1 and determines whether the computing power requirement carried in the computing power request is met. If the computing power requirement is met, the timing starts.

[0116] In the embodiment of the present application, after receiving the computing power request from computing node CN1, switch S1 compares the number 1 of computing cluster Group1 carried in the computing power request with the number of computing clusters stored in the switch, and finds that it has not received computing power requests from computing cluster Group1. Compare the computing power requirements carried in the computing power request with the remaining resources in switch S1, and find that the switch meets the computing power requirements of computing cluster Group1, so the timing starts, the switch S1 reserves the resources corresponding to the computing power requirements, stores the computing power request and the port that receives the computing power request, adds 1 to the shortest path length of the computing power request, and stores the shortest path length.

[0117] 7022. Switch S1 receives the computing power request of computing node CN2, and determines whether it has received the computing power requests of all computing nodes in computing cluster Group1.

[0118] In an embodiment of the present application, after switch S1 receives the computing power request from computing node CN2, it compares the number 1 of computing cluster Group1 carried in the computing power request with the number of the computing cluster stored in the switch, and finds that switch S1 has received the computing power request from computing cluster Group1. It compares the shortest path length carried by the computing power request with the shortest path length stored in the switch, and finds that the shortest path length 0 carried by the computing power request from computing node CN2 is less than the shortest path length 1 stored in switch S1. Therefore, switch S1 stores the computing power request and the port that receives the computing power request, adds 1 to the shortest path length of the computing power request, and updates the shortest path length stored in switch S1 to the shortest path length 1.

[0119] At this time, switch S1 has only received computing power requests from computing nodes CN1 and CN2, and the total number of computing nodes in computing cluster Group1 stored in switch S1 is 4. Therefore, switch S1 has not received computing power requests from all computing nodes in computing cluster Group1, so switch S1 continues to receive computing power requests.

[0120] After switch S1 records the number of the computing cluster carried in the computing power request, each time the switch context of the computing node in the computing cluster is stored, it is necessary to determine whether switch S1 has received the computing power requests of all computing nodes in computing cluster Group1.

[0121] 7023. When the first duration ends, switch S1 only receives computing power requests from computing nodes CN1 and CN2 in computing cluster Group1, aggregates computing power requests from computing nodes CN1 and CN2, obtains aggregate computing power request R1, and forwards aggregate computing power request R1 to switches S3 and S4.

[0122] When the first time period ends, the total number of computing nodes in the computing cluster stored in switch S1 and the number of numbers of different computing nodes are compared, and it is found that switch S1 only receives computing power requests from computing nodes CN1 and CN2 in computing cluster Group1, and does not receive computing power requests from all computing nodes in computing cluster Group1, indicating that switch S1 cannot receive data sent by all computing nodes in computing cluster Group1. Therefore, switch S1 aggregates the computing power requests of computing nodes CN1 and CN2 to obtain aggregated computing power request R1, and forwards the aggregated computing power request R1 to switches R3 and R4, looking for a switch that can receive data sent by all computing nodes in computing cluster Group1.

[0123] 703. Switch S2 receives computing power requests from computing nodes CN3 and CN4 within the first time period, aggregates the computing power requests from computing nodes CN3 and CN4, obtains an aggregate computing power request R2, and forwards the aggregate computing power request R2 to switches S3 and S4.

[0124] In the embodiment of the present application, the switch S2 is able to receive computing power requests from some computing nodes, but fails to receive computing power requests from all computing nodes in the computing cluster within a predetermined time. Therefore, step 703 is the same as the above step 702.

[0125] 704. Switch S3 receives aggregate computing power requests R1 and R2 from switches S1 and S2 within the first time period, and sends a root election message R3 to switches S1 and S2. The root election message R3 indicates the computing power provided by switch S3.

[0126] In the embodiment of the present application, the switch S3 is taken as an example to be able to receive the computing power requests of all computing nodes in the computing cluster within a predetermined time. In this process, step 704 includes step 7041 to step 7042.

[0127] 7041. Switch S3 receives the aggregate computing power request R1 from switch S1, and determines whether the computing power requirement carried by the aggregate computing power request R1 is met. If the computing power requirement is met, the timing starts.

[0128] Switch S3 receives the aggregate computing power request from switch S1, compares the number 1 of computing cluster Group1 carried in the aggregate computing power request with the information stored in switch S3, and finds that switch S3 has never received the computing power request from computing cluster Group1. It compares the computing power demand carried in the computing power request with the remaining resources in switch S3, and finds that switch S3 meets the computing power demand of computing cluster Group1. Therefore, switch S3 reserves the resources corresponding to the computing power demand, stores the aggregate computing power request and the port that receives the computing power request, adds 1 to the shortest path length of the computing power request, and stores the shortest path length 2.

[0129] 7042. Switch S3 receives the aggregate computing power request R2 from switch S2 within the first time period, and determines whether it has received the computing power requests from all computing nodes in computing cluster Group1. If switch S3 has received the computing power requests from all computing nodes in computing cluster Group1, it sends a root election message R3 to switches S1 and S2.

[0130] Switch S3 receives the aggregate computing power request R2 from switch S2, compares the number 1 of the computing cluster Group1 carried in the aggregate computing power request with the information stored in switch S3, and finds that switch S3 has already stored the number 1 of the computing cluster Group1, indicating that switch S3 has received the aggregate computing power request from computing cluster Group1. Therefore, by comparing the shortest path length carried by the aggregate computing power request with the shortest path length stored in switch S3, it is found that the shortest path length 1 carried by the aggregate computing power request of switch S2 is less than the shortest path length 2 stored in switch S3. Therefore, switch S3 stores the aggregate computing power request and the port that receives the computing power request, adds 1 to the shortest path length of the computing power request, and updates the shortest path length to 2.

[0131] At this time, switch S3 receives the aggregate computing power request from switches S1 and S2, stores the numbers of computing nodes CN1 to CN4 and the total number of computing nodes in computing cluster Group1, which is 4. The total number of computing nodes in the computing cluster stored by switch S3 is equal to the number of numbers of different computing nodes. Therefore, switch S3 receives the computing power request from all computing nodes in computing cluster Group1, indicating that switch S3 can receive data sent by all computing nodes in computing cluster Group1, and sends a root election message to switches S1 and S2. The root election message carries the number of computing cluster Group1, root node information RootS3, the total number of computing nodes in computing cluster Group1, which is 4, and the amount of resources that switch S3 can provide to computing cluster Group1.

[0132] 705 . The switch S4 receives the aggregate computing power requests R1 and R2 from the switches S1 and S2 within the first time period, and sends a root election message R4 to the switches S1 and S2 . The root election message R4 indicates the computing power provided by the switch S4 .

[0133] In the embodiment of the present application, the switch S4 is taken as an example to be able to receive the computing power requests of all computing nodes in the computing cluster within a predetermined time, so step 705 is the same as the above step 704.

[0134] 706. Switch S1 receives the root election messages R3 and R4 from switches S3 and S4, selects the target switch S3 based on the root election messages, and sends a confirmation message to switch S3.

[0135] In the embodiment of the present application, after switch S1 receives the root election message from switch S3, it compares the number of the computing cluster carried in the root election message with the number of the computing cluster stored in switch S1, and finds that switch S1 does not store the root election message carrying the number 1 of computing cluster Group1, indicating that switch S1 has not received the root election message of computing cluster Group1. Switch S1 stores the root election message of switch S3 and starts timing.

[0136] During the second time period, switch S1 receives the root election message from switch S4, compares the number of the computing cluster carried in the root election message with the number of the computing cluster stored in switch S1, and finds that switch S1 has received the root election message of computing cluster Group1. Switch S1 stores the root election message of switch S4, and compares the contents of the root election message of switch S3 with the root election message of switch S4 according to the preset strategy.

[0137] In the embodiment of the present application, the preset strategy is that the memory space that the switch can provide is the largest. The size of the memory space carried by the root election message of switch S3 is larger than the size of the memory space carried by the root election message of switch S4. Therefore, the root election message of switch S3 is retained, and switch S3 is made the root node, and the root election message of switch S4 is deleted.

[0138] When the timing ends, switch S1 retains the root election message of switch S3, switch S3 becomes the root node, and switch S1 sends a confirmation message to switch S3.

[0139] 707 . Switch S3 receives the confirmation message, and sends a topology confirmation message to switches S1 and S2 . The topology confirmation message indicates the data transmission path of computing cluster Group1 in the data system.

[0140] After switch S3 sends the root election message, the timing starts. If switch S3 receives the confirmation message within the third time period, switch S3 becomes the root node, sets the root candidate field in the local information to 0, and sets the root IP field to its own IP.

[0141] Switch S3 receives the confirmation message and becomes the root node. It sets the root candidate field in the local information to 0 and the root IP field to its own IP. Based on the stored port for receiving the aggregate computing power requests of switches S1 and S2 and the addresses of switches S1 and S2 carried in the switch contexts of switches S1 and S2, it sends a topology confirmation message to switches S1 and S2. The topology confirmation message carries the root node information RootS3, the number 1 of computing cluster Group1, and the total number of computing nodes in computing cluster Group1.

[0142] 708. Switch S1 receives the topology confirmation message from switch S3, records the information carried in the topology confirmation message, changes the root node information in the topology confirmation message to the information of switch S1, and then sends the modified topology confirmation message to computing nodes CN1 and CN2.

[0143] Switch S1 receives the topology confirmation message from switch S3, stores the root node information RootS3, the number 1 of computing cluster Group1, and the total number of computing nodes in computing cluster Group1 carried in the topology confirmation message, changes the root node information RootS3 in the topology confirmation message to RootS1, and then sends the modified topology confirmation message to computing nodes CN1 and CN2 based on the stored port for receiving computing power requests from computing nodes CN1 and CN2 and the addresses of computing nodes CN1 and CN2 carried in the switch context of computing nodes CN1 and CN2.

[0144] 709. Switch S2 receives the topology confirmation message from switch S3, records the information carried in the topology confirmation message, changes the root node information in the topology confirmation message to the information of switch S2, and then sends the modified topology confirmation message to computing nodes CN3 and CN4.

[0145] Step 709 is similar to step 708.

[0146] 710. Computing nodes CN1 and CN2 receive a topology confirmation message from switch S1 and record information carried in the topology confirmation message. Computing nodes CN3 and CN4 receive a topology confirmation message from switch S2 and record information carried in the topology confirmation message.

[0147] The computing nodes CN1 and CN2 receive the topology confirmation message from the switch S1, and store the root node information RootS1, the number 1 of the computing cluster Group1, and the total number of computing nodes in the computing cluster Group1 carried in the topology confirmation message.

[0148] The computing nodes CN3 and CN4 receive the topology confirmation message from the switch S2, and store the root node information RootS2, the number 1 of the computing cluster Group1, and the total number of computing nodes in the computing cluster Group1 carried in the topology confirmation message.

[0149] During the model training process, the computing nodes send model parameters and transmit the model parameters to the corresponding switches according to the data transmission path. That is, computing nodes CN1 and CN2 send model parameters to switch S1 according to the stored number of computing cluster Group1 and root node information RootS1, and computing nodes CN3 and CN4 send model parameters to switch S2 according to the stored number of computing cluster Group1 and root node information RootS2.

[0150] The switch in the data transmission path receives the model parameters of any computing node in the computing cluster and sends the received model parameters to the recorded root node, that is, switches S1 and S2 receive the model parameters and forward the model parameters to switch S3 according to the stored computing cluster Group1 number and root node information RootS3.

[0151] The root node receives the model parameters of all computing nodes in the computing cluster, aggregates the received model parameters to obtain aggregated model parameters, and sends the aggregated model parameters through the data transmission path, that is, switch S3 receives the model parameters, aggregates the model parameters, and obtains the aggregated model parameters. Based on the port for receiving the aggregated computing power requests of switches S1 and S2 stored in the root node and the addresses of switches S1 and S2 carried by the computing power requests of switches S1 and S2, the aggregated model parameters are sent to switches S1 and S2.

[0152] The switch receives the aggregation model parameters sent by any switch, and sends the received aggregation model parameters to the corresponding switch in the data transmission path, that is, switch S1 receives the aggregation model parameters, and based on the port for receiving the computing power requests of computing nodes CN1 and CN2 stored in switch S1 and the addresses of computing nodes CN1 and CN2 carried in the computing power requests of computing nodes CN1 and CN2, sends the aggregation model parameters to computing nodes CN1 and CN2; switch S2 receives the aggregation model parameters, and based on the port for receiving the computing power requests of computing nodes CN3 and CN4 stored in switch S2 and the addresses of computing nodes CN3 and CN4 carried in the computing power requests of computing nodes CN3 and CN4, sends the aggregation model parameters to computing nodes CN3 and CN4.

[0153] The computing nodes receive the aggregate model parameters and perform model training according to the aggregate model parameters, that is, computing nodes CN1 and CN2 receive the aggregate model parameters from switch S1 and continue training, and computing nodes CN3 and CN4 receive the aggregate model parameters from switch S2 and continue training. This method only needs to send and receive control signals such as computing power requests in the first round of model training. Therefore, the coverage of the control signaling is small, the interaction time of the control signaling is short, and the utilization rate of resources in the data system is improved.

[0154] The above describes the method of the embodiment of the present application, and the following describes the device of the embodiment of the present application. It should be understood that the device described below has any function of the switch in the above method. Figures 2 to 7 The device selection method for model training according to the embodiment of the present application is described in detail. Based on the same inventive concept, the following will be combined with Figures 8 to 9The device selection apparatus for model training according to the embodiment of the present application is described. It should be understood that the technical features described in the method embodiment are also applicable to the following device embodiment.

[0155] See also Figure 8 , an embodiment of the present application provides a device selection apparatus for model training, the device comprising:

[0156] A receiving module 801 is used to receive a computing power request from a computing cluster, where the computing power request carries the computing power requirement of the computing cluster in the data system, and the computing power requirement indicates the computing power required by the computing cluster to perform parameter aggregation during model training;

[0157] The sending module 802 is configured to send a first root election message to multiple second node devices that send computing power requests if the first node device meets the computing power requirement and the first node device receives computing power requests from all computing nodes in the computing cluster within a first time period, where the first root election message indicates the computing power provided by the first node device;

[0158] The sending module 802 is also used to send a first topology confirmation message to multiple second node devices if a first confirmation message is received from any second node device, the first confirmation message indicating that the first node device is elected as the root node, and the first topology confirmation message indicating the data transmission path of the computing cluster in the data system.

[0159] In some embodiments, the apparatus further comprises:

[0160] A recording module, used to record the total number of computing nodes and information of the first computing node;

[0161] The recording module is also used to record the information of any second computing node in the computing cluster each time a computing power request is received from the second computing node within the first time period, and determine whether the computing power requests of all computing nodes in the computing cluster have been received based on the total number of computing nodes recorded and the information of the computing nodes.

[0162] In some embodiments, the apparatus further comprises:

[0163] The first forwarding module is used to forward the computing power request to a third node device connected to the first node device if the first node device does not meet the computing power requirement.

[0164] In some embodiments, the apparatus further comprises:

[0165] The second forwarding module is used to forward the received computing power request to a third node device connected to the first node device if the first node device meets the computing power demand and the first node device has not received computing power requests from all computing nodes in the computing cluster within a first time period.

[0166] In some embodiments, the second forwarding module includes:

[0167] A first forwarding unit, configured to forward the computing power request to a third node device connected to the first node device if the received computing power request is one;

[0168] The second forwarding unit is used to aggregate the computing power requests received by the first node device if multiple computing power requests have been received, obtain an aggregated computing power request, and forward the aggregated computing power request to a third node device connected to the first node device.

[0169] In some embodiments, the apparatus further comprises:

[0170] The first selection module is used to select a target node device from at least two third node devices based on the second root election message from at least two third node devices if a second root election message is received from at least two third node devices within a second time period, and send a second confirmation message to the target node device, wherein the second confirmation message indicates that the target node device is elected as the root node and the target node device complies with a preset policy.

[0171] In some embodiments, the apparatus further comprises:

[0172] The second selection module is used to determine the third node device that sends the second root election message as the target node device if the number of second root election messages received within the second time period is 1, and send a second confirmation message to the target node device, the second confirmation message indicates that the target node device is elected as the root node, and the target node device complies with the preset strategy.

[0173] In some embodiments, the apparatus further comprises:

[0174] The topology confirmation module is used to record the root node carried by the second topology confirmation message if a second topology confirmation message is received, modify the root node in the second topology confirmation message to the first node device, and forward the modified second topology confirmation message.

[0175] In some embodiments, the apparatus further comprises:

[0176] The parameter transceiver module is used to receive the model parameters of any computing node in the computing cluster and send the received model parameters to the recorded root node; the parameter transceiver module is also used to receive the aggregated model parameters sent by any node device and send the received aggregated model parameters to the second node device.

[0177] In some embodiments, the apparatus further comprises:

[0178] The parameter aggregation module is used to receive the model parameters of all computing nodes in the computing cluster, aggregate the received model parameters to obtain aggregated model parameters, and send the aggregated model parameters through the data transmission path.

[0179] It should be understood that the device selection apparatus for model training corresponds to the node device in the above-mentioned method embodiment, and the modules in the apparatus and the above-mentioned other operations and / or functions are respectively various steps and methods implemented by the node device in the method embodiment to implement the specific details. Please refer to the above-mentioned method embodiment, and for the sake of brevity, they will not be repeated here.

[0180] It should be understood that when selecting equipment, the device selection device for model training only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device selection device for model training is divided into different functional modules to complete all or part of the functions described above. In addition, the device selection device for model training provided in the above embodiment belongs to the same concept as the above method embodiment. The specific implementation process is detailed in the above method embodiment, which will not be repeated here.

[0181] See also Fig. 9 , an embodiment of the present application provides a device selection apparatus for model training, the device comprising:

[0182] A sending module 901 is used to send a computing power request to a first node device in a data system, where the computing power request carries a computing power requirement of a computing cluster in the data system, where the computing power requirement indicates the computing power required by the computing cluster to perform parameter aggregation during model training;

[0183] The receiving module 902 is used to receive a first topology confirmation message, which is sent when the first node device meets the computing power requirements and is elected as the root node of the data transmission path. The first topology confirmation message indicates the data transmission path of the computing cluster in the data system.

[0184] The sending module 901 is also used to send the model parameters, and transmit the model parameters to the first node device according to the data transmission path;

[0185] The receiving module 902 is also used to receive aggregate model parameters and perform model training according to the aggregate model parameters.

[0186] It should be understood that the device selection apparatus for model training corresponds to the computing node in the above-mentioned method embodiment, and the modules in the apparatus and the above-mentioned other operations and / or functions are respectively various steps and methods implemented by the node device in the method embodiment to implement the specific details. Please refer to the above-mentioned method embodiment, and for the sake of brevity, they will not be repeated here.

[0187] It should be understood that when selecting equipment, the device selection device for model training only uses the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device selection device for model training is divided into different functional modules to complete all or part of the functions described above. In addition, the device selection device for model training provided in the above embodiment belongs to the same concept as the above method embodiment. The specific implementation process is detailed in the above method embodiment, which will not be repeated here.

[0188] The above introduces the device selection apparatus for model training provided in the embodiment of the present application. The following introduces the product form of the embodiment of the present application.

[0189] The product form of the embodiment of the present application is divided into two parts. The first part is the software protocol stack on the computing node side, and the hardware carrying the software protocol stack is the CPU (central processing unit). The second part is the software protocol stack on the switch side, and the hardware carrying the software protocol stack is the CPU. The second part can also be a hardened logic circuit or chip on the switch side, such as an FPGA (field programmable gate array).

[0190] Fig.10 It should be understood that the device described below can implement any function of the node device in any of the above methods.

[0191] Typically, the node device 1000 includes: a processor 1001 and a memory 1002 .

[0192] The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1001 may be implemented in at least one hardware form of DSP (digital signal processing), FPGA (field-programmable gate array), and PLA (programmable logic array). The processor 1001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (central processing unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1001 may be integrated with a GPU (graphics processing unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1001 may also include an AI (artificial intelligence) processor, which is used to process computing operations related to machine learning.

[0193] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1002 is used to store at least one program, which is used to be executed by the processor 1002 to implement the device selection method for model training provided in the method embodiment of the present application.

[0194] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a program code, and the program code can be executed by a node device to complete the device selection method for model training in the above embodiment. For example, the computer-readable storage medium is a non-temporary computer-readable storage medium, such as a ROM (read-only memory), a RAM (random access memory), a CD-ROM (compact disc read-only memory), a magnetic tape, a floppy disk, and an optical data storage device.

[0195] An embodiment of the present application also provides a computer program product or a computer program, which includes a program code. The computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the node device executes the above-mentioned device selection method for model training.

[0196] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the device selection method for model training in the above-mentioned method embodiments.

[0197] Among them, the device, equipment, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0198] Through the description of the above implementation methods, those skilled in the art can understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device selection method embodiment for model training provided in the above embodiment belongs to the same concept, and its specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0199] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0202] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.

[0203] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "plurality" means two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.

[0204] In this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the related concepts in a concrete way.

[0205] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0206] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0207] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A device selection method for model training, characterized in that: Executed by a first node device in a data system, the method includes: Receive a computing power request from a computing cluster, the computing power request carrying a computing power requirement of the computing cluster in the data system, the computing power requirement indicating the computing power required by the computing cluster to perform parameter aggregation during model training; If the first node device meets the computing power requirement, and the first node device receives computing power requests from all computing nodes in the computing cluster within a first time period, a first root election message is sent to multiple second node devices that send the computing power requests, where the first root election message indicates the computing power provided by the first node device; If a first confirmation message is received from any second node device, a first topology confirmation message is sent to the multiple second node devices, the first confirmation message indicating that the first node device is elected as the root node, and the first topology confirmation message indicating the data transmission path of the computing cluster in the data system.

2. The method according to claim 1, characterized in that The computing power request carries the total number of computing nodes of the computing cluster and information of a first computing node, where the first computing node is a computing node that sends the computing power request, and the method further includes: Record the total number of computing nodes and information of the first computing nodes; During the first time period, each time a computing power request is received from any second computing node in the computing cluster, the information of the second computing node is recorded, and based on the total number of recorded computing nodes and the information of the computing nodes, it is determined whether the computing power requests of all computing nodes in the computing cluster have been received.

3. The method according to claim 1, characterized in that The method further comprises: If the first node device does not meet the computing power requirement, forward the computing power request to a third node device connected to the first node device.

4. The method according to claim 1, characterized in that: The method further comprises: If the first node device meets the computing power requirement and the first node device has not received computing power requests from all computing nodes in the computing cluster within the first time period, forward the received computing power request to a third node device connected to the first node device.

5. The method according to claim 4, characterized in that The forwarding the received computing power request to a third node device connected to the first node device includes: If the number of computing power requests received is one, forwarding the computing power request to a third node device connected to the first node device; If multiple computing power requests have been received, the computing power requests received by the first node device are aggregated to obtain an aggregated computing power request, and the aggregated computing power request is forwarded to a third node device connected to the first node device.

6. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: If a second root election message is received from at least two third node devices within a second time period, a target node device is selected from the at least two third node devices based on the second root election message from the at least two third node devices, and a second confirmation message is sent to the target node device, wherein the second confirmation message indicates that the target node device is elected as the root node and the target node device complies with a preset policy.

7. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: If the number of second root election messages received within the second time period is 1, the third node device that sends the second root election message is determined as the target node device, and a second confirmation message is sent to the target node device. The second confirmation message indicates that the target node device is elected as the root node, and the target node device complies with the preset policy.

8. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: If a second topology confirmation message is received, the root node carried by the second topology confirmation message is recorded, the root node in the second topology confirmation message is modified to the first node device, and the modified second topology confirmation message is forwarded.

9. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: Receiving model parameters of any computing node in the computing cluster, and sending the received model parameters to the recorded root node; Receive the aggregation model parameters sent by any node device, and send the received aggregation model parameters to the second node device.

10. The method according to claim 1, characterized in that The method further comprises: The model parameters of all computing nodes in the computing cluster are received, the received model parameters are aggregated to obtain aggregated model parameters, and the aggregated model parameters are sent through the data transmission path.

11. A device selection method for model training, characterized in that: Executed by a computing node in a data system, the method includes: Sending a computing power request to a first node device in the data system, the computing power request carrying a computing power requirement of a computing cluster in the data system, the computing power requirement indicating the computing power required by the computing cluster to perform parameter aggregation during model training; A first topology confirmation message is received, where the first topology confirmation message is sent when the first node device meets the computing power requirement and is elected as the root node of the data transmission path, and the first topology confirmation message indicates the data transmission path of the computing cluster in the data system.

12. The method according to claim 11, characterized in that The method further comprises: Sending model parameters of model training, and transmitting the model parameters to the first node device according to the data transmission path; An aggregated model parameter is received, and model training is performed according to the aggregated model parameter.

13. A device selection apparatus for model training, characterized in that: The device comprises: A receiving module, configured to receive a computing power request from a computing cluster, wherein the computing power request carries the computing power requirement of the computing cluster in the data system, and the computing power requirement indicates the computing power required by the computing cluster for parameter aggregation during model training; A sending module, configured to send a first root election message to a plurality of second node devices that send the computing power requests if the first node device meets the computing power requirement and the first node device receives computing power requests from all computing nodes in the computing cluster within a first time period, wherein the first root election message indicates the computing power provided by the first node device; The sending module is also used to send a first topology confirmation message to the multiple second node devices if a first confirmation message is received from any second node device, the first confirmation message indicating that the first node device is elected as the root node, and the first topology confirmation message indicating the data transmission path of the computing cluster in the data system.

14. A device selection apparatus for model training, characterized in that: The device comprises: A sending module, configured to send a computing power request to a first node device in the data system, wherein the computing power request carries a computing power requirement of a computing cluster in the data system, and the computing power requirement indicates the computing power required by the computing cluster for parameter aggregation during model training; A receiving module is used to receive a first topology confirmation message, which is sent when the first node device meets the computing power requirement and is elected as the root node of the data transmission path. The first topology confirmation message indicates the data transmission path of the computing cluster in the data system.

15. A computing device, characterized in that: The computing device comprises a processor, and the processor is configured to execute program code so that the computing device performs the method according to any one of claims 1 to 12.

16. A computer-readable storage medium, characterized in that: At least one program code is stored in the storage medium, and the at least one program code is read by the processor to enable the computing device to execute the method according to any one of claims 1 to 12.