Node access method and device, electronic equipment and storage medium
By detecting the increase in the number of nodes in the federated learning task, stopping the first node and obtaining its running results, and then performing algorithm arrangement processing on the first node and the second node, the problem of reduced task efficiency caused by the increase in the number of nodes is solved and achieved. Fast re-execution of tasks and optimization of execution order.
Patent Information
- Application Number
- CN202410272253.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2024-10-18
AI Technical Summary
In federated learning tasks, as the number of nodes increases, the complexity and timing of node software installation and configuration affect network computing resources, resulting in reduced task execution efficiency. It is necessary to ensure task operation efficiency when new nodes are connected.
By detecting the increase in the number of nodes, the first node is controlled to stop executing the task and its running results are obtained. Then the algorithm is arranged for the first node and the second node to optimize and adjust the execution sequence to ensure the continued execution of the task.
It realizes the rapid re-execution of federated learning tasks when new nodes are connected, improving the operating efficiency of tasks and optimizing the execution sequence.
Smart Images

Figure CN118798386A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a node access method, device, electronic device and storage medium. Background Art
[0002] With the development of communication technology, federated learning technology has gradually matured. Federated learning is a distributed computing organization model formed by autonomous and geographically distributed sub-sites. Each node participating in federated learning joins the federated learning in an equal and mutually beneficial cooperation manner.
[0003] At present, federated learning tasks often involve multiple nodes. Due to the complex installation and configuration of the node software corresponding to each node, and the existence of a time sequence relationship between nodes, as the number of nodes increases, it may affect the network computing resources where the federated learning task is located, thereby affecting the execution efficiency of the federated learning task. In view of this situation, it is necessary to ensure the operation efficiency of the new federated learning task when a new node is connected to the federated learning task. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a node access method, device, electronic device and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a node access method, which is applied to a federated learning system, including:
[0006] When detecting that the number of nodes used to perform a federated learning task increases, controlling a first node of the federated learning task to stop performing the federated learning task; and obtaining an operation result of the first node; wherein the first node is a node that performs the federated learning task before the number of nodes increases;
[0007] Performing algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node for executing the federated learning task;
[0008] Based on the algorithm orchestration result and the operation result, the first node and the second node are controlled to continue to execute the federated learning task.
[0009] In an optional implementation, the controlling the first node and the second node to continue to execute the federated learning task based on the algorithm arrangement result and the operation result includes:
[0010] Based on the algorithm arrangement result, determine in the first nodes the nodes that have executed the federated learning task in the current learning round and whose execution order has not changed, to obtain a third node;
[0011] Based on the algorithm arrangement result, determine a node among the first node and the second node that is located after the third node and executes the federated learning task, to obtain a fourth node;
[0012] The federated learning task continues to be executed starting from the fourth node.
[0013] In an optional implementation manner, the continuing to execute the federated learning task from the fourth node includes:
[0014] Create a new task execution process;
[0015] Starting from the fourth node, the federated learning task continues to be executed on the new task execution process.
[0016] In an optional implementation, the controlling the first node and the second node to continue to execute the federated learning task based on the algorithm arrangement result and the operation result includes:
[0017] Based on the execution order included in the algorithm arrangement result, each node of the federated learning task is scheduled to obtain a scheduling result; wherein the scheduling result is used to indicate the execution information of each node and each algorithm component in the node, and each node includes the first node and the second node;
[0018] Control the first node and the second node to continue executing the federated learning task based on the scheduling processing result and the running result.
[0019] In an optional implementation, the scheduling process is performed on each node of the federated learning task based on the execution order included in the algorithm arrangement result to obtain the scheduling process result, including:
[0020] Based on the execution order included in the algorithm arrangement result, determine the node execution information of each node, and determine the component execution information of each algorithm component in each node; wherein the node execution information includes the node execution state and the node execution order, and the component execution information includes the component execution state and the component execution order;
[0021] Based on the node execution information and the component execution information, the scheduling processing result is determined, and the component execution information and / or node execution information corresponding to the scheduling processing result is sent to each of the nodes.
[0022] In an optional implementation manner, performing algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result includes:
[0023] Determine a node list and a component list corresponding to the federated learning task; the node list includes node information of each node used to execute the federated learning task, and the component list includes component information of each algorithm component in each node used to execute the federated learning task;
[0024] Determining a node execution order of each node in the node list, and determining a component execution order of the algorithm components included in each of the nodes;
[0025] The algorithm arrangement result is determined based on the node execution order and the component execution order.
[0026] In an optional implementation manner, after completing the federated learning task, the method further includes:
[0027] In response to a task termination request of a target node, the node information of the target node is deleted from the node list, and the component information of the algorithm component in the target node is deleted from the component list.
[0028] In an optional implementation manner, the method further includes:
[0029] In response to the node joining request of the second node, sending a node software installation package to the second node;
[0030] When it is detected that the second node has completed the installation of the node software installation package, performing a validity check on the node software installed by the second node;
[0031] When it is verified that the node software installed on the second node is the node software installation package, the second node is registered.
[0032] In an optional implementation manner, after registering the second node, the method further includes:
[0033] In response to the task joining request of the second node, performing a validity check on the node software installed by the second node;
[0034] When it is verified that the node software installed on the second node is the node software installation package, it is determined that an increase in the number of nodes used to execute the federated learning task is detected.
[0035] In a second aspect, an embodiment of the present disclosure further provides a node access device, including:
[0036] A detection module, configured to control a first node of the federated learning task to stop executing the federated learning task when detecting that the number of nodes for executing the federated learning task increases; and obtain an operation result of the first node; wherein the first node is a node that executes the federated learning task before the number of nodes increases;
[0037] An algorithm arrangement module, used to perform algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node to execute the federated learning task;
[0038] An algorithm scheduling module is used to control the first node and the second node to continue to execute the federated learning task based on the algorithm scheduling result and the operation result.
[0039] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0040] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0041] When the number of nodes increases, the first node is controlled to stop executing the federated learning task, and its running results are obtained, and then the first node and the newly added second node are processed by algorithm arrangement. The algorithm arrangement result includes the execution order of each node and each algorithm component, thereby optimizing and adjusting the node execution order. In the case that a new node needs to be connected in the federated learning task, the federated learning task can be quickly re-executed.
[0042] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0044] Figure 1 A flowchart of a node access method provided by an embodiment of the present disclosure is shown;
[0045] Figure 2 A flowchart showing a specific method for controlling a first node and a second node to continue to perform a federated learning task in a node access method provided in an embodiment of the present disclosure is shown;
[0046] Figure 3 A schematic diagram of a node access device provided by an embodiment of the present disclosure is shown;
[0047] Figure 4 An interactive schematic diagram of a node access method provided by an embodiment of the present disclosure is shown;
[0048] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0050] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0051] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0052] Research has found that with the development of communication technology, federated model computing technology has gradually matured. Federated model computing is a distributed computing organization model formed by autonomous and geographically distributed sub-sites, and each node joins the federated model in an equal and mutually beneficial cooperation manner.
[0053] At present, federated learning tasks often involve multiple nodes. Due to the complex installation and configuration of the node software corresponding to each node, and the existence of a time sequence relationship between nodes, as the number of nodes increases, it may affect the network computing resources where the federated learning task is located, thereby affecting the execution efficiency of the federated learning task. In view of this situation, it is necessary to ensure the operation efficiency of the new federated learning task when a new node is connected to the federated learning task.
[0054] Based on the above research, the present disclosure provides a node access method. When the number of nodes is detected to increase, the first node is controlled to stop executing the federated learning task, and its running results are obtained, and then the first node and the newly added second node are processed by algorithm arrangement. The algorithm arrangement result includes the execution order of each node and each algorithm component, thereby optimizing and adjusting the node execution order. In the case where a new node needs to be accessed in the federated learning task, the federated learning task can be quickly re-executed.
[0055] To facilitate understanding of this embodiment, a node access method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the node access method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the node access method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0056] See also Figure 1As shown, it is a flowchart of a node access method provided by an embodiment of the present disclosure, the method includes steps S101 to S103, and is applied to a federated learning system, wherein:
[0057] S101. When detecting that the number of nodes used to execute a federated learning task increases, control the first node of the federated learning task to stop executing the federated learning task; and obtain the operation result of the first node; wherein the first node is the node that executes the federated learning task before the number of nodes increases.
[0058] In an embodiment of the present disclosure, the nodes used for the federated learning task can be traversed at preset intervals by a node scheduling module in the federated learning system. When the node scheduling module detects that the number of nodes in the federated learning task has increased compared to the last traversal, the first node of the federated learning task can be controlled to stop executing the federated learning task.
[0059] Here, the node scheduling module can be used to control the first node that is executing the federated learning task to suspend execution.
[0060] Here, after the node scheduling module controls the first node that is executing in the federated learning task to suspend execution, the running result of the first node that has completed the current execution round can be obtained from the context management module in the federated learning system.
[0061] S102. Perform algorithm orchestration processing on the first node and the second node to obtain an algorithm orchestration result; the algorithm orchestration result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node for executing the federated learning task.
[0062] In an embodiment of the present disclosure, when the first node or the second node provides a modeling requirement, the algorithm orchestration module in the federated learning system can perform algorithm orchestration processing in combination with the modeling requirements provided by the first node and the second node to obtain an algorithm orchestration result.
[0063] Here, the modeling requirements include which node (the first node or the second node) any node (the first node or the second node) in the federated learning task needs to run after and / or which node (the first node or the second node) needs to run before.
[0064] Here, when the first node and the second node do not provide modeling requirements, the algorithm orchestration module can combine the required computing power of the first node and the second node, perform algorithm orchestration processing on the first node and the second node, and obtain an algorithm orchestration result.
[0065] Here, each node (first node or second node) in the federated learning task may correspond to multiple or one or more algorithm components, that is, each node (first node or second node) may rely on one or more algorithm components to run.
[0066] Here, after obtaining the running order of the first node and the second node, the algorithm components corresponding to the first node and the second node can be orchestrated by the algorithm orchestration component to determine the execution order of the algorithm components corresponding to the first node and the second node to ensure that the first node and the second node can run successfully.
[0067] S103: Control the first node and the second node to continue to execute the federated learning task based on the algorithm arrangement result and the operation result.
[0068] In an embodiment of the present disclosure, the algorithm scheduling module can schedule the first node and the second node according to the algorithm scheduling result and the operation result of the first node in the current round when the first node stops executing the federated learning task.
[0069] Here, the first node of the running result of the round when the running order has not been changed and the execution of the federated learning task is stopped can be obtained through the breakpoint management module.
[0070] Here, the algorithm scheduling module can control the first node obtained by the breakpoint management module to suspend the first execution round when the federated learning task is re-executed, and use the running result of the round in which the first node stops executing the federated learning task as the running result of the first node in the first execution round when the federated learning task is re-executed.
[0071] Here, the algorithm scheduling module can control the first node or the second node running after the first node obtained by the breakpoint management module to re-execute the federated learning task.
[0072] In an embodiment of the present disclosure, first, when the number of nodes used to perform a federated learning task is detected to increase, the first node of the federated learning task is controlled to stop performing the federated learning task; and the operation result of the first node is obtained. Secondly, the algorithm arrangement processing is performed on the first node and the second node to obtain the algorithm arrangement result. Finally, based on the algorithm arrangement result and the operation result, the first node and the second node are controlled to continue to perform the federated learning task.
[0073] In the above implementation, when the number of nodes is detected to increase, the first node is controlled to stop executing the federated learning task, and its running result is obtained, and then the first node and the newly added second node are processed by algorithm arrangement. The algorithm arrangement result includes the execution order of each node and each algorithm component, thereby optimizing and adjusting the node execution order. In the case where a new node needs to be connected in the federated learning task, the federated learning task can be quickly re-executed.
[0074] In an optional implementation, the above steps control the first node and the second node to continue to perform the federated learning task based on the algorithm arrangement result and the operation result, and specifically include the following steps:
[0075] First, based on the algorithm arrangement result, determine in the first node the nodes that have executed the federated learning task in the current learning round and whose execution order has not changed, and obtain the third node;
[0076] Secondly, based on the algorithm arrangement result, determine the node that performs the federated learning task after the third node among the first node and the second node, and obtain the fourth node;
[0077] Finally, the federated learning task continues from the fourth node.
[0078] In an embodiment of the present disclosure, the current learning round is the round in which the federated learning task is executed before the first node is controlled to stop executing the federated learning task.
[0079] Here, the breakpoint management module can compare the execution order of the first node in the current learning round with the execution order of the first node in the algorithm arrangement result, and determine the first node whose execution order has not been changed as the intermediate node.
[0080] Here, after obtaining the intermediate node, the breakpoint management module can be used to determine in the context manager module whether there is an operation result of the intermediate node in the current learning round. The context manager module is used to record the operation results obtained by each node executing the federated learning task after each round of operation.
[0081] Here, when the breakpoint management module determines that there is an intermediate node in the context manager module with the running result of the current learning round, the intermediate node is determined as the third node.
[0082] In an embodiment of the present disclosure, after the third node is determined, the first node or the second node executed after the third node may be determined as the fourth node through the breakpoint management module.
[0083] Here, after determining the fourth node, the algorithm scheduling module can control the fourth node to continue to execute the federated learning task.
[0084] In an optional implementation, the above steps continue to execute the federated learning task starting from the fourth node, specifically including the following steps:
[0085] First, create a new task execution process;
[0086] Secondly, starting from the fourth node, the federated learning task continues to be executed on the new task execution process.
[0087] In an embodiment of the present disclosure, a new task execution process may be created in the federated learning system to execute the federated learning task.
[0088] Here, after the new task execution process is created, the new task execution process can be run from the fourth node to execute the federated learning task on the new task execution process.
[0089] In the above implementation, after the first node and the second node are re-orchestrated and the node orchestration result is obtained, the federated learning task is not executed on the original execution process. Instead, a new task execution process is re-created, and the federated learning task is executed on the new task execution process to achieve a cold start of the federated learning task.
[0090] In an optional embodiment, if Figure 2 As shown, it is a flowchart of a specific method for controlling the first node and the second node to continue to perform the federated learning task in the node access method provided in the embodiment of the present disclosure. The above steps control the first node and the second node to continue to perform the federated learning task based on the algorithm arrangement result and the operation result, and specifically include the following steps:
[0091] S201, based on the execution order included in the algorithm arrangement result, schedule each node of the federated learning task to obtain a scheduling result; wherein the scheduling result is used to indicate the execution information of each node and each algorithm component in the node, and each node includes a first node and a second node;
[0092] S202, control the first node and the second node to continue to execute the federated learning task based on the scheduling processing result and the operation result.
[0093] In an embodiment of the present disclosure, the algorithm scheduling module can obtain a scheduling processing result based on the execution order of each node and the component corresponding to each node in the algorithm orchestration result, as well as the execution method (for example, node parallel execution, node serial execution, node sequential execution, component parallel execution, component sequential execution and component serial execution).
[0094] Here, the execution information of each node and each algorithm component in the node includes execution sequence information, execution state information and execution mode information of each node and each algorithm component in the node.
[0095] Here, the node scheduling module can be used to control the fourth node to continue executing the federated learning task based on each node and each algorithm component in the node.
[0096] In an optional implementation, the above steps schedule each node of the federated learning task based on the execution order included in the algorithm arrangement result to obtain a scheduling result, which specifically includes the following steps:
[0097] First, based on the execution order included in the algorithm arrangement result, the node execution information of each node and the component execution information of each algorithm component in each node are determined; wherein the node execution information includes the node execution state and the node execution order, and the component execution information includes the component execution state and the component execution order;
[0098] Then, based on the node execution information and the component execution information, a scheduling processing result is determined, and the corresponding component execution information and / or node execution information in the scheduling processing result is sent to each node.
[0099] In an embodiment of the present disclosure, first, the node scheduling module in the algorithm scheduling module can determine the node execution order of each node based on the execution order included in the algorithm arrangement result. Then, the task scheduling module in the algorithm scheduling module can determine the component execution information of each algorithm component in each node according to the node execution order of each node.
[0100] Here, the node execution state includes node suspension execution and node continuation execution; the component execution state includes component suspension execution and component continuation execution.
[0101] Here, the node execution order is the node execution order information of each node. The node execution order information of each node can be used to indicate a node adjacent to the node in the execution order and running before the node and a node adjacent to the node in the execution order and running after the node.
[0102] Here, the component execution order is the component execution order information of each algorithm component. The component execution order information of each algorithm component can be used to indicate an algorithm component that is adjacent to the algorithm component in execution order and runs before the algorithm component and an algorithm component that is adjacent to the algorithm component in execution order and runs after the algorithm component.
[0103] In the embodiment of the present disclosure, the node scheduling module can control any first node or second node to suspend operation when it is running, and can also control any first node or second node that is not running to start running.
[0104] In the embodiment of the present disclosure, the component scheduling module can control any algorithm component to pause running during running, and can also control any algorithm component that is not running to start running.
[0105] In the embodiments of the present disclosure, the node execution information and the component execution information may be used as the scheduling processing result, and the corresponding scheduling processing result may be sent to each node and the algorithm component corresponding to each node.
[0106] In an optional implementation, the above steps perform algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result, which specifically includes the following steps:
[0107] First, determine the node list and component list corresponding to the federated learning task; the node list contains the node information of each node used to execute the federated learning task, and the component list contains the component information of each algorithm component in each node used to execute the federated learning task;
[0108] Secondly, determine the node execution order of each node in the node list, and determine the component execution order of the algorithm components contained in each node;
[0109] Finally, the algorithm orchestration result is determined based on the node execution order and component execution order.
[0110] In an embodiment of the present disclosure, first, the algorithm arrangement module can confirm the node list of the nodes executing the federated learning task. Among them, the node information contained in the node list includes the node identification, node execution requirements and node description information of each node. Among them, the node execution requirements are used to indicate the execution order that the node needs to execute and the indication information that it needs to be adjacent to other nodes; the node description information includes the computing resources required to run the corresponding node.
[0111] Secondly, the algorithm arrangement module can determine the component list based on the node list. The component list contains component information including algorithm component identification, component execution requirements, and component description information. The component execution requirements are used to indicate the execution order between algorithm components and the need to be adjacent to other components; the component description information includes the computing resources required to run the corresponding algorithm component.
[0112] Secondly, the algorithm orchestration module can determine the node execution order of each node executing the federated learning task based on the node execution requirements and node description information in the node information.
[0113] Secondly, after determining the node execution order, the algorithm arrangement module can determine the component execution order of the components corresponding to each node according to the node execution order.
[0114] Finally, the algorithm orchestration component can determine the node execution order and the component execution order as the algorithm orchestration result.
[0115] In an optional implementation, after completing the federated learning task, the following steps are further included:
[0116] In response to the task termination request of the target node, the node information of the target node is deleted from the node list, and the component information of the algorithm component in the target node is deleted from the component list.
[0117] In the embodiment of the present disclosure, here, when each node executing the federated learning task needs to exit the federated execution task, a task termination request can be sent to the federated learning system. After receiving the task termination request, the federated learning system can use the node corresponding to the task termination request as the target node.
[0118] Here, a preset number of executions may also be set for each node executing the federated learning task. When the execution number of any node among the nodes is greater than or equal to the preset number of executions, the node is used as the target node, and a task termination request for the target node is sent to the federated learning system.
[0119] Here, the federated learning system can delete the node information of the target node in the learning list of the federated learning task. In this way, the federated learning task cannot make the target node continue to run through the node scheduling module, and cannot make the algorithm component corresponding to the target node continue to run through the component scheduling module.
[0120] In an optional implementation, the node access method further includes the following steps:
[0121] First, in response to a node joining request of the second node, a node software installation package is sent to the second node;
[0122] Secondly, when it is detected that the second node has completed the installation of the node software installation package, the legality of the node software installed by the second node is verified;
[0123] Finally, when it is verified that the node software installed on the second node is a node software installation package, the second node is registered.
[0124] In an embodiment of the present disclosure, the second node may send a node joining request to the federated learning system through a node device where the second node is located.
[0125] Here, after the federated learning system detects the node joining request sent by the node device, the node creation module can generate a node identification of the second node based on the node joining request and send a node software installation package to the node device of the second node. Wherein, the node joining request includes the node description information of the second node.
[0126] Here, after receiving the node software installation package, the node device of the second node may install the node software installation package into the node device of the second node.
[0127] Here, when the node device of the second node completes the installation of the node software installation package, an installation completion notification may be sent to the federated learning system. The federated learning system may determine the legitimacy of the node software installed by the node device of the second node by determining whether the node software installed by the node device of the second node is the node software installation package sent by the federated learning system.
[0128] Here, in the case where the node software installed in the node device of the second node is a node software installation package sent by the federated learning system, the node registration module can register the second node.
[0129] Among them, the node software can be used to receive control instructions sent by the algorithm scheduling module of the federated learning system.
[0130] In an optional implementation manner, after registering the second node, the following steps are further included:
[0131] First, in response to the task joining request of the second node, the legality of the node software installed by the second node is verified;
[0132] Secondly, when it is verified that the node software installed on the second node is a node software installation package, it is determined that an increase in the number of nodes used to execute the federated learning task is detected.
[0133] In an embodiment of the present disclosure, there are multiple federated learning tasks in the federated learning system, and after the second node is registered, the node device of the second node can send a task joining request to the federated learning system, wherein the task joining request is used to indicate the federated learning task that the second node joins.
[0134] Here, after the federated learning system receives the task joining request, it can again determine whether the node software installed in the node device of the second node is the node software installation package provided by the federated learning system.
[0135] Here, when it is verified that the node software installed on the second node is a node software installation package, the node information of the second node can be added to the node list of the federated learning task.
[0136] In the above implementation, not only is the legitimacy of the second node verified before the second node is registered, but the legitimacy of the second node is also verified again before the second node joins the federated task, thereby improving the security of the federated learning system.
[0137] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0138] Based on the same inventive concept, a node access device corresponding to the node access method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned node access method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0139] Reference Figure 3 As shown, it is a schematic diagram of a node access method provided by an embodiment of the present disclosure, and the device includes: a detection module 11, an algorithm arrangement module 12, and an algorithm scheduling module 13; wherein,
[0140] A detection module, configured to control a first node of the federated learning task to stop executing the federated learning task when detecting that the number of nodes for executing the federated learning task increases; and obtain an operation result of the first node; wherein the first node is a node that executes the federated learning task before the number of nodes increases;
[0141] An algorithm arrangement module, used to perform algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node to execute the federated learning task;
[0142] An algorithm scheduling module is used to control the first node and the second node to continue to execute the federated learning task based on the algorithm scheduling result and the operation result.
[0143] In an embodiment of the present disclosure, first, when the number of nodes used to perform a federated learning task is detected to increase, the first node of the federated learning task is controlled to stop performing the federated learning task; and the operation result of the first node is obtained. Secondly, the algorithm arrangement processing is performed on the first node and the second node to obtain the algorithm arrangement result. Finally, based on the algorithm arrangement result and the operation result, the first node and the second node are controlled to continue to perform the federated learning task.
[0144] In the above implementation, when the number of nodes is detected to increase, the first node is controlled to stop executing the federated learning task, and its running result is obtained, and then the first node and the newly added second node are processed by algorithm arrangement. The algorithm arrangement result includes the execution order of each node and each algorithm component, thereby optimizing and adjusting the node execution order. In the case where a new node needs to be connected in the federated learning task, the federated learning task can be quickly re-executed.
[0145] In a possible implementation, the algorithm arrangement module is further used to: determine, based on the algorithm arrangement result, in the first nodes, nodes that have executed the federated learning task in the current learning round and whose execution order has not changed, to obtain a third node;
[0146] Based on the algorithm arrangement result, determine a node among the first node and the second node that is located after the third node and executes the federated learning task, to obtain a fourth node;
[0147] The federated learning task continues to be executed starting from the fourth node.
[0148] In a possible implementation, the algorithm scheduling module is specifically used to: schedule each node of the federated learning task based on the execution order included in the algorithm arrangement result to obtain a scheduling result; wherein the scheduling result is used to indicate the execution information of each node and each algorithm component in the node, and each node includes the first node and the second node;
[0149] Control the first node and the second node to continue executing the federated learning task based on the scheduling processing result and the running result.
[0150] In a possible implementation, the algorithm scheduling module includes a node scheduling module and a component scheduling module.
[0151] The node scheduling module is specifically used to determine the node execution information of each node based on the execution order included in the algorithm arrangement result.
[0152] The component scheduling module is specifically used to: determine the component execution information of each algorithm component in each of the nodes; wherein the node execution information includes the node execution state and the node execution order, and the component execution information includes the component execution state and the component execution order.
[0153] In a possible implementation, the algorithm orchestration module is specifically used to: determine a node list and a component list corresponding to the federated learning task; the node list includes node information of each node used to execute the federated learning task, and the component list includes component information of each algorithm component in each node used to execute the federated learning task;
[0154] Determining a node execution order of each node in the node list, and determining a component execution order of the algorithm components included in each of the nodes;
[0155] The algorithm arrangement result is determined based on the node execution order and the component execution order.
[0156] In a possible implementation manner, the device further includes a node creation module 14, configured to: send a node software installation package to the second node in response to a node joining request of the second node.
[0157] The second node may send a node joining request to the federated learning system through the node device where the second node is located.
[0158] Here, after the federated learning system detects the node joining request sent by the node device, the node creation module can generate a node identification of the second node based on the node joining request and send a node software installation package to the node device of the second node. Wherein, the node joining request includes the node description information of the second node.
[0159] Here, after receiving the node software installation package, the node device of the second node may install the node software installation package into the node device of the second node.
[0160] In a possible implementation manner, the device further includes a node registration module 15, which is used to: when it is detected that the second node has completed the installation of the node software installation package, perform a validity check on the node software installed by the second node;
[0161] When it is verified that the node software installed on the second node is the node software installation package, the second node is registered.
[0162] In a possible implementation, the device further includes a node deregistration module 16, which is used to: in response to a task termination request of the target node, delete the node information of the target node in the node list, and delete the component information of the algorithm component in the target node in the component list.
[0163] In a possible implementation manner, the device further includes a lifecycle management module 17, wherein the lifecycle management module includes: a breakpoint management module and a context management module.
[0164] The breakpoint management module is specifically used to compare the execution order of the first node in the current learning round with the execution order of the first node in the algorithm arrangement result, and determine the first node whose execution order has not been changed as the intermediate node.
[0165] Here, after obtaining the intermediate node, the breakpoint management module can be used to determine in the context manager module whether there is an operation result of the intermediate node in the current learning round. The context manager module is used to record the operation results obtained by each node executing the federated learning task after each round of operation.
[0166] In an embodiment of the present disclosure, after the third node is determined, the first node or the second node executed after the third node may be determined as the fourth node through the breakpoint management module.
[0167] The context management module is specifically used to: when the breakpoint management module determines that there is an intermediate node in the context manager module in the running result of the current learning round, determine the intermediate node as the third node
[0168] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0169] Corresponds to Figure 1 The node connection method in the present disclosure also provides an interactive schematic diagram of the node access method, such as Figure 4 As shown, including:
[0170] Federated learning system and node devices of each node that performs federated learning tasks.
[0171] Here, the system management and scheduling layer of the federated learning system includes node creation function, node registration function, node orchestration function, node deregistration function, scheduling management function and life cycle management function.
[0172] The scheduling management function includes node scheduling function and component scheduling function. The life cycle management function includes breakpoint management function and context management function.
[0173] Here, the node creation function is used to send a node software installation package to the second node in response to the node joining request of the second node.
[0174] The node registration function is used to verify the legitimacy of the node software installed by the second node when it is detected that the second node has completed the installation of the node software installation package; and to register the second node when it is verified that the node software installed by the second node is the node software installation package.
[0175] The node arrangement function is used to perform algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result.
[0176] The node deregistration function is used to respond to a task termination request of a target node, delete the node information of the target node in the node list, and delete the component information of the algorithm component in the target node in the component list.
[0177] The scheduling management function is used to control the first node and the second node to continue to execute the federated learning task based on the algorithm orchestration result and the operation result.
[0178] The lifecycle management function is used to determine, based on the algorithm orchestration result, a node in the first node that has executed the federated learning task in the current learning round and whose execution order has not changed, to obtain a third node; based on the algorithm orchestration result, determine a node in the first node and the second node that executes the federated learning task after the third node, to obtain a fourth node.
[0179] The node device is used to install the node software sent by the federated learning system.
[0180] Here, the node software includes an algorithm orchestration synchronization function, a node scheduling synchronization function, a component scheduling synchronization function, a breakpoint management synchronization function, and a context management synchronization function.
[0181] The algorithm orchestration synchronization function is used to receive the algorithm orchestration results sent by the federated learning system.
[0182] The node scheduling synchronization function is used to receive control instructions sent by the node scheduling function in the federated learning system and adjust the node status according to the control instructions.
[0183] The component scheduling synchronization function is used to receive control instructions sent by the component scheduling function in the federated learning system, and adjust the status of the algorithm components according to the control instructions.
[0184] The breakpoint management synchronization function is used to receive breakpoint information (for example, node information of the fourth node) sent by the federated learning system.
[0185] The context management function is used to synchronize the context relationship function in the federated learning system to record the operation results of the nodes corresponding to the node devices.
[0186] Here, the node device also includes a node engine layer and a node resource layer. The node engine layer is used to implement the functions corresponding to the node device. The node resource layer is used to store the node information of the node corresponding to the node device.
[0187] Corresponds to Figure 1 The node access method in the present disclosure also provides an electronic device 500, such as Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present disclosure, including:
[0188] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including memory 521 and external memory 522; memory 521 here is also called internal memory, which is used to temporarily store operation data in processor 51 and data exchanged with external memory 522 such as hard disk. Processor 51 exchanges data with external memory 522 through memory 521. When the electronic device 500 is running, the processor 51 communicates with the memory 52 through bus 53, so that the processor 51 executes the following instructions:
[0189] When detecting that the number of nodes used to perform a federated learning task increases, controlling a first node of the federated learning task to stop performing the federated learning task; and obtaining an operation result of the first node; wherein the first node is a node that performs the federated learning task before the number of nodes increases;
[0190] Performing algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node for executing the federated learning task;
[0191] Based on the algorithm orchestration result and the operation result, the first node and the second node are controlled to continue to execute the federated learning task.
[0192] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the node access method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0193] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the node access method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0194] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0195] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, 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 communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] In addition, each functional unit in each embodiment of the present disclosure 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.
[0198] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0199] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A node access method, It is characterized in that Applied to federated learning systems, including: When detecting that the number of nodes used to perform a federated learning task increases, controlling a first node of the federated learning task to stop performing the federated learning task; and obtaining an operation result of the first node; wherein the first node is a node that performs the federated learning task before the number of nodes increases; Performing algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node for executing the federated learning task; Based on the algorithm orchestration result and the operation result, the first node and the second node are controlled to continue to execute the federated learning task.
2. The method according to claim 1, It is characterized in that The controlling the first node and the second node to continue to execute the federated learning task based on the algorithm arrangement result and the operation result includes: Based on the algorithm arrangement result, determine in the first nodes the nodes that have executed the federated learning task in the current learning round and whose execution order has not changed, to obtain a third node; Based on the algorithm arrangement result, determine a node among the first node and the second node that is located after the third node and executes the federated learning task, to obtain a fourth node; The federated learning task continues to be executed starting from the fourth node.
3. The method according to claim 2, It is characterized in that The continuing to execute the federated learning task from the fourth node includes: Create a new task execution process; Starting from the fourth node, the federated learning task continues to be executed on the new task execution process.
4. The method according to claim 1, It is characterized in that The controlling the first node and the second node to continue to execute the federated learning task based on the algorithm arrangement result and the operation result includes: Based on the execution order included in the algorithm arrangement result, each node of the federated learning task is scheduled to obtain a scheduling result; wherein the scheduling result is used to indicate the execution information of each node and each algorithm component in the node, and each node includes the first node and the second node; Control the first node and the second node to continue executing the federated learning task based on the scheduling processing result and the running result.
5. The method according to claim 4, It is characterized in that The execution order included in the algorithm arrangement result is used to schedule each node of the federated learning task to obtain a scheduling result, including: Based on the execution order included in the algorithm arrangement result, determine the node execution information of each node, and determine the component execution information of each algorithm component in each node; wherein the node execution information includes the node execution state and the node execution order, and the component execution information includes the component execution state and the component execution order; Based on the node execution information and the component execution information, the scheduling processing result is determined, and the component execution information and / or node execution information corresponding to the scheduling processing result is sent to each of the nodes.
6. The method according to claim 1, It is characterized in that The performing algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result includes: Determine a node list and a component list corresponding to the federated learning task; the node list includes node information of each node used to execute the federated learning task, and the component list includes component information of each algorithm component in each node used to execute the federated learning task; Determining a node execution order of each node in the node list, and determining a component execution order of the algorithm components included in each of the nodes; The algorithm arrangement result is determined based on the node execution order and the component execution order.
7. The method according to claim 6, It is characterized in that After completing the federated learning task, the method further includes: In response to a task termination request of a target node, the node information of the target node is deleted from the node list, and the component information of the algorithm component in the target node is deleted from the component list.
8. The method according to claim 1, It is characterized in that The method further comprises: In response to the node joining request of the second node, sending a node software installation package to the second node; When it is detected that the second node has completed the installation of the node software installation package, performing a validity check on the node software installed by the second node; When it is verified that the node software installed on the second node is the node software installation package, the second node is registered.
9. The method according to claim 8, It is characterized in that After registering the second node, the method further includes: In response to the task joining request of the second node, performing a validity check on the node software installed by the second node; When it is verified that the node software installed on the second node is the node software installation package, it is determined that an increase in the number of nodes used to execute the federated learning task is detected.
10. A node access device, It is characterized in that include: A detection module, configured to control a first node of the federated learning task to stop executing the federated learning task when detecting that the number of nodes for executing the federated learning task increases; and obtain an operation result of the first node; wherein the first node is a node that executes the federated learning task before the number of nodes increases; An algorithm arrangement module, used to perform algorithm arrangement processing on the first node and the second node to obtain an algorithm arrangement result; the algorithm arrangement result includes the execution order of each node in the federated learning task and each algorithm component in the node, and the second node is a newly added node to execute the federated learning task; An algorithm scheduling module is used to control the first node and the second node to continue to execute the federated learning task based on the algorithm scheduling result and the operation result.
11. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the node access method as described in any one of claims 1 to 9 are performed.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the node access method according to any one of claims 1 to 9 are executed.
