Network transmission method in multi-party secure computing and scheduler for executing the method
By introducing a scheduler in multi-party security computing, combining network interaction data of mpc operators executed in parallel, the problem of limited MPC computing performance in the prior art is solved, and efficient network transmission and computing efficiency improvement is achieved.
Patent Information
- Application Number
- CN202211705464.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In the multi-party security computing process, it is difficult for the existing technology to effectively optimize the network transmission mode, resulting in the limitation of the execution performance of MPC computing and the inability to take into account the requirements of high interaction and high throughput.
By introducing a scheduler in the multi-party security calculation process, the task units that are executed in parallel are scheduled, the network interaction data of multiple mutually independent mpc operators is merged and transmitted, the data to be sent is stored using the cache area and a data packet is formed under preset conditions. Carry out network transmission to improve network transmission efficiency.
It realizes the merger and transmission of network interactive data in multi-party security computing, improves the operation efficiency and execution performance of MPC computing, and takes into account the requirements of high interaction and high throughput.
Smart Images

Figure CN116016368B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to multi-party secure computing, and more particularly, to a network transmission method and apparatus for a multi-party secure computing process. Background Art
[0002] In the Internet big data scenario, various platforms have accumulated a large amount of data. For example, electronic payment platforms have merchant transaction flow data, e-commerce platforms store merchant sales data, and banking institutions have merchant loan data. In order to increase the value of data, there is a need for multiple platforms to jointly process data. For example, the above electronic payment platforms, e-commerce platforms, and banking institutions are interested in jointly conducting machine learning to train merchant classification models.
[0003] However, the data stored by various parties often involve the privacy data of users. At present, the industry pays more and more attention to data security and personal privacy, and the country has recently issued a number of data protection-related policies and regulations. Therefore, protecting the privacy security of all parties in the process of joint data processing by multiple parties has become a key point of concern. To this end, the concept of privacy computing is proposed to achieve joint data processing without leaking the original data, making the data available but invisible. In privacy computing, multi-party secure computing MPC (Multi-Party Computation) has no special requirements for hardware and does not affect the accuracy of the results. Therefore, it is widely used in various privacy computing scenarios.
[0004] Therefore, it is hoped that there will be an improved solution that can improve the execution performance of MPC calculations. Summary of the invention
[0005] One or more embodiments of this specification describe a network transmission method in multi-party secure computing, which can optimize the network transmission method and improve the MPC computing efficiency and execution performance during the execution of multi-party secure computing.
[0006] According to a first aspect, a network transmission method in a multi-party secure computing is provided, which is executed by a scheduler in a first party, and the method includes:
[0007] Scheduling a first task unit to execute a local operation in a first mpc operator involving multi-party secure computing mpc, and in response to the first mpc operator needing to send data to a second party, storing first sent data in a first buffer area;
[0008] Scheduling a second task unit to execute a local operation in a second mpc operator, and in response to the second mpc operator needing to send data to a second party, storing the second sent data in the first cache area; wherein the second mpc operator and the first mpc operator both belong to a target level in an operator execution graph, and the target level includes mpc operators that have no dependencies on each other;
[0009] In response to a preset trigger condition, reading the data stored in the first buffer area to form a first data packet;
[0010] The first data packet is sent to the second party through a network.
[0011] According to one embodiment, before scheduling the first task unit, the scheduler creates the first task unit for the first mpc operator.
[0012] In one embodiment, the first task unit and the second task unit are two coroutines under the same thread.
[0013] According to one implementation, the preset trigger condition includes: all MPC operators in the target level complete the current round of local operations.
[0014] In one embodiment, the first buffer area is a first buffer queue; the first data packet includes a plurality of transmission data arranged in the order of being added to the first buffer queue.
[0015] According to one embodiment, the above method also includes: obtaining the operator execution graph in the form of a directed acyclic graph DAG, which is generated according to a target computing task involving multi-party secure computing.
[0016] According to one embodiment, the method further comprises:
[0017] receiving a second data packet from the second party and storing it in a second buffer;
[0018] The first received data and the second received data are read from the second buffer area respectively, and are passed to the first task unit and the second task unit respectively, so that the first task unit executes the first MPC operator based on the first received data, and the second task unit executes the second MPC operator based on the second received data.
[0019] In one embodiment of the above-mentioned implementation manner, the second cache area is a second cache queue; reading the first received data and the second received data from the second cache area respectively, and passing them to the first task unit and the second task unit respectively include: reading the first received data from the queue head of the second cache queue, passing the first received data to the first task unit, so that it executes the first mpc operator based on the first received data; reading the second received data from the queue head of the second cache queue, passing the second received data to the second task unit, so that it executes the second mpc operator based on the second received data.
[0020] In another embodiment of the above-mentioned implementation manner, the second cache area is a cache stack; reading the first received data and the second received data from the second cache area respectively, and passing them to the first task unit and the second task unit respectively include: reading the second received data from the top of the cache stack, passing the second received data to the second task unit, so that it executes the second MPC operator based on the second received data; reading the first received data from the top of the cache stack, passing the first received data to the first task unit, so that it executes the first MPC operator based on the first received data.
[0021] In one embodiment, the above-mentioned notifying the first received data to the first task unit specifically includes: storing the first received data in the memory space corresponding to the first task unit; waking up the first task unit; and notifying the first task unit of the storage address of the first received data in the memory space.
[0022] According to a second aspect, a scheduler for optimizing network transmission in multi-party secure computing is provided, which is deployed in a first party, and includes:
[0023] a first scheduling module configured to schedule the first task unit to execute a local operation in a first mpc operator involving multi-party secure computing mpc, and in response to the first mpc operator needing to send data to the second party, store the first sent data in a first buffer area;
[0024] a second scheduling module configured to schedule a second task unit to execute a local operation in a second mpc operator, and in response to the second mpc operator needing to send data to a second party, store the second sent data in the first buffer area; wherein the second mpc operator and the first mpc operator both belong to a target level in an operator execution graph, and the target level includes mpc operators that have no dependencies on each other;
[0025] a reading module, configured to read the data stored in the first buffer area in response to a preset trigger condition to form a first data packet;
[0026] The sending module is configured to send the first data packet to the second party through a network.
[0027] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method described in the first aspect.
[0028] According to a fourth aspect, a computing device is provided, comprising a memory and a processor, wherein an executable code is stored in the memory, and when the processor executes the executable code, the method of the first aspect is implemented.
[0029] In the embodiments of the present specification, a scheme for network optimized transmission in multi-party secure computing is proposed, wherein the network interaction data of operators executed in parallel are merged for transmission, thereby taking into account both high-interaction and high-throughput algorithm protocols and improving operating efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0031] Figure 1 An example of the implementation process of the mpc multiplication operator is shown;
[0032] Figure 2 Shows an example implementation of the mpc division operator
[0033] Figure 3 A flowchart showing a network transmission method in a multi-party secure computation according to an embodiment;
[0034] Figure 4 An example of an operator execution graph according to one embodiment is shown;
[0035] Figure 5 Show execution Figure 4 An example of the flow of the operator execution graph shown;
[0036] Figure 6 A schematic diagram of the structure of a scheduler according to an embodiment is shown. DETAILED DESCRIPTION
[0037] The solution provided in this specification is described below in conjunction with the accompanying drawings.
[0038] As mentioned above, multi-party secure computation (MPC) is a commonly used privacy computing method, which is applied in a variety of privacy computing scenarios. In practice, in order to perform specific secure computing, users generally use high-level scripting languages (such as Python, etc.) to write user scripts, in which the calculation process of MPC calculations is defined. The script language interpreter executor translates the user script into MPC operators and executes them in sequence.
[0039] Different from conventional local computing functions, the implementation of MPC operators requires multi-party interaction and network transmission. Figure 1 and Figure 2 The implementation examples of the mpc multiplication operator and the mpc division operator are shown respectively. Figure 1 In the example, two parties implement mpc multiplication calculation based on secret sharing. Specifically, Figure 1 As shown in the figure, in order to jointly perform the mpc multiplication, party A and party B first obtain a random number triplet and then perform local calculations. Next, party A and party B need to transmit and exchange the intermediate results generated by the local calculations through the network. Then, based on the exchanged intermediate results, the local shards of the multiplication calculation results are processed. The sum of the two shards is equal to the multiplication calculation result.
[0040] exist Figure 2 In the example, parties AB implement mpc division calculation based on the obfuscated circuit GC. Specifically, first, one party, for example, party A, prepares the obfuscated circuit GC. Then, in the second stage, party A and party B perform network transmission through the oblivious transmission OT protocol, so that party A sends the obfuscated truth table of the obfuscated circuit GC to party B, and party B performs the operation of the GC circuit. Then, party A and party B each obtain the result slice of the division result.
[0041] It can be seen that different MPC operators, or even different implementation algorithms of the same operator, have different internal computing processes and network interaction processes, and different requirements for network transmission. Some operators require multiple rounds of network interaction to execute, and the amount of data in each interaction is small, so the latency requirement is relatively high; some operators require fewer rounds of network interaction to execute, but the amount of network data in a single communication is large, and the bandwidth requirement is relatively high. In conventional MPC calculations, as mentioned above, each MPC operator is executed in sequence, and the network is directly operated for transmission during the execution process. This makes it difficult for the same computing platform to take into account the different requirements of different MPC operators for network transmission, which has an adverse effect on execution performance.
[0042] In view of this, in the embodiments of this specification, a solution for network optimized transmission in multi-party secure computing is proposed, wherein the network interaction data of operators executed in parallel are merged and transmitted, thereby taking into account both high-interaction and high-throughput algorithm protocols and improving operating efficiency.
[0043] Specifically, consider a party that performs multi-party secure computing, hereinafter referred to as the first party. During the multi-party secure computing process, the first party needs to interact with the second party. In order to optimize network transmission, according to an embodiment of the present specification, a scheduler can be set in the first party, and the scheduler is used to schedule concurrently executable task units. During the multi-party secure computing process, the scheduler can schedule multiple task units to execute multiple MPC operators that are independent of each other in parallel. When a task unit completes the local operation of the corresponding MPC operator in this round and needs to interact with the second party, unlike the conventional technology that directly operates the network for transmission, in multiple embodiments of the specification, the scheduler merges the interactive data for transmission. In the following, the interaction process between the first party and the second party is simplified to a process of sending data first and then receiving data. Therefore, when network interaction is required, each task unit stores the data to be sent in the sending buffer area. When the local operations of multiple MPC operators in this round have been completed, the scheduler merges the data to be sent stored by each task unit and sends them to the second party together. The receiving process is similar. In this way, the combined transmission of network interaction data can be achieved, improving the operating efficiency of multi-party secure computing.
[0044] The specific implementation of the above technical concept is described below.
[0045] Figure 3 A flowchart of a network transmission method in a multi-party secure computing according to an embodiment is shown. The method is executed by a scheduler in a first party, and the first party can be implemented as any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 3 As shown, the method includes the following steps.
[0046] First, in the preparation stage, the scheduler can obtain the operator execution graph generated for the target computing task, where the target computing task is a computing task involving multi-party secure computing. In one embodiment, the target computing task is described by the user in a high-level programming language (typically, it can be a high-level scripting language). The compiler or interpreter executor of the corresponding language can optimize the execution path according to the calculation formula and calculation logic defined in the user code, and generate an operator execution graph reflecting the execution path of the mpc operator. Alternatively, the operator execution graph can also be generated by other dedicated optimizers according to the target computing task.
[0047] Operator Execution Figure 1 Generally, it is in the form of a directed acyclic graph DAG. Therefore, DAG is used in many places below to refer to the operator execution graph. In the DAG, several levels can be included, and each level includes parallel operations of MPC operators that have no dependencies on each other.
[0048] Assume that a certain level of the DAG graph, hereinafter referred to as the target level, includes multiple mpc operators. The following describes the execution process and network transmission of two mpc operators in the target level, namely, the first mpc operator and the second mpc operator. However, it should be understood that the target level may also include more other mpc operators.
[0049] For the first MPC operator and the second MPC operator, the scheduler first creates two task units for executing the two MPC operators respectively. Next, the operator execution phase begins.
[0050] Reference Figure 3 In step 31, the scheduler schedules the first task unit to execute the local operation in the first mpc operator, and in response to the need to send data to the second party, stores the first send data into the first cache area; in step 32, the scheduler schedules the second task unit to execute the local operation in the second mpc operator, and in response to the need to send data to the second party, stores the second send data into the first cache area.
[0051] It should be understood that the above task units are task units that can be executed in parallel. In one embodiment, one task unit corresponds to one thread. Thus, in steps 31 and 32, two threads are executed in parallel to process the local computing tasks of the first mpc operator and the second mpc operator in parallel.
[0052] However, the overhead of thread opening and synchronization is relatively large, and the dependencies and parallel relationships of operator execution graphs are often complex and small in granularity. One level may include many operators that need to be executed in parallel. In this way, it is costly to open a thread for each operator, and sometimes it is even difficult to achieve multi-threaded parallelism in a single operator execution graph. Therefore, in one embodiment, consider using finer-grained coroutines to perform operator calculations. In this embodiment, the first task unit and the second task unit are two coroutines under the same thread. The operation mode of the coroutine is such that at a certain moment in the "micro" world, only one coroutine is executing, but in the "macro" world, it still appears to be parallel. Thus, through two coroutines, the local computing tasks of the first mpc and the second mpc operators are processed in parallel.
[0053] When the first task unit completes the local operation of the first mpc operator and needs to interact with the second party through the network, it stores the first transmission data to be sent in the first buffer instead of sending it directly. Similarly, when the second task unit completes the local operation of the second mpc operator and needs to interact with the second party through the network, it also stores the second transmission data to be sent in the first buffer. In this way, the first buffer stores the data to be sent by each mpc operator in the target level in this round.
[0054] Then, in step 33, in response to a preset trigger condition, the scheduler reads the data stored in the first buffer area to form a first data packet.
[0055] In a typical case, the preset trigger condition is that all the MPC operators in the current target level have completed the local operation of this round. Optionally, in some cases, the preset trigger condition may also include, for example, the first buffer is full, when an MPC operator is abnormally executed, waiting for more than a predetermined time, etc.
[0056] When the above triggering conditions are met, the scheduler reads the data stored in the first buffer area and arranges the multiple transmission data corresponding to the multiple mpc operators in a first order to form a first data packet. The above first order is an order agreed with the second party, so that the second party can correspond the multiple transmission data to the multiple mpc operators after receiving the first data packet.
[0057] In one embodiment, the first cache area is in the form of a cache queue. The scheduler starts each task unit in the form of a coroutine in an agreed order (for example, operators in the same level, in order from left to right), and each task unit stores its send data in the cache queue in turn. For example, the first task unit first stores the first send data in the cache queue, and then the second task unit stores the second send data in the cache queue. Thus, the scheduler directly reads the send data in the cache queue arranged in order of joining to form a first data packet.
[0058] In other embodiments, the first buffer area may be in other forms, and the first order may be in other orders. For example, the first buffer area may be in the form of a stack, and the scheduler arranges each transmission data in the reverse order of adding to the first buffer area to form a first data packet. For another example, the scheduler may also use an agreed mapping method to map the task units executing each mpc operator to storage location numbers and / or sorting numbers, thereby forming a first data packet.
[0059] Thus, in step 34, the scheduler sends the first data packet to the second party through the network.
[0060] Through the above process, the scheduler merges the transmission data of multiple MPC operators executed in parallel, and sends the merged data to the second party through the network, thereby optimizing the network transmission process.
[0061] In some embodiments, the data sent in the first data packet is data that needs a response from the second party. After the first party sends the first data packet, each task execution unit enters a suspended state, waiting for the arrival of the second party's data.
[0062] The network transmission method in the corresponding embodiment may further include the following steps.
[0063] In step 35, the scheduler receives a second data packet from the second party and stores it in a second buffer;
[0064] In step 36, the first received data and the second received data are read from the second buffer area respectively, and are passed to the first task unit and the second task unit respectively, so that the first task unit executes the first MPC operator based on the first received data, and the second task unit executes the second MPC operator based on the second received data.
[0065] It should be understood that the second data packet is formed by the second party arranging multiple copies of data corresponding to multiple mpc operators in a second order, and the second order is an order agreed upon by both parties, as long as the first party can match the multiple copies of data with multiple mpc operators. Typically, the second order is the same as the first order corresponding to the first data packet. However, in other examples, the second order may also be different from the first order. It is assumed below that the second data packet includes the first received data and the second received data arranged in sequence.
[0066] In one embodiment, the second cache area is in the form of a cache queue, referred to as a second cache queue. Therefore, the scheduler can first read the first received data from the queue head of the second cache queue, and pass the first received data to the first task unit, so that it continues to execute the first MPC operator based on the first received data. After reading the first received data, the queue head is updated to the second received data. The scheduler reads the second received data from the queue head at this time, and passes the second received data to the second task unit, so that it continues to execute the second MPC operator based on the second received data.
[0067] In another embodiment, the second cache area is in the form of a cache stack. The scheduler reads the second received data from the top of the cache stack, passes the second received data to the second task unit, so that it continues to execute the second MPC operator based on the second received data. After reading the second received data, the top of the stack is updated to the first received data. Then, the scheduler continues to read the first received data from the top of the cache stack, passes the first received data to the first task unit, so that it continues to execute the first MPC operator based on the first received data.
[0068] The scheduler can pass a copy of the received data to the corresponding task unit in the following manner. Taking the first received data as an example, the scheduler first stores the first received data in the memory space corresponding to the first task unit. After waking up the (previously suspended) first task unit, the storage address of the first received data in the above memory space is notified to the first task unit. In this way, data transfer and task wake-up scheduling are achieved.
[0069] The above describes the process of each task unit executing a round of interactive operations of the mpc operator in parallel. In the case where the mpc operator requires multiple rounds of interactive operations, the above process can be repeated for each round. In some cases, the interactive rounds required for multiple mpc operators in the same level are different. At this time, in the common rounds, the data corresponding to all mpc operators are sent / received, and in the additional rounds required by some operators, only the data corresponding to the part of the mpc operators are sent / received. At this time, the scheduler can consider that the other part of the operators has completed this round of operations, so that the aforementioned triggering conditions are still met. For example, assume that a certain level has three mpc operators O1, O2 and O3, of which operators O1 and O2 require 2 rounds of interaction, and O3 only requires 1 round of interaction. Then in the first round of execution, after the three mpc operators complete their local operations and store the data in the cache area, the scheduler sends the data corresponding to the three operators to the second party. In the second round of execution, after operators O1 and O2 store their data in the cache, the scheduler considers that all operators have completed this round of operations and merges the data of operators O1 and O2 and sends it to the second party.
[0070] The following describes the complete implementation process of the above solution with a specific example.
[0071] In this example, it is assumed that the target compute task is defined by the following user script:
[0072] a=al ice_data()
[0073] b = bob_data()
[0074] c=a*b
[0075] d = a / b
[0076] e=c+d
[0077] In the above user script, since data a comes from Alice and data b comes from Bob, and the script contains calculation formulas for data a and data b, this user script involves multi-party secure computing (MPC). In the process of interpreting and executing the user script, the calculation formulas involving multi-party secure computing can be converted into calculations of the MPC operator and generated. Figure 4 The operator execution graph shown.
[0078] like Figure 4 As shown in Figure 2, variable c is obtained by applying the mpc multiplication operator to a and b, and variable d is obtained by applying the mpc division operator to a and b. Since the calculation processes of variables c and d are independent of each other, Figure 4 In the operator execution graph, the mpc multiplication operator and the mpc division operator are located at the same level. Figure 1 and Figure 2The calculation process of the mpc multiplication operator and the mpc division operator is shown, and both operators are implemented through one round of network interaction.
[0079] For the above computing tasks and operator execution graphs, in one example, the scheduler starts the corresponding coroutine for each operator to achieve parallel execution and merged transmission of the operators.
[0080] Figure 5 Show execution Figure 4 An example of the flow of the operator execution graph is shown.
[0081] In this example, the scheduler executes the operator execution graph from top to bottom in layers. In each layer, coroutines are used to execute from left to right.
[0082] For the first layer, the scheduler first targets the mpc multiplication operator ( Figure 3 The example of the first mpc operator in the example above creates a coroutine called the multiplication coroutine. Then, the multiplication coroutine starts executing. Specifically, Figure 1 As shown in the figure, the multiplication coroutine first obtains the triples and then starts local calculation. After completing the local calculation, the multiplication coroutine needs to interact with the other party. At this time, the multiplication coroutine stores the multiplication send data to be transmitted into the send queue. After that, the multiplication coroutine suspends and hands the control flow to the scheduler.
[0083] Next, the scheduler continues to create a division coroutine for the mpc division operator (example of the second mpc operator). Then, the division coroutine starts to execute. When the division coroutine completes the local calculation and needs to interact with the other party, it adds the division send data to the send queue. Then the division coroutine hands the control flow to the scheduler and suspends itself.
[0084] The scheduler determines that there are no operators that can continue to execute in the first layer, and each operator has completed the local operation of this round, so the scheduler merges the data in the sending queue to form a data packet and sends the data packet to the other party through the network. At the same time, it waits for the other party's data to arrive.
[0085] Once the scheduler receives a data packet from the other party, it stores the data packet in the receive buffer. Then, the scheduler starts to distribute the received data.
[0086] In this example, both the send and receive buffers are in the form of queues, and are arranged in the order of multiplication data and division data. Therefore, the scheduler first reads the multiplication receive data from the queue head of the receive queue, wakes up the multiplication coroutine, and delivers or passes the multiplication receive data to the multiplication coroutine. The control flow is transferred to the multiplication coroutine.
[0087] The multiplication coroutine obtains the received multiplication data, completes the remaining local calculations, obtains the result and ends the coroutine. The control flow is transferred to the scheduler.
[0088] The scheduler reads the division receive data from the current queue head of the receive queue, wakes up the division coroutine, and passes the division receive data to the division coroutine. The control flow is transferred to the division coroutine.
[0089] The division coroutine obtains the received division data, completes the remaining local calculations, obtains the result and ends the coroutine. The control flow is transferred back to the scheduler.
[0090] The scheduler determines that the computational tasks of this layer are completed and starts to execute the computations of the next layer.
[0091] Through the above process, with the help of the scheduler, an optimization solution is implemented for merging and transmitting the interactive data of the mpc multiplication operator and the mpc division operator executed in parallel.
[0092] According to an embodiment of another aspect, a scheduler for optimizing network transmission in multi-party secure computation is provided. Figure 6 A schematic diagram of the structure of a scheduler according to an embodiment is shown, and the scheduler is deployed in a first party, and the first party can be implemented as any device, platform or device cluster with data storage, computing and processing capabilities. Figure 6 As shown, the scheduler 600 includes:
[0093] A first scheduling module 61 is configured to schedule the first task unit to perform a local operation in a first mpc operator involving multi-party secure computing mpc, and in response to the first mpc operator needing to send data to the second party, store the first sent data in the first buffer area;
[0094] The second scheduling module 62 is configured to schedule the second task unit to execute the local operation in the second mpc operator, and in response to the second mpc operator needing to send data to the second party, store the second sent data in the first buffer area; wherein the second mpc operator and the first mpc operator both belong to the target level in the operator execution graph, and the target level includes mpc operators that have no dependency relationship with each other;
[0095] A reading module 63, configured to read the data stored in the first buffer area in response to a preset trigger condition to form a first data packet;
[0096] The sending module 64 is configured to send the first data packet to the second party through the network.
[0097] According to one embodiment, the scheduler 600 further includes (not shown) a first creation module configured to create the first task unit for the first mpc operator.
[0098] In one embodiment, the first task unit and the second task unit are two coroutines under the same thread.
[0099] According to one implementation, the preset trigger condition includes: all MPC operators in the target level complete the current round of local operations.
[0100] In one embodiment, the first buffer area is a first buffer queue; the first data packet includes a plurality of transmission data arranged in the order of being added to the first buffer queue.
[0101] According to one embodiment, the scheduler further includes (not shown) an execution graph acquisition module configured to acquire the operator execution graph in the form of a directed acyclic graph DAG, which is generated based on a target computing task involving multi-party secure computing.
[0102] According to one embodiment, the scheduler 600 further includes (shown by dashed lines):
[0103] The receiving module 65 is configured to receive a second data packet from the second party and store it in a second buffer area;
[0104] The distribution module 66 is configured to read the first received data and the second received data from the second buffer area respectively, and pass them to the first task unit and the second task unit respectively, so that the first task unit executes the first MPC operator based on the first received data, and the second task unit executes the second MPC operator based on the second received data.
[0105] In one embodiment of the above-mentioned implementation manner, the second cache area is a second cache queue; the distribution module 66 is specifically configured as follows: reading the first received data from the queue head of the second cache queue, passing the first received data to the first task unit, so that it executes the first mpc operator based on the first received data; reading the second received data from the queue head of the second cache queue, passing the second received data to the second task unit, so that it executes the second mpc operator based on the second received data.
[0106] In another embodiment of the above-mentioned implementation manner, the second cache area is a cache stack; the distribution module 66 is specifically configured as follows: reading the second received data from the top of the cache stack, passing the second received data to the second task unit, so that it executes the second MPC operator based on the second received data; reading the first received data from the top of the cache stack, passing the first received data to the first task unit, so that it executes the first MPC operator based on the first received data.
[0107] In one embodiment, the distribution module 66 notifies the first task unit of the first received data by specifically implementing: storing the first received data in the memory space corresponding to the first task unit; waking up the first task unit; and notifying the first task unit of the storage address of the first received data in the memory space.
[0108] Through the above scheduler, the interactive data of multiple MPC operators executed in parallel are merged and transmitted, thereby optimizing the network transmission method, taking into account both high-interaction and high-throughput algorithm protocols, and improving the efficiency of MPC calculations.
[0109] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 3 The method described.
[0110] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 3 The method described.
[0111] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.
[0112] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
Claims
1. A network transmission method in a multi-party secure computation, executed by a scheduler in a first party, the method include: Scheduling a first task unit to execute a local operation in a first mpc operator involving multi-party secure computing mpc, and in response to the first mpc operator needing to send data to a second party, storing first sent data in a first buffer area; Scheduling a second task unit to execute a local operation in a second mpc operator, and in response to the second mpc operator needing to send data to a second party, storing the second sent data in the first cache area; wherein the second mpc operator and the first mpc operator both belong to a target level in an operator execution graph, and the target level includes mpc operators that have no dependencies on each other; In response to a preset trigger condition, reading the data stored in the first buffer area to form a first data packet; sending the first data packet to the second party via a network; receiving a second data packet from the second party and storing it in a second buffer; The first received data and the second received data are read from the second buffer area respectively, and are passed to the first task unit and the second task unit respectively, so that the first task unit executes the first MPC operator based on the first received data, and the second task unit executes the second MPC operator based on the second received data.
2. The method according to claim 1, before scheduling the first task unit, further include: For the first MPC operator, create the first task unit.
3. The method according to claim 1, in, The first task unit and the second task unit are two coroutines under the same thread.
4. The method according to claim 1, in, The preset triggering condition includes: all the MPC operators in the target level have completed the current round of local operations.
5. The method according to claim 1, in, The first buffer area is a first buffer queue; the first data packet includes a plurality of transmission data arranged in the order of being added to the first buffer queue.
6. The method according to claim 1, further comprising: include: The operator execution graph in the form of a directed acyclic graph (DAG) is obtained, which is generated according to a target computing task involving multi-party secure computing.
7. The method according to claim 1, in, The second buffer area is a second buffer queue; reading the first received data and the second received data from the second buffer area respectively, and passing them to the first task unit and the second task unit respectively includes: Reading first received data from the queue head of the second cache queue, and passing the first received data to the first task unit so that it executes the first MPC operator based on the first received data; Read the second received data from the queue head of the second cache queue, and pass the second received data to the second task unit so that it executes the second MPC operator based on the second received data.
8. The method according to claim 1, in, The second buffer area is a buffer stack; reading the first received data and the second received data from the second buffer area respectively, and passing them to the first task unit and the second task unit respectively comprises: Reading second received data from the top of the cache stack, and passing the second received data to the second task unit so that it executes the second MPC operator based on the second received data; Read first received data from the top of the cache stack, and pass the first received data to the first task unit so that it executes the first MPC operator based on the first received data.
9. The method according to claim 7 or 8, in, The first received data is transmitted to the first task unit, comprising: storing the first received data in a memory space corresponding to the first task unit; Waking up the first task unit; The first task unit is notified of the storage address of the first received data in the memory space.
10. A scheduler for optimizing network transmission in multi-party secure computing, deployed in a first party, wherein the scheduler include: a first scheduling module configured to schedule the first task unit to execute a local operation in a first mpc operator involving multi-party secure computing mpc, and in response to the first mpc operator needing to send data to the second party, store the first sent data in a first buffer area; a second scheduling module configured to schedule a second task unit to execute a local operation in a second mpc operator, and in response to the second mpc operator needing to send data to a second party, store the second sent data in the first buffer area; wherein the second mpc operator and the first mpc operator both belong to a target level in an operator execution graph, and the target level includes mpc operators that have no dependencies on each other; a reading module, configured to read the data stored in the first buffer area in response to a preset trigger condition to form a first data packet; a sending module, configured to send the first data packet to the second party through a network; a receiving module, configured to receive a second data packet from the second party and store it in a second buffer; The distribution module is configured to read the first received data and the second received data from the second buffer area respectively, and pass them to the first task unit and the second task unit respectively, so that the first task unit executes the first MPC operator based on the first received data, and the second task unit executes the second MPC operator based on the second received data.
11. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 9.
12. A computing device comprising a memory and a processor, It is characterized in that The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Task execution method and device in multi-party security computing
CN113849806A
