A data processing method and device based on multi-party secure computation
By performing division operations on larger domains and other operations on smaller rings in multi-party secure computation, combined with ring-domain transformation, the tree model training process is optimized, solving the problem of high communication volume and improving training efficiency.
Patent Information
- Application Number
- CN202211562566.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-12-07
AI Technical Summary
Existing secure multi-party learning techniques require a large amount of communication when training tree models, which affects training performance.
By performing division operations on larger domains and other operations on smaller rings, and by optimizing the data processing through ring-domain transformation, the amount of communication is reduced.
This reduces the amount of communication during multi-party secure computation and improves the efficiency of tree model training.
Smart Images

Figure CN115964738B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, and in particular to a data processing method and device based on multi-party secure computation. BACKGROUND
[0002] Traditional machine learning paradigms need to converge a large amount of data for model training, and the data used for training is likely to come from multiple different organizations or users. Converging data from multiple different organizations or different users together is likely to cause the risk of data leakage, which exposes information assets for organizations and may leak personal privacy for individual users.
[0003] The existence of the above problems poses a severe challenge to the training of AI models. To solve the above problems, secure multi-party learning technology emerges as the times require. Secure multi-party learning is a distributed machine learning paradigm in which multiple parties (different organizations or users) collaboratively train an AI model using all their data without converging the data. Secure multi-party learning collaboratively computes and trains an AI model by using secure multi-party computation technologies such as secret sharing and garbled circuits, while ensuring the privacy of the data of multiple parties. Through secure multi-party learning technology, the data of multiple parties is protected, and the data of multiple parties can be fully utilized to collaboratively train the model, so as to obtain a more powerful model.
[0004] At present, secure multi-party training of tree models (such as decision trees) requires a large amount of communication, which affects the training performance of tree models. SUMMARY
[0005] Embodiments of the present application provide a data processing method and device based on multi-party secure computation. In the data processing process based on multi-party secure computation, the division operation is performed on a larger domain, and other operations are performed on a smaller ring, thereby reducing the communication amount in the data processing process based on multi-party secure computation.
[0006] In a first aspect, embodiments of the present application provide a tree model training method based on multi-party secure computation, applied to any computing participant in a plurality of computing participants, any computing participant having a secret share of a to-be-processed data set. The method comprises: interacting with other computing participants in the plurality of computing participants through a multi-party secure computation protocol, processing the secret share of the to-be-processed data set to obtain a secret share of a processing result; and performing a division operation on a domain and a non-division operation on a ring in the process of processing the secret share of the to-be-processed data set, the domain being larger than the ring.
[0007] The method provided by the embodiments of the present application reduces the communication amount in the data processing process based on multi-party secure computation by performing the division operation on a larger domain and performing other operations on a smaller ring.
[0008] In a possible implementation, the data processing method based on multi-party secure computation provided by the embodiments of the present application further includes: when converting from the ring to the field to perform an operation, converting each element on the ring to the field for representation; and when converting from the field to the ring to perform an operation, converting each element on the field to the ring for representation. The embodiments of the present application provide conversion between the ring and the field, to realize conversion of data between the ring and the field when the division operation is converted to the non-division operation or the non-division operation is converted to the division operation in the training process of the tree model, so that the calculation and processing of data in the training process of the tree model are realized.
[0009] In a possible implementation, converting each element on the ring to the field for representation includes: obtaining representations of secret shares of each element on the ring of the plurality of computing participants on the field; calculating a sum of the representations of the secret shares of each element on the ring of the plurality of computing participants on the field; and determining the representation of each element on the ring on the field based on the sum of the representations of the secret shares of each element on the ring of the plurality of computing participants on the field being greater than the size of the ring a number of times. The embodiments of the present application provide a fast ring-to-field conversion method, which only needs 4 communication rounds, and greatly reduces the communication amount compared with all operations being performed on a larger field.
[0010] In another possible implementation, converting each element on the field to the ring for representation includes: adding each element on the field to the size of the ring to obtain a first value of each element on the field; obtaining a first intermediate parameter and a second intermediate parameter based on the first value of each element on the field and the size of the field; obtaining representations of secret shares of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring; and determining the representation of each element on the field on the ring based on the representations of the secret shares of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring. The embodiments of the present application provide a fast field-to-ring conversion method, which only needs 2 communication rounds, and greatly reduces the communication amount compared with all operations being performed on a larger field.
[0011] In another possible implementation, the to-be-processed data set is a training sample set; and processing the secret shares of the to-be-processed data set to obtain the secret share of the processing result includes: training the tree model based on the secret shares of the training sample set to obtain the secret share of the trained tree model, wherein the secret share of the trained tree model can be obtained based on the secret share of the tree model corresponding to each computing participant.
[0012] In another possible implementation, the secret share of the training sample set includes secret shares of multiple samples in the training sample set; and the training of the tree model based on the secret share of the training sample set includes: sorting, based on each feature of the secret share of the sample, the secret shares of the multiple samples to obtain a first sorting result of the secret shares of the multiple samples corresponding to each feature; calculating gains of sample partition strategies of each split node in a current layer, determining the sample partition strategies of each split node in the current layer based on the gains, partitioning the secret shares of the multiple samples based on the sample partition strategies of each split node in the current layer, and determining a sorting result and a grouping result of the secret shares of the samples corresponding to each feature in a next layer based on the partitioning result and the first sorting result of the secret shares of the multiple samples corresponding to each feature.
[0013] The data processing method based on multi-party secure computation provided by the embodiments of the present application, when applied to tree model training, combines the radix sort and the training process of the decision tree, thereby saving the number of sorting. Specifically, compared with the complete sorting under 2*h*m secret sharing in the related art, the optimization is to complete sorting under m secret sharing and h*m single-bit sorting in the training process. Wherein, h is the tree height, and m is the number of features of the data.
[0014] In another possible implementation, the determination of the sorting result and the grouping result of the secret shares of the samples corresponding to each feature in the next layer based on the partitioning result and the sorting result of the secret shares of the samples corresponding to each feature includes: determining a highest bit corresponding to a feature value of each feature based on the partitioning result, performing single-bit sorting on the secret shares of the multiple samples corresponding to each feature based on the highest bit to obtain a second sorting result of the secret shares of the multiple samples corresponding to each feature, and determining the sorting result and the grouping result of the secret shares of the samples corresponding to each feature in the next layer based on the first sorting result of the secret shares of the multiple samples corresponding to each feature and the second sorting result of the secret shares of the multiple samples corresponding to each feature.
[0015] In another possible implementation, the secret share of the training sample set includes secret shares of multiple samples in the training sample set; and the training of the tree model based on the secret share of the training sample set includes: sorting, based on each feature of the secret share of the sample, the secret shares of the multiple samples to obtain a first sorting result of the secret shares of the multiple samples corresponding to each feature; calculating gains of sample partition strategies of each split node in a current layer, determining the sample partition strategies of each split node in the current layer based on the gains, partitioning the secret shares of the multiple samples based on the sample partition strategies of each split node in the current layer, and determining a sorting result and a grouping result of the secret shares of the samples corresponding to each feature in a next layer based on the partitioning result and the first sorting result of the secret shares of the multiple samples corresponding to each feature.
[0016] Embodiments of the present application further optimize the communication volume and communication rounds in the training process by improving the related operators in the tree model training process. For example, the related operators include a group sum operator (GroupSum), a group prefix sum operator (GroupPrefixSum), and a group maximum value operator (GroupMax). Embodiments of the present application replace the complete sorting involved in the operators with single-bit sorting, which improves the complexity of GroupMax and GroupPrefix in the three operators and improves GroupMax by a constant level.
[0017] In a second aspect, embodiments of the present application provide a data processing apparatus based on multi-party secure computation, applied to any computing participant in a plurality of computing participants, any computing participant having a secret share of a data set to be processed. The data processing apparatus based on multi-party secure computation at least includes a data processing module and an algebraic module. The data processing module is configured to interact with other computing participants in the plurality of computing participants through a multi-party secure computation protocol, process the secret share of the data set to be processed, and obtain a secret share of a processing result. The algebraic module is configured to perform division operations on a field and non-division operations on a ring during processing of the secret share of the data set to be processed, the field being larger than the ring.
[0018] In one possible implementation, the algebraic module is further configured to: when converting from the ring to the field to perform operations, convert each element on the ring to the field for representation; and when converting from the field to the ring to perform operations, convert each element on the field to the ring for representation.
[0019] In another possible implementation, converting each element on the ring to the field for representation includes: obtaining a representation of a secret share of each element on the ring of the plurality of computing participants on the field; calculating a sum of the representation of the secret share of each element on the ring of the plurality of computing participants on the field; and determining the representation of each element on the ring on the field based on a number of times that the sum of the representation of the secret share of each element on the ring of the plurality of computing participants on the field is greater than a size of the ring.
[0020] In another possible implementation, converting each element on the field to the ring for representation includes: obtaining a first value of each element on the field by adding the size of the ring to each element on the field; obtaining a first intermediate parameter and a second intermediate parameter based on the first value of each element on the field and the size of the field; obtaining a representation of a secret share of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring; and determining the representation of each element on the field on the ring based on the representation of the secret share of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring.
[0021] In another possible implementation, the data set to be processed is a training sample set; and the data processing module is specifically configured to train the tree model based on the secret shares of the training sample set, to obtain secret shares of the trained tree model, wherein the secret shares of the trained tree model can be obtained based on the secret shares of the tree model corresponding to each computing participant.
[0022] In another possible implementation, the secret shares of the training sample set include secret shares of multiple samples in the training sample set; and the data processing module is specifically configured to sort the secret shares of the multiple samples based on each feature of the secret shares of the samples, to obtain a first sorting result of the secret shares of the multiple samples corresponding to each feature; calculate the gain of the sample partition strategy of each split node in the current layer, determine the sample partition strategy of each split node in the current layer based on the gain; partition the secret shares of the multiple samples based on the sample partition strategy of each split node in the current layer; and determine a sorting result and a grouping result of the secret shares of the samples corresponding to each feature in the next layer based on the partition result and the first sorting result of the secret shares of the multiple samples corresponding to each feature.
[0023] In another possible implementation, determining the sorting result of the secret shares of the samples corresponding to each feature in the next layer based on the partition result and the sorting result of the secret shares of the samples corresponding to each feature includes: determining the highest bit corresponding to each feature value of each feature based on the partition result; performing single-bit sorting on the secret shares of the multiple samples corresponding to each feature based on the highest bit, to obtain a second sorting result of the secret shares of the multiple samples corresponding to each feature; and determining the sorting result and the grouping result of the secret shares of the multiple samples corresponding to each feature in the next layer based on the first sorting result of the secret shares of the multiple samples corresponding to each feature and the second sorting result of the secret shares of the multiple samples corresponding to each feature.
[0024] In another possible implementation, the secret shares of the training sample set are processed by multiple operators during the training of the tree model based on the secret shares of the training sample set; the tree model includes multiple layers of nodes, and each layer of nodes includes multiple data and group identifiers corresponding to the multiple data; and the tree model training apparatus based on multi-party secure computation provided in the embodiments of the present application further includes an operator module configured to sort the multiple data by single-bit sorting based on the group identifiers when the multiple operators process the multiple data and the group identifiers corresponding to the multiple data.
[0025] In a third aspect, the embodiments of the present application provide a computing device including a memory and a processor, the memory stores executable code, and the processor executes the executable code to implement the method provided in the first aspect of the present application.
[0026] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, having stored thereon a computer program, which, when executed in a computer, causes the computer to perform the method provided by the first aspect of the present application.
[0027] In a fifth aspect, an embodiment of the present application provides a computer program or a computer program product, which includes instructions, when the instructions are executed, implement the method provided by the first aspect of the present application.
[0028] In a sixth aspect, an embodiment of the present application provides a chip, which includes at least one processor and an interface, the at least one processor determines program instructions or data through the interface; the at least one processor is configured to execute the program instructions to implement the method provided by the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 It is a schematic diagram of a tree model;
[0030] Figure 2 It is a schematic diagram of a framework of a tree model training system based on multi-party secure computation;
[0031] Figure 3 It shows a schematic diagram of an application scenario of the tree model training method based on multi-party secure computation provided by an embodiment of the present application;
[0032] Figure 4 It is a schematic diagram of implementation of the ring domain protocol provided by an embodiment of the present application;
[0033] Figure 5 It is a schematic diagram of implementation of the domain ring protocol provided by an embodiment of the present application;
[0034] Figure 6 It is a schematic diagram of implementation of the GroupSum operator provided by an embodiment of the present application;
[0035] Figure 7 It is a schematic diagram of implementation of the GroupPrefixSum operator provided by an embodiment of the present application;
[0036] Figure 8 It is a schematic diagram of implementation of the GroupMax operator provided by an embodiment of the present application;
[0037] Figure 9 It is a schematic diagram of structure of the tree model training apparatus based on multi-party secure computation provided by an embodiment of the present application;
[0038] Figure 10 It is a schematic diagram of structure of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0039] The technical solutions of the present application are described in further detail below with reference to the accompanying drawings and examples.
[0040] To facilitate understanding of the data processing method and device based on multi-party secure computation provided by the embodiments of the present application, part of the technical terms related to the embodiments of the present application are briefly described below.
[0041] Secret Share, also known as secret split, is a method of dispersing a secret to a group of people, each of whom gets a part of the secret, called a share. Only when enough shares are combined can the secret be restored; each share is useless on its own.
[0042] Node in tree model, which represents the structure represented by the circle part in tree structure, is the core structure of tree model. The nodes in the tree can be divided into leaf nodes and non-leaf nodes. The leaf node is the bottom layer node in the tree structure, which represents the reasoning result (if it is a classification problem, it represents a certain class label, if it is a regression problem, it is a specific value). The non-leaf node is all nodes except the last layer of nodes. The non-leaf node is responsible for determining the path of executing reasoning for a reasoning sample (whether to continue executing reasoning by the left child node or by the right child node after passing through the node). The specific value in the node is the so-called sample cutting strategy, which determines the path of the reasoning sample executing reasoning.
[0043] Sample cutting strategy (Split feature value), the so-called sample cutting strategy, is essentially a specific value of a specific feature. Since the training sample has many features, and each feature has many different optional values, there are many optional sample cutting strategies. The training process of the tree model is the process of selecting a specific sample cutting strategy for each node of the tree model.
[0044] Secure Multi-Party Learning, Secure Multi-Party Learning is a technology between secure multi-party computation method and machine learning process. It is based on one or more secure multi-party computation methods, and jointly uses the protected data distributed in multiple parties to achieve secure distributed machine learning.
[0045] The embodiment of the present application provides a kind of data processing method and device based on multi-party secure computation, it is applied to any computing participant in multiple computing participants, any computing participant has the secret share of data set to be handled;Any computing participant in multiple computing participants interacts with other computing participants in multiple computing participants by multi-party secure computation protocol, processes the secret share of data set to be handled, obtains the secret share of processing result;During processing the secret share of data set to be handled, performing division operation on field, performing non-division operation on ring, field is greater than ring.In data processing process, by division operation on larger field, other operations are carried out on smaller ring, reduce the traffic in the data process based on multi-party secure computation.
[0046] The embodiment of the present application provides one application scene of a kind of data processing method and device based on multi-party secure computation can be, based on multi-party secure computation movement data processing scene.In this scene, multi-party secure computation task is the heat of computing running, wherein relevant movement information such as running distance, running speed and running time is kept in a party, the model for calculating calorie consumption when running includes the parameter value in model kept in another party, both parties respectively to the movement data and model parameter value kept by it are secret shared to two parties, then two parties execute the calculation task of calorie consumption in secret sharing state, wherein the calculation formula of calorie is: weight (kg) × movement time (hour) * 30 / speed, calculation task includes multiplication and division operation.
[0047] Wherein, multiplication operation is carried out on smaller ring, division operation is carried out on larger field, compared with, all calculation operations are carried out on larger field in existing multi-party secure computation, reduce the traffic in the data processing process based on multi-party secure computation.
[0048] When converting from ring to field to execute operation, each element on ring is converted to field to be represented;When converting from field to ring to execute operation, each element on field is converted to ring to be represented.That is to say, when data is processed by converting from non-division operator to division operator in data processing process, ring-to-field operation is needed, when data is processed by converting from division operator to non-division operator, field-to-ring operation is needed.That is, ring-to-field method can be used to convert when executing division operation in data processing process.
[0049] The embodiment of the present application provides a kind of data processing method and device based on multi-party secure computation, another typical application scene is, based on multi-party secure computation tree model training, when being applied to the tree model training scene based on multi-party secure computation, the data processing method and device based on multi-party secure computation provided in the embodiment of the present application can also be called a kind of tree model training method and device based on multi-party secure computation.
[0050] The following details the implementation of a data processing method and apparatus based on multi-party secure computation provided in this application when applied to a tree model training scenario based on multi-party secure computation, that is, a specific implementation of a tree model training method and apparatus based on multi-party secure computation.
[0051] A tree model is a typical machine learning model; it is a discriminant tree. Figure 1 A tree model is shown, where leaf nodes ( Figure 1 The nodes with shaded areas represent the discrimination results, while non-leaf nodes represent the results. Figure 1 The decision criterion is defined as the non-leaf node (without a shaded area). During the inference phase of the model, the sample to be inferred is determined based on the decision criterion (or specific decision value) corresponding to the non-leaf node to decide whether to proceed to the left or right subtree. According to the inference rules, inference proceeds sequentially from the root node down to the leaf node to obtain the final inference result. During the training phase of the tree model, a decision criterion is selected for each non-leaf node of the tree model from all available decision criters, starting from the root node, using pre-set decision criteria.
[0052] To protect the security and privacy of training data, secure multi-party learning is often used to train tree models. The training framework of a tree model training system based on secure multi-party computation is as follows: Figure 2 As shown, the system contains multiple data holders and computational participants. The secure multi-party learning tree model training is specifically divided into three steps: data sharing, model training, and model reconstruction. Step 1: Data sharing. Each data holder shares their data with each computational participant using a secret sharing method, ensuring that each participant possesses a secret share of the entire dataset. Step 2: During the training phase, computational participants perform interactive computations on the entire dataset to execute the training process. Each participant ultimately obtains a secret share of the trained tree model. During this process, all intermediate computational results also exist in the form of secret shares. Step 3: In the model reconstruction phase, each computational participant transmits its secret share of the trained tree model to a designated server, which then reconstructs the final model.
[0053] The specific differences between schemes that typically use secure multi-party learning (SMIL) techniques to train tree models lie in the underlying algebraic system (algebraic system layer), the implementation of operators (operator layer), and the implementation of the training process (algorithm layer). These differences lead to variations in communication overhead. This application's embodiments address the issue of high communication overhead in existing schemes at the algebraic system layer, operator layer, and algorithm layer, reducing communication volume and number of communication rounds during tree model training based on secure multi-party computation.
[0054] There are two main types of algebraic systems: rings and fields. Generally, ring-based algebraic systems use 8-, 16-, 32-, or 64-bit integer rings, allowing for automatic modulo operations during computation, resulting in faster local computation. Field-based algebraic systems typically choose a large prime number as the field size, requiring manual modulo operations for each iteration, thus slowing down local computation. Furthermore, because fields have inverses, computations on fields can perform multi-input multiplication and unsigned error stages in constant-round increments. Performing these operations on rings often requires multiple rounds of communication. Regardless of whether a ring or field-based algebraic system is used, the size of the algebraic system must be greater than the size of the largest number that the algorithm needs to represent.
[0055] Training a tree model for multi-party secure computation involves radix sorting with secret sharing. We use... To refer to the list under the secret sharing Perform radix sort. Radix sort consists of the following functions: (1) Bit decomposition function: used for bit decomposition Perform bit decomposition, (2) Generate a single-bit sorting function based on the list. The k-th bit after element-wise decomposition generates the secret shared index for sorting. (3) Apply a sorting function to the generated sort indices and apply them to the list under Secret Sharing. (4) The composite sorting function combines the sorting indices of the two secret-shared functions into one.
[0056] In schemes using secure multi-party learning (SMIL) to train tree models, the algebraic system layer is entirely based on a single domain. Therefore, to perform the division calculations required during decision tree training (which require additional bits to represent the decimal part), this scheme necessitates using a relatively large domain, leading to increased communication overhead.
[0057] At the operator level, there are three main group operation protocols (also known as group operation operators) under secret sharing, including GroupSum, GroupPrefixSum and GroupMax. GroupSum takes a list x under secret sharing and a group identifier g under secret sharing as input, and then takes the sum y of each group under secret sharing as input. Specifically, assuming that the input x = [1, 3, 2, 6, 4, 2, 4, 3, 5] and g = [1, 0, 0, 1, 0, 1, 0, 0, 0] (where 1 in g indicates the beginning of a group, so there are 3 groups in total), the output y = [6, 6, 6, 10, 10, 14, 14, 14, 14]. GroupPrefixSum and GroupMax take the same input as GroupSum, and the output of GroupPrefixSum is the prefix sum of each group, and the output of GroupMax is the maximum value of each group. Similarly, in the above example, the output of GroupPrefixSum y = [1, 4, 6, 6, 10, 2, 6, 9, 14], and the output of GroupMax y = [3, 3, 3, 6, 6, 5, 5, 5, 5]. In addition, it can be seen that the prefix sum of g can obtain the group number of the elements in the list, PrefixSum(g) = [1, 1, 1, 2, 2, 3, 3, 3, 3].
[0058] During the training process of the tree model (which can be a decision tree), the data of the same layer is stored in a list, and the nodes are represented by groups. The data belonging to the same node exists in the same group. For example, the second layer of the decision tree has two nodes, the first node has data [1, 2, 3], and the second node has data [6, 5, 4, 3]. The data of the second layer is represented by the feature list x = [1, 2, 3, 6, 5, 4, 3] and the group identifier list g = [1, 0, 0, 1, 0, 0, 0].
[0059] At the algorithm level, the decision tree training starts from the 0th layer and continues to the hth layer (h is determined by the participants in advance and is public), which is a binary tree. The training process of each layer is consistent. Assuming that the training of the ith layer is currently being performed, the steps are as follows:
[0060] For each feature, the following operations are performed:
[0061] (a) Sort the feature values from small to large within the group. The in-group sorting can be realized by two secret sharing-based stable sorting operations: first sort by feature value, then sort by group number.
[0062] (b) Calculate the Gini coefficient and threshold of each split point using GroupMax, GroupPrefixSum and secret sharing-based division operations.
[0063] (c) Use GroupMax to get the optimal Gini coefficient and its threshold in each group. (Usually the optimal Gini coefficient is the minimum value, but it can be converted to maximize by adding a negative sign)
[0064] Get the best split attribute and its threshold by comparing the Gini coefficients between different features. Here the attribute and threshold are the split attribute and threshold of the last trained decision tree node.
[0065] Compare each sample according to the split threshold and its corresponding feature, and get the comparison result (0 for less than the threshold, 1 for greater than the threshold).
[0066] According to the comparison result, construct a new group label and sort the samples and group labels, so that the samples are assigned to the i+1 layer node.
[0067] The disadvantages of this scheme are high communication volume and communication rounds, resulting in low efficiency. The high communication rounds and communication volume mainly come from three aspects:
[0068] 1. The communication rounds and communication volume of the three group operation protocols are high, and there is further optimization space.
[0069] 2. The number of sorting times in the decision tree training process secret sharing is too large, resulting in a large amount of communication rounds and communication volume.
[0070] 3. In order to be able to divide when calculating the Gini coefficient, a larger domain is needed to represent the data, resulting in an increase in communication volume.
[0071] In order to reduce the communication volume and communication rounds required for tree model training, thereby improving the efficiency of secure multi-party tree model training, the embodiments of the present application provide a tree model training method and device based on multi-party secure calculation.
[0072] The specific implementation of the tree model training method and device based on multi-party secure calculation provided by the embodiments of the present application is described in detail below.
[0073] Figure 3 An application scenario diagram of the tree model training method based on multi-party secure calculation provided by the embodiments of the present application is shown. As Figure 3As shown, the tree model training method based on multi-party secure computation provided by the embodiments of the present application can be applied to tree model training of multi-party secure computation between financial industry companies and operator companies. For example, financial industry users (such as banks, securities companies, etc.) can jointly model with other financial industry users or operator data (such as mobile, telecommunications, and Unicom) and their own data to improve the accuracy of financial industry models (such as credit score models, credit card user default models, etc.), thereby helping to improve the overall operational efficiency and risk resistance of the financial industry.
[0074] The financial industry company and the operator company respectively share the data held by themselves to multiple computing participants through secret sharing, for example Figure 3 The computing participant 1, the computing participant 2 and the computing participant 3 in the multiple computing participants perform interactive computation, train the tree model, and each computing participant obtains a secret share of the tree model. After the training is completed, each computing participant sends the secret share of the tree model to the financial industry company, and the financial industry company restores the trained tree model according to the obtained multiple secret shares of the tree model.
[0075] The device of the computing participant can be a device with computing capability, for example, a server and a computing terminal, etc. The server can be an independent server or a server group, which can be centralized or distributed. In some examples, the server can be regional or remote. In some examples, the server can be executed on a cloud platform, for example, the cloud platform can include one or any combination of private cloud, public cloud, hybrid cloud, community cloud, decentralized cloud, internal cloud, etc.
[0076] The tree model can be a decision tree model.
[0077] Of course, Figure 3 This is only an application scenario example of the tree model training method based on multi-party secure computation provided by the embodiments of the present application, and does not constitute a limitation on the embodiments of the present application. For example, in addition to the above application scenarios, there are many other application scenarios, such as in the Internet advertising scenario, an Internet company can establish a model based on whether the Internet service user data purchases related items by means of other Internet company information or advertising principal purchase data information, thereby improving the advertising efficiency, etc.
[0078] The implementation of the tree model training method and device based on multi-party secure computation provided by the embodiments of the present application will be introduced from the data representation layer, the operator layer and the algorithm layer respectively.
[0079] In the data representation layer, in the process of training the tree model based on the secret share of the training sample set, the division operation is performed on the domain, and the non-division operation is performed on the ring, and the domain is greater than the ring.
[0080] The embodiments of this application propose a fast ring-domain protocol, enabling integer operations during training to be performed on a smaller ring, while rational number calculations (mainly division) can be carried out in the domain. This saves a large amount of communication volume. Moreover, the ring-domain transformation only incurs a small amount of overhead because the ring-to-domain conversion only requires 4 communication rounds, while the domain-to-ring conversion only requires 2 communication rounds.
[0081] The implementation of the ring-to-domain protocol is as Figure 4 shown. The computing parties first share the additive secret shares on the ring in the domain and calculate their sum (lines 1-2). Then, calculate the number of times the sum exceeds the ring size (2k) (line 3). Here, an additional 2 k-1 is added. So if x ∈ [0, 2 k-1 -1], then the wrap remains unchanged. And if x ∈ [2 k-1 , 2 k -1], then the wrap will be incremented by 1, so that the encoding on the ring is consistent with the encoding in the domain. Finally, the computing parties directly subtract wrap * 2 k from sum to obtain the secret share in the domain.
[0082] The domain-to-ring protocol is based on the following theorem. Assume that x is an element in the domain and 2x < p (the size of the domain), and t0 and t1 are two elements in the domain satisfying t0 + t1 = x + wrap * p. Then wrap satisfies wrap = ((2t0 mod p) mod 2) | ((2t1 mod p) mod 2). The implementation of the domain-to-ring protocol is as Figure 5 shown. The parties first add the secret share of x in the domain to 2 [[ID=2I]] k to convert the encoding of negative integers in the domain to the encoding on the ring. Note that although the encoding of positive numbers is also incremented by 2 k , it has no impact on the final result. Because after converting to the sharing on the ring, the extra 2 k will be automatically eliminated by taking the modulus. Then, Party 0 and Party 1 respectively calculate t0, t1, 2t0 mod p mod 2, and 2t1 mod p mod 2, and secretly share them on the ring (lines 2-4). Finally, the computing parties calculate sum and wrap, and subtract wrap * (p mod 2 k ) from sum to obtain the secret share on the ring (lines 5-7).
[0083] For the operator layer, the group operation protocol is optimized, i.e., the group operation protocol is optimized in the embodiment of the application, and the communication amount and communication rounds required by the group operation protocol are reduced. In the embodiment of the application, single-bit sorting is used to optimize GroupSum, so that the communication amount is reduced from O(n*logn) to O(n), and the communication rounds are optimized from O(logn) to O(1). GroupPrefixSum and GroupMax are also based on GroupSum, so the efficiency is improved. The communication amount of GroupPrefixSum is reduced from O(n*logn) to O(n), and the communication rounds are optimized from O(logn) to O(1); GroupMax is optimized by a constant level in the communication amount and the communication rounds.
[0084] The following is the implementation of the three group operation protocols:
[0085] The implementation of GroupSum is shown in Figure 6 , assuming that r is the number of groups.
[0086] In step 1, the list is calculated, where The first element of each group is equal to and is accumulated to the corresponding position of the prefix sum.
[0087] In steps 2 and 3, we generate the sorting permutation from and apply it to In this way, the first element of each group in will be copied to the head of
[0088] In step 5, we calculate At this time, for each k∈[1,r], is the sum of the kth group in x. From step 5 to step 7, each is copied to each element in the kth group. In order to achieve this purpose, first, the difference between the sum of each adjacent group is calculated and stored in . Then each is put back to the first element of the kth group, where k∈[1,r], and is obtained. Finally, the prefix sum of is calculated to obtain the result. In the related art, a complete sorting is used to generate the permutation from . However, we observe that each element of should be 1 or 0. Therefore, single-bit sorting is used instead of complete sorting in the embodiment of the application, which greatly improves the efficiency of GroupSum.
[0089] The implementation of GroupPrefixSum is as follows: Figure 7 As shown, first calculate Right now The prefix sum. Now, Each element includes not only the prefix sum of its group, but also the sum of the preceding group. Therefore, from step 2 to step 5, calculate... That is, the sum of the preceding groups for each element, and finally from... Subtract it from the middle. The efficiency bottleneck of GroupPrefixSum in related technologies lies in GroupSum, so after improving the performance of GroupSum, the performance of GroupPrefixSum is also greatly improved.
[0090] The implementation of GroupMax is as follows Figure 8 As shown. The overall approach employs the concept of dynamic programming (steps 5-14). Each element represents whether the region contains the first element of the group in the i-th round. Each element in the array represents the position of the element at most 2 steps backward from its position in the i-th round. i The step size is the maximum value that can be found in the first element of the current group. After updating m-1 rounds, the maximum value of each group will appear in the last element of the group. Therefore, after clearing the other elements in the group, GroupSum can be used to make every element in the group equal to the maximum value (step 18). It can be seen that the implementation of GroupMax needs to be based on GroupSum, so after improving the performance of GroupSum, the performance of GroupMax is also improved.
[0091] Regarding the algorithm layer, the tree model training method based on multi-party secure computation provided in this application optimizes the training process of decision trees.
[0092] For example, this embodiment of the application reduces the number of sorting operations required during decision tree training by combining the decision tree training process with cardinality sorting under secret sharing, thereby reducing the required communication volume and communication rounds. Specifically, assuming the decision tree height is h and the number of data features is m. In related technologies, the number of sorting operations required during decision tree training is 2*h*m complete sorting operations under secret sharing, while the optimized training process in this embodiment only requires m complete sorting operations under secret sharing and h*m single-bit sorting operations. The optimized training process is as follows: First, each participant uses... Generate sorted index IDXs under secret sharing for each feature of the training data. For example, if the age feature of the training data is [10,20,1,4,3], then the IDX generated based on age is [3,4,0,2,1].
[0093] The decision tree training starts from the 0th layer and goes to the hth layer, which is a binary tree.
[0094] Suppose the training of the ith layer is being performed, the steps are as follows:
[0095] 1. Perform the following operations for each feature:
[0096] (a) First, perform the following operations for each attribute: apply the generated order index IDXs to the attribute values and labels using applyPerm(IDXs,~). Here, ~ refers to each attribute value and label.
[0097] (b) Calculate the Gini coefficient and its threshold for each split point (also known as a sample partitioning strategy) using the GroupMax, GroupPrefixSum operations and the ring domain transformation protocol. The ring domain transformation protocol is used before and after the division is calculated.
[0098] (c) Use GroupMax to obtain the optimal Gini coefficient and its threshold within each group. (Usually the optimal Gini coefficient is the minimum value, but it can be converted to find the maximum value by adding a negative sign)
[0099] 2. Compare the Gini coefficients obtained from different features to obtain the best split attribute and its threshold. Here, the attribute and threshold, which are the split attribute and threshold of the final trained decision tree node, need to be saved.
[0100] 3. Compare each sample according to the split threshold and its corresponding feature to obtain the comparison result (0 for less than the threshold and 1 for greater than the threshold).
[0101] 4. According to the comparison result, construct a new group identifier, and consider the comparison result as the highest bit of all attributes, and generate the order result IDXs2 using genPermbyBit according to the bit, and then combine the previous order result IDXs using compose(IDXs, IDXs2) to generate new IDXs. Apply the new IDXs to the sample attributes and group identifiers to ensure that the sample belongs to the correct group and the attributes within the group are in ascending order.
[0102] It can be understood that the Gini coefficient is used to evaluate the gain of each sample partitioning strategy, and the gain of each sample partitioning strategy is an indicator of the quality of the sample partitioning strategy. The gain of the sample partitioning strategy can be calculated in other ways, such as information entropy, in addition to the Gini coefficient.
[0103] The tree model training method based on multi-party secure computation provided by the embodiments of the present application greatly saves the communication amount and communication rounds. In the data representation layer, through a fast ring domain conversion protocol, the entire training process can be performed on a smaller ring for addition, multiplication, comparison and other operations, and on a larger domain for division operation. This operation alone saves more than 50% of the communication amount compared to the prior art. For the operator layer, the complete sorting in the group operation protocol in the related art is replaced by single-bit sorting, which improves the complexity of GroupMax and GroupPrefix in the three group operation protocols, and improves the constant level of GroupMax. For the algorithm layer, the number of sorting is saved by combining the radix sorting and the training process of the decision tree. Specifically, the complete sorting under 2*h*m secret sharing in the prior art is optimized to complete sorting under m secret sharing and h*m single-bit sorting in the training process. Wherein, h is the tree height, and m is the number of features of the data.
[0104] Based on the same concept as the foregoing embodiments of the tree model training method based on multi-party secure computation, the embodiments of the present application also provide a tree model training device 900 based on multi-party secure computation. The tree model training device 900 based on multi-party secure computation includes units or modules for implementing each step in Figures 2-8 .
[0105] Figure 9 The structure diagram of the tree model training device based on multi-party secure computation provided by the embodiments of the present application. The device can be deployed on any device, equipment, platform or equipment cluster with computing capability, for example, it can be deployed on Figure 3 the computing participants in the related art to reduce the communication rounds and communication amount in the tree model training process based on multi-party secure computation.
[0106] As shown in Figure 9 , the tree model training device 900 based on multi-party secure computation at least includes a training module 901 and an algebra module 902, wherein the training module 901 is configured to interact with other computing participants in the plurality of computing participants through a multi-party secure computation protocol, train a tree model based on secret shares of a training sample set, and obtain a secret share of a trained tree model, wherein the secret share of the trained tree model can be obtained based on the secret share of the tree model corresponding to each computing participant; the algebra module 902 is configured to perform division operation on a domain and non-division operation on a ring in the training process of the tree model based on the secret shares of the training sample set, and the domain is larger than the ring.
[0107] In a possible implementation, the algebra module 902 is further configured to: when performing an operation from the ring to the field, convert each element on the ring to a representation on the field; and when performing an operation from the field to the ring, convert each element on the field to a representation on the ring.
[0108] In another possible implementation, converting each element on the ring to a representation on the field includes: obtaining a representation on the field of a secret share of each element on the ring of a plurality of computing participants; calculating a sum of the representation on the field of the secret share of each element on the ring of the plurality of computing participants; and determining the representation on the field of each element on the ring based on the sum of the representation on the field of the secret share of each element on the ring of the plurality of computing participants being greater than a number of times of the ring size.
[0109] In another possible implementation, converting each element on the field to a representation on the ring includes: obtaining a first value of each element on the field by adding the size of the ring to each element on the field; obtaining a first intermediate parameter and a second intermediate parameter based on the first value of each element on the field and the size of the field; obtaining a representation on the ring of a secret share of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants; and determining the representation on the ring of each element on the field based on the representation on the ring of the secret share of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants.
[0110] In another possible implementation, the secret shares of the training sample set include secret shares of a plurality of samples in the training sample set; and the training module 901 is specifically configured to: sort the secret shares of the plurality of samples based on each feature of the secret shares, to obtain a first sorting result of the secret shares of the plurality of samples corresponding to each feature; calculate a gain of a sample segmentation strategy of each split node of a current layer, and determine the sample segmentation strategy of each split node of the current layer based on the gain; segment the secret shares of the plurality of samples based on the sample segmentation strategy of each split node of the current layer; and determine a sorting result and a grouping result of the secret shares of samples corresponding to each feature of a next layer based on the segmentation result and the first sorting result of the secret shares of the plurality of samples corresponding to each feature.
[0111] In another possible implementation, determining the sorting result of the secret shares of the samples corresponding to each feature of the next layer based on the segmentation result and the sorting result of the secret shares of the samples corresponding to each feature includes: determining a highest bit position corresponding to a feature value of each feature based on the segmentation result; performing single-bit sorting on the secret shares of the plurality of samples corresponding to each feature based on the highest bit position, to obtain a second sorting result of the secret shares of the plurality of samples corresponding to each feature; and determining the sorting result and the grouping result of the secret shares of the plurality of samples corresponding to each feature of the next layer based on the first sorting result of the secret shares of the plurality of samples corresponding to each feature and the second sorting result of the secret shares of the plurality of samples corresponding to each feature.
[0112] In another possible implementation, the secret shares of the training sample set are processed by the plurality of operators in a tree model training process based on the secret shares of the training sample set; the tree model includes a plurality of layers of nodes, each layer of nodes including a plurality of data and group identifiers corresponding to the plurality of data; the tree model training apparatus based on multi-party secure computation provided in the embodiments of the present application further includes an operator module 903, configured to sort the plurality of data by single-bit sorting based on the group identifiers when the plurality of operators process the plurality of data and the group identifiers corresponding to the plurality of data.
[0113] The tree model training apparatus 900 based on multi-party secure computation according to the embodiments of the present application can correspond to perform the methods described in the embodiments of the present application, and the above and other operations and / or functions of each module in the tree model training apparatus 900 based on multi-party secure computation are respectively to realize the corresponding processes of each method in Figures 2-8 For brevity, they will not be described here.
[0114] Based on the same concept as the foregoing embodiments of the method, the embodiments of the present application also provide a computing device, which at least includes a processor and a memory, and the memory has stored a program, and the processor can implement Figures 2-8 the units or modules of each step in the method shown in
[0115] Figure 10 A structural schematic diagram of a computing device provided in the embodiments of the present application.
[0116] As shown in Figure 10 , the computing device 1000 includes at least one processor 1001, a memory 1002 and a communication interface 1003. Among them, the processor 1001, the memory 1002 and the communication interface 1003 are communicatively connected, which can be realized by wired (such as bus) communication connection, or can be realized by wireless communication connection. The communication interface 1003 is used to receive data (such as secret shares of the training sample set) sent by other devices; the memory 1002 stores computer instructions, and the processor 1001 executes the computer instructions to execute the method in the foregoing method embodiments.
[0117] It should be appreciated that in the embodiments of the present application, the processor 1001 can be a central processing unit (CPU), and the processor 1801 can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0118] The memory 1002 can include a read-only memory and a random access memory, and provide instructions and data for the processor 1001. The memory 1002 can also include a non-volatile random access memory.
[0119] The memory 1002 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0120] It should be appreciated that the computing device 1000 according to the embodiments of the present application can perform the method shown in the embodiments of the present application, and the detailed description of the method implemented by the computing device 1000 is described above. For brevity, it will not be repeated here. Figures 2-8 It should be appreciated that the computing device 1000 according to the embodiments of the present application can perform the method shown in the embodiments of the present application, and the detailed description of the method implemented by the computing device 1000 is described above. For brevity, it will not be repeated here.
[0121] Embodiments of the present application provide a computer readable storage medium having stored thereon computer program, which when executed by a processor, causes the above-mentioned method to be implemented.
[0122] Embodiments of the present application provide a chip, comprising at least one processor and an interface, the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the above-mentioned method.
[0123] Embodiments of the present application provide a computer program or computer program product, comprising instructions, which when executed, cause a computer to execute the above-mentioned method.
[0124] Those skilled in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms above. Whether the functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0125] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.
[0126] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data processing method based on multi-party secure computation, applied to any computing participant in a plurality of computing participants, the any computing participant having a secret share of a data set to be processed, characterized in that, The method comprises: processing the secret shares of the to-be-processed data set through interaction with other computing participants in the plurality of computing participants by a multi-party secure computation protocol to obtain secret shares of a processing result; in the process of processing the secret shares of the to-be-processed data set, performing division operations on a domain and non-division operations on a ring, the domain being larger than the ring; when switching from the ring to the domain to perform operations, converting each element on the ring to the domain for representation; when switching from the domain to the ring to perform operations, converting each element on the domain to the ring for representation; the conversion of each element on the ring to the domain for representation comprises: obtaining the representation of the secret shares of each element on the ring of the plurality of computing participants on the domain; calculating the sum of the representations of the secret shares of each element on the ring of the plurality of computing participants on the domain; determining the representation of each element on the ring on the domain based on the sum of the representations of the secret shares of each element on the ring of the plurality of computing participants on the domain being greater than the size of the ring a plurality of times.
2. The method of claim 1, wherein, the conversion of each element on the domain to the ring for representation comprises: adding each element on the domain to the size of the ring to obtain a first value of each element on the domain; obtaining a first intermediate parameter and a second intermediate parameter based on the first value of each element on the domain and the size of the domain; obtaining the representation of the secret shares of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring; determining the representation of each element on the domain on the ring based on the representation of the secret shares of the first intermediate parameter and the second intermediate parameter of the plurality of computing participants on the ring.
3. The method of claim 1, wherein, the to-be-processed data set is a training sample set; the processing of the secret shares of the to-be-processed data set to obtain secret shares of a processing result comprises: training a tree model based on the secret shares of the training sample set to obtain secret shares of the trained tree model, wherein the secret shares of the trained tree model can be obtained based on the secret shares of the tree model corresponding to each computing participant.
4. The method of claim 3, wherein, the secret shares of the training sample set comprise secret shares of a plurality of samples in the training sample set; the training of the tree model based on the secret shares of the training sample set to obtain secret shares of the trained tree model comprises: sorting the secret shares of the plurality of samples based on each feature of the secret shares of the samples to obtain a first sorting result of the secret shares of the plurality of samples corresponding to each feature; calculating the gain of the sample partition strategy of each split node in the current layer, and determining the sample partition strategy of each split node in the current layer based on the gain; segmenting the secret shares of the plurality of samples based on the sample partition strategy of each split node in the current layer to obtain a segmentation result; and Determine a next-layer sorting result and a grouping result of the secret shares of the plurality of samples corresponding to each feature based on the splitting result and a first sorting result of the secret shares of the plurality of samples corresponding to each feature.
5. The method of claim 4, wherein, The determining of the next-layer sorting result and the grouping result of the secret shares of the plurality of samples corresponding to each feature based on the splitting result and the first sorting result of the secret shares of the plurality of samples corresponding to each feature comprises: Determining a highest bit position corresponding to a feature value of each feature based on the splitting result; Performing single-bit sorting on the secret shares of the plurality of samples corresponding to each feature based on the highest bit position to obtain a second sorting result of the secret shares of the plurality of samples corresponding to each feature; Determine a next-layer sorting result and a grouping result of the secret shares of the plurality of samples corresponding to each feature based on the splitting result and a first sorting result of the secret shares of the plurality of samples corresponding to each feature.
6. The method according to any one of claims 3-5, characterized in that, The plurality of operators process the secret shares of the training sample set during the training of the tree model based on the secret shares of the training sample set; The tree model comprises a plurality of layers of nodes, and each layer of nodes comprises a plurality of data and group identifiers corresponding to the plurality of data; When the plurality of operators process the plurality of data and the group identifiers corresponding to the plurality of data, the plurality of data are sorted based on the group identifiers through single-bit sorting.
7. A data processing apparatus based on secure multi-party computation, applied to any computing party of a plurality of computing parties, the any computing party having a secret share of a data set to be processed, characterized in that, Comprise: A data processing module configured to interact with other computing participants in the plurality of computing participants through a multi-party secure computation protocol, process secret shares of the to-be-processed data set, and obtain a secret share of a processing result; An algebraic module configured to perform division on a domain and non-division on a ring during processing of the secret shares of the to-be-processed data set, the domain being larger than the ring; When converting from the ring to the domain to perform an operation, each element on the ring is converted to the domain for representation; When converting from the domain to the ring to perform an operation, each element on the domain is converted to the ring for representation; The conversion of each element on the ring to the domain for representation comprises: Obtain a representation of each element on the ring of the plurality of computing participants in the domain; Calculate a sum of the representations of each element on the ring of the plurality of computing participants in the domain; Determine the representation of each element on the ring in the domain based on a number of times that the sum of the representations of each element on the ring of the plurality of computing participants in the domain is greater than the size of the ring.
8. The apparatus of claim 7, wherein, The conversion of each element on the domain to the ring for representation comprises: Add the size of the ring to each element on the domain to obtain a first value of each element on the domain; Based on the first value of each element on the domain and the size of the domain, obtain a first intermediate parameter and a second intermediate parameter; obtaining representations of secret shares of the first and second intermediate parameters of the plurality of computing parties on the ring; determining representations of elements on the ring based on the representations of secret shares of the first and second intermediate parameters of the plurality of computing parties on the ring.
9. The apparatus of claim 7, wherein, The to-be-processed data set is a training sample set. The data processing module is specifically configured to: train a tree model based on secret shares of the training sample set, to obtain secret shares of the trained tree model, wherein the secret shares of the trained tree model can be obtained based on the secret shares of the tree model corresponding to each computing party.
10. The apparatus of claim 9, wherein, The secret shares of the training sample set include secret shares of multiple samples in the training sample set. The data processing module is specifically configured to: sort the secret shares of the multiple samples based on each feature of the secret shares of the sample, to obtain a first sorting result of the secret shares of the multiple samples corresponding to the each feature; calculate gains of sample partition strategies of each split node of the current layer, and determine the sample partition strategies of each split node of the current layer based on the gains; partition the secret shares of the multiple samples based on the sample partition strategies of each split node of the current layer, to obtain a partition result; determine a sorting result and a grouping result of the secret shares of the multiple samples corresponding to the each feature in the next layer based on the partition result and the first sorting result of the secret shares of the multiple samples corresponding to the each feature.
11. The apparatus of claim 10, wherein, The determining a sorting result and a grouping result of the secret shares of the multiple samples corresponding to the each feature in the next layer based on the partition result and the first sorting result of the secret shares of the multiple samples corresponding to the each feature includes: determining a highest bit position corresponding to a feature value of the each feature based on the partition result; performing single-bit sorting on the secret shares of the multiple samples corresponding to each feature based on the highest bit position, to obtain a second sorting result of the secret shares of the multiple samples corresponding to the each feature; determining a sorting result and a grouping result of the secret shares of the multiple samples corresponding to the each feature in the next layer based on the first sorting result of the secret shares of the multiple samples corresponding to the each feature and the second sorting result of the secret shares of the multiple samples corresponding to the each feature.
12. The device of any one of claims 9-11, wherein, The tree model is trained based on the secret shares of the training sample set by multiple operators during the training process. The tree model includes multiple layers of nodes, and each layer of nodes includes multiple data and group identifiers corresponding to the multiple data. The apparatus further includes: an operator module configured to sort the multiple data by single-bit sorting based on the group identifiers when the multiple operators process the multiple data and the group identifiers corresponding to the multiple data.
13. A computing device comprising a memory and a processor, wherein: The memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-6. The memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-6.
14. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is configured to cause a computer to perform the method of any one of claims 1-6 when the computer program is executed in the computer.
Citation Information
Patent Citations
Secret sharing protocol-based optimization method for safe and efficient mathematical division calculation
CN113535121A