A method, device, equipment and medium for constructing a gradient boosting tree model

By encrypting the sample data label and leaf node weights in vertical federated learning, only encrypted information is transmitted, which reduces the amount of communication data, solves the problem of low efficiency in building gradient improvement tree model, and realizes efficient model construction and data security .

CN114925853BActive Publication Date: 2024-11-26JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210580412.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2024-11-26
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

In the process of building a gradient enhancement tree model based on vertical federated learning, the business side needs to transmit a large number of gradient ciphertext values, resulting in large communication overhead and reducing model construction efficiency.

Method used

By encrypting the sample data tags and transmitting only the encrypted sample ciphertext tags and leaf node ciphertext weights, the data side calculates the gradient ciphertext aggregation value based on this information, and the service side then splits the node, reducing the transmission of communication data quantity.

Benefits of technology

Reduces communication overhead, improves the construction efficiency of gradient enhancement tree model, ensures data security, and prevents data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925853B_ABST
    Figure CN114925853B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, equipment and medium for constructing a gradient boosting tree model. The method is applied to a service end, and includes: obtaining first sample data, and sending a sample ciphertext label to a data end; determining a first information gain based on a leaf node weight, the first sample data and the sample label in a previous tree model; sending a leaf node ciphertext weight in a previous tree model to a data end, so that the data end determines and sends a gradient ciphertext aggregation value based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label; determining a second information gain based on the gradient ciphertext aggregation value; performing node splitting on a node to be split based on the first information gain and the second information gain, and determining that the current tree model is completed when a preset splitting stop condition is met; obtaining a gradient boosting tree model when a preset construction stop condition is met, thereby reducing communication overhead, improving model construction efficiency, and ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of privacy computing technology, in particular to the field of federated learning technology, and specifically to a method, device, equipment and medium for constructing a gradient boosting tree model. Background Art

[0002] As artificial intelligence is increasingly used, data has brought huge value to all walks of life. At the same time, data privacy and security are becoming more and more important. Different data owners want to cooperate to maximize the value of data, but are unwilling or unable to share data, which has caused the problem of data silos. In order to solve this problem, the concept of federated learning was proposed, hoping that multiple participants can achieve the purpose of joint modeling without sharing data, only sharing intermediate results, and unable to reverse the data, thereby ensuring data security.

[0003] According to the different characteristics of the data held by different participants in federated learning, it can be classified into horizontal federated learning, vertical federated learning, and federated transfer learning. In risk control scenarios, vertical federated learning has been more widely used and developed. Its characteristics are that the sample labels are only held by one party (i.e., the business end), while the other parties only have partial features of the data (i.e., the data end). The Gradient Boosting Decision Tree (GBDT) model can effectively solve the performance problems caused by a single decision tree, integrate the powerful learning capabilities of multiple trees, and can handle both classification and regression problems, so it has been widely used in risk control scenarios. At present, the gradient boosting tree model is often constructed based on vertical federated learning to improve model performance and achieve the purpose of reducing risks.

[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] In the process of building a gradient boosting tree model based on vertical federated learning, each time the business end builds a tree model, it is necessary to determine the gradient ciphertext value of the prediction value corresponding to each sample data, and transmit the gradient ciphertext value to all data ends. Due to the large amount of sample data, this process requires a large communication overhead, which greatly reduces the construction efficiency of the gradient boosting tree model. Summary of the invention

[0006] The embodiments of the present invention provide a method, device, equipment and medium for constructing a gradient boosting tree model to reduce communication overhead, improve the construction efficiency of the gradient boosting tree model, and ensure data security.

[0007] In a first aspect, an embodiment of the present invention provides a method for constructing a gradient boosting tree model, which is applied to a business end and includes:

[0008] Acquire first sample data after sample alignment with the data end, encrypt the sample label corresponding to the first sample data, and send the encrypted sample ciphertext label to the data end;

[0009] Based on the leaf node weights in the previous tree model that has been constructed, the first sample data and the sample labels, determining a first information gain of a node to be split in a current tree model to be constructed under a first splitting mode;

[0010] Encrypting the leaf node weights in the previous tree model, and sending the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the leaf node ciphertext weights, the second sample data after sample alignment with the service end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end;

[0011] Determine a second information gain of the node to be split in a second splitting mode based on the gradient ciphertext aggregation value;

[0012] Based on the first information gain and the second information gain, performing node splitting on the node to be split, and determining that the current tree model is completed when a preset splitting stop condition is met;

[0013] When the preset construction stop condition is met, a gradient boosting tree model is obtained based on each tree model that has been constructed.

[0014] In a second aspect, an embodiment of the present invention further provides a method for constructing a gradient boosting tree model, which is applied to a data end and includes:

[0015] Obtaining second sample data after sample alignment with the business end;

[0016] Receiving a sample ciphertext label corresponding to the second sample data sent by the service end;

[0017] Receiving the ciphertext weight of the leaf node corresponding to the previous tree model constructed and sent by the service end;

[0018] Determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label;

[0019] The gradient ciphertext aggregation value is sent to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, the target gradient boosting tree model is obtained based on the constructed tree models.

[0020] In a third aspect, an embodiment of the present invention further provides a device for constructing a gradient boosting tree model, which is integrated in a service end and includes:

[0021] A first sample data alignment module, used for acquiring first sample data after sample alignment with the data end, encrypting a sample label corresponding to the first sample data, and sending the encrypted sample ciphertext label to the data end;

[0022] A first information gain determination module, used to determine a first information gain of a node to be split in a current tree model to be constructed under a first splitting mode based on the leaf node weights in the previous tree model that has been constructed, the first sample data and the sample labels;

[0023] A leaf node ciphertext weight sending module is used to encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the leaf node ciphertext weights, the second sample data after sample alignment with the service end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end;

[0024] A second information gain determination module, used to determine a second information gain of the node to be split in a second splitting mode based on the gradient ciphertext aggregation value;

[0025] A node splitting module, used for performing node splitting on the node to be split based on the first information gain and the second information gain, and determining that the current tree model is completed when a preset splitting stop condition is met;

[0026] The gradient boosting tree model determination module is used to obtain a gradient boosting tree model based on each constructed tree model when a preset construction stop condition is met.

[0027] In a fourth aspect, an embodiment of the present invention further provides a device for constructing a gradient boosting tree model, which is integrated in a data end and includes:

[0028] A second sample data acquisition module, used to acquire second sample data after sample alignment with the service end;

[0029] A sample ciphertext label receiving module, used to receive the sample ciphertext label corresponding to the second sample data sent by the service end;

[0030] A leaf node ciphertext weight receiving module, used to receive the leaf node ciphertext weight corresponding to the constructed previous tree model sent by the service end;

[0031] A gradient ciphertext aggregation value determination module, used to determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label;

[0032] A gradient ciphertext aggregation value sending module is used to send the gradient ciphertext aggregation value to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, obtains the target gradient boosting tree model based on the constructed tree models.

[0033] In a fifth aspect, an embodiment of the present invention further provides a system for constructing a gradient boosting tree model, the system comprising a business end and at least one data end;

[0034] Wherein, the business end is used to implement the method for constructing the gradient boosting tree model as provided in the first aspect;

[0035] The data end is used to implement the method for constructing the gradient boosting tree model as provided in the second aspect.

[0036] In a sixth aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0037] one or more processors;

[0038] A memory for storing one or more programs;

