Method and device for constructing federated random forest model
By using the encryption protection mechanism to obtain the tag aggregation information of split points in the federated random forest model, the problem of poor interpretability after the model is anonymous is solved, and the balance between data security and interpretability in vertical federated learning is achieved.
Patent Information
- Application Number
- CN202210126686.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-02-10
AI Technical Summary
The lack of interpretability of the existing federated random forest model after data anonymity hinders its application in longitudinal federated learning.
Through the encryption protection mechanism, after the data features are aligned, the tag aggregation information of the split point is obtained, and data exchange and decryption are used to ensure data security while improving the interpretability of the model.
On the premise of ensuring data security, the interpretability of the federated random forest model is improved and its application in vertical federated learning is promoted.
Smart Images

Figure CN114548424B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a method and device for constructing a federated random forest model. Background Art
[0002] With the rapid development of computer software and hardware technologies, the era of big data has penetrated every industry. The data-centric artificial intelligence industry has experienced explosive growth and expansion, finding widespread application and practical application in fields such as finance, healthcare, education, and advertising. However, measures taken to protect data security have objectively hindered data use, creating the phenomenon of "data silos." To address this problem, federated learning has emerged.
[0003] Tree models offer high interpretability. To mitigate the weak performance of single decision trees within a vertical federated learning framework, a federated random forest model was proposed. While inheriting the high performance of random forests, the federated random forest model also fully considers data security requirements. In existing federated random forest model construction methods, if the data provider does not anonymize the meaning of its features to the business provider, and the business provider selects the splitting feature and split point based on the Gini coefficient, if the selected splitting feature is owned by the data provider and is binary, the business provider will learn the data provider's features.
[0004] However, when the meaning of the features is anonymized by the data provider to the business side, the federated random forest model lacks interpretability for the business side, which hinders the further application of the federated random forest. Summary of the Invention
[0005] The embodiments of the present application provide a method and apparatus for constructing a federated random forest model to solve the problem of poor interpretability of the federated random forest model in the prior art.
[0006] In a first aspect, an embodiment of the present application provides a method for constructing a federated random forest model, which is applied to a business party device, and the method includes:
[0007] Performing encrypted sample alignment on the data features in the business party device and the data features in the data party device to determine the aligned overall data set;
[0008] Determining a training set for a first tree of the federated random forest model based on the overall data set;
[0009] When splitting at the first splitting point of the first tree, randomly sampling the sample set to construct an alternative splitting feature set;
[0010] Obtaining, in encryption protection, label aggregation information of the first splitting point according to the device to which the feature in the candidate splitting feature set belongs;
[0011] The first splitting point is split according to the label aggregation information of the first splitting point.
[0012] In an optional implementation, obtaining the label aggregation information of the first splitting point under encryption protection according to the device to which the feature in the candidate splitting feature set belongs includes:
[0013] If the feature in the candidate splitting feature set belongs to the business party device, receiving the encrypted sample encoding information of the first splitting point sent by the data party device;
[0014] Calculating encrypted label aggregation information of the first splitting point according to the encrypted sample encoding information;
[0015] Sending the encrypted label aggregation information of the first splitting point to the data party device;
[0016] Receive the decrypted tag aggregation information sent by the data party device.
[0017] In an optional implementation, obtaining the label aggregation information of the first splitting point under encryption protection according to the device to which the feature in the candidate splitting feature set belongs includes:
[0018] If the feature in the candidate split feature set belongs to the data party device, receiving the encrypted label aggregation information of the first splitting point sent by the data party device;
[0019] The encrypted tag aggregation information is decrypted to obtain the decrypted tag aggregation information.
[0020] In an optional embodiment, the encryption protection includes additive homomorphic encryption.
[0021] In an optional implementation, before obtaining the label aggregation information of the first splitting point in encryption protection, the method further includes:
[0022] Sending a first public key to the data party device, where the first public key is a public key in a first public-private key pair used by the business party device for additive homomorphic encryption;
[0023] Receive a second public key sent by the data party device, where the second public key is a public key in a second public-private key pair used by the data party device to perform additive homomorphic encryption.
[0024] In an optional embodiment, after determining the aligned overall data set, the method further includes:
[0025] Performing binning processing on the data features in the overall data set to generate a threshold candidate set to be split;
[0026] The threshold candidate set to be split is sent to the data party device.
[0027] In an optional implementation, determining a training set for a first tree of the federated random forest model based on the entire data set includes:
[0028] Sampling with replacement is performed on the entire data set to determine a training set for the first tree of the federated random forest model.
[0029] In an optional embodiment, after determining the training set of the first tree of the federated random forest model, the method further includes:
[0030] Encrypting the predicted value of the training set of the first tree;
[0031] The encrypted prediction value of the training set of the first tree is sent to the data party device.
[0032] In an optional implementation, splitting the first splitting point according to the label aggregation information of the first splitting point includes:
[0033] Calculating the Gini coefficient of the first splitting point according to the label aggregation information of the first splitting point;
[0034] If the maximum value of the Gini coefficient of the first splitting point is greater than or equal to the threshold of the Gini coefficient, the first splitting point is split;
[0035] Send the splitting rule of the first splitting point to the data party device.
[0036] In an optional implementation, after calculating the Gini coefficient of the first splitting point, the method further includes:
[0037] If the maximum value of the Gini coefficient of the first splitting point is less than the threshold value of the Gini coefficient, the first splitting point is not split.
[0038] In an optional implementation, after splitting at the first splitting point, the method further includes:
[0039] If the feature in the candidate split feature set belongs to the business party device, the left child node sample encoding information after the full sample space corresponding to the feature belonging to the business party device is split is sent to the data party device.
[0040] In an optional embodiment, after splitting the first splitting point, the method further includes:
[0041] When the splitting point of the first tree cannot be split or the depth of the first tree reaches a preset depth threshold, the splitting of the splitting point of the first tree is stopped.
[0042] In a second aspect, an embodiment of the present application provides a method for constructing a federated random forest model, which is applied to a data cube device. The method includes:
[0043] When the first splitting point of the first tree of the federated random forest model splits, the auxiliary service party device obtains the label aggregation information of the first splitting point in encryption protection according to the device to which the features in the candidate splitting feature set belong.
[0044] In an optional implementation manner, the auxiliary service party device obtains the label aggregation information of the first splitting point under encryption protection, including:
[0045] If the feature in the candidate split feature set belongs to the service party device, encoding sample information of the first splitting point to generate sample encoding information of the first splitting point;
[0046] Encrypting the sample encoding information of the first splitting point;
[0047] Sending the encrypted sample coding information of the first splitting point to the service party device;
[0048] receiving the encrypted label aggregation information of the first splitting point sent by the service party device;
[0049] decrypting the encrypted label aggregation information of the first splitting point;
[0050] The decrypted tag aggregation information is sent to the service party device.
[0051] In an optional implementation, the method further includes:
[0052] receiving a threshold candidate set to be split sent by the service party device;
[0053] receiving the encrypted prediction value of the training set of the first tree sent by the service party device;
[0054] In an optional implementation manner, the auxiliary service party device obtains the label aggregation information of the first splitting point under encryption protection, including:
[0055] If the features in the candidate split feature set belong to the data cube device, determining the sample encoding information of each box of samples according to the threshold candidate set to be split;
[0056] aggregating the sample encoding information of each box of samples according to the encrypted prediction value of the training set of the first tree to determine the encrypted label aggregation information of the first splitting point;
[0057] Send the encrypted label aggregation information of the first splitting point to the service party device.
[0058] In a third aspect, an embodiment of the present application provides a device for constructing a federated random forest model, the device comprising:
[0059] An alignment module, configured to perform encrypted sample alignment of the data features in the construction device with the data features in the data-side device, and determine an aligned overall data set;
[0060] a sampling module, configured to determine a training set for a first tree of the federated random forest model based on the overall data set;
[0061] A construction module, configured to randomly sample the sample set when splitting at the first splitting point of the first tree to construct an alternative splitting feature set;
[0062] An acquisition module, configured to acquire, in encrypted protection, label aggregation information of the first splitting point according to the device to which the feature in the candidate splitting feature set belongs;
[0063] A splitting module is configured to split the first splitting point according to the label aggregation information of the first splitting point.
[0064] In an optional embodiment, the acquisition module is specifically used to receive the encrypted sample coding information of the first splitting point sent by the data party device if the features in the alternative splitting feature set belong to the business party device; calculate the encrypted label aggregation information of the first splitting point based on the encrypted sample coding information; send the encrypted label aggregation information of the first splitting point to the data party device; and receive the decrypted label aggregation information sent by the data party device.
[0065] In an optional embodiment, the acquisition module is specifically used to receive the encrypted label aggregation information of the first splitting point sent by the data party device if the features in the alternative splitting feature set belong to the data party device; decrypt the encrypted label aggregation information to obtain the decrypted label aggregation information.
[0066] In an optional embodiment, the encryption protection includes additive homomorphic encryption.
[0067] In an optional embodiment, the device further includes:
[0068] An encryption module is used to send a first public key to the data party device, where the first public key is the public key in the first public-private key pair used by the business party device for additive homomorphic encryption; and receive a second public key sent by the data party device, where the second public key is the public key in the second public-private key pair used by the data party device for additive homomorphic encryption.
[0069] In an optional implementation, the construction module is further configured to perform binning processing on the data features in the overall data set to generate a threshold candidate set to be split; and send the threshold candidate set to be split to the data cube device.
[0070] In an optional implementation, the sampling module is specifically used to perform sampling with replacement on the entire data set to determine a training set for the first tree of the federated random forest model.
[0071] In an optional implementation, the encryption module is further configured to encrypt the predicted value of the training set of the first tree; and send the encrypted predicted value of the training set of the first tree to the data party device.
[0072] In an optional embodiment, the splitting module is further used to calculate the Gini coefficient of the first splitting point based on the label aggregation information of the first splitting point; if the maximum value of the Gini coefficient of the first splitting point is greater than or equal to the threshold of the Gini coefficient, the first splitting point is split; and the splitting rule of the first splitting point is sent to the data cube device.
[0073] In an optional implementation, the splitting module is further configured to: if the maximum value of the Gini coefficient of the first splitting point is less than a threshold value of the Gini coefficient, the first splitting point is not split.
[0074] In an optional embodiment, the splitting module is also used to send the left child node sample encoding information after the full sample space corresponding to the feature belonging to the business party device is split to the data party device if the feature in the alternative splitting feature set belongs to the business party device.
[0075] In an optional implementation, the splitting module is further configured to stop splitting the splitting point of the first tree when the splitting point of the first tree cannot be split or the depth of the first tree reaches a preset depth threshold.
[0076] In a fourth aspect, an embodiment of the present application provides a device for constructing a federated random forest model, the device comprising:
[0077] The processing module is configured to assist the service party device in obtaining the label aggregation information of the first splitting point under encryption protection according to the device to which the features in the candidate splitting feature set belong when the first splitting point of the first tree of the federated random forest model splits.
[0078] In an optional embodiment, the processing module is specifically used to encode sample information of the first splitting point to generate sample coding information of the first splitting point if the feature in the alternative splitting feature set belongs to the business party device; encrypt the sample coding information of the first splitting point; send the encrypted sample coding information of the first splitting point to the business party device; receive the encrypted label aggregation information of the first splitting point sent by the business party device; decrypt the encrypted label aggregation information of the first splitting point; and send the decrypted label aggregation information to the business party device.
[0079] In an optional embodiment, the device further includes:
[0080] A receiving module is used to receive a candidate set of threshold values to be split sent by the business party device; and receive a predicted value of the encrypted training set of the first tree sent by the business party device.
[0081] In an optional embodiment, the processing module is specifically used to determine the sample encoding information of each box of samples based on the threshold candidate set to be split if the features in the alternative splitting feature set belong to the data party device; aggregate the sample encoding information of each box of samples based on the predicted value of the encrypted training set of the first tree to determine the encrypted label aggregation information of the first splitting point; and send the encrypted label aggregation information of the first splitting point to the business party device.
[0082] In a fifth aspect, the present application further provides an electronic device, comprising: a processor, and a memory;
[0083] The memory is used to store a computer program of the processor; the processor is configured to implement any possible method in the first aspect by executing the computer program.
[0084] In a sixth aspect, the present application further provides an electronic device, comprising: a processor, and a memory;
[0085] The memory is used to store a computer program of the processor; the processor is configured to implement any possible method in the second aspect by executing the computer program.
[0086] In a seventh aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any one of the first aspects.
[0087] In an eighth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any one of the second aspects.
[0088] In a ninth aspect, the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, and when the computer program is executed by a processor, any possible method in the first aspect is implemented.
[0089] In a tenth aspect, the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, and when the computer program is executed by a processor, any possible method in the second aspect is implemented.
[0090] The method and device for constructing a federated random forest model provided in the embodiment of the present application encrypt and align the data features in the business party device with the data features in the data party device to determine the overall data set after alignment; determine the training set of the first tree of the federated random forest model based on the overall data set; randomly sample the sample set when the first splitting point of the first tree splits to construct an alternative splitting feature set; obtain the label aggregation information of the first splitting point in encrypted protection based on the device to which the features in the alternative splitting feature set belong; and split the first splitting point based on the label aggregation information of the first splitting point. In the above manner, the label aggregation information of the first splitting point is obtained in encrypted protection, which improves the interpretability of the federated random forest model while ensuring data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0092] Figure 1 A schematic diagram of the existing federated random forest modeling process;
[0093] Figure 2 A schematic diagram of a process flow of a federated random forest model provided in an embodiment of the present application;
[0094] Figure 3 A schematic diagram of the principle of a federated random forest model provided in an embodiment of the present application;
[0095] Figure 4 A signaling interaction diagram of a method for constructing a federated random forest model provided in an embodiment of the present application;
[0096] Figure 5 A signaling interaction diagram of another method for constructing a federated random forest model provided in an embodiment of the present application;
[0097] Figure 6 A schematic diagram of the structure of a device for constructing a federated random forest model provided in an embodiment of the present application;
[0098] Figure 7 A schematic diagram of the structure of another apparatus for constructing a federated random forest model provided in an embodiment of the present application;
[0099] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0100] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0101] With the rapid development of computer software and hardware technologies, the era of big data has penetrated every industry. The data-centric artificial intelligence industry has experienced explosive growth and expansion, finding widespread application and practical application in fields such as finance, healthcare, education, and advertising. However, measures taken to protect data security have objectively hindered data use, creating the phenomenon of "data silos." To address this problem, federated learning has emerged.
[0102] Based on the relationship between the sample space and feature space of each participant's data in federated learning, federated learning algorithms can be divided into three categories: horizontal federated learning, vertical federated learning, and federated transfer learning. In the horizontal federated learning framework, each participant has the same feature space but different sample spaces, meaning that each participant has feature data of the same dimensions for different users. In the vertical federated learning framework, each participant has the same sample space but different feature spaces, meaning that each participant has feature data of different dimensions for the same users. In the federated transfer learning framework, each participant has different sample and feature spaces, requiring transfer learning to achieve learning.
[0103] The Random Forest model's high interpretability has made it widely used in federated learning, particularly vertical federated learning. Because a single decision tree model has limited performance and is unable to meet real-world business needs, the Federated Random Forest model was proposed. The Federated Random Forest model integrates multiple decision trees, offering strong learning capabilities and reducing model variance. Within the vertical federated learning framework, while inheriting the high performance of the Random Forest model, it also fully considers data security requirements.
[0104] Figure 1 A schematic diagram of the existing federated random forest modeling process. Figure 1 As shown in the figure, there are two parties: business parties and data parties. The data party is the party that provides data features, while the business party not only provides data features but also provides data labels.
[0105] Continue to refer Figure 1 ,The existing federated random forest modeling includes the encrypted sample alignment stage and the encrypted model training stage.
[0106] During the encrypted sample alignment phase, since the training algorithm requires the business and data parties to match the features belonging to the same data, in order to protect data privacy and security, data samples can be aligned based on privacy intersection technology.
[0107] During the encryption model training phase, federated modeling can be performed using the data of each participant based on the aligned data. The intermediate data during the encryption model training phase can be protected using additive homomorphic encryption (e.g., the Pailllier algorithm) to prevent data privacy leaks. Additive homomorphic encryption is an addition and multiplication operation based on ciphertext. For example, formulas (1)-(2) are a type of additive homomorphic encryption.
[0108]
[0109]
[0110] in, Used to represent homomorphic encryption operations.
[0111] The following describes the modeling process of the federated random forest.
[0112] In the modeling process of a federated random forest, first, each tree in the random forest is independent of each other. Second, when constructing each tree in the federated random forest, the training set used is sampled with replacement from the full dataset, and the training set sample size is the same as the full dataset. Finally, when each tree in the federated random forest determines the splitting feature, it first randomly selects several features from the total set as candidates, and then selects the feature with the highest information gain from these candidates as the splitting feature.
[0113] Exemplarily, after the encrypted sample alignment phase, the data of the business party is with label y ∈ R N , and the data of the data party is The overall data set is X = [X g , X h ∈ R n×d , d = d g + d h . Suppose there are T trees in the random forest in total. At each split, the number of alternative features is k < d. Correspondingly, the encrypted model training phase includes steps S101 to S112.
[0114] S101. The business party generates a public-private key pair <p, p'> for additive homomorphic encryption and sends the public key p for encryption to the data party.
[0115] S102. For each feature q = 1, 2,..., d g + d h of the business party and the data party, perform binning to obtain L quantiles split q = {split q1 , split q2 ,..., split qL} as the candidate thresholds for splitting.
[0116] S103. For each tree t ∈ {1, 2,..., T} in the federated random forest, execute steps S104 - S111.
[0117] S104. The business party samples with replacement from X, selects N samples, constructs the training set X t ∈ R N ×d , and synchronizes the sample identification information of X t to the data party.
[0118] S105. The business party, for the current node, randomly selects k features from all d features as the alternative splitting feature set and synchronizes it to the corresponding data party.
[0119] S106. The business party encrypts the predicted value y in the data set and sends it to the data party.
[0120] S107. Let the sample set within the current node be I. The business party and the data party bin I according to split q .
[0121] S108, the business side performs label aggregation on each box of its own features and obtains the number of positive samples in each box. l , calculate the Gini coefficient of each split point of the feature, and set the sample set in the left child node after splitting as I L , the sample set in the right child node is I R , then the calculation method of the Gini coefficient is as shown in formula (3):
[0122]
[0123] S109, the data side aggregates the labels in each box of its own features and counts the number of samples in each box The aggregate value and The data is synchronized to the business side. After the business side decrypts the tag aggregation value, it calculates the Gini coefficient of each feature and each split point of the data side. The calculation is shown in formula (3).
[0124] S110. The business party selects the splitting features and splitting points based on the Gini coefficient.
[0125] S111. For each leaf node of the current tree, the above steps S105 to S111 are executed in a loop until all leaf nodes can no longer be split or the depth of the tree reaches the set maximum depth. The business side calculates the predicted value of each leaf node, and the current tree is constructed.
[0126] S112. After all sub-models are established, the prediction results of the obtained integrated tree model are used to vote for the prediction results of each sub-model.
[0127] As shown in the modeling process of the federated random forest model, if the data owner does not anonymize the meaning of its features to the business owner, when the business owner selects the splitting feature and split point based on the Gini coefficient, if the selected splitting feature belongs to the data owner and is binary, the business owner will know the data owner's features. However, when the data owner anonymizes the meaning of the features to the business owner, the federated random forest model lacks interpretability for the business owner, hindering its further application.
[0128] To address the aforementioned issues, embodiments of the present application provide a method and apparatus for constructing a federated random forest model. This method, based on the device to which the features in the candidate splitting feature set belong, obtains encrypted, aggregated label information for the splitting point, thereby splitting the splitting point. This approach improves the interpretability of the federated random forest model while ensuring data security.
[0129] It can be understood that the above-mentioned method for constructing a federated random forest model can be implemented by the construction device of a federated random forest model provided in an embodiment of the present application. The construction device of the federated random forest model can be part or all of a certain device, such as a business party device or a data party device.
[0130] The following uses a business side device and a data side device that have integrated or installed relevant execution code as an example to describe the technical solutions of the embodiments of the present application in detail with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0131] Figure 2 A flowchart of a federated random forest model provided in an embodiment of the present application is provided. Figure 3 This is a schematic diagram of the principle of a federated random forest model provided in the embodiment of this application. This embodiment involves the process of how to build a federated random forest model, and its execution subject is the business party device. Figure 2 and Figure 3 As shown, the method includes:
[0132] S201: Align the data features in the business party device with the data features in the data party device through encrypted samples to determine the aligned overall data set.
[0133] In this application, before training the federated random forest model, it is necessary to align the data features in the business-side device and the data-side device to determine the aligned overall data set.
[0134] Alignment can be understood as matching the features of the same data in the business side device and the data side device.
[0135] It should be understood that the embodiments of the present application do not limit how to align encrypted samples. For example, data samples can be aligned through privacy intersection technology, thereby facilitating the subsequent training of the federated random forest model while protecting data privacy and security.
[0136] It should be noted that the embodiment of the present application does not limit the overall data set after alignment. For example, after the encrypted samples are aligned, the data of the business party device is The label is y∈R N , the data of the data party device is The overall data set is X=[X g ,X h ]∈R N×d , d=d g +d h . Assume that there are T trees in the random forest, and at each split, the number of alternative features is k <d。
[0137] In some embodiments, after determining the aligned overall data set, the business-side device can send a first public key to the data-side device. This first public key is the public key in the first public-private key pair used by the business-side device for additive homomorphic encryption. Similarly, the data-side device can send a second public key to the business-side device. This second public key is the public key in the second public-private key pair used by the data-side device for additive homomorphic encryption. Through the first public-private key pair and the second public-private key pair, additive homomorphic encryption can be implemented in subsequent model training.
[0138] For example, the business party device generates a public-private key pair for additive homomorphic encryption <p g ,p′ g >, then the public key p used for encryption can be g The data party device generates a public-private key pair for additive homomorphic encryption. <p h ,p′ h >, then the public key p used for encryption can be h Sent to the business party's device.
[0139] In some embodiments, after determining the aligned overall data set, the business-side device may bin the data features in the overall data set to generate a set of candidate threshold values to be split. Subsequently, the business-side device may send the set of candidate threshold values to be split to the data-side device.
[0140] For example, for each feature q=1, 2, ..., d of the service side device and the data side device g +d h , you can do binning to get L quantiles of each feature split q ={split q1 ,split q2 ,…,split qL}, as the threshold candidate to be split.
[0141] S202. Determine a training set for the first tree of the federated random forest model based on the entire data set.
[0142] In this step, once the business-side device determines the aligned overall dataset, it can begin training the federated random forest model. Based on the overall dataset, the business-side device can determine the training set for the first tree of the federated random forest model and send the training set to the data-side device.
[0143] Among them, the first tree can be understood as any tree of the federated random forest model. Before training each tree, the training set of the tree needs to be determined.
[0144] It should be noted that the embodiments of the present application do not limit how to determine the training set of the first tree of the federated random forest model. In some implementations, the business party device can perform replacement sampling on the entire data set to determine the training set of the first tree of the federated random forest model.
[0145] Sampling with replacement is a form of simple random sampling. In this method, each number is drawn and then returned to the population. For any given draw, since the population size remains constant, each number has an equal chance of being drawn.
[0146] For example, for each tree t∈{1,2,…,T} in the federated random forest, the business device can sample with replacement from X, select N samples, and construct the training set X for the t-th tree. t ∈R N×d , and X t The sample identification information is synchronized to the data party device.
[0147] In some embodiments, after determining the training set of the first tree of the federated random forest model, the business party device may first encrypt the prediction value of the training set of the first tree, and then send the encrypted prediction value of the training set of the first tree to the data party device.
[0148] For example, the business side device may first encrypt the prediction value y of the training set of the first tree to obtain the encrypted prediction value and will Sent to the data party device.
[0149] S203: When the first splitting point of the first tree splits, randomly sample the sample set to construct an alternative split feature set.
[0150] In this step, once the business-side device determines the training set for the first tree of the federated random forest model, it can begin splitting the split point in the first tree. When the first split point of the first tree splits, the sample set is randomly sampled to construct an alternative split feature set.
[0151] The first splitting point may be any node in the first tree.
[0152] Exemplarily, for the first splitting node, the business party device may randomly select k features from all d features as candidate splitting features, and synchronize them to the corresponding data party.
[0153] S204 : Obtain label aggregation information of the first splitting point in encryption protection according to the device to which the features in the candidate splitting feature set belong.
[0154] In this step, after the service-side device constructs the candidate split feature set, it can obtain the label aggregation information of the first split point under encryption protection according to the device to which the features in the candidate split feature set belong.
[0155] The embodiment of the present application does not limit how to obtain the label aggregation information of the first splitting point in encryption protection, and can be determined based on the device to which the features in the candidate splitting feature set belong.
[0156] In some embodiments, if a feature in the candidate split feature set belongs to a business-side device, the data-side device encodes sample information for the first splitting point, generates sample encoding information for the first splitting point, and encrypts the sample encoding information for the first splitting point. Subsequently, the data-side device may send the encrypted sample encoding information for the first splitting point to the business-side device. The business-side device may calculate encrypted tag aggregation information for the first splitting point based on the encrypted sample encoding information, and send the encrypted tag aggregation information for the first splitting point to the data-side device. Finally, the data-side device may decrypt the encrypted tag aggregation information for the first splitting point and send the decrypted tag aggregation information to the business-side device.
[0157] Among them, encryption protection includes additive homomorphic encryption.
[0158] For example, the data server device may encode the sample information of the first split point to obtain the sample encoding information π={0,1} N , where 0 means the sample does not belong to the first split point, and 1 means the sample belongs to the first split point. When the data party device encodes the sample information, based on p h Perform homomorphic encryption Will Transmit to the business side device. Business side device, based on and sample coding information for each box of samples Calculate the label aggregation information under the first split point of each feature. The aggregation method is shown in formula (4):
[0159]
[0160] The business side device can then Returned to the data party's device, after decryption, the data party's device can Return to the business device.
[0161] In other embodiments, if the features in the candidate split feature set belong to the data party device, the data party device can determine the sample encoding information for each box of samples based on the threshold candidate set to be split. Next, the data party device aggregates the sample encoding information for each box of samples based on the predicted values of the encrypted training set of the first tree to determine the encrypted label aggregation information of the first split point. Third, the data party device sends the encrypted label aggregation information of the first split point to the business party device. Finally, the business party device can decrypt the encrypted label aggregation information to obtain the decrypted label aggregation information.
[0162] Among them, encryption protection includes additive homomorphic encryption.
[0163] For example, the data party device can be based on split q Divide the samples into boxes and encode the sample information in each box to obtain the sample encoding information π of each box of samples bin ={0,1} N , where 0 and 1 have the same meaning as π. The label information in each box is aggregated. The aggregation method is shown in formula (5):
[0164]
[0165] The data party device can then Synchronize to the business side so that the business side equipment can Decrypt it, and you get
[0166] S205: Split the first splitting point according to the label aggregation information of the first splitting point.
[0167] In this step, after obtaining the label aggregation information of the first splitting point in the encryption protection, the service party device may split the first splitting point according to the label aggregation information of the first splitting point.
[0168] It should be noted that the embodiments of the present application do not limit how the first splitting point is split. In some embodiments, the business-side device may calculate the Gini coefficient of the first splitting point based on the tag aggregation information of the first splitting point. If the maximum value of the Gini coefficient of the first splitting point is less than the threshold value of the Gini coefficient, the first splitting point is not split. If the maximum value of the Gini coefficient of the first splitting point is greater than or equal to the threshold value of the Gini coefficient, the first splitting point is split, and the splitting rule of the first splitting point is sent to the data-side device.
[0169] It should be noted that if it is a business side feature, the business side device can synchronize the left child node sample encoding information after the corresponding full sample space is split to the data side device.
[0170] It should be understood that for each leaf node of the first tree, the above-mentioned first tree splitting process is executed cyclically until all leaf nodes can no longer be split or the depth of the tree reaches the set maximum depth. The business side calculates the predicted value of each leaf node, and the current tree construction is completed.
[0171] In some embodiments, after all trees are constructed, the prediction results of the obtained ensemble tree model are used to vote for the prediction results of each tree.
[0172] In this application, encryption is implemented when data-side devices synchronize node sample information with business-side devices, and when business-side devices synchronize sample label information with data-side devices. Therefore, data-side devices can disclose their feature meanings to business-side devices without leaking their data features, improving the interpretability of the model while ensuring data security.
[0173] The method for constructing a federated random forest model provided in an embodiment of the present application performs encrypted sample alignment of the data features in the business party device and the data features in the data party device to determine the overall data set after alignment; based on the overall data set, the training set of the first tree of the federated random forest model is determined; when the first splitting point of the first tree splits, the sample set is randomly sampled to construct an alternative split feature set; based on the device to which the features in the alternative split feature set belong, the label aggregation information of the first splitting point is obtained in encrypted protection; based on the label aggregation information of the first splitting point, the first splitting point is split. In the above manner, the label aggregation information of the first splitting point is obtained in encrypted protection, which improves the interpretability of the federated random forest model while ensuring data security.
[0174] Based on the above embodiment, the following describes a case where the features in the candidate split feature set belong to the service-side device. Figure 4 This is a signaling interaction diagram of a method for constructing a federated random forest model provided in an embodiment of the present application. Figure 4 As shown, the method includes:
[0175] S301: The business party device performs encrypted sample alignment on the data features in the business party device and the data features in the data party device to determine the aligned overall data set.
[0176] S302: The business party device determines a training set for the first tree of the federated random forest model based on the entire data set.
[0177] S303: When the business device splits at the first splitting point of the first tree, the business device randomly extracts a sample set to construct an alternative split feature set.
[0178] S304: The data-side device encodes sample information of the first splitting point to generate sample encoding information of the first splitting point.
[0179] S305: The data-side device encrypts the sample coding information of the first splitting point.
[0180] S306: The data party device sends the encrypted sample coding information of the first splitting point to the business party device.
[0181] S307: The service-side device calculates the encrypted label aggregation information of the first splitting point according to the encrypted sample coding information.
[0182] S308: The service-side device sends the encrypted label aggregation information of the first splitting point to the data-side device.
[0183] S309: The data-party device decrypts the encrypted tag aggregation information of the first splitting point.
[0184] S310: The data party device sends the decrypted tag aggregation information to the business party device.
[0185] Based on the above embodiment, the following describes a case where the features in the candidate split feature set belong to the data cube device. Figure 5 This is a signaling interaction diagram of another method for constructing a federated random forest model provided in an embodiment of the present application. Figure 5 As shown, the method includes:
[0186] S401: The business party device performs encrypted sample alignment on the data features in the business party device and the data features in the data party device to determine the aligned overall data set.
[0187] S402: The business party device determines a training set for the first tree of the federated random forest model based on the entire data set.
[0188] S403: When the business party device splits at the first splitting point of the first tree, the business party device randomly extracts a sample set to construct an alternative split feature set.
[0189] S404: The data cube device determines the sample encoding information of each box of samples according to the threshold candidate set to be split.
[0190] S405: The data cube device aggregates the sample encoding information of each box of samples according to the encrypted prediction value of the training set of the first tree, and determines the encrypted label aggregation information of the first splitting point.
[0191] S406: The data-side device sends the encrypted label aggregation information of the first splitting point to the service-side device.
[0192] S407: The service-side device decrypts the encrypted tag aggregation information to obtain the decrypted tag aggregation information.
[0193] The method for constructing a federated random forest model provided in an embodiment of the present application performs encrypted sample alignment of the data features in the business party device and the data features in the data party device to determine the overall data set after alignment; based on the overall data set, the training set of the first tree of the federated random forest model is determined; when the first splitting point of the first tree splits, the sample set is randomly sampled to construct an alternative split feature set; based on the device to which the features in the alternative split feature set belong, the label aggregation information of the first splitting point is obtained in encrypted protection; based on the label aggregation information of the first splitting point, the first splitting point is split. In the above manner, the label aggregation information of the first splitting point is obtained in encrypted protection, which improves the interpretability of the federated random forest model while ensuring data security.
[0194] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.
[0195] Figure 6 This is a schematic diagram of a structure of a device for constructing a federated random forest model provided in an embodiment of the present application. The device for constructing a federated random forest model can be implemented by software, hardware, or a combination of both, and can be, for example, a business party device or a chip of a business party device in the above embodiment to execute the method for constructing a federated random forest model on the business party device side in the above embodiment. Figure 6 , the construction device 500 of the federated random forest model includes:
[0196] Alignment module 501, configured to perform cryptographic sample alignment between the data features in the construction device and the data features in the data-stakeholder device, and determine the overall aligned data set;
[0197] A sampling module 502 is used to determine a training set for a first tree of the federated random forest model based on the entire data set;
[0198] A construction module 503 is configured to randomly extract a sample set when the first splitting point of the first tree splits, and to construct an alternative splitting feature set;
[0199] An acquisition module 504 is configured to obtain, under encryption protection, label aggregation information of a first splitting point based on the device to which the features in the candidate splitting feature set belong;
[0200] The splitting module 505 is configured to split the first splitting point according to the label aggregation information of the first splitting point.
[0201] In an optional implementation, the acquisition module 504 is specifically used to receive the encrypted sample coding information of the first splitting point sent by the data party device if the features in the alternative splitting feature set belong to the business party device; calculate the encrypted label aggregation information of the first splitting point based on the encrypted sample coding information; send the encrypted label aggregation information of the first splitting point to the data party device; and receive the decrypted label aggregation information sent by the data party device.
[0202] In an optional implementation, the acquisition module 504 is specifically used to receive the encrypted label aggregation information of the first splitting point sent by the data party device if the feature in the alternative splitting feature set belongs to the data party device; decrypt the encrypted label aggregation information to obtain the decrypted label aggregation information.
[0203] In an optional embodiment, the encryption protection includes additive homomorphic encryption.
[0204] In an optional embodiment, the device further includes:
[0205] The encryption module 506 is used to send a first public key to the data party device, where the first public key is the public key in the first public-private key pair used by the business party device for additive homomorphic encryption; and receive a second public key sent by the data party device, where the second public key is the public key in the second public-private key pair used by the data party device for additive homomorphic encryption.
[0206] In an optional implementation, the construction module 503 is further configured to perform binning processing on the data features in the entire data set to generate a threshold candidate set to be split; and send the threshold candidate set to be split to the data cube device.
[0207] In an optional implementation, the sampling module 502 is specifically configured to perform sampling with replacement on the entire data set to determine a training set for the first tree of the federated random forest model.
[0208] In an optional implementation, the encryption module 506 is further configured to encrypt the prediction value of the training set of the first tree; and send the encrypted prediction value of the training set of the first tree to the data party device.
[0209] In an optional implementation, the splitting module 505 is further used to calculate the Gini coefficient of the first splitting point based on the label aggregation information of the first splitting point; if the maximum value of the Gini coefficient of the first splitting point is greater than or equal to the threshold of the Gini coefficient, the first splitting point is split; and the splitting rule of the first splitting point is sent to the data party device.
[0210] In an optional implementation, the splitting module 505 is further configured to not split the first splitting point if the maximum value of the Gini coefficient of the first splitting point is less than a threshold value of the Gini coefficient.
[0211] In an optional embodiment, the splitting module 505 is also used to send the left child node sample encoding information after the full sample space corresponding to the feature belonging to the business party device is split if the feature in the alternative splitting feature set belongs to the business party device to the data party device.
[0212] In an optional implementation, the splitting module 505 is further configured to stop splitting the splitting point of the first tree when the splitting point of the first tree cannot be split or the depth of the first tree reaches a preset depth threshold.
[0213] Need to explain, Figure 6 The apparatus for constructing the federated random forest model provided in the exemplary embodiment can be used to execute the method provided in any of the above embodiments. The specific implementation methods and technical effects are similar and will not be described in detail here.
[0214] Figure 7 This is a schematic diagram of the structure of another apparatus for constructing a federated random forest model provided in an embodiment of the present application. The apparatus for constructing a federated random forest model can be implemented by software, hardware, or a combination of both, and can be, for example, a data cube device or a chip of a data cube device in the above embodiment to execute the method for constructing a federated random forest model on the business side device side in the above embodiment. Figure 7 The construction device 600 of the federated random forest model includes: a processing module 601 and a receiving module 602.
[0215] Processing module 601 is configured to assist a service party device in obtaining label aggregation information of the first splitting point under encryption protection based on the device to which the features in the candidate splitting feature set belong when the first splitting point of the first tree of the federated random forest model splits.
[0216] In an optional implementation, the processing module 601 is specifically used to encode sample information of the first splitting point to generate sample coding information of the first splitting point if the feature in the alternative splitting feature set belongs to the business party device; encrypt the sample coding information of the first splitting point; send the encrypted sample coding information of the first splitting point to the business party device; receive the encrypted label aggregation information of the first splitting point sent by the business party device; decrypt the encrypted label aggregation information of the first splitting point; and send the decrypted label aggregation information to the business party device.
[0217] In an optional embodiment, the device further includes:
[0218] The receiving module 602 is configured to receive a candidate set of threshold values to be split sent by a business device; and receive a predicted value of the encrypted training set of the first tree sent by the business device.
[0219] In an optional implementation, the processing module 601 is specifically used to determine the sample encoding information of each box of samples based on the threshold candidate set to be split if the features in the alternative splitting feature set belong to the data party device; aggregate the sample encoding information of each box of samples based on the predicted value of the encrypted training set of the first tree to determine the encrypted label aggregation information of the first splitting point; and send the encrypted label aggregation information of the first splitting point to the business party device.
[0220] Need to explain, Figure 7 The apparatus for constructing the federated random forest model provided in the exemplary embodiment can be used to execute the method provided in any of the above embodiments. The specific implementation methods and technical effects are similar and will not be described in detail here.
[0221] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include: at least one processor 701 and a memory 702. Figure 8 The invention relates to an electronic device with a processor as an example, such as a logistics management server, an inventory management server or an application server.
[0222] The memory 702 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0223] The memory 702 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0224] The processor 701 is used to execute the computer-executable instructions stored in the memory 702 to implement the method for constructing the federated random forest model on the business device side; or, the processor 701 is used to execute the computer-executable instructions stored in the memory 702 to implement the method for constructing the federated random forest model on the data device side.
[0225] The processor 701 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0226] Alternatively, in a specific implementation, if the communication interface, memory 702, and processor 701 are implemented independently, they may be interconnected via a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, control buses, etc., but this does not necessarily mean that there is only one bus or only one type of bus.
[0227] Optionally, in a specific implementation, if the communication interface, memory 702 and processor 701 are integrated on a chip, the communication interface, memory 702 and processor 701 can complete communication through an internal interface.
[0228] The present application also provides a chip comprising a processor and an interface. The interface is used to input and output data or instructions processed by the processor. The processor is used to execute the method provided in the above method embodiment. The chip can be used in a device for constructing a federated random forest model.
[0229] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program code. Specifically, the computer-readable storage medium stores program information, and the program information is used for the above-mentioned method for constructing the federated random forest model.
[0230] An embodiment of the present application also provides a program, which, when executed by a processor, is used to execute the method for constructing a federated random forest model provided in the above method embodiment.
[0231] An embodiment of the present application also provides a program product, such as a computer-readable storage medium, which stores instructions. When the program product is run on a computer, it enables the computer to execute the method for constructing a federated random forest model provided in the above method embodiment.
[0232] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a federated random forest model, characterized in that: Applied to a business party device, the method includes: Performing encrypted sample alignment on the data features in the business party device and the data features in the data party device to determine the aligned overall data set; Determining a training set for a first tree of the federated random forest model based on the overall data set; When splitting at the first splitting point of the first tree, randomly sampling the sample set to construct an alternative split feature set; Obtaining, in encryption protection, label aggregation information of the first splitting point according to the device to which the feature in the candidate splitting feature set belongs; splitting the first splitting point according to the label aggregation information of the first splitting point; The step of obtaining the label aggregation information of the first splitting point under encryption protection according to the device to which the feature in the candidate splitting feature set belongs includes: If the feature in the candidate splitting feature set belongs to the business party device, receiving the encrypted sample encoding information of the first splitting point sent by the data party device; Calculating encrypted label aggregation information of the first splitting point according to the encrypted sample encoding information; Sending the encrypted label aggregation information of the first splitting point to the data party device; Receiving the decrypted tag aggregation information sent by the data party device; If the feature in the candidate split feature set belongs to the data party device, receiving the encrypted label aggregation information of the first splitting point sent by the data party device; The encrypted tag aggregation information is decrypted to obtain the decrypted tag aggregation information.
2. The method according to claim 1, characterized in that The cryptographic protection includes additive homomorphic encryption.
3. The method according to claim 2, characterized in that Before obtaining the label aggregation information of the first splitting point in encryption protection, the method further includes: Sending a first public key to the data party device, where the first public key is a public key in a first public-private key pair used by the business party device for additive homomorphic encryption; Receive a second public key sent by the data party device, where the second public key is a public key in a second public-private key pair used by the data party device to perform additive homomorphic encryption.
4. The method according to claim 1, wherein After determining the aligned overall data set, the method further includes: Performing binning processing on the data features in the overall data set to generate a threshold candidate set to be split; The threshold candidate set to be split is sent to the data party device.
5. The method according to claim 1, characterized in that Determining a training set for a first tree of the federated random forest model based on the entire data set includes: Sampling with replacement is performed on the entire data set to determine a training set for the first tree of the federated random forest model.
6. The method according to claim 1, characterized in that After determining the training set of the first tree of the federated random forest model, the method further includes: Encrypting the predicted value of the training set of the first tree; The encrypted prediction value of the training set of the first tree is sent to the data party device.
7. The method according to claim 1, characterized in that The splitting of the first splitting point according to the label aggregation information of the first splitting point includes: Calculating the Gini coefficient of the first splitting point according to the label aggregation information of the first splitting point; If the maximum value of the Gini coefficient of the first splitting point is greater than or equal to the threshold of the Gini coefficient, the first splitting point is split; Send the splitting rule of the first splitting point to the data party device.
8. The method according to claim 7, characterized in that After calculating the Gini coefficient of the first splitting point, the method further includes: If the maximum value of the Gini coefficient of the first splitting point is less than the threshold value of the Gini coefficient, the first splitting point is not split.
9. The method according to claim 7, characterized in that After splitting at the first splitting point, the method further includes: If the feature in the candidate split feature set belongs to the business party device, the left child node sample encoding information after the full sample space corresponding to the feature belonging to the business party device is split is sent to the data party device.
10. The method according to any one of claims 1 to 9, characterized in that After splitting the first splitting point, the method further includes: When the splitting point of the first tree cannot be split or the depth of the first tree reaches a preset depth threshold, the splitting of the splitting point of the first tree is stopped.
11. A method for constructing a federated random forest model, characterized in that: Applied to a data-provider device, the method includes: When a first splitting point of a first tree of the federated random forest model is split, the auxiliary service party device obtains label aggregation information of the first splitting point under encryption protection according to the device to which the features in the candidate splitting feature set belong; The auxiliary service party device obtains the label aggregation information of the first splitting point under encryption protection, including: If the feature in the candidate split feature set belongs to the service party device, encoding sample information of the first splitting point to generate sample encoding information of the first splitting point; Encrypting the sample encoding information of the first splitting point; Sending the encrypted sample coding information of the first splitting point to the service party device; receiving the encrypted label aggregation information of the first splitting point sent by the service party device; decrypting the encrypted label aggregation information of the first splitting point; Sending the decrypted tag aggregation information to the service party device; If the features in the candidate split feature set belong to the data cube device, determining the sample encoding information of each box of samples according to the threshold candidate set to be split; aggregating the sample encoding information of each box of samples according to the encrypted prediction value of the training set of the first tree to determine the encrypted label aggregation information of the first splitting point; Send the encrypted label aggregation information of the first splitting point to the service party device.
12. The method according to claim 11, characterized in that The method further comprises: receiving a threshold candidate set to be split sent by the service party device; Receive the encrypted prediction value of the training set of the first tree sent by the business party device.
13. A device for constructing a federated random forest model, characterized in that: The device comprises: An alignment module, configured to perform encrypted sample alignment of the data features in the construction device with the data features in the data-side device, and determine an aligned overall data set; a sampling module, configured to determine a training set for a first tree of the federated random forest model based on the overall data set; A construction module, configured to randomly extract a sample set when splitting at the first splitting point of the first tree to construct an alternative splitting feature set; An acquisition module, configured to acquire, in encrypted protection, label aggregation information of the first splitting point according to the device to which the feature in the candidate splitting feature set belongs; a splitting module, configured to split the first splitting point according to label aggregation information of the first splitting point; The acquisition module is specifically configured to receive the encrypted sample encoding information of the first splitting point sent by the data party device if the feature in the candidate splitting feature set belongs to the business party device; Calculating encrypted label aggregation information of the first splitting point according to the encrypted sample encoding information; Sending the encrypted label aggregation information of the first splitting point to the data party device; Receiving the decrypted tag aggregation information sent by the data party device; The acquisition module is specifically configured to receive the encrypted label aggregation information of the first splitting point sent by the data party device if the feature in the candidate splitting feature set belongs to the data party device; The encrypted tag aggregation information is decrypted to obtain the decrypted tag aggregation information.
14. A device for constructing a federated random forest model, characterized in that: The device comprises: a processing module, configured to assist a service party device in obtaining, under encryption protection, label aggregation information of a first splitting point of a first tree of the federated random forest model when the first splitting point splits, based on devices to which features in a candidate splitting feature set belong; The processing module is specifically configured to, if the feature in the candidate split feature set belongs to the service party device, encode the sample information of the first splitting point to generate sample encoding information of the first splitting point; Encrypting the sample encoding information of the first splitting point; Sending the encrypted sample coding information of the first splitting point to the service party device; receiving the encrypted label aggregation information of the first splitting point sent by the service party device; decrypting the encrypted label aggregation information of the first splitting point; Sending the decrypted tag aggregation information to the service party device; The processing module is specifically configured to determine the sample encoding information of each box of samples according to the threshold candidate set to be split if the feature in the candidate split feature set belongs to the data cube device; aggregating the sample encoding information of each box of samples according to the encrypted prediction value of the training set of the first tree to determine the encrypted label aggregation information of the first splitting point; Send the encrypted label aggregation information of the first splitting point to the service party device.
15. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 12 when executed by a processor.
16. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 12.
17. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Decision model training method, prediction method and device based on longitudinal federation learning
CN111598186A
Multi-party joint decision tree construction method, device and readable storage medium
WO2021249086A1