Model training method, insurance purchase rate prediction method, device, equipment and medium
By collaboratively determining gradient and label information between the electronic devices of both parties, the sample features with the largest feature gain are selected and a longitudinal federated model is trained. This solves the problem of poor model training performance caused by label conflicts and improves the accuracy of insurance purchase rate prediction.
Patent Information
- Application Number
- CN202310506115.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2043-05-06
AI Technical Summary
When both sides have partially labeled data and there are label conflicts, existing technologies select one side's label for model training, resulting in poor model training performance and low accuracy in predicting user behavior.
The gradient and label information of each sample are determined by the collaboration of the first and second electronic devices. The sample features with the largest feature gain are selected and used to train the longitudinal federated model, making full use of the label data of both parties.
This improved the training performance of the model and enhanced the accuracy of predicting user insurance purchase rates in the subsequent longitudinal federated model.
Smart Images

Figure CN116561678B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of federal learning technology, and in particular to a model training method, a purchase rate prediction method, an apparatus, device, and medium. Background Technology
[0002] Federated learning is a distributed machine learning technique. Its core idea is to train a model across multiple participants who possess sample data, enabling all participants to collaboratively train the model without sharing the data itself. This effectively resolves the conflict between data sharing and data privacy protection. The trained model can then be used to predict user behavior, thereby providing better services. Therefore, proper model training is crucial.
[0003] In real-world business scenarios, it is common to encounter situations where both sides have partially labeled data, and there is a possibility of label conflicts. That is, the same sample may have a label value of 0 on one side and a label value of 1 on the other. Currently, the main approach is to select the labeled data from one side for model training, which results in poor model training performance and consequently, poor accuracy when predicting user behavior based on the trained model.
[0004] Application Content
[0005] This application provides a model training method, a purchase rate prediction method, an apparatus, a device, and a medium that can improve the training effect of the model.
[0006] In a first aspect, embodiments of this application provide a model training method applied to a first electronic device, the method comprising:
[0007] Based on the true label of each first sample in the first sample set and the predicted label of the first sample on the first electronic device side, the first gradient information of each first sample is determined;
[0008] The first gradient information is sent to the second electronic device;
[0009] The device receives second gradient information corresponding to the sample features of each first sample sent by the second electronic device, as well as first identification information corresponding to the sample features. The second gradient information is determined by the second electronic device based on the label of the first sample on the second electronic device side and the first gradient information.
[0010] For each sample feature, the feature gain of the longitudinal federated model is determined based on the second gradient information and the first identifier information;
[0011] The sample feature with the largest feature gain is taken as a target feature, and the target feature is used to train the longitudinal federated model, so as to obtain a trained longitudinal federated model, and the longitudinal federated model is used to predict the insurance purchasing rate of the user.
[0012] In a second aspect, the embodiments of the present application provide a model training method, applied to a second electronic device, the method comprising:
[0013] receiving first gradient information of each first sample sent by the first electronic device, the first gradient information being determined by the first electronic device according to a true label of the first sample and a predicted label of the first sample on the first electronic device side;
[0014] For each sample feature of each first sample, second gradient information corresponding to the sample feature and first identification information corresponding to the sample feature are determined according to a label of the first sample on the second electronic device side and the first gradient information;
[0015] sending the second gradient information and the first identification information to the first electronic device, so that the first electronic device trains a longitudinal federated model according to the second gradient information and the first identification information, and the longitudinal federated model is used to predict the insurance purchasing rate of the user.
[0016] In a third aspect, the embodiments of the present application provide an insurance purchasing rate prediction method, comprising:
[0017] obtaining a user feature of a user;
[0018] inputting the user feature into a pre-trained longitudinal federated model to obtain an insurance purchasing rate of the user, and the longitudinal federated model is trained according to the method in the first aspect or the second aspect.
[0019] In a fourth aspect, the embodiments of the present application provide a model training device, applied to a first electronic device, the device comprising a determination module, a sending module, a receiving module and a training module;
[0020] The determination module is configured to determine first gradient information of each first sample according to a true label of each first sample in the first sample set and a predicted label of the first sample on the first electronic device side;
[0021] The sending module is configured to send the first gradient information to a second electronic device;
[0022] The receiving module is configured to receive second gradient information corresponding to a sample feature of each first sample and first identification information corresponding to the sample feature sent by the second electronic device, and the second gradient information is determined by the second electronic device according to a label of the first sample on the second electronic device side and the first gradient information;
[0023] The determining module is further configured to determine, for each sample feature, a feature gain of the longitudinal federated model according to the second gradient information and the first identification information.
[0024] The training module is configured to take the sample feature with the largest feature gain as a target feature, and train the longitudinal federated model by using the target feature to obtain a trained longitudinal federated model, which is configured to predict the insurance purchasing rate of the user.
[0025] In a fifth aspect, an embodiment of the present application provides a model training apparatus applied to a second electronic device, and the apparatus comprises:
[0026] The receiving module is configured to receive first gradient information of each first sample sent by a first electronic device, wherein the first gradient information is determined by the first electronic device according to a real label of the first sample and a predicted label of the first sample on a first electronic device side.
[0027] The determining module is configured to determine, for each sample feature of each first sample, second gradient information corresponding to the sample feature and first identification information corresponding to the sample feature according to a label of the first sample on a second electronic device side and the first gradient information.
[0028] The sending module is configured to send the second gradient information and the first identification information to the first electronic device, so that the first electronic device trains a longitudinal federated model according to the second gradient information and the first identification information, and the longitudinal federated model is configured to predict the insurance purchasing rate of the user.
[0029] In a sixth aspect, an embodiment of the present application provides an insurance purchasing rate prediction apparatus, comprising:
[0030] The obtaining module is configured to obtain a user feature of a user.
[0031] The prediction module is configured to input the user feature into a pre-trained longitudinal federated model to obtain the insurance purchasing rate of the user, and the longitudinal federated model is trained according to the method in the first aspect or the second aspect.
[0032] In a seventh aspect, an embodiment of the present application provides an electronic device, comprising:
[0033] A processor;
[0034] A memory configured to store computer program instructions;
[0035] When the computer program instructions are executed by the processor, the method in the first aspect, the second aspect or the third aspect is implemented.
[0036] In an eighth aspect, an embodiment of the present application provides a computer readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method in the first aspect, the second aspect or the third aspect is implemented.
[0037] In a ninth aspect, an embodiment of the present application provides a computer program product. Instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the method according to the first aspect, the second aspect, or the third aspect.
[0038] According to the real labels of the first samples and the predicted labels of the first samples on the first electronic device side, the first gradient information of each first sample is determined by the first electronic device, and is sent to the second electronic device. According to the first gradient information sent by the first electronic device, the second electronic device determines the second gradient information corresponding to the sample feature and the first identification information in combination with the label of the first sample on the second electronic device side and the first gradient information, and sends them to the first electronic device. After receiving the second gradient information and the first identification information, the first electronic device determines the feature gain of the longitudinal federated model, and trains the longitudinal federated model based on the sample feature with the largest feature gain. That is, in the case that the first electronic device and the second electronic device are provided with labels for the first samples, the target feature can be screened based on the labels of both parties, and the label data of both parties is fully utilized. In this way, the training effect of the model can be improved, and the accuracy of the prediction result can be improved when the trained longitudinal federated model is used to predict the insurance purchasing rate of the user subsequently. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments of the present application will be briefly introduced. For those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0040] Figure 1 A flowchart of a model training method provided by an embodiment of the present application;
[0041] Figure 2 A flowchart of a model training method provided by an embodiment of the present application;
[0042] Figure 3 A display schematic diagram of a cutting point provided by an embodiment of the present application;
[0043] Figure 4 An interaction process schematic diagram of a first electronic device and a second electronic device provided by an embodiment of the present application;
[0044] Figure 5 A flowchart of an insurance purchasing rate prediction method provided by an embodiment of the present application;
[0045] Figure 6 A structural diagram of a model training device provided by an embodiment of the present application;
[0046] Figure 7 A structural diagram of a model training device provided for an embodiment of the present application is shown in FIG. 1.
[0047] Figure 8 A structural diagram of a purchase rate prediction device provided for an embodiment of the present application is shown in FIG. 2.
[0048] Figure 9 A structural diagram of an electronic device provided for an embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0049] The features and exemplary embodiments of various aspects of the present application will be described in detail below with reference to the accompanying drawings and embodiments, in order to make the purposes, technical solutions and advantages of the present application more clear. It should be understood that the specific embodiments described herein are only configured to explain the present application, and are not configured to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0050] It should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or apparatus. Without more limitations, the elements defined by the statement "comprising" do not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the elements defined by the statement "comprising".
[0051] For two-party longitudinal federal modeling, in actual business scenarios, there are often cases where both parties have some labels, and there are label conflicts, for example, for the same sample, the label on one side is 0, and the label on the other side is 1.
[0052] Currently, when training a longitudinal federal model, the label of one party is used as the basis, and the label of the other party is discarded, which loses part of the information, resulting in poor model training effect. When using the trained longitudinal federal model to predict the purchase rate of a user, the accuracy of the prediction result is low.
[0053] Therefore, the embodiments of the present application provide a model training method, a purchase rate prediction, a device, an apparatus and a medium, which can improve the training effect of the model.
[0054] The model training method provided by the embodiments of the present application will be described below in combination with specific examples. The model training method provided by the embodiments of the present application can be applied to a first electronic device and a second electronic device. The first electronic device and the second electronic device can be, for example, a computer, a desktop computer, a server, etc.
[0055] Figure 1 A flowchart of a model training method provided by the embodiments of the present application is shown in FIG. 1. The method can be applied to a first electronic device. As shown in FIG. 1, the model training method can include the following steps: Figure 1
[0056] S110, determining first gradient information of each first sample in the first sample set according to the real label of each first sample in the first sample set and the predicted label of the first sample on the first electronic device side.
[0057] S120, sending the first gradient information to the second electronic device.
[0058] S130, receiving second gradient information corresponding to the sample feature of each first sample and first identification information corresponding to the sample feature sent by the second electronic device.
[0059] The second gradient information is determined by the second electronic device according to the label of the first sample on the second electronic device side and the first gradient information.
[0060] S140, for each sample feature, determining a feature gain of the longitudinal federated model according to the second gradient information and the first identification information.
[0061] S150, taking the sample feature with the largest feature gain as a target feature, and training the longitudinal federated model using the target feature to obtain a trained longitudinal federated model.
[0062] The longitudinal federated model is used to predict the insurance purchasing rate of a user.
[0063] The embodiment of the application determines first gradient information of each first sample according to the real label of each first sample and the predicted label of the first sample on the first electronic device side, and sends the first gradient information to the second electronic device. The second electronic device determines second gradient information corresponding to the sample feature and first identification information according to the first gradient information sent by the first electronic device, in combination with the label of the first sample on the second electronic device side and the first gradient information, and sends the second gradient information and the first identification information to the first electronic device. After receiving the second gradient information and the first identification information, the first electronic device determines the feature gain of the longitudinal federal model, and trains the longitudinal federal model based on the sample feature with the largest feature gain. That is, in the case that the first electronic device and the second electronic device are provided with labels for the first sample, the embodiment of the application can screen the target feature based on the labels of both parties, fully utilizes the label data of both parties, so as to improve the training effect of the model, and then when the trained longitudinal federal model is used to predict the insurance purchase rate of the user in the subsequent stage, the accuracy of the prediction result can be improved.
[0064] The above steps are described in detail as follows:
[0065] In S110, the first electronic device and the second electronic device can be intelligent devices corresponding to different participants, for example, the first electronic device can be an intelligent device corresponding to a business party, and the second electronic device can be an intelligent device corresponding to a data party. The data party mainly provides data to assist the business party in modeling and improve business capabilities.
[0066] The business party and the data party can be different companies, for example, the business party can correspond to company A, and the data party can correspond to company B. The samples of company A not only have sample features, but also have sample labels, and the samples of company B also have sample features and sample labels. The sample features and sample labels of company A and company B are not completely coincident, and for the same sample, the sample label of company A and the sample label of company B can be different. The embodiment of the application can improve the training effect of the longitudinal federal model by comprehensively considering the label data of company A and company B.
[0067] The sample here can be a user, and one user can correspond to one sample. The first sample set can be a set containing multiple samples.
[0068] It should be understood that the user groups of different companies are not completely coincident, and therefore, the samples of different companies can be aligned before the model is trained.
[0069] Taking company A and company B participating in model training as an example, exemplary, company A and company B can respectively confirm the common users of the two companies based on encrypted user sample alignment technologies such as RSA encryption algorithm, private set intersection (PSI) technology, etc., without disclosing the user data of each company respectively, and respectively obtain the local samples corresponding to the common users, and ensure the consistency of the local samples.
[0070] The first sample set is the sample set obtained after alignment by the alignment technology, that is, the common users contained by company A and company B.
[0071] In the application scenario of purchasing insurance, the label can be used to represent whether the user purchases insurance, for example, label 0 can represent that the user does not purchase insurance, and label 1 can represent that the user purchases insurance.
[0072] The true label can be the label of the first sample in company A, that is, the label of whether the first sample actually purchases insurance stored by company A. The predicted label is the label obtained by the first electronic device initializing whether the first sample purchases insurance.
[0073] Exemplarily, the first electronic device can randomly initialize the first Extreme Gradient Boosting (XGBoost) tree to obtain the predicted label of each first sample i represents the i-th first sample.
[0074] The first gradient information can include the first-order gradient of the true label of the i-th first sample The first-order gradient of the i-th first sample assuming that its label is a preset label and the second-order gradient h of the i-th first sample i . Exemplarily, the preset label can be 1.
[0075] Exemplarily, the first gradient information of each first sample can be determined in the following manner:
[0076] For each first sample, the true label of the first sample and the predicted label on the first electronic device side are determined to determine the first loss value;
[0077] According to the first loss value, the first first-order gradient of the true label of the first sample and the second first-order gradient assuming that the label of the first sample is a preset label are determined;
[0078] According to the predicted label of the first sample on the first electronic device side, the first second-order gradient of the first sample is determined;
[0079] The first first-order gradient, the second first-order gradient, and the first second-order gradient are determined as the first gradient information.
[0080] Exemplarily, wherein g i is the first loss value, y i is the real label, h i is the first second-order gradient, i.e., the second-order gradient of the i-th first sample, the first first-order gradient, i.e., the first-order gradient of the i-th first sample real label the second first-order gradient, i.e., the first-order gradient of the i-th first sample assuming that the label is the preset label and may be determined based on the first loss value g i , and a specific determination process is not limited by the embodiments of the present application.
[0081] Exemplarily, for each first sample, the following information shown in Table 1 can be obtained and h i .
[0082] Table 1 First Gradient Information
[0083]
[0084] In S120, the first electronic device determines the first gradient information h and h i of each first sample, and then sends the first gradient information to the second electronic device.
[0085] It should be understood that if the business direction data party exposes the first gradient information in plaintext, the data party can easily deduce the labels of the first samples in the business party. In order to protect the labels of the business party, the first gradient information can be encrypted.
[0086] Exemplarily, the above S120 can include the following steps:
[0087] encrypting the first gradient information according to a homomorphic encryption algorithm;
[0088] sending the encrypted first gradient information to the second electronic device.
[0089] The characteristic of the homomorphic encryption algorithm is that the encrypted data is processed to obtain an output, and the result of decrypting the output is the same as the output result obtained by processing the original unencrypted data using the same method. In formula, it can be expressed as follows:
[0090] [A]+[B]=[A+B]
[0091] Exemplarily, the Paillier homomorphic encryption algorithm can be used to encrypt h and h i , and obtain h and [h i ], wherein [ ] represents homomorphic encryption.
[0092] The Paillier homomorphic encryption algorithm is a public key algorithm based on a difficulty problem, has the characteristics of homomorphism and randomness, and relative to symmetric homomorphic encryption algorithms such as affine homomorphic encryption (Affine Homomorphic Encryption) and iterative affine homomorphic encryption (Iterative Affine Homomorphic Encryption), the Paillier ensures homomorphism while ensuring the randomness of the ciphertext, avoids the data party from deducing the label of the business party through the ciphertext, and has corresponding security.
[0093] When sending the and [h i ] to the second electronic device, the and [h i ] can be transmitted by using an oblivious transfer protocol, for example. The characteristic of the oblivious transfer protocol transmission mode is that not only the real label is used, but also the leakage of the business party label can be avoided.
[0094] The embodiments of the present application encrypt the and h i obtained by the business party by using the Paillier homomorphic encryption algorithm, and transmit them by using the oblivious transfer protocol, so that the data party can avoid deducing the label of the business party through the ciphertext, and the security of the label of the business party is ensured.
[0095] In S130, the sample feature is the feature of the first sample stored by the data party (the second electronic device), which can include the age, length of service, salary and other characteristics of the user, for example.
[0096] After the second electronic device receives the and [h i ] sent by the first electronic device, the second gradient information and the first identification information can be determined for each sample feature, which are used to assist the business party in training the vertical federated model.
[0097] For each sample feature, the second gradient information can include, for example, the sum of the first-order gradients of the left and right sub-trees of the sample feature at each split point, and the sum of the second-order gradients of the left and right sub-trees of the sample feature at each split point.
[0098] The first identification information can include identification information of the sample feature and identification information of the split point. Exemplarily, the identification information of the sample feature can be a number of the sample feature, for example, a first sample feature, and the identification information of the split point can be a number of the split point, for example, a first split point. That is, the second electronic device only sends the numbers of the sample features and the split points to the first electronic device, and does not send the feature values, the feature distribution, the feature name of the sample feature, and the specific value of the split point to the first electronic device, thereby ensuring the security of the data sample feature.
[0099] Taking the sample feature as an age as an example, the ages of the first samples can be arranged in ascending order, for example, the age of the first sample is 1-90, and it is assumed that 30 years old is taken as a split point, and the age feature of 1-90 is split, then 1-30 is referred to as a left sub-tree of the split point 30, and 30-90 is referred to as a right sub-tree of the split point 30.
[0100] For another example, 30-90 is split again, and 60 years old is taken as a split point, then 30-60 is referred to as a left sub-tree of the split point 60, and 60-90 is referred to as a right sub-tree of the split point 60.
[0101] The determination process of the second gradient information can refer to the following embodiments.
[0102] In actual application, the second gradient information and the first identification information received by the first electronic device are ciphertexts, and after receiving the second gradient information and the first identification information, the first electronic device can use a private key to decrypt to obtain the second gradient information and the first identification information.
[0103] In S140, after obtaining the second gradient information and the first identification information, the first electronic device can calculate a feature gain of the longitudinal federated model, thereby providing a basis for subsequent screening of a target feature used for training the longitudinal federated model. The specific calculation process is not described herein.
[0104] In S150, after obtaining the feature gain, the first electronic device can take a sample feature with the largest feature gain as a target feature, train the longitudinal federated model, and obtain a trained longitudinal federated model.
[0105] The longitudinal federated model is a tree structure, which is composed of two parts, that is, an overall structure of the tree and a leaf node, and the leaf node is used to store a split feature (a sample feature) and a split value (a split point).
[0106] The business party saves the overall structure of the tree, the split characteristics of each node (for the split characteristics of the business party, the characteristic information is directly saved; for the characteristics of the data party, only the characteristic number is saved, and the specific characteristics are not saved) and the split value (for the split characteristics of the business party, the specific split value is saved; but for the characteristics of the data party, only the number of the split threshold is saved, and the specific value is not saved).
[0107] The leaf node weight of the model is only saved in the business party. When the inference of the model is performed, the prediction result is composed of the sum of the leaf node weights of each tree for the sample, and the result is finally calculated by the business party. The leaf node weight and the model prediction result are not exposed to the data party. In this way, the security of the model information is ensured.
[0108] Specifically, the business party can inform the sample characteristic owner with the largest feature gain to split and build a tree, construct the next XGBoost tree, and the corresponding party updates the vertical federated model. For example, the sample characteristic owner with the largest feature gain is the data party, the business party informs the data party to split the sample characteristic, and constructs the next XGBoost tree, at the same time, the business party updates the vertical federated model. In this way, the iteration is repeated until the number of iterations reaches the set threshold, or the loss value of the vertical federated model tends to be stable, and a trained vertical federated model is obtained.
[0109] For example, as shown in FIG. 8, the training method applied to the second electronic device (the data party) can include the following steps: Figure 2
[0110] S210, receiving the first gradient information of each first sample sent by the first electronic device.
[0111] The first gradient information is determined by the first electronic device according to the true label of the first sample and the prediction label of the first sample on the first electronic device side.
[0112] S220, for each sample characteristic of each first sample, determining the second gradient information corresponding to the sample characteristic and the first identification information corresponding to the sample characteristic according to the label of the first sample on the second electronic device side and the first gradient information.
[0113] S230, sending the second gradient information and the first identification information to the first electronic device, so that the first electronic device trains the vertical federated model according to the second gradient information and the first identification information.
[0114] The vertical federated model is used to predict the insurance purchasing rate of a user.
[0115] The embodiment of the application determines first gradient information of each first sample according to the real label of each first sample and the predicted label of the first sample on the first electronic device side, and sends the first gradient information to the second electronic device. The second electronic device determines second gradient information corresponding to the sample feature and first identification information according to the first gradient information sent by the first electronic device, in combination with the label of the first sample on the second electronic device side and the first gradient information, and sends the second gradient information and the first identification information to the first electronic device. After receiving the second gradient information and the first identification information, the first electronic device determines the feature gain of the vertical federated model, and trains the vertical federated model based on the sample feature with the largest feature gain. That is, in the case that the first electronic device and the second electronic device are provided with labels for the first sample, the target feature can be screened based on the labels of both parties, and the label data of both parties is fully utilized. In this way, the training effect of the model can be improved, and then when the trained vertical federated model is used to predict the insurance purchasing rate of a user in the subsequent stage, the accuracy of the prediction result can be improved.
[0116] The above steps are described in detail as follows:
[0117] In S210, the determination process of the first gradient information can refer to the above embodiments, and will not be described herein for brevity.
[0118] In S220, the label of the same first sample on the business side and the label on the data side can be different. After receiving the first gradient information sent by the first electronic device, the second electronic device of the embodiment of the application can determine the second gradient information corresponding to each sample feature and the first identification information corresponding to the sample feature in combination with the label of the first sample on the second electronic device side, to provide a basis for the subsequent training of the vertical federated model by the first electronic device. The determination process of the first identification information can refer to the above embodiments, and the determination process of the second gradient information is described below.
[0119] Taking an example in which the first gradient information includes a first first-order gradient of the real label of the first sample, a second first-order gradient assuming that the label of the first sample is a preset label, and a first second-order gradient of the first sample, the above “determining the second gradient information corresponding to the sample feature according to the label of the first sample on the second electronic device side and the first gradient information” is exemplarily described as follows:
[0120] According to the relationship between the label of the first sample on the second electronic device side and the preset label, the target first-order gradient of the first sample is determined from the first first-order gradient and the second first-order gradient;
[0121] For each sample feature, the sum of the first-order gradient of the left sub-tree and the first-order gradient of the right sub-tree of the sample feature at the preset split point is determined according to the target first-order gradient of each first sample, to obtain a third first-order gradient;
[0122] Based on the first second gradient of each first sample, the sum of the second gradient of the left subtree and the second gradient of the right subtree of the sample feature at the preset split point is determined to obtain the second second gradient.
[0123] The third first-order gradient and the second second-order gradient are determined as the second gradient information corresponding to the sample features.
[0124] The first-order gradient here is the same as that in the above embodiment. The second first-order gradient is also known as the gradient in the above embodiments. The first and second-order gradients are also [h] in the above embodiments. i ].
[0125] Based on the relationship between the tag on the second electronic device and the preset tag of the first sample, it can be seen from... and The first-order gradient corresponding to the tag on the second electronic device side is determined, which is also the target first-order gradient.
[0126] Taking a preset label of 1 as an example, the above-mentioned "determining the target first gradient of the first sample from the first first gradient and the second first gradient based on the relationship between the label of the first sample on the second electronic device and the preset label" may include the following steps:
[0127] If the label of the first sample on the second electronic device side is the same as the preset label, the second first gradient is determined as the target first gradient of the first sample.
[0128] If the label of the first sample on the second electronic device side is different from the preset label, the first first-order gradient is determined as the target first-order gradient of the first sample.
[0129] For example, for the same first sample, if the label of the first sample on the second electronic device side, i.e., the data side, is 1, then the second first-order gradient will be... As the target first-order gradient of the first sample, if the label of the first sample on the second electronic device side, i.e., the data side, is 0, then the first first-order gradient will be... This serves as the target first-order gradient for the first sample.
[0130] Table 2 provides an example of how some data providers select corresponding samples based on their own labels. and One of them. For example, for sample ID1, the label of the data side is 0, so [g1] can be used as the target first gradient. Similarly, for sample ID2, the label of the data side is 1, so [g2]* can be used as the target first gradient.
[0131] Table 2: Selection of Some Labels
[0132]
[0133] By comparing the label of the first sample on the data side with the preset label, the first-order gradient corresponding to the label on the data side can be determined from and , which provides a basis for subsequent determination of the second gradient information.
[0134] Suppose that the first sample corresponds to N sample features, then for each sample feature, the sum of the first-order gradient of the left sub-tree and the first-order gradient of the right sub-tree of the sample feature at the preset split point can be determined according to the target first-order gradient of each first sample, to obtain a third first-order gradient.
[0135] Exemplarily, is the target first-order gradient of the i-th first sample, is the third first-order gradient, f represents a sample feature, and k represents the split point number of the sample feature.
[0136] Similarly, according to [h i ] of each first sample, the sum of the second-order gradient of the left sub-tree and the second-order gradient of the right sub-tree of the sample feature at the preset split point can be determined, to obtain a second second-order gradient [H f,k ].
[0137] Exemplarily, referring to Figure 3 , suppose that the order of a sample feature is ID m1 , ID m1 , …, ID mn , which is divided into k boxes, i.e., contains k-1 split points. m represents the m-th sample feature, and n is the number of first samples. By traversing the first split point of the sample feature, the first-order gradient and the second-order gradient of the left sub-tree and the first-order gradient and the second-order gradient of the right sub-tree of the split point can be calculated, to obtain [G0] and [H0], [G0] is the sum of the first-order gradient of the left sub-tree and the first-order gradient of the right sub-tree corresponding to the first split point, [H0] is the sum of the second-order gradient of the left sub-tree and the second-order gradient of the right sub-tree corresponding to the first split point. Similarly, the first-order gradient and the second-order gradient of the left sub-tree and the first-order gradient and the second-order gradient of the right sub-tree of the second split point can be calculated, to obtain [G1] and [H1], and in turn, the first-order gradient and the second-order gradient of the left sub-tree and the first-order gradient and the second-order gradient of the right sub-tree of the k-1-th split point can be calculated, to obtain [G k-2 ] and [H k-2 ].
[0138] For example, [G0] equals the sum of the target first-order gradients of the first samples in the left and right subtrees. Similarly, [H0] equals the sum of the second-order gradients of the first samples in the left and right subtrees. The concepts of left and right subtrees can be found in the above embodiments, and will not be repeated here for the sake of brevity.
[0139] For example, [H f,k ] = [H0] + [H1] + ... + [H k-2 ], and [H] f,k Once confirmed, you can proceed. and [H] f,k This is collectively referred to as second gradient information. Because... and [H] f,k All results are aggregated; therefore, the business side can only obtain the aggregated results and cannot determine exactly what the data provider selected. still This ensures the security of the data source tags.
[0140] In S230, after the second gradient information and the first identifier information are determined, they can be sent to the first electronic device, so that the first electronic device can train the longitudinal federated model based on the second gradient information and the first identifier information, thereby improving the training effect of the model.
[0141] It should be noted that in practical applications, the first sample may contain multiple sample features. In this embodiment, after determining the second gradient information and first identification information of a sample feature, the second electronic device can send them to the first electronic device to complete one iteration. Then, based on the interaction with the first electronic device, the second gradient information and first identification information of the next sample feature are calculated, and so on, until the condition for terminating the iteration is met. The condition for terminating the iteration can be found in the above embodiments, and will not be repeated here for the sake of brevity.
[0142] It should also be noted that the second electronic device sends data to the first electronic device. and H f,k And the first identifier information is all encrypted, that is [H f,k [1], [2] and [3], [4] and [5], where [6] can be the feature number and [7] and [8] can be the segmentation point number, respectively, and are collectively referred to as the first identification information.
[0143] The first electronic device received [H f,k After obtaining the [feature index] and [segmentation point index], the private key can be used to decrypt and obtain the specific content, which can then be used for subsequent feature gain calculations.
[0144] The interaction process of the first electronic device and the second electronic device is described below through an example:
[0145] As shown in Figure 4 , the first electronic device determines the and h i of each first sample and h i are homomorphically encrypted to obtain and [h i ], and and [h i ] are sent to the second electronic device and [h i ] are received by the second electronic device, which selects or according to its own label, and generates and [H f,k ] corresponding to the sample features, as well as [feature index] and [cut point index], and sends them to the first electronic device and [H f,k ] and [feature index] and [cut point index] are used by the first electronic device to determine the feature owner with the maximum feature gain, complete split tree building, and model updating.
[0146] The embodiments of the present application can filter target features based on the labels of both parties when the first electronic device and the second electronic device are provided with labels for the first samples, and fully utilize the label data of both parties. In this way, the training effect of the model can be improved, and the accuracy of the prediction result can be improved when predicting the insurance purchase rate of the user using the trained longitudinal federal model subsequently.
[0147] Taking the use of the trained longitudinal federal model to predict the insurance purchase rate of the user as an example, the insurance purchase rate prediction method can include the following steps: Figure 5
[0148] S510, obtaining user features of a user;
[0149] S520, inputting the user features into a pre-trained longitudinal federal model to obtain the insurance purchase rate of the user.
[0150] The longitudinal federal model is trained according to the model training method of the above embodiments.
[0151] Since the longitudinal federal model is trained based on the method of the above embodiment, that is, when the longitudinal federal model is trained, the label data of both parties is fully considered, the training effect of the model is improved, and therefore when the trained longitudinal federal model is used to predict the insurance purchasing rate of the user, the accuracy of the prediction result is higher.
[0152] The user features herein can include, but are not limited to, the age, length of service, salary, and the like of the user, which can reflect the ability to purchase insurance to a certain extent.
[0153] Based on the same inventive concept, the embodiments of the present application also provide a model training apparatus, which can be applied to the first electronic device, and the following will be described in combination with Figure 6 The model training apparatus provided by the embodiments of the present application will be described in detail.
[0154] As shown in Figure 6 The model training apparatus can include a determination module 610, a sending module 620, a receiving module 630, and a training module 640.
[0155] The determination module 610 is configured to determine first gradient information of each first sample in the first sample set according to the real label of each first sample and the predicted label of the first sample on the first electronic device side.
[0156] The sending module 620 is configured to send the first gradient information to the second electronic device.
[0157] The receiving module 630 is configured to receive second gradient information corresponding to the sample feature of each first sample and first identification information corresponding to the sample feature sent by the second electronic device, and the second gradient information is determined by the second electronic device according to the label of the first sample on the second electronic device side and the first gradient information.
[0158] The determination module 610 is further configured to determine, for each sample feature, a feature gain of the longitudinal federal model according to the second gradient information and the first identification information.
[0159] The training module 640 is configured to take the sample feature with the largest feature gain as a target feature, and train the longitudinal federal model by using the target feature to obtain a trained longitudinal federal model, and the longitudinal federal model is used to predict the insurance purchasing rate of the user.
[0160] In this embodiment, a first electronic device determines the first gradient information of each first sample based on its real label and the predicted label on its side, and sends this information to a second electronic device. The second electronic device, based on the first gradient information sent by the first electronic device, and combining it with the label and first gradient information on its side, determines the second gradient information and first identification information corresponding to the sample features, and sends these to the first electronic device. Upon receiving the second gradient information and first identification information, the first electronic device determines the feature gain of the vertical federated model and trains the vertical federated model based on the sample feature with the largest feature gain. In other words, in this embodiment, when both the first and second electronic devices have labels for the first samples, target features can be selected based on the labels of both devices, fully utilizing the label data from both sides. This improves the training effect of the model and, consequently, enhances the accuracy of the prediction results when using the trained vertical federated model to predict the user's insurance purchase rate.
[0161] In some embodiments, the determining module 610 is specifically used for:
[0162] For each first sample, a first loss value is determined based on the true label of the first sample and the predicted label on the first electronic device side;
[0163] Based on the first loss value, determine the first first-order gradient of the true label of the first sample, and the second first-order gradient assuming that the label of the first sample is a preset label;
[0164] Based on the predicted label of the first sample on the first electronic device side, determine the first second-order gradient of the first sample;
[0165] The first-order gradient, the second-order gradient, and the first-second-order gradient are defined as the first gradient information.
[0166] In some embodiments, the sending module 620 is specifically used for:
[0167] The first gradient information is encrypted using a homomorphic encryption algorithm;
[0168] The encrypted first-gradient information is sent to the second electronic device.
[0169] Figure 6 Each module in the illustrated device has the ability to implement Figure 1 The functions of each step and the corresponding technical effects are described in detail here for the sake of brevity.
[0170] Based on the same inventive concept, this application also provides a model training device, which can be applied to a second electronic device, as described below. Figure 7The model training apparatus provided in the embodiments of the present application is described in detail.
[0171] As shown in the figure, the model training apparatus can include: Figure 7
[0172] The receiving module 710 is configured to receive first gradient information of each first sample sent by the first electronic device, wherein the first gradient information is determined by the first electronic device according to a true label of the first sample and a predicted label of the first sample on the first electronic device side;
[0173] The determining module 720 is configured to, for each sample feature of each first sample, determine second gradient information corresponding to the sample feature and first identification information corresponding to the sample feature according to the label of the first sample on the second electronic device side and the first gradient information;
[0174] The sending module 730 is configured to send the second gradient information and the first identification information to the first electronic device, so that the first electronic device trains the longitudinal federated model according to the second gradient information and the first identification information, and the longitudinal federated model is used to predict the insurance purchasing rate of the user.
[0175] In the embodiments of the present application, the first electronic device determines the first gradient information of each first sample according to the true label of each first sample and the predicted label of the first sample on the first electronic device side, and sends the first gradient information to the second electronic device. The second electronic device determines the second gradient information corresponding to the sample feature and the first identification information according to the first gradient information sent by the first electronic device, in combination with the label of the first sample on the second electronic device side and the first gradient information, and sends the second gradient information and the first identification information to the first electronic device. After the first electronic device receives the second gradient information and the first identification information, the feature gain of the longitudinal federated model is determined, and the longitudinal federated model is trained based on the sample feature with the largest feature gain. That is, in the case that the first electronic device and the second electronic device both set labels for the first sample, the embodiments of the present application can screen target features based on the labels of both parties, fully utilize the label data of both parties, so as to improve the training effect of the model, and then when the trained longitudinal federated model is used to predict the insurance purchasing rate of the user in the subsequent stage, the accuracy of the prediction result can be improved.
[0176] In some embodiments, the first gradient information includes a first first-order gradient of the true label of the first sample, a second first-order gradient assuming that the label of the first sample is a preset label, and a first second-order gradient of the first sample;
[0177] The determining module 720 is specifically configured to:
[0178] determine a target first-order gradient of the first sample from the first first-order gradient and the second first-order gradient according to the relationship between the label of the first sample on the second electronic device side and the preset label;
[0179] For each sample feature, the sum of the first-order gradient of the left sub-tree and the first-order gradient of the right sub-tree of the sample feature at the preset split point is determined according to the target first-order gradient of each first sample, to obtain a third first-order gradient;
[0180] The sum of the second-order gradient of the left sub-tree and the second-order gradient of the right sub-tree of the sample feature at the preset split point is determined according to the first second-order gradient of each first sample, to obtain a second second-order gradient;
[0181] The third first-order gradient and the second second-order gradient are determined as the second gradient information corresponding to the sample feature.
[0182] In some embodiments, the determining module 720 is specifically configured to:
[0183] In a case where the label of the first sample on the second electronic device side is the same as the preset label, the second first-order gradient is determined as the target first-order gradient of the first sample;
[0184] In a case where the label of the first sample on the second electronic device side is different from the preset label, the first first-order gradient is determined as the target first-order gradient of the first sample.
[0185] Figure 7 Each module in the device has the function of implementing each step in the method and can achieve the corresponding technical effects. For brevity, no further description is given here. Figure 2 Each module in the device has the function of implementing each step in the method and can achieve the corresponding technical effects. For brevity, no further description is given here.
[0186] Based on the same inventive concept, the embodiments of the present application also provide an insurance purchase rate prediction device, which will be described in detail below. Figure 8 The insurance purchase rate prediction device provided by the embodiments of the present application will be described in detail.
[0187] Figure 8 The structure diagram of the insurance purchase rate prediction device provided by the embodiments of the present application.
[0188] As shown in Figure 8 The insurance purchase rate prediction device can include:
[0189] The obtaining module 810 is configured to obtain the user features of a user.
[0190] The prediction module 820 is configured to input the user features into a pre-trained longitudinal federated model to obtain the insurance purchase rate of the user, and the longitudinal federated model is trained according to the model training method of the above embodiments.
[0191] Since the longitudinal federated model is trained based on the method of the above embodiments, that is, when training the longitudinal federated model, the label data of both parties is fully considered, and the training effect of the model is improved, therefore, when predicting the insurance purchase rate of the user based on the trained longitudinal federated model, the accuracy of the prediction result is higher.
[0192] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, which can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a server, etc. The embodiments of the present application will be described in detail below in combination with Figure 9 The electronic device provided by the embodiments of the present application will be described in detail.
[0193] As shown in the embodiment of the electronic device shown in Figure 9 The electronic device can include a processor 910 and a memory 920 for storing computer program instructions.
[0194] The processor 910 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement the embodiments of the present application.
[0195] The memory 920 can include a mass storage for data or instructions. By way of example and not limitation, the memory 920 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In one example, the memory 920 can include a removable or non-removable (or fixed) medium, or the memory 920 is a non-volatile solid state memory. In one example, the memory 920 can be a read only memory (ROM). In one example, the ROM can be a mask programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0196] The processor 910 reads and executes the computer program instructions stored in the memory 920 to implement the method in the embodiment shown in Figures 1-5 and achieve the corresponding technical effects of the embodiments shown in Figures 1-5 described for brevity.
[0197] In one example, the electronic device can also include a communication interface 930 and a bus 940. As shown in Figure 9 The processor 910, the memory 920, and the communication interface 930 are connected through the bus 940 and complete communication among each other.
[0198] The communication interface 930 is mainly used to realize the communication between various modules, devices and / or equipment in the embodiments of the present application.
[0199] The bus 940 includes hardware, software or both that couples various components of the electronic device to each other. By way of example, and not limitation, the bus 940 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or combination of two or more of these. Where appropriate, the bus 940 can include one or more buses. Although the present application describes and illustrates a particular bus, the present application contemplates any suitable bus or interconnect.
[0200] The electronic device can perform the model training method in the embodiments of the present application after determining the first gradient information of each first sample according to the true label of each first sample in the first sample set and the predicted label of the first sample on the first electronic device side, thereby realizing the model training method described in combination with Figure 1 The model training method described in combination with Figure 6 The model training device described in combination with
[0201] Alternatively, the electronic device can perform the model training method in the embodiments of the present application after receiving the first gradient information of each first sample sent by the first electronic device, thereby realizing the model training method described in combination with Figure 2 The model training method described in combination with Figure 7 The model training device described in combination with
[0202] Alternatively, the electronic device can perform the insurance purchase rate prediction method in the embodiments of the present application after obtaining the user features of the user, thereby realizing the insurance purchase rate prediction method described in combination with Figure 5 The insurance purchase rate prediction method described in combination with Figure 8 The insurance purchase rate prediction device described in combination with
[0203] In addition, in combination with the model training method and the insurance purchase rate prediction method in the above embodiments, the embodiments of the present application can provide a computer storage medium for implementation. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any one of the model training methods and the insurance purchase rate prediction methods in the above embodiments.
[0204] It should be noted that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted herein. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.
[0205] The functional blocks shown in the structural block diagrams described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.
[0206] It should also be noted that the exemplary embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0207] Those skilled in the art will understand that the functions of the above-described method, apparatus (system) and computer program product according to the embodiments of the present application can be implemented in digital electronic circuitry, in computer software, firmware or hardware, and that the disclosed embodiments are not limited to any particular
[0208] The above describes only specific implementation of the present application. For the convenience and brevity of description, the specific working process of the above-described system, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein. It should be understood that the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.
Claims
1. A model training method, characterized in that, The method is applied to a first electronic device, the first electronic device is an electronic device corresponding to a business party, and the method comprises the following steps: According to the real label of each first sample in the first sample set and the predicted label of the first sample on the first electronic device side, first gradient information of each first sample is determined; The first gradient information is sent to a second electronic device by using an oblivious transfer protocol; the second electronic device is an electronic device corresponding to a data party; the sending of the first gradient information to the second electronic device comprises the following steps: the first gradient information is encrypted according to a homomorphic encryption algorithm; and the encrypted first gradient information is sent to the second electronic device; Second gradient information corresponding to the sample feature of each first sample and first identification information corresponding to the sample feature are received, which are sent by the second electronic device; the second gradient information is determined by the second electronic device according to the label of the first sample on the second electronic device side and the first gradient information; wherein the first identification information comprises identification information of the sample feature and identification information of a split point; For each sample feature, feature gain of a longitudinal federated model is determined according to the second gradient information and the first identification information; The sample feature with the largest feature gain is taken as a target feature, and the longitudinal federated model is trained by using the target feature, so that a trained longitudinal federated model is obtained.
2. The method of claim 1, wherein, The first gradient information of each first sample is determined according to the real label of each first sample in the first sample set and the predicted label of the first sample on the first electronic device side, and the method comprises the following steps: For each first sample, a first loss value is determined according to the real label of the first sample and the predicted label on the first electronic device side; According to the first loss value, a first first-order gradient of the real label of the first sample and a second first-order gradient of the first sample assuming that the label of the first sample is a preset label are determined; According to the predicted label of the first sample on the first electronic device side, a first second-order gradient of the first sample is determined; The first first-order gradient, the second first-order gradient and the first second-order gradient are determined as the first gradient information.
3. A model training method, comprising: The method is applied to a second electronic device, the second electronic device is an electronic device corresponding to a data party; the method comprises the following steps: First gradient information of each first sample sent by a first electronic device by using an oblivious transfer protocol is received, the first electronic device is an electronic device corresponding to a business party, and the first gradient information is determined by the first electronic device according to the real label of the first sample and the predicted label of the first sample on the first electronic device side; the first gradient information is first gradient information after being encrypted according to a homomorphic encryption algorithm; For each sample feature of each first sample, second gradient information corresponding to the sample feature and first identification information corresponding to the sample feature are determined according to the label of the first sample on the second electronic device side and the first gradient information; wherein the first identification information comprises identification information of the sample feature and identification information of a split point; The second gradient information and the first identification information are sent to the first electronic device, so that the first electronic device trains a vertical federated model according to the second gradient information and the first identification information.
4. The method of claim 3, wherein, The first gradient information includes a first first-order gradient of a true label of the first sample, a second first-order gradient assuming that a label of the first sample is a preset label, and a first second-order gradient of the first sample; According to the relationship between the label of the first sample on the second electronic device side and the preset label, the target first-order gradient of the first sample is determined from the first first-order gradient and the second first-order gradient; For each sample feature, the sum of the first-order gradient of the left sub-tree and the first-order gradient of the right sub-tree of the sample feature at a preset split point is determined according to the target first-order gradient of each first sample, to obtain a third first-order gradient; According to the first second-order gradient of each first sample, the sum of the second-order gradient of the left sub-tree and the second-order gradient of the right sub-tree of the sample feature at a preset split point is determined, to obtain a second second-order gradient; The third first-order gradient and the second second-order gradient are determined as the second gradient information corresponding to the sample feature. According to the relationship between the label of the first sample on the second electronic device side and the preset label, the target first-order gradient of the first sample is determined from the first first-order gradient and the second first-order gradient, including:
5. The method of claim 4, wherein, In the case where the label of the first sample on the second electronic device side is the same as the preset label, the second first-order gradient is determined as the target first-order gradient of the first sample; In the case where the label of the first sample on the second electronic device side is different from the preset label, the first first-order gradient is determined as the target first-order gradient of the first sample. The device is applied to a first electronic device, the first electronic device being an electronic device corresponding to a business party, and the device includes a determination module, a sending module, a receiving module, and a training module; 6. A model training apparatus characterized by comprising: The determination module is configured to determine first gradient information of each first sample in a first sample set according to a true label of each first sample and a predicted label of the first sample on the first electronic device side; The sending module is configured to send the first gradient information to a second electronic device by using an oblivious transfer protocol; the second electronic device is an electronic device corresponding to a data party; and the sending of the first gradient information to the second electronic device includes: encrypting the first gradient information according to a homomorphic encryption algorithm; and sending the encrypted first gradient information to the second electronic device; The receiving module is configured to receive second gradient information corresponding to a sample feature of each first sample and first identification information corresponding to the sample feature, which is sent by the second electronic device, wherein the second gradient information is determined by the second electronic device according to a label of the first sample at the second electronic device and the first gradient information; and the first identification information includes identification information of the sample feature and identification information of a split point. The determining module is further configured to determine, for each sample feature, a feature gain of the longitudinal federated model according to the second gradient information and the first identification information. The training module is configured to take a sample feature with the largest feature gain as a target feature, and train the longitudinal federated model by using the target feature to obtain a trained longitudinal federated model.
7. A model training apparatus characterized by comprising: The application is applied to a second electronic device, which is an electronic device corresponding to a data party; and the device comprises: A receiving module is configured to receive first gradient information of each first sample sent by a first electronic device in an oblivious transfer protocol, wherein the first electronic device is an electronic device corresponding to a business party, and the first gradient information is determined by the first electronic device according to a real label of the first sample and a predicted label of the first sample at the first electronic device; and the first gradient information is first gradient information after being encrypted according to a homomorphic encryption algorithm. A determining module is configured to determine, for each sample feature of each first sample, second gradient information corresponding to the sample feature and first identification information corresponding to the sample feature according to a label of the first sample at the second electronic device and the first gradient information; and the first identification information includes identification information of the sample feature and identification information of a split point. A sending module is configured to send the second gradient information and the first identification information to the first electronic device, so that the first electronic device trains a longitudinal federated model according to the second gradient information and the first identification information.
8. An electronic device, comprising: It comprises: A processor; A memory configured to store computer program instructions; When the computer program instructions are executed by the processor, the method in any one of claims 1-5 is implemented.
9. A computer-readable storage medium having stored thereon computer program instructions, wherein, When the computer program instructions are executed by the processor, the method in any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Construction method and device of multi-classification gradient boosting tree and electronic equipment
CN113657471A
Sample prediction method and device based on federated training, and storage medium
WO2020029590A1