[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for constructing a gradient boosting tree model as provided in any embodiment of the present invention.

[0040] In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for constructing a gradient boosting tree model as provided in any embodiment of the present invention.

[0041] The embodiments of the above invention have the following advantages or beneficial effects:

[0042] The service end encrypts the sample label corresponding to the first sample data, and sends the encrypted sample ciphertext label to the data end. When constructing the current tree model, based on the leaf node weights, the first sample data and the sample labels in the previous tree model that have been constructed, the service end determines the first information gain of the node to be split in the current tree model under the first splitting mode, and encrypts the leaf node weights in the previous tree model, and sends the encrypted leaf node ciphertext weights to the data end. The data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the received leaf node ciphertext weights, the second sample data after sample alignment with the service end and the received sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end. The business end determines the second information gain of the node to be split under the second splitting mode based on the received gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain, and determines that the current tree model is completed when the preset splitting stop condition is met. Therefore, each time the business end builds a tree model, it only needs to transmit the leaf node ciphertext weights in the previous tree model to the data end, and there is no need to transmit the gradient ciphertext value corresponding to each sample data, thereby greatly reducing the communication overhead and improving the communication efficiency, thereby also improving the construction efficiency of the gradient boosting tree model, and the business end sends the encrypted leaf node ciphertext weights and sample ciphertext labels to the data end, thereby ensuring the data security of the business end, and at the same time, the data end sends the gradient ciphertext aggregation value to the business end, so that the business end cannot obtain a single prediction value based on the gradient ciphertext aggregation value, thereby also ensuring the data security of the data party. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces 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 creative work.

[0044] Figure 1 It is a flowchart of a method for constructing a gradient boosting tree model applied to a business end provided by an embodiment of the present invention;

[0045] Figure 2It is a flowchart of another method for constructing a gradient boosting tree model applied to a business end provided by an embodiment of the present invention;

[0046] Figure 3 It is a flowchart of a method for constructing a gradient boosting tree model applied to a data end provided by an embodiment of the present invention;

[0047] Figure 4 It is a structural schematic diagram of a device for constructing a gradient boosting tree model integrated in a service end provided by an embodiment of the present invention;

[0048] Figure 5 It is a structural schematic diagram of a device for constructing a gradient boosting tree model integrated in a data end provided by an embodiment of the present invention;

[0049] Figure 6 It is a structural schematic diagram of a system for constructing a gradient boosting tree model provided by an embodiment of the present invention;

[0050] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0052] Figure 1 A flowchart of a method for constructing a gradient boosting tree model applied to a business end provided in an embodiment of the present invention. This embodiment is applicable to the case of constructing a gradient boosting tree model based on vertical federated learning, and in particular, can be used to construct a gradient boosting tree model in a risk control scenario. Among them, the gradient boosting tree model can be a combination of several tree models based on the Boosting method, and the loss function is determined by gradient descent to finally obtain a strong learner. The Boosting method is to compare the error situation of each iteration result, adjust the weight of the sample, and train a new round of learners to obtain the result of adding multiple tree models according to the weights. The gradient boosting tree model constructed in this embodiment may refer to a GBDT model or an XGBoost model or LightGBM model obtained by improving the GBDT model. The method can be executed by a construction device for a gradient boosting tree model integrated in the business end, and the device can be implemented by software and / or hardware. Figure 1 As shown, the method specifically comprises the following steps:

[0053] S110, obtaining the first sample data after sample alignment with the data end, encrypting the sample label corresponding to the first sample data, and sending the encrypted sample ciphertext label to the data end.

[0054] Among them, the data end may refer to a terminal device used by a data party that only has sample features. The number of data ends may be one or more. The business end may refer to a terminal device used by a business party that has sample features and sample labels. Features of different dimensions of the same sample (such as the same user) may be stored in the business end and each data end, so that the business end can combine various data ends and perform vertical federated learning with the help of sample features in the data end, thereby improving the model construction effect and reducing risks. The first sample data may refer to the sample feature information stored in the business end corresponding to the same sample owned by the business end and each data end. The sample label corresponding to the first sample data may refer to the actual result predicted based on the first sample data. For example, if the user age information is predicted, the sample label may refer to the actual age of the user.

[0055] Specifically, based on the privacy set intersection method, the sample data in the business end and the sample data in each data end can be sample aligned, that is, the features belonging to the same data are matched, and the same sample identifiers owned by the business end and each data end are determined, so as to use different sample features of the same sample for vertical federated learning. By using the privacy set intersection method, the data privacy and security in the sample alignment process can be further guaranteed to avoid data leakage. Through the sample alignment operation, the business end and each data end can obtain n data intersections, that is, the business end can obtain the first sample data after alignment and each data end will also obtain the second sample data after alignment. For example, if the sample data stored in the business end is: income feature information of user A, income feature information of user B and income feature information of user C; there is only one data end, and the sample data stored in the data end is: asset feature information of user A, asset feature information of user C and asset feature information of user D, then the first sample data obtained by the business end includes: income feature information of user A and income feature information of user C; the second sample data obtained by the data end includes: asset feature information of user A and asset feature information of user C.

[0056] The business end can generate a public key and a private key based on a preset encryption method, such as the Paillier homomorphic encryption method, and after obtaining the first sample data, can use the public key to encrypt each sample label y={y1,y2,...,y n}Encrypt Enc pk (y), and the encrypted ciphertext labels of each sample [y] = {[y1], [y2], ..., [y n]} is sent to each data end. The public key can be transmitted to each data end by broadcasting or sending it together with the sample ciphertext label, so that each data end can directly perform ciphertext information calculation operations based on the public key.

[0057] S120, determining a first information gain of a node to be split in a current tree model to be constructed under a first splitting mode based on the leaf node weights, the first sample data and the sample labels in the previous tree model that has been constructed.

[0058] Among them, the previous tree model may refer to the last constructed tree model of the current tree model to be constructed, that is, the latest constructed tree model. The leaf node weight may refer to the prediction value corresponding to each leaf node in the previous tree model, which can be used to characterize the single prediction value obtained by each sample data in the previous tree model. It should be noted that the prediction value corresponding to each sample data refers to the sum of each single prediction value output by each constructed tree model. The first splitting method may refer to a method of performing node splitting for each sample feature in the first sample data at each quantile threshold. For example, for each sample feature k=1,…,d in the n first sample data of the business end 1 , binning is performed to obtain L quantiles S for each sample feature k ={s k1 ,…,s kL} as a candidate feature threshold for splitting. Based on a sample feature and a candidate feature threshold, a first splitting method can be determined, and thus multiple different first splitting methods can be determined. The first information gain may refer to the score obtained after the node to be split is split under each first splitting method, which is used to characterize the pros and cons of the splitting corresponding to each first splitting method. For example, if the first information gain corresponding to a first splitting method is the highest, it indicates that the node splitting effect of the first splitting method is the best.

[0059] Specifically, when the business end constructs the current tree model, i.e., the Tth tree, for each node to be split, the current prediction value corresponding to each sample data corresponding to the node to be split can be determined based on the leaf node weight in the constructed previous tree model (i.e., the T-1th tree) and the previous prediction value (i.e., the sum of the output results of each tree model constructed before the T-1th tree). For example, for each sample data corresponding to the node to be split, the target leaf node weight corresponding to the sample data corresponding to the node to be split can be determined based on the corresponding relationship between each leaf node weight in the previous tree model and the first sample data, and the target leaf node weight and the corresponding previous prediction value are added, and the obtained addition result is determined as the current prediction value corresponding to the sample data. Based on the current prediction value and the corresponding sample label corresponding to each sample data corresponding to the node to be split, the gradient aggregation value corresponding to each child node obtained by splitting the node to be split in each first splitting mode can be determined, and based on each gradient aggregation value, the first information gain of the node to be split in each first splitting mode can be determined.

[0060] It should be noted that the key to establishing a gradient boosting tree model is that the construction of the current tree model (i.e., the Tth tree) is based on the label residual of the previous tree model (i.e., the T-1th tree) for learning, and in the construction of each tree, it is decided how and whether each node should be split. This process is achieved through multi-party cooperation and information exchange to determine the information gain of each feature after each threshold split, and the split is achieved based on the splitting method with the maximum information gain.

[0061] S130. Encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting method based on the leaf node ciphertext weights, the second sample data after sample alignment with the business end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the business end.

[0062] The second splitting method may refer to a method in which each sample feature in the second sample data is node split at each quantile threshold. For example, for each sample feature k=1,…,d in the n second sample data at the data end 1 , binning is performed to obtain L quantiles S for each sample feature k ={s k1 ,…,s kL} as a candidate feature threshold for splitting. A second splitting method can be determined based on a sample feature and a candidate feature threshold, thereby determining a plurality of different second splitting methods. A plurality of child nodes can be obtained by splitting the node to be split according to the splitting feature and feature threshold in each second splitting method, and a corresponding gradient ciphertext aggregation value is determined for each child node. The gradient ciphertext aggregation value may refer to the result obtained by encrypting and aggregating the gradient information of each sample data corresponding to each child node. Each sample data corresponding to each child node may refer to a set of sample data obtained by dividing the second sample data according to the splitting feature and feature threshold in the second splitting method.

[0063] Specifically, the business end can encrypt the weights of each leaf node in the previous tree model based on the public key, and send the encrypted ciphertext weights of each leaf node to the data end in the order in which the leaf nodes are sorted. For example, if the tree model is a single-layer binary tree, the weights of the two leaf nodes in the previous tree model (i.e., the T-1th tree) are and Encrypt and sequentially weight the encrypted two leaf nodes Sent to the data end. The data end can determine the gradient ciphertext aggregation value of each node to be split under the second splitting mode based on the received leaf node ciphertext weight, the second sample data and the received sample ciphertext label, and send each gradient ciphertext aggregation value to the business end. In this embodiment, the business end only needs to send the ciphertext weight of each leaf node in the previous tree model to the data end, so that the data end can determine the gradient information locally, thereby greatly reducing the communication overhead of the business end transmitting the gradient information to the data end.

