Task execution method, device, central node and downstream node equipment
Through resource quota comparison and task waiting queue management between the central node and downstream nodes in multi-party security computing, the problem of resource scheduling complexity and low efficiency in MPC training scenarios is solved, and rapid task execution and resource efficiency are achieved. use.
Patent Information
- Application Number
- CN202210397550.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In the multi-party secure computing (MPC) training scenario, when multiple parties jointly execute training tasks, the existing technology is difficult to effectively schedule resources, resulting in low resource utilization efficiency and high complexity, unable to fully utilize the computing resources of downstream nodes, and affecting the execution of training tasks. speed.
Get the training task creation request through the central node, compare the preset resource quota with the total resources of the downstream nodes, create and start the training task, and implement the waiting queue management of the task in the downstream node to ensure that the task is started and released according to the available resources. , thereby reducing the complexity of resource scheduling and making full use of the computing resources of downstream nodes.
It realizes starting training tasks based on the currently available resources of each downstream node, reducing the complexity of resource scheduling, speeding up the execution of training tasks, and making full use of the computing resources of downstream nodes.
Smart Images

Figure CN114741175B_ABST
Abstract
Description
[Technical field]
[0001] The embodiments of this specification relate to the field of Internet technology, and in particular, to a task execution method, apparatus, central node, and downstream node device. [Background technology]
[0002] Multi-party computation (MPC) refers to the use of cryptographic algorithms such as secret sharing, obfuscated circuits and / or homomorphic encryption to mine data value without leaving the domain, while meeting data security, privacy protection and regulatory compliance requirements.
[0003] In the MPC training scenario, multiple parties need to jointly conduct training. The training tasks will be sent to each training party for training, but the training node configurations used by each training party are inconsistent, and the resource occupancy of each training task is also different. Therefore, a solution is needed to schedule resources for training tasks. [Summary of the invention]
[0004] The embodiments of this specification provide a task execution method, apparatus, central node and downstream node device to create training tasks based on the total resources of each downstream node participating in the training, fully utilize the computing resources of each downstream node, and speed up the execution of the training tasks.
[0005] In a first aspect, an embodiment of the present specification provides a task execution method, which is applied to a target downstream node that performs a training task for multi-party secure computing, the method comprising: obtaining a training task, the training task including a resource quota required for the training task; wherein the training task is created at each downstream node after a central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task; the central node is the central node that performs the training task for multi-party secure computing; if the resource quota required for the training task is less than or equal to the currently available resources of the target downstream node, starting the training task and waiting for other downstream nodes participating in the training to start the training task; and determining to execute the training task based on the start status of the training tasks in other downstream nodes participating in the training.
[0006] In the above-mentioned task execution method, after the target downstream node obtains the training task, if the resource quota required for the above-mentioned training task is less than or equal to the currently available resources of the target downstream node, the above-mentioned training task is started, and waits for other downstream nodes participating in the training to start the training task. Then, according to the start status of the training tasks in other downstream nodes participating in the training, it is determined to execute the above-mentioned training task, so that the downstream node can start the training task according to its own currently available resources, reducing the complexity of resource scheduling, and can make full use of the computing resources of the downstream nodes, thereby speeding up the execution speed of the training tasks.
[0007] In one possible implementation, determining to execute the training task according to the startup status of the training tasks in other downstream nodes participating in the training includes: if the training tasks in other downstream nodes participating in the training are all started normally, starting to execute the training task.
[0008] In one possible implementation, determining to execute the training task based on the initiation status of the training tasks in other downstream nodes participating in the training includes: if after the waiting timeout of the training task initiated by the target downstream node, there are still downstream nodes among the other downstream nodes participating in the training that have not started the training task, then adding the training task initiated by the target downstream node to the waiting queue of the target downstream node.
[0009] In one possible implementation, after starting to execute the training task, it also includes: after the execution of the training task is completed, releasing the resources occupied by the training task, obtaining the next training task from the waiting queue of the target downstream node; and starting the next training task.
[0010] In one possible implementation, after acquiring the training task, the method further includes: if the resource quota required by the training task is greater than the resources currently available to the target downstream node, adding the training task to a waiting queue of the target downstream node.
[0011] In a second aspect, an embodiment of the present specification provides a task execution method, which is applied to a central node of a training task for executing multi-party secure computing, the method comprising: obtaining a training task establishment request; wherein the training task establishment request includes the operator types included in the training task to be established and the downstream nodes participating in the training; determining the resource quota required for the training task to be established based on the pre-set resource quota corresponding to each operator type; comparing the resource quota required for the training task to be established with the total resources of each downstream node participating in the training; if the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established, creating the training task to be established at the downstream node participating in the training; wherein the training task includes the resource quota required for the training task.
[0012] In the above task execution method, after the central node obtains the training task establishment request, it determines the resource quota required for the training task to be established based on the pre-set resource quota corresponding to each operator type, and then compares the resource quota required for the training task to be established with the total resources of each downstream node participating in the training. If the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established, the training task to be established is created in each downstream node participating in the training. In this way, the training task can be started according to the currently available resources of each downstream node, the computing resources of each downstream node can be fully utilized, and the execution speed of the training task can be accelerated.
[0013] In one possible implementation, after comparing the resource quota required for the training task to be established with the total resources of each downstream node participating in the training, it also includes: if there are downstream nodes among the downstream nodes participating in the training whose total resources are less than the resource quota required for the training task to be established, it is determined that the creation of the training task to be established has failed.
[0014] In a third aspect, an embodiment of the present specification provides a task execution device, which is arranged in a target downstream node for executing a training task for multi-party secure computing, and the device includes: an acquisition module, used to acquire a training task, wherein the training task includes a resource quota required for the training task; wherein the training task is created at each downstream node after the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task; the central node is the central node for executing the training task for multi-party secure computing; a startup module, used to start the training task when the resource quota required for the training task is less than or equal to the currently available resources of the target downstream node, and wait for other downstream nodes participating in the training to start the training task; an execution module, used to determine to execute the training task according to the startup status of the training task in other downstream nodes participating in the training.
[0015] In one possible implementation, the execution module is specifically configured to start executing the training task when the training tasks in other downstream nodes participating in the training are all started normally.
[0016] In one possible implementation, the execution module is specifically used to add the started training task to the waiting queue of the target downstream node if there are still downstream nodes that have not started the training task among other downstream nodes participating in the training after the waiting timeout of the started training task.
[0017] In one possible implementation, the device also includes: a release module; the release module is used to release the resources occupied by the training task after the execution of the training task is completed; the acquisition module is also used to obtain the next training task from the waiting queue of the target downstream node; the start module is also used to start the next training task.
[0018] In one possible implementation, the device also includes: a joining module, which is used to add the training task to the waiting queue of the target downstream node after the acquisition module acquires the training task, if the resource quota required by the training task is greater than the resources currently available to the target downstream node.
[0019] In a fourth aspect, an embodiment of the present specification provides a task execution device, which is arranged in a central node of a training task that performs multi-party secure computing, and the device includes: an acquisition module, used to obtain a training task establishment request; wherein the training task establishment request includes the operator type included in the training task to be established and the downstream nodes participating in the training; a determination module, used to determine the resource quota required for the training task to be established based on the pre-set resource quota corresponding to each operator type; a comparison module, used to compare the resource quota required for the training task to be established with the total resources of each downstream node participating in the training; a creation module, used to create the training task to be established in the downstream nodes participating in the training when the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established; wherein the training task includes the resource quota required for the training task.
[0020] In one possible implementation, the determination module is also used to determine that the creation of the training task to be established has failed if there is a downstream node among the downstream nodes participating in the training whose total resources are less than the resource quota required for the training task to be established after the comparison module compares the resource quota required for the training task to be established with the total resources of each downstream node participating in the training.
[0021] In a fifth aspect, an embodiment of the present specification provides a downstream node device, comprising: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the first aspect.
[0022] In a sixth aspect, an embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the first aspect.
[0023] In the seventh aspect, an embodiment of the present specification provides a central node device, comprising: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the second aspect.
[0024] In an eighth aspect, an embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the second aspect.
[0025] It should be understood that the third, fifth and sixth aspects of the embodiments of this specification are consistent with the technical solutions of the first aspect of the embodiments of this specification, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated.
[0026] It should be understood that the fourth, seventh and eighth aspects of the embodiments of this specification are consistent with the technical solutions of the second aspect of the embodiments of this specification, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated.
Brief Description of the Drawings
[0027] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A flowchart of a task execution method provided by one embodiment of this specification;
[0029] Figure 2 A flowchart of a task execution method provided by another embodiment of this specification;
[0030] Figure 3 A schematic diagram of task execution provided for one embodiment of this specification;
[0031] Figure 4 A flowchart of a task execution method provided in yet another embodiment of this specification;
[0032] Figure 5 A schematic diagram of an embodiment of state transition of a training task provided by an embodiment of this specification;
[0033] Figure 6 A schematic diagram of the structure of a task execution device provided in one embodiment of this specification;
[0034] Figure 7 A schematic diagram of the structure of a task execution device provided in another embodiment of this specification;
[0035] Figure 8 A schematic diagram of the structure of a task execution device provided in yet another embodiment of this specification;
[0036] Fig. 9 A schematic diagram of the structure of a central node device provided in one embodiment of this specification. [Specific implementation method]
[0037] In order to better understand the technical solution of this specification, the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0038] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0039] The terms used in the embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms "a", "said" and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0040] In the existing related technologies, in the MPC training scenario, when multiple parties need to jointly perform the training task, the following two methods are generally used to perform the above training task.
[0041] One method is serial execution, that is, after a training node completes its own training task, it passes the obtained training results to the next training node. However, this method has low execution efficiency and cannot reasonably allocate computing resources according to the node computing resources and the resource consumption of the training task.
[0042] Another way is to schedule tasks by the task distribution module. However, in this way, the task distribution module needs to monitor the task execution status of each training node and the resource consumption of each training node, which is complex to implement and has low stability.
[0043] Figure 1 This is a flowchart of a task execution method provided by an embodiment of this specification. The above task execution method can be applied to a central node that performs a training task of multi-party secure computing, such as Figure 1 As shown, the above method may include:
[0044] Step 102, obtaining a training task establishment request; wherein the training task establishment request includes the operator type included in the training task to be established and the downstream nodes participating in the training.
[0045] In this embodiment, the user can call the application programming interface (API) of the system framework to initiate a training task establishment request, in which the operator type included in the training task to be established and the downstream nodes participating in the training are specified. Then, the system framework API initiates a training task establishment request to the central node according to the training task establishment request initiated by the user, and the central node obtains the training task establishment request.
[0046] The system framework is a platform for orchestrating, deploying and managing various applications in multi-party secure computing scenarios. The system framework is a cross-institutional kubernetes cluster, in which the kubernetes master is located in the central node and is responsible for managing, scheduling and / or coordinating the resources and status of the entire cluster. The kubernetes node is located in the downstream node and is responsible for executing offline training tasks and running online model services.
[0047] Step 104: Determine the resource quota required for the training task to be established according to the preset resource quota corresponding to each operator type.
[0048] In this embodiment, the training task uses operators as training units, so the resource quota corresponding to each operator type can be set in advance according to different operator types. For example, the resource quota corresponding to the operator "Privacy Intersection" is "4 CPU cores 4G memory", and the resource quota corresponding to the operator "WOE Binning" is "1 CPU core 1G memory"...
[0049] In this way, after the central node obtains the training task establishment request, it can obtain the operator types included in the training task to be established, and then determine the resource quota required for the training task to be established based on the pre-set resource quota corresponding to each operator type.
[0050] Step 106 : Compare the resource quota required by the training task to be established with the total resources of each downstream node participating in the training. Then, step 108 or step 110 is executed.
[0051] Specifically, the resource quota required for the training task to be established is compared with the total resources of each downstream node participating in the training, in order to verify whether the resource quota required for the training task to be established is greater than the total resources of each downstream node participating in the training. If the total resources of any downstream node are less than the resource quota required for the training task to be established, the training task will be considered failed; if the total resources of each downstream node participating in the training meet the requirements, the training task to be established will be created in each downstream node.
[0052] Step 108, if the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established, then create the training task to be established at the downstream nodes participating in the training; wherein the training task includes the resource quota required for the training task.
[0053] Step 110: If there is a downstream node among the downstream nodes participating in the training whose total resources are less than the resource quota required by the training task to be established, it is determined that the creation of the training task to be established has failed.
[0054] In the above task execution method, after the central node obtains the training task establishment request, it determines the resource quota required for the training task to be established based on the pre-set resource quota corresponding to each operator type, and then compares the resource quota required for the training task to be established with the total resources of each downstream node participating in the training. If the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established, the training task to be established is created in each downstream node participating in the training. In this way, the training task can be started according to the currently available resources of each downstream node, the computing resources of each downstream node can be fully utilized, and the execution speed of the training task can be accelerated.
[0055] Figure 2 A flowchart of a task execution method is provided for another embodiment of the present specification. The above-mentioned task execution method can be applied to a target downstream node that performs a training task of multi-party secure computing, wherein the target downstream node can be any downstream node that participates in the training task of multi-party secure computing.
[0056] like Figure 2 As shown, the above method may include:
[0057] Step 202: Obtain a training task, where the training task includes a resource quota required for the training task.
[0058] The training task is created at each downstream node after the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required by the training task; the central node is the central node for executing the training task of the multi-party secure computing. For details, please refer to the process of the central node creating a training task in this manual. Figure 1 The description in the illustrated embodiment will not be repeated here.
[0059] Step 204: If the resource quota required by the training task is less than or equal to the currently available resources of the target downstream node, the training task is started, and other downstream nodes participating in the training are waited to start the training tasks.
[0060] Among them, the resource quota required for the above training task is less than or equal to the resources currently available to the target downstream node, indicating that the resources currently available to the target downstream node are sufficient. At this time, the target node can start the training task normally and wait for other downstream nodes to start the training task.
[0061] Step 206: Determine to execute the above training task according to the start status of the training tasks in other downstream nodes participating in the training.
[0062] Specifically, in one implementation, determining to execute the above training task according to the startup status of the training tasks in other downstream nodes participating in the training may be: if the training tasks in other downstream nodes participating in the training are all started normally, then starting to execute the above training task.
[0063] In this implementation, after the above training task starts to be executed, after the above training task is completed, the target downstream node releases the resources occupied by the above training task, obtains the next training task from the waiting queue of the target downstream node, and then starts the next training task.
[0064] In another implementation method, the execution of the above-mentioned training task can be determined based on the startup status of the training tasks in other downstream nodes participating in the training: if after the waiting timeout of the training task started by the target downstream node, there are still downstream nodes among the other downstream nodes participating in the training that have not started the training task, then the training task started by the target downstream node is added to the waiting queue of the above-mentioned target downstream node.
[0065] See also Figure 3 , Figure 3 A schematic diagram of task execution provided for one embodiment of this specification, Figure 3 In the example, Node B and Node C jointly execute Task 2. After Node B obtains Task 2, since the currently available resources of Node B are greater than the resource quota required for Task 2, Node B starts Task 2 and waits for Node C to start Task 2. However, the currently available resources of Node C are less than the resource quota required for Task 2, so Node C cannot start Task 2 and adds Task 2 to the waiting queue of Node C. In this way, after the waiting timeout of Task 2 started by Node B, Node C still does not start Task 2, and Node B adds Task 2 to the waiting queue of Node B.
[0066] In the above-mentioned task execution method, after the target downstream node obtains the training task, if the resource quota required for the above-mentioned training task is less than or equal to the currently available resources of the target downstream node, the above-mentioned training task is started, and waits for other downstream nodes participating in the training to start the training task. Then, according to the start status of the training tasks in other downstream nodes participating in the training, it is determined to execute the above-mentioned training task, so that the downstream node can start the training task according to its own currently available resources, reducing the complexity of resource scheduling, and can make full use of the computing resources of the downstream nodes, thereby speeding up the execution speed of the training tasks.
[0067] Figure 4 A flowchart of a task execution method provided in another embodiment of this specification is as follows: Figure 4 As shown in this manual Figure 2 In the illustrated embodiment, after step 202, the following may also be included:
[0068] Step 402: If the resource quota required by the training task is greater than the currently available resources of the target downstream node, the training task is added to the waiting queue of the target downstream node.
[0069] See also Figure 3 ,As mentioned above, node B and node C jointly execute task 2. After node C obtains task 2, the currently available resources of node C are less than the resource quota required by task 2. Therefore, node C cannot start task 2, and task 2 is added to the waiting queue of node C.
[0070] The following is combined with this instruction manual Figure 1 to Figure 4 The description of the illustrated embodiment illustrates the state transition of the training task in the task execution method provided in the embodiment of this specification. Figure 5 A schematic diagram of an embodiment of the state transition of a training task provided in one embodiment of this specification.
[0071] See also Figure 5 After the user initiates a training task establishment request, the status of the training task is Starting. If the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task to be established, the training task to be established is created at the downstream node participating in the training. After the downstream node obtains the training task, if the resource quota required for the training task is less than or equal to the currently available resources of the downstream node, the downstream node starts the training task. At this time, the status of the training task changes from Starting to Pending.
[0072] If the training tasks in all downstream nodes involved in the training are started normally, the above training tasks will be executed, and the status of the training tasks will change from Pending to Running. After the training tasks start to execute, if the training result of the training task is successful, the status will change to Success; if the training result of the training task is a failure, the status will change to Failed; and if the training task times out, the status will also change to Failed.
[0073] On the other hand, after the user initiates a request to establish a training task, if the central node determines that there are downstream nodes among the downstream nodes participating in the training whose total resources are less than the resource quota required for the training task to be established, it is determined that the creation of the above training task has failed, and the status of the training task changes from Starting to Failed.
[0074] The task execution method provided in the embodiment of this specification, based on the characteristics of MPC training tasks requiring multi-party joint training and simultaneous training, uses the system framework's scheduling capabilities for MPC training tasks to decompose the training resource scheduling into the central node's judgment of the total resources of the downstream nodes and the timeout judgment after the downstream nodes start the training tasks, and implements the task startup and queuing mechanism mode through the downstream nodes, reducing the complexity of the resource scheduling system. At the same time, according to the resource consumption of different operators, the relevant functions of the Kubernetes resource budget can be used to flexibly configure the resource usage of the downstream nodes, and the computing resources of the downstream nodes can be fully utilized, which speeds up the execution of the training tasks.
[0075] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0076] Figure 6 This is a schematic diagram of the structure of a task execution device provided in one embodiment of the present specification. The task execution device may be arranged in a target downstream node for executing a training task of multi-party secure computing, such as Figure 6 As shown, the task execution device may include: an acquisition module 61, a start module 62 and an execution module 63;
[0077] Wherein, the acquisition module 61 is used to acquire a training task, wherein the training task includes the resource quota required for the training task; wherein the training task is created at each downstream node after the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task; the central node is the central node for executing the training task of the multi-party secure computing;
[0078] A starting module 62 is used to start the training task when the resource quota required by the training task is less than or equal to the currently available resources of the target downstream node, and wait for other downstream nodes participating in the training to start the training task;
[0079] The execution module 63 is used to determine the execution of the above training task according to the start status of the training tasks in other downstream nodes participating in the training.
[0080] Figure 6 The task execution device provided in the embodiment shown can be used to execute the task execution device of the present invention. Figure 2The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0081] Figure 7 A schematic diagram of a task execution device provided in another embodiment of the present specification, Figure 6 Compared with the task execution device shown, in one implementation, the execution module 63 is specifically used to start executing the above training task when the training tasks in other downstream nodes participating in the training are all started normally.
[0082] In another implementation, the execution module 63 is specifically used to add the started training task to the waiting queue of the target downstream node if there are still downstream nodes that have not started the training task among other downstream nodes participating in the training after the started training task waits for a timeout.
[0083] Furthermore, the task execution device may further include: a release module 64;
[0084] A release module 64 is used to release the resources occupied by the training task after the training task is completed;
[0085] The acquisition module 61 is also used to acquire the next training task from the waiting queue of the target downstream node;
[0086] The start module 62 is also used to start the next training task.
[0087] Furthermore, the task execution device may further include: a joining module 65;
[0088] The adding module 65 is used to add the training task to the waiting queue of the target downstream node after the acquiring module 61 acquires the training task, if the resource quota required by the training task is greater than the currently available resources of the target downstream node.
[0089] Figure 7 The task execution device provided in the embodiment shown can be used to execute the task execution device of the present invention. Figure 2 to Figure 4 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0090] Figure 8 This is a structural diagram of a task execution device provided in another embodiment of the present specification. The task execution device may be arranged in a central node for executing a training task of multi-party secure computing, such as Figure 8 As shown, the task execution device may include: an acquisition module 81, a determination module 82, a comparison module 83 and a creation module 84;
[0091] The acquisition module 81 is used to acquire a training task establishment request; wherein the training task establishment request includes the operator type included in the training task to be established and the downstream nodes participating in the training;
[0092] A determination module 82, configured to determine the resource quota required for the training task to be established according to the preset resource quota corresponding to each operator type;
[0093] A comparison module 83, used to compare the resource quota required for the training task to be established with the total resources of each downstream node participating in the training;
[0094] The creation module 84 is used to create the training task to be established at the downstream nodes participating in the training when the total resources of each downstream node are greater than or equal to the resource quota required for the training task to be established; wherein the training task includes the resource quota required for the training task.
[0095] In this embodiment, the determination module 82 is also used to determine that the creation of the training task to be established has failed if there are downstream nodes among the downstream nodes participating in the training whose total resources are less than the resource quota required for the training task to be established after the comparison module 83 compares the resource quota required for the training task to be established with the total resources of each downstream node participating in the training.
[0096] Figure 8 The task execution device provided in the embodiment shown can be used to execute the task execution device of the present invention. Figure 1 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0097] Fig. 9 A schematic diagram of the structure of a central node device provided in one embodiment of this specification is shown in FIG. Fig. 9 As shown, the central node device may include at least one processor; and at least one memory connected to the processor in communication, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the instructions of this specification. Figure 1 The illustrated embodiment provides a task execution method.
[0098] Among them, the above-mentioned central node device can be a central node for performing training tasks of multi-party secure computing.
[0099] Fig. 9 A block diagram of an exemplary central node device suitable for implementing the embodiments of the present specification is shown. Fig. 9 The central node device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of this specification.
[0100] like Fig. 9 As shown, the central node device is in the form of a general computing device. The components of the central node device may include but are not limited to: one or more processors 410, a communication interface 420, a memory 430, and a communication bus 440 connecting different components (including the memory 430, the communication interface 420 and the processing unit 410).
[0101] The communication bus 440 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus structures. For example, the communication bus 440 may include, but is not limited to, an industry standard architecture (ISA) bus, a micro channel architecture (MCA) bus, an enhanced ISA bus, a video electronics standards association (VESA) local bus, and a peripheral component interconnection (PCI) bus.
[0102] The central node device typically includes a variety of computer system readable media, which can be any available media that can be accessed by the central node device, including volatile and non-volatile media, removable and non-removable media.
[0103] The memory 430 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The memory 430 may include at least one program product having a set (e.g., at least one) of program modules configured to execute the instructions of the present invention. Figure 1 Functionality of the illustrated embodiment.
[0104] A program / utility having a set (at least one) of program modules may be stored in the memory 430, such program modules including - but not limited to - an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment. The program modules generally execute the instructions in this specification. Figure 1 The functions and / or methods in the described embodiments.
[0105] The processor 410 executes various functional applications and data processing by running the programs stored in the memory 430, such as implementing the present specification. Figure 1The illustrated embodiment provides a task execution method.
[0106] The embodiment of the present specification also provides a downstream node device, which may include at least one processor; and at least one memory connected to the processor in communication, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the present specification Figure 2 to Figure 4 The illustrated embodiment provides a task execution method.
[0107] The downstream node device can be a downstream node that performs a training task of multi-party secure computing. Fig. 9 The structural implementation shown will not be repeated here.
[0108] The embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the present specification. Figure 1 The illustrated embodiment provides a task execution method.
[0109] The embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the present specification. Figure 2 to Figure 4 The illustrated embodiment provides a task execution method.
[0110] The above-mentioned non-transient computer-readable storage medium can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (read only memory, ROM), erasable programmable read-only memories (erasable programmable read only memory, EPROM) or flash memory, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0111] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0112] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0113] Computer program code for performing the operations of the present specification may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0115] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0116] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this specification, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0117] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of this specification includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of this specification belong.
[0118] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0119] It should be noted that the terminals involved in the embodiments of this specification may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.
[0120] In the several embodiments provided in this specification, it should be understood that the disclosed systems, 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 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0121] In addition, each functional unit in each embodiment of this specification 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 integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0122] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0123] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. A task execution method, applied to a target downstream node for executing a training task of multi-party secure computing, the method comprising: Obtain a training task, wherein the training task includes a resource quota required for the training task; wherein the training task is created at each downstream node after the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task; the central node is the central node of the training task that executes the multi-party secure computing; the resource quota required for the training task is determined according to the resource quota corresponding to the operator type included in the training task; If the resource quota required by the training task is less than or equal to the currently available resources of the target downstream node, start the training task and wait for other downstream nodes participating in the training to start the training tasks; Determining to execute the training task according to the initiation status of the training task in other downstream nodes participating in the training; Wherein, determining to execute the training task according to the initiation status of the training task in other downstream nodes participating in the training includes: If the training tasks in other downstream nodes participating in the training are all started normally, then the training tasks are started; If, after the waiting timeout of the training task started by the target downstream node, there are still downstream nodes among the other downstream nodes participating in the training that have not started the training task, the training task started by the target downstream node is added to the waiting queue of the target downstream node.
2. The method according to claim 1, wherein: After the training task is started, the method further includes: After the training task is executed, the resources occupied by the training task are released, and the next training task is obtained from the waiting queue of the target downstream node; Start the next training task.
3. The method according to claim 1, wherein: After obtaining the training task, the method further includes: If the resource quota required by the training task is greater than the currently available resources of the target downstream node, the training task is added to the waiting queue of the target downstream node.
4. A task execution device, the task execution device being arranged in a target downstream node for executing a training task of multi-party secure computing, the device comprising: An acquisition module, used to acquire a training task, wherein the training task includes a resource quota required for the training task; wherein the training task is created at each downstream node after the central node determines that the total resources of each downstream node participating in the training are greater than or equal to the resource quota required for the training task; the central node is the central node of the training task that executes the multi-party secure computing; the resource quota required for the training task is determined according to the resource quota corresponding to the operator type included in the training task; A starting module, used for starting the training task when the resource quota required by the training task is less than or equal to the currently available resources of the target downstream node, and waiting for other downstream nodes participating in the training to start the training task; An execution module, used for determining to execute the training task according to the start status of the training tasks in other downstream nodes participating in the training; The execution module is specifically used to start executing the training task when the training tasks in other downstream nodes participating in the training are all started normally; The execution module is specifically used to add the started training task to the waiting queue of the target downstream node if there are still downstream nodes that have not started the training task among other downstream nodes participating in the training after the started training task waits for timeout.
5. The device according to claim 4, wherein: Also includes: Release module; The release module is used to release the resources occupied by the training task after the training task is executed; The acquisition module is further used to acquire the next training task from the waiting queue of the target downstream node; The starting module is also used to start the next training task.
6. The device according to claim 4, wherein: Also includes: The adding module is used to add the training task to the waiting queue of the target downstream node after the acquiring module acquires the training task, if the resource quota required by the training task is greater than the resources currently available to the target downstream node.
7. A downstream node device, comprising: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 3 by calling the program instructions. 8 . A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions enable the computer to execute the method according to claim 1 .
Citation Information
Patent Citations
Method and device for distributing number of GPU cards, electronic equipment and storage medium
CN112835721A
Model training method and device and storage medium
CN114089889A