[0064] S140. Determine a second information gain of the node to be split under a second splitting method based on the gradient ciphertext aggregation value.

[0065] The second information gain may refer to the score obtained after the node to be split is split in each second splitting mode, which is used to characterize the quality of the split corresponding to each second splitting mode. For example, if the second information gain corresponding to a second splitting mode is the highest, it indicates that the node splitting effect of the second splitting mode is the best.

[0066] Specifically, the service end can decrypt each gradient ciphertext aggregation value of the node to be split sent by each data end under each second splitting mode based on the private key, and determine the second information gain of the node to be split under each second splitting mode based on the decrypted gradient aggregation value. It should be noted that, since the data end sends the gradient ciphertext aggregation value obtained after aggregation of each sample data, rather than the gradient ciphertext value, the service end cannot determine the prediction value corresponding to each sample data in the data end based on the gradient ciphertext aggregation value, thereby ensuring the privacy security of the data end.

[0067] S150, performing node splitting on the node to be split based on the first information gain and the second information gain, and determining that the current tree model is completed when a preset splitting stop condition is met.

[0068] Specifically, the service end can compare the first information gain corresponding to each first splitting mode and the second information gain corresponding to each second splitting mode to obtain the maximum information gain, and perform node splitting on the node to be split according to the target splitting mode corresponding to the maximum information gain, thereby ensuring the splitting effect. After performing node splitting on each node to be split, it can be detected whether the preset splitting stop condition is currently met, such as there is no leaf node that can be split, or the depth of the tree reaches the preset maximum depth. If not, node splitting can be continued on the next node to be split. If it is satisfied, the current tree model f can be determined. m Build completed.

[0069] It should be noted that after the current tree model is constructed, the business end can determine the leaf node weight corresponding to each leaf node based on the gradient aggregation value corresponding to the optimal split node in the current tree model, so as to construct the next tree model based on the leaf node weights in the current tree model.

[0070] S160. When a preset construction stop condition is met, a gradient boosting tree model is obtained based on each constructed tree model.

[0071] Specifically, after the current tree model is constructed, it can be detected whether the preset framework stop condition is met, such as whether the number of currently constructed tree models is equal to the preset number, or the model performance of the currently constructed gradient boosting tree model verified based on the validation data set reaches the preset performance. If not, continue to build the next tree model. If it is satisfied, it can be indicated that the gradient boosting tree model is completed, and the obtained gradient boosting tree model is: Where M represents the number of tree models; X i Represents the i-th data input into the model.

[0072] Exemplarily, when the gradient boosting tree model to be constructed is an XGBoost model, the node classification in the tree model needs to determine the information gain under each splitting mode based on the first-order gradient value g (i.e., the first-order gradient of the loss function) and the second-order gradient value h (i.e., the second-order gradient of the loss function), and select the splitting mode with the largest information gain for node splitting, complete an iterative training, and start the training of the next tree after reaching the preset stop splitting condition. In the prior art, in order to obtain the first-order gradient aggregation value and the second-order gradient aggregation value, the business end needs to send the first-order gradient value and the second-order gradient value of each sample data to the data end. Assuming that there are n sample data and P data cubes after alignment, and the communication cost is c, a tree model is established, and the communication overhead of the business end transmitting the first-order gradient information and the second-order gradient information to the data end is: 2×n×P×c. It can be seen that the communication overhead of transmitting the first-order and second-order gradient information in the prior art is high, and the modeling process is highly affected by the communication efficiency. In view of this, the service end in this embodiment only needs to send the ciphertext weights of the leaf nodes in the previous tree model to the data end, so that each data end determines the corresponding gradient aggregation value based on the ciphertext weights of the leaf nodes, and then determines the information gain based on the gradient aggregation value. Assuming that the leaf nodes of each tree contain s samples, a tree is constructed, and the communication overhead of the service end transmitting the ciphertext weights of the leaf nodes to the data end is: n / s×P×c, where 1 / s<<1. It can be seen that the communication overhead of transmitting the ciphertext weights of the leaf nodes is much smaller than the overhead of transmitting the gradient information of all samples, so that this embodiment can greatly reduce the communication overhead and improve the communication efficiency. Moreover, the information interaction between the data end and the service end is encrypted information, so that the privacy information of both parties can be not exposed in the model training stage and the prediction stage, and then on the premise of ensuring data privacy, the communication overhead of parameter transmission is greatly reduced, the communication efficiency is improved, and a safe and efficient federated learning method is provided for practical application scenarios.

[0073] In the technical solution of this embodiment, the service end encrypts the sample label corresponding to the first sample data, and sends the encrypted sample ciphertext label to the data end. When constructing the current tree model, based on the leaf node weights, the first sample data and the sample labels in the previous tree model that have been constructed, the service end determines the first information gain of the node to be split in the current tree model under the first splitting mode, and encrypts the leaf node weights in the previous tree model, and sends the encrypted leaf node ciphertext weights to the data end. The data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the received leaf node ciphertext weights, the second sample data after sample alignment with the service end and the received sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end. The business end determines the second information gain of the node to be split under the second splitting mode based on the received gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain, and determines that the current tree model is completed when the preset splitting stop condition is met. Therefore, each time the business end builds a tree model, it only needs to transmit the leaf node ciphertext weights in the previous tree model to the data end, and there is no need to transmit the gradient ciphertext value corresponding to each sample data, thereby greatly reducing the communication overhead and improving the communication efficiency, thereby also improving the construction efficiency of the gradient boosting tree model, and the business end sends the encrypted leaf node ciphertext weights and sample ciphertext labels to the data end, thereby ensuring the data security of the business end, and at the same time, the data end sends the gradient ciphertext aggregation value to the business end, so that the business end cannot obtain a single prediction value based on the gradient ciphertext aggregation value, thereby also ensuring the data security of the data party.

[0074] Figure 2 A flowchart of another method for constructing a gradient boosting tree model applied to a business end provided by an embodiment of the present invention is provided. Based on the above embodiments, this embodiment describes in detail the specific construction process of each tree model constructed in each iteration of the gradient boosting tree model. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0075] See also Figure 2 The method for constructing a gradient boosting tree model applied to a business end provided in this embodiment specifically includes the following steps:

[0076] S210, obtaining the first sample data after sample alignment with the data end, encrypting the sample label corresponding to the first sample data, and sending the encrypted sample ciphertext label to the data end.

[0077] S211, obtaining a current node to be split in a current set of nodes to be split corresponding to the current tree model to be constructed.

[0078] The current set of nodes to be split can be dynamically updated based on the splitting operation, and is used to store the leaf nodes that need to be split in the current tree model.

[0079] Specifically, when the current tree model is constructed in the first iteration, the current set of nodes to be split only includes the root node, and the root node can be used as the current node to be split. In non-first iterations, the current set of nodes to be split includes at least two nodes to be split, and any one of the nodes to be split can be selected from the set as the current node to be split.

[0080] S212: Obtain third sample data corresponding to the current node to be split from the first sample data.

[0081] The third sample data may refer to each sample data in the first sample data that is divided into the current node to be split.

[0082] Exemplarily, S212 may include: if it is the first iteration, using the first sample data as the third sample data corresponding to the current node to be split; if it is not the first iteration, obtaining the third sample data corresponding to the current node to be split in the first sample data, and sending the sample identifier corresponding to the third sample data to the data end, so that the data end determines the fourth sample data corresponding to the current node to be split from the second sample data based on the sample identifier.

[0083] For example, if the first sample data after sample alignment is 100 data, then in the first iteration, the current node to be split is the root node, and all the first sample data can be used as the third sample data corresponding to the current node to be split, that is, the third sample data is 100 data. In non-first iterations, for example, the current node to be split is a child node of the root node, each first sample data can be divided in advance based on the splitting feature and feature threshold corresponding to the root node, and all the third sample data divided into the current node to be split, such as 30 data out of 100 data, can be determined.

[0084] It should be noted that each piece of sample data corresponds to a sample identifier, such as a user identifier, so that different sample data can be distinguished based on the sample identifier. After obtaining each third sample data, the business end can send each sample identifier corresponding to each third sample data to the data end, so that the data end can determine the fourth sample data corresponding to the current node to be split from the second sample data after sample alignment based on each received sample identifier, thereby achieving data synchronization, thereby ensuring that the business end and the data end use the sample data corresponding to the same sample when each node is split, thereby ensuring the accuracy of the tree model construction.

[0085] S213: Based on the leaf node weights in the previous tree model that has been constructed, the third sample data, and the sample labels corresponding to the third sample data, determine the first gradient aggregation value corresponding to the first child node obtained by splitting the current node to be split in the first splitting mode.

[0086] Specifically, for each first splitting method, the current node to be split can be split based on the splitting feature and the feature threshold to obtain two first child nodes after the split, namely the left node and the right node. Based on the splitting feature and the feature threshold, all third sample data can be divided to determine the set of sample data divided into each first child node. Based on the leaf node weights in the constructed previous tree model (i.e., the T-1th tree) and the previous prediction value (i.e., the sum of the output results of each tree model constructed before the T-1th tree), the current prediction value corresponding to each sample data corresponding to each first child node is determined. For example, based on the corresponding relationship between each sample data and the leaf node weight, the target leaf node weight corresponding to each sample data corresponding to each first child node is determined, and the target leaf node weight and the previous prediction value corresponding to the sample data are added, and the obtained addition result is determined as the current prediction value corresponding to the sample data.

[0087] This embodiment is based on a preset loss function, according to the current prediction value corresponding to each sample data corresponding to each first child node and sample label y, the first gradient aggregation value corresponding to each first child node can be determined. For example, when building an XGBoost model, it is necessary to determine the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to each first child node. The first-order gradient value corresponding to the i-th sample data corresponding to each first child node The corresponding second-order gradient value By calculating the first-order gradient value g corresponding to each sample data i Add them together to obtain the first-order gradient aggregation value corresponding to each first child node, that is, G = ∑ i∈I g i , where I refers to the sample data set corresponding to the first child node. Similarly, the second-order gradient value h corresponding to each sample data i Add them together to obtain the second-order gradient aggregation value corresponding to each first child node, that is, H = ∑ i∈I h i .

[0088] For example, when the preset loss function is the mean square error function, the first-order gradient value g i and the second-order gradient value h i This can be determined as follows:

[0089]

[0090] When the default loss function is the cross entropy loss function and the Sigmod function, the first-order gradient value g i and the second-order gradient value h i This can be determined as follows:

[0091]

[0092] S214: Determine a first information gain of the current node to be split in a first splitting mode based on the first gradient aggregation value corresponding to the first child node.

[0093] Specifically, for each splitting mode, the service end can determine the first information gain of the current node to be split in the first splitting mode based on each first gradient aggregation value corresponding to each first child node after the split. For example, the first information gain of the current node to be split in the first splitting mode can be determined based on the following formula:

[0094]

[0095] Among them, j represents one of the first child nodes after the split, such as the first left child node, that is, G j =G L , λ and γ are both non-negative model parameters, G is the first-order gradient aggregation value corresponding to the current node to be split, that is, the sum of the first-order gradient aggregation values ​​corresponding to the two first child nodes, that is, G = G L +G R H is the second-order gradient aggregation value corresponding to the current node to be split, that is, the sum of the second-order gradient aggregation values ​​corresponding to the two first child nodes, that is, H = H L +H R For example, based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the first left child node after the current node to be split is split, and the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the first right child node, the first information gain Gain of the current node to be split in the first splitting mode can be determined by the above formula.

[0096] S215. Encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value corresponding to the second child node obtained by splitting the current node to be split under the second splitting method based on the leaf node ciphertext weights, the second sample data after sample alignment with the business end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the business end.

[0097] Specifically, before constructing the current tree model, the business end can encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that when the data end constructs the current tree model for each node split, it can determine the gradient ciphertext aggregation value corresponding to the two second child nodes obtained by splitting the current node to be split under each second splitting method based on the leaf node ciphertext weights in the previous tree model, and send the gradient ciphertext aggregation value to the business end.

[0098] It should be noted that the execution order of step S215 is not limited here. For example, step S215 can be executed sequentially after step S214, or before step S211, or simultaneously with step S211 to further improve the efficiency of model building.

[0099] S216. Decrypt the gradient ciphertext aggregation value corresponding to the second child node obtained by splitting the current node to be split in the second splitting mode to obtain a second gradient aggregation value corresponding to the decrypted second child node.

[0100] Specifically, the service end can, based on the private key, split the received current node to be split in the second splitting mode to obtain the gradient ciphertext aggregation value [G j ] to decrypt and obtain the second gradient aggregation value corresponding to each second child node, such as the first-order gradient aggregation value G corresponding to the second left child node L =Dec sk ([G L ] and the second-order gradient aggregation value H L =Dec sk ([H L ] and the first-order gradient aggregation value G corresponding to the second right child node R =Dec sk ([G R ] and the second-order gradient aggregation value H R =Dec sk ([H R ].

[0101] S217: Determine a second information gain of the current node to be split under a second splitting mode based on the second gradient aggregation value corresponding to the second child node.

[0102] Specifically, the service end may determine the second information gain of the current node to be split in each second splitting mode based on the above-mentioned determination method of the first information gain and according to the second gradient aggregation value corresponding to each second child node.

[0103] Exemplarily, S217 may include: determining the second information gain of the current node to be split under the second splitting method based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second left child node, and the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second right child node.

[0104] Specifically, when constructing the XGBoost model, the second information gain Gain of the current node to be split in each second splitting mode can be determined through the above information gain determination formula based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second left child node after the decrypted split of the current node to be split, and the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second right child node.

[0105] S218. Determine a maximum information gain based on the first information gain and the second information gain.

[0106] Specifically, the service end may compare the first information gain corresponding to each first splitting mode and the second information gain corresponding to each second splitting mode to obtain the maximum information gain of the first information gain and the second information gain.

[0107] S219: If it is detected that the maximum information gain is greater than a preset gain threshold, the current node to be split is split based on a target splitting method corresponding to the maximum information gain.

[0108] The preset gain threshold may be a preset minimum value of information gain that allows node splitting. The target splitting mode may be the first splitting mode in the service end or the second splitting mode in the data end.

[0109] Specifically, by detecting whether the maximum information gain is greater than or equal to a preset gain threshold, it is determined whether to split the current node to be split. For example, if the maximum information gain is greater than the preset gain threshold, the current node to be split is split based on whether the target splitting method corresponding to the maximum information gain is located at the business end or the data end, and two leaf nodes are obtained after the split to ensure the privacy security of the data. If the maximum information gain is less than the preset gain threshold, it indicates that the model performance of the node to be split is not good regardless of whether it is based on the first splitting method or the second splitting method. At this time, the splitting of the current node to be split can be stopped, and the current node to be split is removed from the current set of nodes to be split.

[0110] Exemplarily, "performing node splitting on the current node to be split based on the target splitting method corresponding to the maximum information gain" in S219 may include: if the target splitting method corresponding to the maximum information gain is the first splitting method in the business end, then based on the target splitting method, performing local node splitting on the current node to be split, and determining the target splitting characteristics and characteristic thresholds; if the target splitting method corresponding to the maximum information gain is the second splitting method in the data end, then sending the identification information corresponding to the target splitting method to the data end, so that the data end splits the current node to be split based on the second splitting method corresponding to the identification information, and determines the target splitting characteristics and characteristic thresholds.

[0111] Specifically, if the target splitting mode is the first splitting mode in the business end, it indicates that the target splitting feature is the sample feature in the business end. At this time, the business end can perform local node splitting on the current node to be split based on the target splitting mode to obtain the optimal target splitting feature and feature threshold. If the target splitting mode is the second splitting mode in a data end, it indicates that the target splitting feature is the sample feature in the data end. At this time, the business end can send the identification information corresponding to the target splitting mode to the data end, so that the data end can split the current node to be split in the data end based on the second splitting mode corresponding to the identification information, and determine the optimal target splitting feature and feature threshold. It should be noted that during the training process, the optimal target splitting feature and feature threshold need to be saved locally and do not need to be disclosed to other ends to ensure the privacy and security of the data. In actual application, joint prediction is required based on the cooperation between the business end and each data end.

[0112] Exemplarily, after determining the target splitting feature and the feature threshold, it also includes: based on the target splitting feature and the feature threshold, dividing the third sample data corresponding to the current node to be split, and determining the sample data corresponding to each target sub-node after the split.

[0113] Specifically, the business end or the data end performs node splitting on the current node to be split based on the target splitting method to obtain two target child nodes, i.e., two new leaf nodes, and divides the third sample data corresponding to the current node to be split based on the target splitting feature and the feature threshold, and determines the sample data set corresponding to each target child node, so that the corresponding target child node can be subsequently split based on the sample data set. If the node splitting is performed at the business end, the business end needs to send the sample identification set corresponding to the sample data set corresponding to each target child node after the split to each data end to achieve data synchronization. If the node splitting is performed at the data end, the data end needs to send the sample identification set corresponding to the sample data set corresponding to each target child node after the split to the business end or other data end to achieve data synchronization.

[0114] S220: Add the target child node after the split to the current set of nodes to be split, and remove the current node to be split from the current set of nodes to be split.

[0115] Specifically, the service end adds the target child node after the split to the current set of nodes to be split, and removes the current node to be split from the current set of nodes to be split, so as to update the current set of nodes to be split.

[0116] It should be noted that if a node split is performed on the data side, the business side only knows that the current node to be split is split into two target child nodes, but the target split feature and feature threshold based on which the split is based cannot be known.

[0117] S221, check whether the preset split stop condition is met, if so, execute step S222, if not, return to execute step S211.

[0118] S222: Determine whether the current tree model is constructed.

[0119] Specifically, for the current tree model, that is, each leaf node of the Tth tree, node splitting is performed by cyclically executing the above steps S211-S219 until the preset splitting stop condition is met to determine that the current tree model is completed.

[0120] The first-order gradient aggregation value and the second-order gradient aggregation value of the optimal split of the business party holding the node can calculate the optimal weight of each leaf node At this point, the construction of the Tth tree is completed.

[0121] Exemplarily, when constructing an XGBoost model, after the current tree model is constructed, the business end can determine the leaf node weight corresponding to each leaf node based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the optimal split node in the current tree model, so that the next tree model can be constructed based on the leaf node weights in the current tree model. For example, the leaf node weight corresponding to each leaf node in the Tth tree can be determined by the following formula:

[0122]

[0123] Among them, j represents the left leaf node 0 or the right leaf node 1.

[0124] S223. When a preset construction stop condition is met, a gradient boosting tree model is obtained based on each tree model that has been constructed.

[0125] Specifically, after the business end completes the construction and training of the Tth tree, the weights can be encrypted based on the leaf nodes in the Tth tree. Repeat steps S211-S222 to construct the T+1th tree, i.e., the next tree model, until the preset construction stop condition is met. For example, when M trees are constructed, a complete gradient boosting tree model can be obtained:

[0126] According to the technical solution of this embodiment, the business end sends the ciphertext weights of the leaf nodes in the previous tree model to the data end, and iteratively splits each node to be split in the current tree model to be constructed to construct the current tree model. This can improve communication efficiency while ensuring data privacy, thereby improving the construction efficiency of the gradient boosting tree model.

[0127] Figure 3 A flowchart of a method for constructing a gradient boosting tree model applied to a data end provided in an embodiment of the present invention. This embodiment is applicable to the case of constructing a gradient boosting tree model based on vertical federated learning, and in particular, it can be used to construct a gradient boosting tree model in a risk control scenario. The method can be executed by a construction device for a gradient boosting tree model integrated in the data end, and the device can be implemented by software and / or hardware. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 3 As shown, the method specifically comprises the following steps:

[0128] S310: Obtain second sample data after sample alignment with the business end.

[0129] Specifically, based on the data alignment method described in the above embodiment, sample alignment can be performed on each data end and service end, so that each data end can obtain second sample data after sample alignment.

[0130] S320. Receive a sample ciphertext label corresponding to the second sample data sent by the service end.

[0131] Specifically, each data terminal can receive the sample ciphertext label corresponding to each second sample data. Since the sample ciphertext label is encrypted information, it can avoid leaking the business terminal information and ensure the data privacy security of the business terminal.

[0132] S330, receiving the ciphertext weight of the leaf node corresponding to the previous tree model constructed and sent by the business end.

[0133] S340, based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label, determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting method.

[0134] Specifically, each data end can iteratively determine the gradient ciphertext aggregation value of each node to be split under each second splitting mode for each node to be split that the business end needs to split when building the current tree model.

[0135] Exemplarily, S340 may include the following steps S341 - S343 .

[0136] S341. Determine fourth sample data corresponding to the current node to be split from the second sample data.

[0137] Specifically, if the second sample data after sample alignment is 100 pieces of data, then in the first iteration, the current node to be split is the root node, and at this time, all the second sample data can be used as the fourth sample data corresponding to the current node to be split, that is, the second sample data is 100 pieces of data. In a non-first iteration, for example, the current node to be split is a child node of the root node, and the fourth sample data corresponding to the current node to be split can be determined from the second sample data after sample alignment based on the sample identifier, for example, 30 pieces of data out of 100 pieces of data.

[0138] S342: Determine a current predicted ciphertext value corresponding to the fourth sample data based on the correspondence between the leaf node ciphertext weight and the second sample data, and a previous predicted ciphertext value corresponding to the fourth sample data.

[0139] Specifically, after the previous tree model is constructed, each data end can obtain the correspondence between the ciphertext weight of each leaf node in the previous tree model and each second sample data, as well as the previous predicted ciphertext value corresponding to each second sample data, so that the current predicted ciphertext value corresponding to each fourth sample data can be determined based on the correspondence and the previous predicted ciphertext value corresponding to each fourth sample data.

[0140] Exemplarily, S342 may include: determining the target leaf node ciphertext weight corresponding to the fourth sample data based on the correspondence between the leaf node ciphertext weight and the second sample data; homomorphically adding the previous predicted ciphertext value corresponding to the fourth sample data and the target leaf node ciphertext weight to obtain the current predicted ciphertext value corresponding to the fourth sample data.

[0141] Specifically, based on the correspondence between each leaf node ciphertext weight and each second sample data, the leaf node ciphertext weight corresponding to the fourth sample data, that is, the target leaf node ciphertext weight, can be obtained. (i.e., the sum of the output ciphertext results of each tree model constructed before the T-1th tree) and the ciphertext weight of the target leaf node in the previous tree model (i.e., the T-1th tree) Perform homomorphic addition to obtain the current predicted ciphertext value corresponding to each fourth sample data Right now in It is homomorphic addition, that is, the addition operation on the ciphertext, and its result is equal to the encrypted value of the sum of the plaintext.

[0142] S343. Determine the gradient ciphertext aggregation value of the current node to be split under the second splitting mode based on the current predicted ciphertext value and the sample ciphertext label corresponding to the fourth sample data.

[0143] Exemplarily, S343 may include: based on the second splitting method, dividing the fourth sample data, determining the fifth sample data corresponding to the second child node obtained by splitting the current node to be split under the second splitting method; based on a preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data, determining the gradient ciphertext value corresponding to each fifth sample data; based on the gradient ciphertext values ​​corresponding to each fifth sample data, determining the gradient ciphertext aggregation value corresponding to the second child node.

[0144] Specifically, each data end can split the current node to be split based on the splitting feature and feature threshold for each second splitting mode, and obtain two second child nodes after the split, namely the left node and the right node. Based on the splitting feature and feature threshold, all fourth sample data can be divided to determine a data set consisting of each fifth sample data divided into each second child node. For the data set corresponding to each second child node, the current predicted ciphertext value corresponding to each fifth sample data in the data set can be used to obtain the predicted ciphertext value. and the sample ciphertext label [y], determine the corresponding gradient ciphertext value, and perform homomorphic addition on each gradient ciphertext value to obtain the gradient ciphertext aggregation value corresponding to each second child node.

[0145] Exemplarily, based on a preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data, determining the gradient ciphertext value corresponding to each fifth sample data may include: based on a first-order gradient calculation method corresponding to the preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data, determining the first-order gradient ciphertext value corresponding to each fifth sample data; based on a second-order gradient calculation method corresponding to the preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data, determining the second-order gradient ciphertext value corresponding to each fifth sample data;

[0146] Correspondingly, based on the gradient ciphertext values ​​corresponding to each fifth sample data, determining the gradient ciphertext aggregation value corresponding to the second child node may include: homomorphically adding the first-order gradient ciphertext values ​​corresponding to each fifth sample data to obtain the first-order gradient ciphertext aggregation value corresponding to the second child node; homomorphically adding the first-order gradient ciphertext values ​​corresponding to each fifth sample data to obtain the second-order gradient ciphertext aggregation value corresponding to the second child node.

[0147] Specifically, when constructing the XGBoost model, it is necessary to determine the first-order gradient ciphertext aggregation value and the second-order gradient ciphertext aggregation value corresponding to each second child node. The first-order gradient ciphertext value corresponding to the i-th fifth sample data corresponding to each second child node is [g i ], the corresponding second-order gradient ciphertext value is [h i ]. The first-order gradient ciphertext value corresponding to each fifth sample data is = [g i ] are added to obtain the first-order gradient ciphertext aggregation value corresponding to each second child node, that is, Among them, I j It refers to the fifth sample data set corresponding to the jth second child node (the second left child node or the second right child node). Similarly, for each fifth sample data corresponding to the second-order gradient ciphertext value [h i ] are added to obtain the second-order gradient ciphertext aggregation value corresponding to each second child node, that is,

[0148] For example, when the preset loss function is the mean square error function, the first-order gradient ciphertext value [g i ] and the second-order gradient ciphertext value [h i ] can be determined as follows:

[0149] [h i ]=[1]

[0150] When the preset loss function is the cross entropy loss function and the Sigmod function, the data end can approximate the Sigmod function by performing Taylor expansion at 0 (taking the first-order Taylor expansion as an example), and then the first-order gradient ciphertext value [g i ] and the second-order gradient ciphertext value [h i ] can be determined as follows:

[0151]

[0152]

[0153]

[0154] Among them, when the preset loss function contains more complex operations such as power operations and rational number division operations, the Taylor expansion can be used to perform a second-order approximation on the expression and convert it into a form that can be operated by homomorphic encryption.

[0155] S350. Send the gradient ciphertext aggregation value to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, obtain the target gradient boosting tree model based on the constructed tree models.

[0156] In the technical solution of this embodiment, the service end encrypts the sample label corresponding to the first sample data, and sends the encrypted sample ciphertext label to the data end. When constructing the current tree model, based on the leaf node weights, the first sample data and the sample labels in the previous tree model that have been constructed, the service end determines the first information gain of the node to be split in the current tree model under the first splitting mode, and encrypts the leaf node weights in the previous tree model, and sends the encrypted leaf node ciphertext weights to the data end. The data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the received leaf node ciphertext weights, the second sample data after sample alignment with the service end and the received sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end. The business end determines the second information gain of the node to be split under the second splitting mode based on the received gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain, and determines that the current tree model is completed when the preset splitting stop condition is met. Therefore, each time the business end builds a tree model, it only needs to transmit the leaf node ciphertext weights in the previous tree model to the data end, and there is no need to transmit the gradient ciphertext value corresponding to each sample data, thereby greatly reducing the communication overhead and improving the communication efficiency, thereby also improving the construction efficiency of the gradient boosting tree model, and the business end sends the encrypted leaf node ciphertext weights and sample ciphertext labels to the data end, thereby ensuring the data security of the business end, and at the same time, the data end sends the gradient ciphertext aggregation value to the business end, so that the business end cannot obtain a single prediction value based on the gradient ciphertext aggregation value, thereby also ensuring the data security of the data party.

[0157] The following is an embodiment of a device for constructing a gradient boosting tree model integrated at a business end provided by an embodiment of the present invention. The device and the method for constructing a gradient boosting tree model applied to a business end in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the device for constructing a gradient boosting tree model integrated at a business end, reference can be made to the embodiment of the method for constructing a gradient boosting tree model applied to a business end in the above-mentioned embodiment.

[0158] Figure 4 is a schematic diagram of a structure of a device for constructing a gradient boosting tree model integrated in a service end provided by an embodiment of the present invention, such as Figure 4 As shown, the device specifically includes: a first sample data alignment module 410, a first information gain determination module 420, a leaf node ciphertext weight sending module 430, a second information gain determination module 440, a node splitting module 450 and a gradient boosting tree model determination module 460.

[0159] Among them, the first sample data alignment module 410 is used to obtain the first sample data after sample alignment with the data end, encrypt the sample label corresponding to the first sample data, and send the encrypted sample ciphertext label to the data end; the first information gain determination module 420 is used to determine the first information gain of the node to be split in the current tree model to be constructed under the first splitting method based on the leaf node weights, the first sample data and the sample labels in the previous tree model that has been constructed; the leaf node ciphertext weight sending module 430 is used to encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that the data end can determine the first information gain of the node to be split in the current tree model to be constructed based on the leaf node ciphertext weights. The second sample data and the sample ciphertext label after sample alignment with the business end are used to determine the gradient ciphertext aggregation value of the node to be split under the second splitting mode, and the gradient ciphertext aggregation value is sent to the business end; the second information gain determination module 440 is used to determine the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value; the node splitting module 450 is used to perform node splitting on the node to be split based on the first information gain and the second information gain, and determine that the current tree model construction is completed when the preset splitting stop condition is met; the gradient boosting tree model determination module 460 is used to obtain the gradient boosting tree model based on the constructed tree models when the preset construction stop condition is met.

[0160] Optionally, the first information gain determination module 420 includes:

[0161] A current node to be split acquiring unit, used to acquire a current node to be split in a current node to be split set corresponding to a current tree model to be constructed;

[0162] A third sample data acquisition unit, configured to acquire third sample data corresponding to the current node to be split from the first sample data;

[0163] A first gradient aggregation value determining unit is used to determine a first gradient aggregation value corresponding to a first child node obtained by splitting the current node to be split in a first splitting mode based on the leaf node weights in the previous tree model that has been constructed, the third sample data, and the sample labels corresponding to the third sample data;

[0164] The first information gain determining unit is used to determine the first information gain of the current node to be split in the first splitting mode based on the first gradient aggregation value corresponding to the first child node.

[0165] Optionally, the current to-be-split node acquisition unit is specifically used for:

[0166] If it is the first iteration, the first sample data is used as the third sample data corresponding to the current node to be split; if it is not the first iteration, the third sample data corresponding to the current node to be split in the first sample data is obtained, and the sample identifier corresponding to the third sample data is sent to the data end, so that the data end determines the fourth sample data corresponding to the current node to be split from the second sample data based on the sample identifier.

[0167] Optionally, the second information gain determination module 440 includes:

[0168] A gradient ciphertext aggregate value decryption unit is used to decrypt the gradient ciphertext aggregate value corresponding to the second child node obtained by splitting the current node to be split in the second splitting mode, and obtain a second gradient aggregate value corresponding to the decrypted second child node;

[0169] The second information gain determining unit is used to determine the second information gain of the current node to be split in the second splitting mode based on the second gradient aggregation value corresponding to the second child node.

[0170] Optionally, the second information gain determination unit is specifically used to determine the second information gain of the current node to be split under the second splitting method based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second left child node, and the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second right child node.

[0171] Optionally, the node splitting module 450 includes:

[0172] a maximum information gain determining unit, configured to determine a maximum information gain based on the first information gain and the second information gain;

[0173] A node splitting unit, configured to perform node splitting on the current node to be split based on a target splitting mode corresponding to the maximum information gain if it is detected that the maximum information gain is greater than or equal to a preset gain threshold;

[0174] The current set of nodes to be split is updated by a unit, which is used to add the target child node after the split to the current set of nodes to be split, and remove the current node to be split from the current set of nodes to be split, and return to execute the step of obtaining the current node to be split in the current set of nodes to be split corresponding to the current tree model to be constructed, until the preset splitting stop condition is met to determine that the construction of the current tree model is completed.

[0175] Optionally, the node splitting unit is specifically used for:

[0176] If the target splitting mode corresponding to the maximum information gain is the first splitting mode in the business end, then based on the target splitting mode, the local node splitting is performed on the current node to be split, and the target splitting characteristics and characteristic thresholds are determined; if the target splitting mode corresponding to the maximum information gain is the second splitting mode in the data end, then the identification information corresponding to the target splitting mode is sent to the data end, so that the data end splits the current node to be split based on the second splitting mode corresponding to the identification information, and determines the target splitting characteristics and characteristic thresholds.

[0177] The device for constructing a gradient boosting tree model integrated in the business end provided in an embodiment of the present invention can execute the method for constructing a gradient boosting tree model applied to the business end provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method for constructing a gradient boosting tree model applied to the business end.

[0178] It is worth noting that in the embodiment of the above-mentioned device for constructing a gradient boosting tree model integrated in the business end, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0179] The following is an embodiment of a device for constructing a gradient boosting tree model integrated at a data end provided by an embodiment of the present invention. The device and the method for constructing a gradient boosting tree model applied to a data end in the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the device for constructing a gradient boosting tree model integrated at a data end, reference can be made to the embodiment of the method for constructing a gradient boosting tree model applied to a data end in the above-mentioned embodiment.

[0180] Figure 5 is a schematic diagram of a structure of a device for constructing a gradient boosting tree model integrated in a data terminal provided by an embodiment of the present invention, such as Figure 5As shown, the device specifically includes: a second sample data acquisition module 510, a sample ciphertext label receiving module 520, a leaf node ciphertext weight receiving module 530, a gradient ciphertext aggregation value determination module 540 and a gradient ciphertext aggregation value sending module 550.

[0181] Among them, the second sample data acquisition module 510 is used to obtain the second sample data after sample alignment with the business end; the sample ciphertext label receiving module 520 is used to receive the sample ciphertext label corresponding to the second sample data sent by the business end; the leaf node ciphertext weight receiving module 530 is used to receive the leaf node ciphertext weight corresponding to the previous tree model that has been constructed and sent by the business end; the gradient ciphertext aggregation value determination module 540 is used to determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label; the gradient ciphertext aggregation value sending module 550 is used to send the gradient ciphertext aggregation value to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, the target gradient boosting tree model is obtained based on each constructed tree model.

[0182] Optionally, the gradient ciphertext aggregation value determination module 540 includes:

[0183] A fourth sample data determining unit, configured to determine fourth sample data corresponding to the current node to be split from the second sample data;

[0184] a current predicted ciphertext value determining unit, configured to determine a current predicted ciphertext value corresponding to the fourth sample data based on a correspondence between a leaf node ciphertext weight and the second sample data, and a previous predicted ciphertext value corresponding to the fourth sample data;

[0185] The gradient ciphertext aggregation value determining unit is used to determine the gradient ciphertext aggregation value of the current node to be split under the second splitting mode based on the current predicted ciphertext value and the sample ciphertext label corresponding to the fourth sample data.

[0186] Optionally, the current predicted ciphertext value determining unit is specifically configured to:

[0187] Based on the correspondence between the leaf node ciphertext weight and the second sample data, determine the target leaf node ciphertext weight corresponding to the fourth sample data; homomorphically add the previous predicted ciphertext value corresponding to the fourth sample data and the target leaf node ciphertext weight to obtain the current predicted ciphertext value corresponding to the fourth sample data.

[0188] Optionally, the gradient ciphertext aggregation value determining unit includes:

[0189] a fifth sample data determination subunit, configured to divide the fourth sample data based on the second splitting mode, and determine fifth sample data corresponding to a second child node obtained by splitting the current node to be split in the second splitting mode;

[0190] A gradient ciphertext value determination subunit, used to determine the gradient ciphertext value corresponding to each fifth sample data based on a preset loss function and according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data;

[0191] The gradient ciphertext aggregate value determining subunit is used to determine the gradient ciphertext aggregate value corresponding to the second child node based on the gradient ciphertext values ​​corresponding to each fifth sample data.

[0192] Optionally, the gradient ciphertext value determination subunit is specifically used to: determine the first-order gradient ciphertext value corresponding to each fifth sample data based on the first-order gradient calculation method corresponding to the preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data; determine the second-order gradient ciphertext value corresponding to each fifth sample data based on the second-order gradient calculation method corresponding to the preset loss function, according to the current predicted ciphertext value and the sample ciphertext label corresponding to each fifth sample data;

[0193] The gradient ciphertext aggregation value determination subunit is specifically used to: homomorphically add the first-order gradient ciphertext values ​​corresponding to each fifth sample data to obtain the first-order gradient ciphertext aggregation value corresponding to the second child node; homomorphically add the first-order gradient ciphertext values ​​corresponding to each fifth sample data to obtain the second-order gradient ciphertext aggregation value corresponding to the second child node.

[0194] The device for constructing a gradient boosting tree model integrated in the data end provided in an embodiment of the present invention can execute the method for constructing a gradient boosting tree model applied to the data end provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method for constructing a gradient boosting tree model applied to the data end.

[0195] It is worth noting that in the embodiment of the above-mentioned device for constructing a gradient boosting tree model integrated in the data end, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0196] Figure 6is a schematic diagram of a system for constructing a gradient boosting tree model provided by an embodiment of the present invention. This embodiment is applicable to the case of constructing a gradient boosting tree model based on vertical federated learning, and in particular, can be used to construct a gradient boosting tree model in a risk control scenario. Figure 6 As shown, the system specifically includes: a service end 610 and at least one data end 620.

[0197] The service end 610 is used to implement the construction method of the gradient boosting tree model applied to the service end as provided in the above embodiment. Each data end 620 is used to implement the construction method of the gradient boosting tree model applied to the data end as provided in the above embodiment.

[0198] In the construction system of the gradient boosting tree model in this embodiment, the business end encrypts the sample label corresponding to the first sample data, and sends the encrypted sample ciphertext label to the data end. When constructing the current tree model, based on the leaf node weights, the first sample data and the sample labels in the previous tree model that have been constructed, the first information gain of the node to be split in the current tree model under the first splitting mode is determined, and the leaf node weights in the previous tree model are encrypted, and the encrypted leaf node ciphertext weights are sent to the data end. The data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the received leaf node ciphertext weights, the second sample data after sample alignment with the business end and the received sample ciphertext label, and sends the gradient ciphertext aggregation value to the business end. The business end determines the second information gain of the node to be split under the second splitting mode based on the received gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain, and determines that the current tree model is completed when the preset splitting stop condition is met. Therefore, each time the business end builds a tree model, it only needs to transmit the leaf node ciphertext weights in the previous tree model to the data end, and there is no need to transmit the gradient ciphertext value corresponding to each sample data, thereby greatly reducing the communication overhead and improving the communication efficiency, thereby also improving the construction efficiency of the gradient boosting tree model, and the business end sends the encrypted leaf node ciphertext weights and sample ciphertext labels to the data end, thereby ensuring the data security of the business end, and at the same time, the data end sends the gradient ciphertext aggregation value to the business end, so that the business end cannot obtain a single prediction value based on the gradient ciphertext aggregation value, thereby also ensuring the data security of the data party.

[0199] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 7 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0200] like Figure 7 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0201] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0202] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0203] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0204] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0205] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0206] The processing unit 16 executes various functional applications and data processing by running the programs stored in the system memory 28, such as implementing the method for constructing the gradient boosting tree model provided in the embodiment of the present invention.

[0207] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the method for determining the reserved inventory amount provided in any embodiment of the present invention.

[0208] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for constructing a gradient boosting tree model as provided in any embodiment of the present invention.

[0209] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0210] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0211] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0212] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0213] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0214] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for constructing a gradient boosting tree model based on federated learning. It is characterized in that Applied to the business end, which is the terminal device used by the business party, including: Acquire first sample data after sample alignment with the data end, encrypt the sample label corresponding to the first sample data, and send the encrypted sample ciphertext label to the data end; Determine, based on the leaf node weights in the previous tree model that has been constructed, the first sample data, and the sample labels, a first information gain of a node to be split in a current tree model to be constructed under a first splitting mode; Encrypting the leaf node weights in the previous tree model, and sending the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the leaf node ciphertext weights, the second sample data after sample alignment with the service end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end; Determine a second information gain of the node to be split in a second splitting mode based on the gradient ciphertext aggregation value; Based on the first information gain and the second information gain, performing node splitting on the node to be split, and determining that the current tree model is completed when a preset splitting stop condition is met; When the preset construction stop condition is met, a gradient boosting tree model is obtained based on each tree model that has been constructed.

2. The method according to claim 1, It is characterized in that The determining, based on the leaf node weights in the previous tree model that has been constructed, the first sample data, and the sample labels, of a first information gain of a node to be split in a current tree model to be constructed in a first splitting mode includes: Obtain the current node to be split in the current set of nodes to be split corresponding to the current tree model to be constructed; Acquire third sample data corresponding to the current node to be split from the first sample data; Determine, based on the leaf node weights in the previous tree model that has been constructed, the third sample data, and the sample labels corresponding to the third sample data, a first gradient aggregation value corresponding to a first child node obtained by splitting the current node to be split in the first splitting mode; Based on the first gradient aggregation value corresponding to the first child node, a first information gain of the current node to be split in a first splitting mode is determined.

3. The method according to claim 2, It is characterized in that The acquiring, from the first sample data, third sample data corresponding to the current node to be split includes: If it is the first iteration, the first sample data is used as the third sample data corresponding to the current node to be split; If it is not the first iteration, the third sample data corresponding to the current node to be split in the first sample data is obtained, and the sample identifier corresponding to the third sample data is sent to the data end, so that the data end determines the fourth sample data corresponding to the current node to be split from the second sample data based on the sample identifier.

4. The method according to claim 2, It is characterized in that The determining, based on the gradient ciphertext aggregation value, a second information gain of the node to be split in a second splitting mode includes: Decrypting the gradient ciphertext aggregation value corresponding to the second child node obtained by splitting the current node to be split in the second splitting mode, to obtain the second gradient aggregation value corresponding to the decrypted second child node; Based on the second gradient aggregation value corresponding to the second child node, a second information gain of the current node to be split in the second splitting mode is determined.

5. The method according to claim 4, It is characterized in that The determining, based on the second gradient aggregation value corresponding to the second child node, a second information gain of the current node to be split in the second splitting mode includes: Based on the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second left child node and the first-order gradient aggregation value and the second-order gradient aggregation value corresponding to the second right child node, the second information gain of the current node to be split under the second splitting mode is determined.

6. The method according to claim 2, It is characterized in that The node splitting is performed on the node to be split based on the first information gain and the second information gain, and when a preset splitting stop condition is met, it is determined that the current tree model is completed, including: Determining a maximum information gain based on the first information gain and the second information gain; If it is detected that the maximum information gain is greater than or equal to the preset gain threshold, performing node splitting on the current node to be split based on the target splitting mode corresponding to the maximum information gain; The target child node after the split is added to the current set of nodes to be split, and the current node to be split is removed from the current set of nodes to be split, and the step of obtaining the current node to be split in the current set of nodes to be split corresponding to the current tree model to be constructed is returned to the step of determining that the current tree model is completed when the preset split stop condition is met.

7. The method according to claim 6, It is characterized in that The performing node splitting on the current node to be split based on the target splitting mode corresponding to the maximum information gain includes: If the target splitting mode corresponding to the maximum information gain is the first splitting mode in the service end, then based on the target splitting mode, performing local node splitting on the current node to be split, and determining a target splitting feature and a feature threshold; If the target splitting mode corresponding to the maximum information gain is the second splitting mode in the data end, the identification information corresponding to the target splitting mode is sent to the data end, so that the data end splits the current node to be split based on the second splitting mode corresponding to the identification information, and determines the target splitting feature and feature threshold.

8. A method for constructing a gradient boosting tree model based on federated learning. It is characterized in that Applied to the data end, which is the terminal device used by the data party, including: Obtaining second sample data after sample alignment with the business end; Receiving a sample ciphertext label corresponding to the second sample data sent by the service end; Receiving the ciphertext weight of the leaf node corresponding to the previous tree model constructed and sent by the service end; Determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label; The gradient ciphertext aggregation value is sent to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, the target gradient boosting tree model is obtained based on the constructed tree models.

9. The method according to claim 8, It is characterized in that The step of determining the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label includes: Determine fourth sample data corresponding to the current node to be split from the second sample data; Determine a current predicted ciphertext value corresponding to the fourth sample data based on a corresponding relationship between the leaf node ciphertext weight and the second sample data, and a previous predicted ciphertext value corresponding to the fourth sample data; Based on the current predicted ciphertext value and the sample ciphertext label corresponding to the fourth sample data, the gradient ciphertext aggregation value of the current node to be split under the second splitting mode is determined.

10. The method according to claim 9, It is characterized in that The determining, based on the correspondence between the leaf node ciphertext weight and the second sample data, and the last predicted ciphertext value corresponding to the fourth sample data, a current predicted ciphertext value corresponding to the fourth sample data includes: Determine the target leaf node ciphertext weight corresponding to the fourth sample data based on the correspondence between the leaf node ciphertext weight and the second sample data; The previous predicted ciphertext value corresponding to the fourth sample data and the target leaf node ciphertext weight are homomorphically added to obtain the current predicted ciphertext value corresponding to the fourth sample data.

11. The method according to claim 9, It is characterized in that The step of determining the gradient ciphertext aggregation value of the current node to be split in the second splitting mode based on the current predicted ciphertext value and the sample ciphertext label corresponding to the fourth sample data includes: Based on the second splitting mode, the fourth sample data is divided to determine fifth sample data corresponding to a second child node obtained by splitting the current node to be split in the second splitting mode; Based on a preset loss function, determining a gradient ciphertext value corresponding to each of the fifth sample data according to a current predicted ciphertext value and a sample ciphertext label corresponding to each of the fifth sample data; Based on the gradient ciphertext values ​​corresponding to each of the fifth sample data, the gradient ciphertext aggregation value corresponding to the second sub-node is determined.

12. The method according to claim 11, It is characterized in that The step of determining the gradient ciphertext value corresponding to each of the fifth sample data based on the preset loss function and the current predicted ciphertext value and the sample ciphertext label corresponding to each of the fifth sample data comprises: Based on the first-order gradient calculation method corresponding to the preset loss function, and according to the current predicted ciphertext value and the sample ciphertext label corresponding to each of the fifth sample data, determine the first-order gradient ciphertext value corresponding to each of the fifth sample data; Based on the second-order gradient calculation method corresponding to the preset loss function, and according to the current predicted ciphertext value and the sample ciphertext label corresponding to each of the fifth sample data, determine the second-order gradient ciphertext value corresponding to each of the fifth sample data; The determining, based on the gradient ciphertext values ​​corresponding to the fifth sample data, the gradient ciphertext aggregation value corresponding to the second sub-node includes: Homomorphically adding the first-order gradient ciphertext values ​​corresponding to each of the fifth sample data to obtain a first-order gradient ciphertext aggregation value corresponding to the second child node; The first-order gradient ciphertext values ​​corresponding to each of the fifth sample data are homomorphically added to obtain a second-order gradient ciphertext aggregation value corresponding to the second child node.

13. A device for constructing a gradient boosting tree model based on federated learning, It is characterized in that Integrated in the business end, which is the terminal device used by the business party, including: A first sample data alignment module, used for acquiring first sample data after sample alignment with the data end, encrypting a sample label corresponding to the first sample data, and sending the encrypted sample ciphertext label to the data end; A first information gain determination module, used to determine a first information gain of a node to be split in a current tree model to be constructed in a first splitting mode based on the leaf node weights in the previous tree model that has been constructed, the first sample data and the sample labels; A leaf node ciphertext weight sending module is used to encrypt the leaf node weights in the previous tree model, and send the encrypted leaf node ciphertext weights to the data end, so that the data end determines the gradient ciphertext aggregation value of the node to be split under the second splitting mode based on the leaf node ciphertext weights, the second sample data after sample alignment with the service end, and the sample ciphertext label, and sends the gradient ciphertext aggregation value to the service end; A second information gain determination module, used to determine a second information gain of the node to be split in a second splitting mode based on the gradient ciphertext aggregation value; A node splitting module, used for performing node splitting on the node to be split based on the first information gain and the second information gain, and determining that the current tree model is completed when a preset splitting stop condition is met; The gradient boosting tree model determination module is used to obtain a gradient boosting tree model based on each constructed tree model when a preset construction stop condition is met.

14. A device for constructing a gradient boosting tree model based on federated learning. It is characterized in that Integrated in the data end, which is the terminal device used by the data party, including: A second sample data acquisition module, used to acquire second sample data after sample alignment with the service end; A sample ciphertext label receiving module, used to receive the sample ciphertext label corresponding to the second sample data sent by the service end; A leaf node ciphertext weight receiving module, used to receive the leaf node ciphertext weight corresponding to the constructed previous tree model sent by the service end; A gradient ciphertext aggregation value determination module, used to determine the gradient ciphertext aggregation value of the node to be split in the current tree model to be constructed under the second splitting mode based on the leaf node ciphertext weight, the second sample data and the sample ciphertext label; A gradient ciphertext aggregation value sending module is used to send the gradient ciphertext aggregation value to the business end, so that the business end determines the second information gain of the node to be split under the second splitting mode based on the gradient ciphertext aggregation value, and performs node splitting on the node to be split based on the first information gain and the second information gain of the node to be split under the first splitting mode, and determines that the current tree model construction is completed when the preset splitting stop condition is met; when the preset model construction stop condition is met, obtains the target gradient boosting tree model based on the constructed tree models.

15. A system for building a gradient boosted tree model. It is characterized in that The system includes a service end and at least one data end; Wherein, the business end is used to implement the method for constructing a gradient boosting tree model based on federated learning as described in any one of claims 1 to 7; The data end is used to implement the method for constructing a gradient boosting tree model based on federated learning as described in any one of claims 8-12.

16. An electronic device, It is characterized in that The electronic device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for constructing a gradient boosting tree model based on federated learning as described in any one of claims 1-12.

17. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, it implements the method for constructing a gradient boosting tree model based on federated learning as described in any one of claims 1 to 12.