Creation of data prediction model and prediction method, device and storage medium

By using encrypted aggregated values ​​and information gain calculations in the creation of data prediction models, the problem of leaking data characteristics of participants in the data prediction model in the prior art is solved, and data privacy protection and model interpretability are achieved.

CN114781649BActive Publication Date: 2025-04-15JINGDONG TECH HLDG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210393854.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2025-04-15
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

The prior art has the risk of leaking participants' data characteristics when creating data prediction models, especially when the sample characteristics are unevenly distributed, it is difficult to protect participants' data privacy.

Method used

By receiving the encryption model iteration parameters and encryption aggregation values ​​from the initiator device, the participant device generates and decrypts the encryption aggregation values, calculates the information gain of the feature division of each party, determines the node division situation in the model iteration, and stores the weight information of the leaf nodes on the participant device.

Benefits of technology

It realizes the creation of interpretable data prediction models while protecting the data privacy of participants, avoiding the risk of initiating the initiator's speculation on the characteristic attributes of participants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114781649B_ABST
    Figure CN114781649B_ABST
Patent Text Reader

Abstract

The present application provides a method, device and storage medium for creating and predicting a data prediction model. During the model creation process, the weights of the model leaf nodes and the aggregate values ​​corresponding to the feature divisions of the participants are stored locally on the participants and kept confidential to the initiator, thereby ensuring that the initiator cannot infer the feature attributes of the participants corresponding to the samples based on the known model node features, thereby achieving a reliable interpretable model. When making data predictions based on the data prediction model, the initiator encrypts and transmits the local prediction results to the participants. After the data of each participant is predicted, the final prediction results are returned to the initiator. This process will not leak the feature distribution of the participants corresponding to the leaf nodes, while protecting the sample labels of the initiator from being known by the participants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of federated learning technology, and in particular to a method, device and storage medium for creating and predicting a data prediction model. Background Art

[0002] Federated machine learning, also known as federated learning, can effectively help multiple institutions use data and conduct machine learning modeling while ensuring user privacy protection and data security. According to the characteristics of data and tasks, it can be divided into vertical federated learning, horizontal federated learning, and federated transfer learning.

[0003] Vertical federated learning is when two data sets have a lot of overlap in users but a little overlap in user features. The data sets are split vertically, i.e., along the feature dimension, and the data with the same users but different user features is taken out for model training. Taking the field of credit risk control as an example, based on user data samples from different institutions, such as banks and e-commerce, a prediction model for the user's ability to repay a loan can be established, where the bank institution is the guest, i.e., the business initiator or model user, and the e-commerce institution is the host, i.e., the business participant or user data feature supplementer.

[0004] The prediction model built by the guest based on the existing model creation method has the risk of leaking the data features of the host. The main reason is that the guest can infer which leaf node the sample belongs to by combining the weight of the leaf node, and then infer the distribution of all samples from the leaf node to obtain the information of each node sample set. When the distribution of sample features is uneven, such as the uneven distribution of "no breach of contract" in most samples, it is very easy to infer the sample features, which does not meet the requirements of protecting the privacy of the host data. Therefore, it is urgent to optimize the creation method of the prediction model. Summary of the invention

[0005] The embodiments of the present application provide a method, device and storage medium for creating and predicting a data prediction model, which achieve the interpretability of the model while protecting the data privacy of the participants.

[0006] A first aspect of an embodiment of the present application provides a method for creating a data prediction model, which is applied to a participant device, and the method includes: receiving an encrypted model iteration parameter and a first encrypted aggregate value from an initiator device; the encrypted model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of an i-th model, the i-th model being a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of a sample set of a current node using the initiator feature of the sample;

[0007] Generate a second encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key, wherein the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the sample;

[0008] Determine a first information gain set for dividing the sample set by the initiator's characteristics according to the first decrypted encrypted aggregate value; determine a second information gain set for dividing the sample set by the participant's characteristics according to the second decrypted encrypted aggregate value; the first information gain set and the second information gain set each include at least one information gain;

[0009] If the maximum information gain in the first information gain set and the second information gain set is less than or equal to a preset threshold, the child node of the current node is determined to be a leaf node of the data prediction model of the i+1th model iteration, and after determining the weight information of the current node, the weight information is stored in the participant device; the weight information is used to indicate the label prediction value of the current node sample after i+1 model training.

[0010] In an optional embodiment of the first aspect of the present application, generating a second encrypted aggregate value according to the encryption model iteration parameter, the sample set, and the initiator public key includes:

[0011] Generate a third encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key; the third encrypted aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample;

[0012] Generate an encrypted random number based on the random number generated by the participant's device and the initiator's public key;

[0013] The second encrypted aggregate value is obtained by adding the encrypted random number to the third encrypted aggregate value.

[0014] In an optional embodiment of the first aspect of the present application, before determining the second information gain set for dividing the sample set by the participant characteristics according to the decrypted second encrypted aggregate value, the method further includes:

[0015] Sending the second encrypted aggregate value to the initiator device, where the second encrypted aggregate value includes an encrypted random number;

[0016] Receiving a second aggregate value including a random number returned by the initiator device;

[0017] After removing the random number, a third aggregate value is obtained, which is the decrypted third encrypted aggregate value, and includes the derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set is divided by the characteristics of the participant.

[0018] In an optional embodiment of the first aspect of the present application, before determining the first information gain set for dividing the sample set by the initiator feature according to the decrypted first encrypted aggregate value, the method further includes:

[0019] Decrypting the first encrypted aggregate value according to the participant's private key to obtain a first aggregate value;

[0020] The first aggregate value is the first encrypted aggregate value after decryption, and the first aggregate value includes the derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set is divided by the initiator feature.

[0021] In an optional embodiment of the first aspect of the present application, the method further includes:

[0022] If the maximum information gain in the first information gain set and the second information gain set is greater than the preset threshold, the partition feature corresponding to the maximum information gain is used as the target partition feature of the current node, and the target partition feature is the initiator feature or the participant feature.

[0023] In an optional embodiment of the first aspect of the present application, the method further includes:

[0024] If the target partitioning feature of the current node is the initiator feature, first node partitioning information is sent to the initiator device, where the first node partitioning information includes the number of the initiator feature and a feature threshold.

[0025] In an optional embodiment of the first aspect of the present application, the method further includes:

[0026] If the target partitioning feature of the current node is the participant feature, updating the sample set of the child nodes of the current node according to the number of the participant feature and the feature threshold, and generating an encrypted sample set of the child nodes of the current node;

[0027] Sending second node division information to the initiator device, where the second node division information includes the serial number of the participant feature and an encrypted sample set of child nodes of the current node.

[0028] A second aspect of an embodiment of the present application provides a method for creating a data prediction model, which is applied to an initiator device, and the method includes:

[0029] Generate a first encrypted aggregate value according to a model iteration parameter, a sample set of the current node known to the initiator device, and a public key of a participant; the model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of the i-th model, the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of the encrypted sample set using the initiator characteristics of the sample;

[0030] Encrypt the model iteration parameter according to the initiator's public key to obtain the encrypted model iteration parameter;

[0031] The encryption model iteration parameter and the first encrypted aggregate value are sent to the participant device.

[0032] In an optional embodiment of the second aspect of the present application, the method further includes:

[0033] Receiving a second encrypted aggregate value from the participant device, where the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the samples;

[0034] Decrypting the second encrypted aggregate value according to the initiator's private key to obtain a second aggregate value including a random number, where the random number is generated by the participant's device;

[0035] A second aggregate value including the random number is sent to the participant device.

[0036] In an optional embodiment of the second aspect of the present application, the method further includes:

[0037] If the target partitioning feature of the current node is the initiator feature, receiving first node partitioning information from the participant device, the first node partitioning information including the number of the initiator feature and a feature threshold;

[0038] Update the encrypted sample set of the child nodes of the current node according to the first node division information and the encrypted sample set of the current node;

[0039] Sending an encrypted sample set of child nodes of the current node to the participant device.

[0040] In an optional embodiment of the second aspect of the present application, the method further includes:

[0041] If the target partitioning feature of the current node is the participant feature, second node partitioning information is received from the participant device, where the second node partitioning information includes the serial number of the participant feature and an encrypted sample set of child nodes of the current node.

[0042] A third aspect of an embodiment of the present application provides a data prediction method, which is applied to an initiator device, wherein the initiator device includes a data prediction model, and the data prediction model is obtained through T model iterations, where T is a positive integer; the method includes:

[0043] receiving a data prediction request, wherein the data prediction request includes an identifier of a target object;

[0044] Acquire feature data of the target object on the initiator device according to the identifier, and obtain a first prediction result based on the feature data and the data prediction model, where the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0045] Sending the data prediction request and the encrypted first prediction result to the participant device;

[0046] Receive a third prediction result returned by the participant device; the third prediction result is determined by the participant device in combination with the weight information of the leaf node of the data prediction model, the encrypted first prediction result, and the second prediction result, the second prediction result is generated by the participant device based on the feature data of the target object on the participant device and the data prediction model;

[0047] By decrypting the third prediction result, the final label prediction value of the target object is obtained.

[0048] In an optional embodiment of the third aspect of the present application, the method further includes:

[0049] The encrypted first prediction result is generated according to the first prediction result and the initiator's private key.

[0050] A fourth aspect of the embodiments of the present application provides a data prediction method, which is applied to a participant device, wherein the participant device includes weight information of a leaf node of a data prediction model, wherein the data prediction model is obtained after T model iterations, where T is a positive integer; the method includes:

[0051] Receiving a data prediction request and an encrypted first prediction result from an initiator device, wherein the data prediction request includes an identifier of a target object, and the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0052] Acquire feature data of the target object on the participant device according to the identifier, and obtain a second prediction result based on the feature data of the participant device and the data prediction model;

[0053] Generate a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model;

[0054] Send the third prediction result to the initiator device.

[0055] In an optional embodiment of the fourth aspect of the present application, generating a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model includes:

[0056] Obtaining a cross product result of the second prediction result and the encrypted first prediction result;

[0057] The third prediction result is then obtained by performing a dot product operation on the weight information of the leaf nodes of the data prediction model and the cross product operation result.

[0058] A fifth aspect of an embodiment of the present application provides a device for creating a data prediction model, including:

[0059] A receiving module, configured to receive an encrypted model iteration parameter and a first encrypted aggregate value from an initiator device; the encrypted model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of an i-th model, wherein the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of a sample set of a current node using the initiator feature of the sample;

[0060] A processing module, configured to generate a second encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key, wherein the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the sample;

[0061] Determine a first information gain set for dividing the sample set by the initiator's characteristics according to the first decrypted encrypted aggregate value; determine a second information gain set for dividing the sample set by the participant's characteristics according to the second decrypted encrypted aggregate value; the first information gain set and the second information gain set each include at least one information gain;

[0062] If the maximum information gain in the first information gain set and the second information gain set is less than or equal to a preset threshold, the child node of the current node is determined to be a leaf node of the data prediction model of the i+1th model iteration. After determining the weight information of the current node, a storage module is used to store the weight information on the participant device; the weight information is used to indicate the label prediction value of the current node sample after i+1 model training.

[0063] A sixth aspect of an embodiment of the present application provides a device for creating a data prediction model, including:

[0064] A processing module, configured to generate a first encrypted aggregate value according to a model iteration parameter, a sample set of a current node known to an initiator device, and a public key of a participant; the model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of an i-th model, the i-th model being a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of the encrypted sample set using the initiator characteristics of the sample;

[0065] Encrypt the model iteration parameter according to the initiator's public key to obtain the encrypted model iteration parameter;

[0066] A sending module is used to send the encryption model iteration parameter and the first encrypted aggregate value to the participant device.

[0067] A seventh aspect of an embodiment of the present application provides a data prediction device, including:

[0068] A receiving module, configured to receive a data prediction request, wherein the data prediction request includes an identifier of a target object;

[0069] A processing module, configured to obtain feature data of the target object on the initiator device according to the identifier, and obtain a first prediction result based on the feature data and a data prediction model, wherein the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0070] A sending module, used for sending the data prediction request and the encrypted first prediction result to a participant device;

[0071] The receiving module is further used to receive a third prediction result returned by the participant device; the third prediction result is determined by the participant device in combination with the weight information of the leaf node of the data prediction model, the encrypted first prediction result and the second prediction result, and the second prediction result is generated by the participant device based on the feature data of the target object on the participant device and the data prediction model;

[0072] The processing module is further used to obtain a final label prediction value of the target object by decrypting the third prediction result.

[0073] An eighth aspect of an embodiment of the present application provides a data prediction device, including:

[0074] A receiving module, configured to receive a data prediction request and an encrypted first prediction result from an initiator device, wherein the data prediction request includes an identifier of a target object, and the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0075] A processing module, configured to obtain feature data of the target object on a participant device according to the identifier, and obtain a second prediction result based on the feature data of the participant device and the data prediction model;

[0076] Generate a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model;

[0077] A sending module is used to send the third prediction result to the initiator device.

[0078] A ninth aspect of an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program; the computer program is stored in the memory and is configured to be executed by the processor to implement a method as described in any one of the first aspect, or a method as described in any one of the second aspect, or a method as described in any one of the third aspect, or a method as described in any one of the fourth aspect.

[0079] The tenth aspect of an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement a method as described in any one of the first aspect, or a method as described in any one of the second aspect, or a method as described in any one of the third aspect, or a method as described in any one of the fourth aspect.

[0080] The eleventh aspect of the embodiments of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method as described in any one of the first aspect, or the method as described in any one of the second aspect, or the method as described in any one of the third aspect, or the method as described in any one of the fourth aspect.

[0081] The embodiments of the present application provide a method, device, equipment and storage medium for creating a data prediction model. In the i+1th model iteration of the data prediction model, the initiator device and the participant device both calculate the encrypted aggregate value corresponding to the feature division of each party based on the first-order derivative and the second-order derivative of the difference between the sample label prediction value and the true value of the i-th model. The participant device calculates the maximum information gain corresponding to each party based on the decrypted aggregate value obtained by each party, thereby determining whether the sample set of each node is divided in the i+1th model iteration, and which feature division is used. If it is determined that the sample set of a certain node is no longer divided, the node is the leaf node of the model, and after calculating the weight information of the leaf node, the weight information is stored locally on the participant. The above scheme saves the model leaf node weight and the aggregate value corresponding to the participant feature division locally on the participant, and keeps it confidential to the initiator, thereby ensuring that the initiator cannot infer the participant feature attribute corresponding to the sample based on the known model node features, and realizes a reliable interpretable model.

[0082] The embodiments of the present application also provide a data prediction method, apparatus, device and storage medium. The method is based on the data prediction model created above. The initiator device generates a first prediction result based on the local data prediction model and the characteristic data of the target object on the initiator, and encrypts it and sends it to the participant device. The participant device generates a label vector based on the characteristic distribution of the leaf node, and combines the leaf node weight and the encrypted first prediction result to generate a new prediction result, that is, an encrypted third prediction result. The initiator device decrypts the third prediction result to obtain the final label prediction value of the target object. The above scheme ensures that the characteristic distribution of the participant corresponding to the leaf node is not leaked, while protecting the sample label of the initiator from being known by the participant. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0084] Figure 1 A schematic diagram of a scenario of a method for creating a data prediction model and a prediction method provided in an embodiment of the present application;

[0085] Figure 2 This is a diagram of leaf node weight reasoning for the data prediction model;

[0086] Figure 3 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 1 ;

[0087] Figure 4 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 2 ;

[0088] Figure 5 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 3 ;

[0089] Figure 6 Schematic diagram of the process of the data prediction method provided in the embodiment of the present application Figure 1 ;

[0090] Figure 7 Schematic diagram of the process of the data prediction method provided in the embodiment of the present application Figure 2 ;

[0091] Figure 8 A schematic diagram of a device for creating a data prediction model provided in an embodiment of the present application Figure 1 ;

[0092] Fig. 9 A schematic diagram of a device for creating a data prediction model provided in an embodiment of the present application Figure 2 ;

[0093] Fig.10 A schematic diagram of the structure of the data prediction device provided in the embodiment of the present application Figure 1 ;

[0094] Fig.11 A schematic diagram of the structure of the data prediction device provided in the embodiment of the present application Figure 2 ;

[0095] Fig.12 A hardware structure diagram of an electronic device provided in an embodiment of the present application.

[0096] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0097] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0098] The terms "first", "second", etc. in the specification, claims, and the above-mentioned drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0099] It should be understood that the terms "including" and "having" and any variations thereof used herein are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.

[0100] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.

[0101] Before introducing the creation method and prediction method of the data prediction model provided in this application, the application scenarios of the creation method and the prediction method are briefly introduced.

[0102] Figure 1 A schematic diagram of a scenario of a method for creating a data prediction model and a prediction method provided in an embodiment of the present application. Figure 1 As shown, the scenario includes an initiator device 11 and at least one participant device, such as Figure 1 The participant devices 12 and 13 in the example are connected to the initiator device 11 in communication. The initiator device 11 and the participant devices 12 and 13 can jointly participate in the federated learning process to establish a data prediction model, which can be used to predict whether a sample has a certain attribute feature.

[0103] In one possible scenario, the initiator device 11 and the participant devices 12 and 13 contain a large number of identical data samples and a small number of identical data features, and the process of establishing a data prediction model falls within the scope of vertical federated learning.

[0104] In another possible scenario, the initiator device 11 and the participant devices 12 and 13 contain a small number of identical data samples and a large number of identical data features, and the process of establishing a data prediction model falls within the scope of horizontal federated learning.

[0105] In another possible scenario, the initiator device 11 and the participant devices 12 and 13 contain a small number of identical data samples and a small number of identical data features, and the process of establishing a data prediction model falls within the scope of federated transfer learning.

[0106] The embodiments of this application are mainly developed for the above-mentioned vertical federated learning scenario. The following provides some specific implementation scenarios in combination with practical applications.

[0107] For example, suppose there are two institutions in a certain area, such as a banking institution and an e-commerce institution. The user groups of the two institutions are likely to include most of the residents in the area, so the intersection of the two users is relatively large. Banking institutions record users' income and expenditure and credit ratings, and e-commerce institutions record users' browsing and purchase history, so the characteristics of the two users have a small intersection. Data prediction models can be jointly constructed through data samples from the two institutions. For example, the data prediction model is used to predict whether a user has the ability to purchase a certain financial product; for another example, the data prediction model is used to predict whether a user has the ability to repay a loan.

[0108] For example, suppose there are three service providers in a certain area, such as a book recommendation service provider and a movie recommendation service provider. The user groups of the two are likely to include most of the residents in the area, so the intersection of the two users is relatively large. The book recommendation service provider records the user's browsing and reading records of books, and the movie recommendation service provider records the user's browsing and watching records of movies, so the characteristics of the two users have less intersection. The data samples of the two service providers can be used to jointly build a data prediction model. For example, the data prediction model is used to predict whether the user is interested in buying a book; for another example, the data prediction model is used to predict whether the user is interested in a movie.

[0109] The above-mentioned implementation scenarios are only used as examples. Any other scenarios in which vertical federated learning modeling and data prediction can be performed through the participation of multiple parties are within the protection scope of the embodiments of this application, and the embodiments of this application do not impose any restrictions on this.

[0110] Based on the above application scenarios, the prediction model built by the initiator based on the existing model creation method has the risk of leaking the data characteristics of the participants. This is mainly because after the initiator infers the prediction result of the sample, it can combine the weight of the leaf node to infer which leaf node the sample belongs to, and then infer the distribution of all samples from the leaf node to obtain the information of each node sample set. When the distribution of sample characteristics is uneven, such as the uneven distribution of "no breach of contract" in most samples, it is very easy to infer the sample characteristics, which does not meet the requirements of protecting the data privacy of the participants.

[0111] Figure 2 This is a diagram of leaf node weight reasoning for the data prediction model. Figure 2 As shown, the initiator infers the sample S i The prediction result of the sample is consistent with the weight value of leaf node 4, so the sample S is judged i belongs to leaf node 4. Then we can know that S iBelongs to nodes 1 and 2. If the feature meaning at node 2 is "whether there has been a breach of contract", based on the uneven distribution of "no breach of contract" in most samples, it can be inferred that S i Similarly, a large amount of data characteristic content of the participants can be leaked.

[0112] In response to the above problems, an embodiment of the present application proposes a scheme for creating a data prediction model, which provides the meaning of the participant's characteristics to the initiator, and at the same time ensures that the initiator cannot infer the participant's characteristic attributes corresponding to the sample. The existing model creation scheme saves the leaf node weights on the initiator. During the reasoning process, the initiator can infer the characteristics of the sample based on the leaf node weights corresponding to the sample prediction results, which leaks the sample characteristics of the participant and makes it impossible to achieve data privacy protection. The model creation scheme provided by the present application saves the leaf node weights, first-order gradient aggregation values, and second-order gradient aggregation values ​​on the participant, keeps them confidential to the initiator, and ensures that the initiator cannot infer the participant's characteristic attributes corresponding to the sample based on the known tree model node characteristics, thereby achieving a reliable interpretable model.

[0113] In addition, when calculating the information gain of the participants, the participants use the encrypted first-order gradient and second-order gradient provided by the initiator to calculate the encrypted aggregation value corresponding to the feature split, add the encrypted random number and send it to the initiator. After decryption, the initiator can only get the plain text of the sum of the aggregation value and the random number and return it to the participant. The initiator cannot deduce the aggregation value to calculate the information gain and weight. The participant removes the random number and calculates the information gain of the feature split locally. If it is a leaf node, the weight corresponding to the leaf node is calculated and the weight corresponding to the leaf node is saved in the participant.

[0114] The embodiment of the present application also provides a data prediction method. Based on the data prediction model obtained by the above creation scheme, the participant generates an indication vector according to the feature distribution of the leaf node, multiplies the leaf node weight by bit, and then multiplies the encrypted label vector generated by the guest and returns it to the initiator. The above scheme can ensure that the sample label of the initiator is not known to the participant while not leaking the feature distribution of the participant corresponding to the leaf node.

[0115] The technical solutions provided by the embodiments of the present application are described in detail below through specific examples. It should be noted that the technical solutions provided by the embodiments of the present application may include part or all of the following contents. The following specific examples may be combined with each other, and the same or similar concepts or processes may not be repeated in some examples.

[0116] Figure 3 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 1For ease of understanding, this embodiment uses the interaction between an initiator device and a participant device to illustrate the solution, wherein the initiator device has sample feature data and sample tags, and the participant device has sample feature data. It should be understood that in a model creation scenario involving multiple participant devices, the interaction process between each participant device and the initiator device can refer to this embodiment.

[0117] like Figure 3 As shown, the method provided in this embodiment includes the following steps:

[0118] Step 101: The initiator device generates a first encrypted aggregate value according to a model iteration parameter, a sample set of current nodes known to the initiator device, and a public key of a participant.

[0119] The model iteration parameter is used to indicate the derivative of the difference between the sample label prediction value and the true value of the i-th model, the i-th model is the data prediction model after i-model iterations, and i is a positive integer. The first encrypted aggregation value is used to indicate the division of the encrypted sample set using the initiator feature of the sample.

[0120] Optionally, the model iteration parameters include the first-order derivative and second-order derivative of the difference between the predicted value and the true value of the sample label according to the model loss function after the previous i model iterations, that is, the model iteration parameters include the first-order derivative and second-order derivative of the sample label residual after the previous i model iterations. The i+1th iteration of the model is learned with the model iteration parameters of the previous i iterations of the model as the target.

[0121] In an optional embodiment of this embodiment, the current node is the root node of the initial data prediction model of this model iteration, and the sample set of the current node known to the initiator device is the sample set aligned by the privacy intersection technology. Accordingly, the initiator device generates a first encrypted aggregate value according to the model iteration parameter, the sample set of the root node of the initial data prediction model, and the public key of the participant.

[0122] In an optional embodiment of this embodiment, the current node is a child node of each level of the root node of the data prediction model of this model iteration, and the sample set of the current node known to the initiator device can be an encrypted sample set provided to the initiator device by the participant device, such as an encrypted sample set of the current node generated after the participant device divides the parent node of the current node according to the participant characteristics of the sample. Accordingly, the initiator device generates a first encrypted aggregate value according to the model iteration parameters, the encrypted sample set of the current node provided by the participant device, and the participant public key.

[0123] Optionally, in some embodiments, the initiator device generates a first encrypted aggregate value based on the model iteration parameters, the encrypted encoding vector of the sample set of the current node provided by the participant device, and the participant public key.

[0124] Optionally, the first encrypted aggregate value includes and The two parts can be expressed by the following formulas:

[0125]

[0126]

[0127] in, and Respectively indicate the first-order derivative and second-order derivative of the difference between the sample label prediction value and the true value of the sample set of the current bin of the initiator feature (that is, the sample set of the child nodes of the current node obtained by dividing the sample label of a bin of the initiator feature). [] H Indicates encryption by the public key of the participating party. gi and hi respectively indicate the first-order derivative and second-order derivative of the difference between the sample label prediction value and the true value of the i-th model. π=Π(I;I G ) is the sample set I of the current node relative to I G The encoding vector of I is usually I G A subset of π bin =Π(I bin ;I G ) is the sample set I belonging to the current bin bin Relative to I G The encoding vector of . It represents I G The i-th sample in is in sample set I and belongs to the current bin.

[0128] Step 102: The initiator device encrypts the model iteration parameter according to the initiator public key to obtain the encrypted model iteration parameter.

[0129] As can be seen from step 101, the model iteration parameters include the first-order derivative gi and the second-order derivative hi of the difference between the sample label prediction value and the true value of the i-th model. After being encrypted with the initiator's public key, the encrypted model iteration parameter [gi] can be obtained. G and [hi] G .

[0130] Step 103: The initiator device sends the encryption model iteration parameter and the first encrypted aggregate value to the participant device.

[0131] Step 104: The participant device generates a second encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key. The second encrypted aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample.

[0132] Specifically, the participating device first generates a third encrypted aggregate value based on the encryption model iteration parameters, the sample set and the initiator's public key, where the third encrypted aggregate value is used to indicate the division of the sample set of the current node using the participating party characteristics of the sample; then, an encrypted random number is generated based on the random number generated by the participating device and the initiator's public key; finally, the second encrypted aggregate value is obtained by adding the encrypted random number to the third encrypted aggregate value.

[0133] It should be pointed out that the random number generated by the participating device can also be described as a salt value (slat). The salt value is a randomly generated set of strings that can include random uppercase and lowercase letters, numbers, and characters. The number of digits can be set according to actual needs, and this embodiment does not impose any restrictions on this.

[0134] Exemplarily, as can be seen from step 102, the participant device iterates the parameters [gi] according to the encryption model G and [hi] G , a sample set of current nodes known to the participating devices and the initiator's public key to generate a third encrypted aggregate value.

[0135] Optionally, the third encrypted aggregate value includes and The two parts can be expressed by the following formulas:

[0136]

[0137]

[0138] in, and Respectively indicate the first-order derivative and second-order derivative of the difference between the sample label prediction value and the true value of the sample set of the current bin of the participant feature (that is, the sample set of the child nodes of the current node obtained by dividing the participant feature into a bin). [] G Indicates encryption by the initiator's public key. π=Π(I;I G ) is the sample set I relative to I G The encoding vector of I is usually I G A subset of π bin =Π(I bin ;I G ) is the sample set I belonging to the current box bin Relative to I G The encoding vector of . And represents I G The i-th sample in is in sample set I and belongs to the current bin.

[0139] The participating device randomly generates two salt values ​​and encrypts the two salt values ​​with the initiator's public key to obtain [salt1] G, [salt2] G , combine the third encrypted aggregate value and the encrypted salt value to obtain the second encrypted aggregate value The participating device then sends the encrypted aggregate value with the salt value added to it for decryption.

[0140] Step 105: The participant device determines a first information gain set of the initiator's feature-divided sample set according to the decrypted first encrypted aggregate value. The first information gain set includes at least one information gain.

[0141] In this embodiment, the participant device directly decrypts the first encrypted aggregate value according to the participant private key to obtain the first aggregate value, which is the decrypted first encrypted aggregate value. The first aggregate value includes the first-order derivative and the second-order derivative of the difference between the sample label prediction value and the true value in the sub-sample set after the sample set of the current node is divided by the initiator's feature.

[0142] The participating device divides the sample set of the current node according to the obtained initiator's characteristics, and calculates the first-order derivative and second-order derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set, and calculates the information gain corresponding to each division of the initiator's characteristics. The calculation process can adopt the existing calculation method and will not be elaborated here.

[0143] Among them, information gain is used to indicate the uncertainty of sample set division. The smaller the information gain, the smaller the uncertainty of sample set division, and the higher the accuracy of sample set division; the larger the information gain, the greater the uncertainty of sample set division, and the lower the accuracy of sample set division.

[0144] Step 106: The participant device determines a second information gain set of the participant feature division sample set according to the decrypted second encrypted aggregate value. The second information gain set includes at least one information gain.

[0145] In this embodiment, the participant device obtains the decrypted second encrypted aggregate value by interacting with the initiator device. The decrypted second encrypted aggregate value is the second aggregate value, which includes the first-order derivative and the second-order derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set of the current node is divided by the participant feature. For the interaction process between the participant device and the initiator device, see the following embodiment.

[0146] The participant device divides the sample set of the current node according to the obtained participant characteristics, and calculates the first-order derivative and second-order derivative of the difference between the sample label prediction value and the true value in the sub-sample set, and calculates the information gain corresponding to each division of the participant characteristics. The calculation process can adopt the existing calculation method, which is not elaborated here.

[0147] Step 107: If the maximum information gain in the first information gain set and the second information gain set is less than or equal to the preset threshold, the participant device determines that the child node of the current node is a leaf node of the data prediction model of the i+1th model iteration.

[0148] The first information gain set includes at least one information gain of dividing the current node sample set by using the initiator's characteristics, and the second information gain set includes at least one information gain of dividing the current node sample set by using the participant's characteristics.

[0149] The participating device takes the maximum information gain in the first information gain set and the second information gain set. If the maximum information gain is less than or equal to the preset threshold, it indicates that the uncertainty of dividing the current node sample set using the target partitioning feature corresponding to the maximum information gain is very small, or the accuracy of dividing the current node sample set is very high, that is, the purity of the sub-node sample set of the current node is very high, and there is no need to divide the sample set of the sub-nodes of the current node.

[0150] The participating device uses the child node of the current node as the leaf node of the data prediction model of the i+1th model iteration.

[0151] Step 108: After the participant device determines the weight information of the current node, the weight information is stored in the participant device.

[0152] The weight information is used to indicate the label prediction value of the current node sample after i+1 model training. It should be noted that the label prediction value of the current node sample after i+1 model training includes the sum of the label prediction values ​​of the current node sample in each model of the i+1 models.

[0153] Optionally, the optimal weight of any leaf node in the model is determined by the following formula:

[0154]

[0155] in, The sample set I of the leaf node j The sum of the first-order derivatives of the label prediction values ​​of all samples in, The sample set I of the leaf node j The sum of the second-order derivatives of the label prediction values ​​of all samples in , and λ is a constant.

[0156] Different from the existing model training process, after the participating device of this embodiment determines the weight information of the leaf node of the data prediction model, it stores the weight information of the leaf node locally on the participating device and does not send the weight information of the leaf node to the initiating device.

[0157] It should be noted that the above scheme can be executed for each leaf node of the data prediction model of the i+1th model iteration until the sample sets of all leaf nodes are no longer divided or the depth of the data prediction model reaches the set maximum depth, thus ending this model iteration.

[0158] The method for creating a data prediction model shown in this embodiment, in the i+1th model iteration of the data prediction model, the initiator device and the participant device both calculate the encrypted aggregate value corresponding to the feature division of each party based on the first-order derivative and the second-order derivative of the difference between the sample label prediction value and the true value of the i-th model. The participant device calculates the maximum information gain corresponding to each party based on the decrypted aggregate value obtained by each party, thereby determining whether the sample set of each node is divided in the i+1th model iteration, and which party's feature division is used. If it is determined that a certain node sample set is no longer divided, the node is a leaf node of the model. After calculating the weight information of the leaf node, the weight information is stored locally in the participant. The above scheme saves the model leaf node weight and the aggregate value (i.e., the second aggregate value) corresponding to the participant's feature division locally in the participant, and keeps it confidential to the initiator, thereby ensuring that the initiator cannot infer the participant's feature attribute corresponding to the sample based on the known model node features, and realizes a reliable interpretable model.

[0159] Figure 4 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 2 .like Figure 4 As shown, this embodiment shows that the participant device obtains the second aggregate value of the participant by interacting with the initiator device. The process includes the following steps:

[0160] Step 201: The participant device sends a second encrypted aggregate value to the initiator device.

[0161] Exemplarily, based on the above embodiments, the second encrypted aggregate value can be expressed as:

[0162]

[0163] Step 202: The initiator device decrypts the second encrypted aggregate value according to the initiator private key to obtain a second aggregate value including a random number, wherein the random number is generated by the participant device, stored locally in the participant device, and kept confidential to the initiator device.

[0164] Step 203: The initiator device sends a second aggregate value including a random number to the participant device.

[0165] Exemplarily, the initiator device uses the initiator private key pair Decryption, get the second aggregate value containing the random number, that is The initiator device sends the

[0166] Step 204: After eliminating the random numbers, a third aggregate value is obtained.

[0167] Exemplarily, the participant device receives the second aggregate value including the salt value, obtains the corresponding salt values ​​salt1 and salt2 stored locally, and finally obtains the third aggregate value The third aggregate value includes the first-order derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the current node sample set is divided by the participant characteristics. and the second-order derivative

[0168] During the interaction process provided in this embodiment, the aggregate value corresponding to the participant feature division received by the initiator device includes a random number or a salt value. Therefore, the initiator cannot calculate the information gain and weight corresponding to the participant feature division through the aggregate value, and thus cannot infer the participant feature attributes corresponding to the sample based on the model structure, thereby achieving the purpose of protecting the participant data.

[0169] Figure 5 Schematic diagram of the process of creating a data prediction model provided in the embodiment of the present application Figure 3 The execution subject of this embodiment is the participant device, which involves the processing process after the participant device determines how to divide the current node, such as Figure 5 As shown, the process includes the following steps:

[0170] Step 301: Determine the relationship between the maximum information gain in the first information gain set and the second information gain set and a preset threshold.

[0171] If the maximum information gain is greater than the preset threshold, execute step 302;

[0172] If the maximum information gain is less than or equal to the preset threshold, step 303 is executed.

[0173] Step 302: Use the partition feature corresponding to the maximum information gain as the target partition feature of the current node. The target partition feature is the initiator feature or the participant feature.

[0174] Step 303: The current node is regarded as a leaf node, and the weight information of the leaf node is stored locally. The current node is regarded as a leaf node, that is, the sample set of the current node is not divided, and the current node is removed from the set of nodes to be divided.

[0175] After step 302, if the target segmentation feature is a participant feature, the following steps are performed:

[0176] Step 304: The participant device updates the sample set of the child nodes of the current node according to the participant feature number and feature threshold, and generates an encrypted sample set of the child nodes of the current node.

[0177] Step 305: The participant device sends second node division information to the initiator device, where the second node division information includes the number of the participant feature and an encrypted sample set of child nodes of the current node.

[0178] After step 302, if the target segmentation feature is the initiator feature, the following steps are performed:

[0179] Step 306: The participant device sends first node division information to the initiator device, where the first node division information includes the number of the initiator feature and the feature threshold.

[0180] Accordingly, after receiving the first node division information, the initiator device can update the encrypted sample set of the child nodes of the current node according to the first node division information and the encrypted sample set of the current node, and send the encrypted sample set of the child nodes of the current node to the participating device.

[0181] The node division process shown in this embodiment is that the participating device determines whether to divide the sample set of the current node and how to divide it according to the information gain corresponding to the characteristics of each party. When it is determined to use the participant's characteristics for division, the participating device shares the number of the participant's characteristics and the encrypted sample set of the child nodes of the current node with the initiator device. For the initiator device, it cannot know the real sample set of each node, but the participating device discloses the meaning of the participant's characteristics to it, making the model interpretable.

[0182] In the above embodiments, the sample set may be a user set, and the features of the samples may be certain features of the users. For different application scenarios, the features of the users are different, and the prediction functions of the constructed data prediction models are different.

[0183] Based on the data prediction model created in the above-mentioned embodiments, the application scheme of the data prediction model is described below. It should be noted that in the application scheme, both the initiator device and the participant device store the structure of the created data prediction model, and the specific model structure of each feature division node in the data prediction model can be known. The data prediction model is obtained after T model iterations, where T is a positive integer. The weight information of the leaf nodes of the data prediction model is stored in the participant device.

[0184] Figure 6 Schematic diagram of the process of the data prediction method provided in the embodiment of the present application Figure 1 For ease of understanding, this embodiment uses the interaction between an initiator device and a participant device to illustrate the solution. Figure 6 As shown, the method provided in this embodiment includes the following steps:

[0185] Step 401: The initiator device receives a data prediction request, the data prediction request includes an identifier of a target object. Exemplarily, the target object includes a user, and the identifier of the target object includes an identifier of the user, for example, the user's ID number can be used as the user's identifier.

[0186] Step 402: The initiator device obtains feature data of the target object on the initiator device according to the identifier, and obtains a first prediction result based on the feature data and the data prediction model, wherein the first prediction result is used to indicate an initial tag prediction value obtained by the target object on the initiator device.

[0187] The initiator device obtains the initiator feature of the target object according to the identifier of the target object in the data prediction request, and then obtains the first prediction result according to the initiator feature of the target object and the node information of the node whose feature is divided into the initiator feature in the data prediction model. The node information of the node whose feature is divided into the initiator feature includes the number of the initiator feature and the feature threshold.

[0188] Specifically, the initiator device initializes the label vector of the leaf node to z0=(1,1,…,1), where there are t 1s in z0, where t is the number of leaf nodes in the data prediction model and t is a positive integer. The initiator device updates the label vector of the leaf node based on the node information whose features are divided into the initiator features in the data prediction model, and uses the updated label vector of the leaf node as the first prediction result. The first prediction result can be recorded as z=(z1,z2,…,z t ).

[0189] Exemplarily, assuming that the number of leaf nodes of the data prediction model is 5, the label vector of the leaf node is a 5-dimensional vector, each value in the vector is used to indicate the label prediction value of the target object belonging to the leaf node, and the 5-dimensional vector is used as the first prediction result.

[0190] Step 403: The initiator device sends a data prediction request and an encrypted first prediction result to the participant device. Specifically, the initiator device encrypts the first prediction result according to the initiator public key. The encrypted first prediction result can be expressed as [z] G , the initiator device will [z] G Sent to the participating devices.

[0191] Step 404: The participant device obtains feature data of the target object on the participant device according to the identifier, and obtains a second prediction result based on the feature data of the participant device and a data prediction model.

[0192] The participant device obtains the participant characteristics of the target object according to the identifier of the target object in the data prediction request; and then obtains the second prediction result according to the participant characteristics of the target object and the leaf node information in the data prediction model. The leaf node information includes the participant characteristics (local characteristics) corresponding to each leaf node. Specifically, the participant device obtains the participant characteristics corresponding to each leaf node from the data prediction model structure of the participant.

[0193] Specifically, the participant device initializes the label vector of the leaf node to η0 = (1, 1, ..., 1), where there are t 1s in η0, where t is the number of leaf nodes of the data prediction model and t is a positive integer. The participant device updates the label vector of the leaf node by comparing the participant feature of the target object with the local feature corresponding to each leaf node, and uses the updated label vector of the leaf node as the second prediction result, which can be recorded as η.

[0194] Step 405: The participant device generates a third prediction result based on the encrypted first prediction result, the second prediction result, and the weight information of the leaf nodes of the data prediction model.

[0195] Optionally, the participant device generates the third prediction result in the following manner: obtain the cross product operation result of the second prediction result and the encrypted first prediction result, and then obtain the third prediction result by performing a dot product operation on the weight information of the leaf node of the data prediction model and the cross product operation result, as shown in the following formula:

[0196] w⊙(η×[z] G )

[0197] Among them, w is the weight information of the leaf node of the data prediction model.

[0198] Step 406: The participant device sends the third prediction result to the initiator device.

[0199] Step 407: The initiator device obtains the final label prediction value of the target object by decrypting the third prediction result.

[0200] Optionally, the initiator device decrypts the third prediction result according to the initiator public key to obtain w⊙(η×z), which is the final label prediction value of the target object.

[0201] In the data prediction method shown in this embodiment, an initiator device receives a data prediction request, which includes an identifier of a target object. The initiator device generates a first prediction result based on a local data prediction model and the characteristic data of the target object at the initiator, and encrypts it and sends it to the participant device. The participant device generates a label vector based on the characteristic distribution of the leaf node, and generates a new prediction result, i.e., an encrypted third prediction result, by combining the leaf node weight and the encrypted first prediction result. The initiator device decrypts the third prediction result to obtain the final label prediction value of the target object. The above scheme ensures that the characteristic distribution of the participant corresponding to the leaf node is not leaked, while protecting the true label of the initiator's sample from being known by the participant.

[0202] Optionally, in some embodiments, the data prediction method involves an initiator device and multiple participant devices. Figure 7 Schematic diagram of the process of the data prediction method provided in the embodiment of the present application Figure 2 .like Figure 7 As shown, the prediction result of the target object in the data prediction request can be determined through the following interactive steps:

[0203] Step 501: Generate a first prediction result on the guest side according to the data prediction request and the data prediction model, and encrypt the first prediction result according to the initiator's public key to obtain [z] G , send [z] G To host1. Host1 is a participant device randomly selected from multiple participant devices.

[0204] Step 502: Host 1 initializes the label vector η0 of the leaf node, updates the label vector of the leaf node to η1 locally on host 1, and sends η1×[z] G to host2, where host2 is a participant device randomly selected from multiple participant devices after host1 is removed.

[0205] Step 503: host2 based on η1×[z] G , update the label vector of the leaf node locally to η2×η1×[z] G , send η2×η1×[z] G To one of the remaining participants, until the last participant, host m.

[0206] Step 504: host m based on n m-1 ×...×η1×[z] G , update the label vector of the leaf node locally to η m ×η m-1 ×…×η1×[z] G, combined with the weight w of the leaf node of host m, we get w⊙(η m ×η m-1 ×…×η1×[z] G ) and send it to the participating devices.

[0207] Step 505: The guest decrypts to obtain the prediction result w⊙(η m ×η m-1 ×…×η1×z).

[0208] The above describes the method for creating a data prediction model and the data prediction method provided in the embodiments of the present application. The following describes the device for creating a data prediction model and the data prediction device provided in the embodiments of the present application.

[0209] The embodiment of the present application can divide the functional modules of the device for creating a data prediction model or the data prediction device according to the above method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of using each functional module divided according to each function.

[0210] Figure 8 A schematic diagram of a device for creating a data prediction model provided in an embodiment of the present application Figure 1 .like Figure 8 As shown, the data prediction model creation device 600 provided in this embodiment includes: a receiving module 601, a processing module 602, a storage module 603 and a sending module 603.

[0211] The receiving module 601 is used to receive an encrypted model iteration parameter and a first encrypted aggregate value from an initiator device; the encrypted model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of the i-th model, the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of a sample set of a current node using the initiator feature of the sample;

[0212] Processing module 602, used to generate a second encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key, wherein the second encrypted aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample;

[0213] Determine a first information gain set for dividing the sample set by the initiator's characteristics according to the first decrypted encrypted aggregate value; determine a second information gain set for dividing the sample set by the participant's characteristics according to the second decrypted encrypted aggregate value; the first information gain set and the second information gain set each include at least one information gain;

[0214] If the maximum information gain in the first information gain set and the second information gain set is less than or equal to a preset threshold, the child node of the current node is determined to be a leaf node of the data prediction model of the i+1th model iteration. After determining the weight information of the leaf node, the storage module 603 is used to store the weight information on the participant device; the weight information is used to indicate the label prediction value of the sample in the leaf node.

[0215] In an optional embodiment of this embodiment, the processing module 602 is used to:

[0216] Generate a third encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key; the third encrypted aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample;

[0217] Generate an encrypted random number based on the random number generated by the participant's device and the initiator's public key;

[0218] The second encrypted aggregate value is obtained by adding the encrypted random number to the third encrypted aggregate value.

[0219] In an optional embodiment of this embodiment, before the processing module 602 determines the second information gain set for dividing the sample set by the participant characteristics according to the decrypted second encrypted aggregate value, the sending module 603 is used to send the second encrypted aggregate value to the initiator device, where the second encrypted aggregate value includes an encrypted random number;

[0220] The receiving module 601 is used to receive a second aggregate value including a random number returned by the initiator device;

[0221] The processing module 602 is used to obtain a third aggregate value after removing the random number, and the third aggregate value is the decrypted third encrypted aggregate value. The third aggregate value includes the derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set is divided by the participant characteristics.

[0222] In an optional embodiment of this embodiment, before the processing module 602 determines the first information gain set for dividing the sample set by the initiator feature according to the decrypted first encrypted aggregate value, the processing module 602 is further configured to:

[0223] Decrypting the first encrypted aggregate value according to the participant's private key to obtain a first aggregate value;

[0224] The first aggregate value is the first encrypted aggregate value after decryption, and the first aggregate value includes the derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set is divided by the initiator feature.

[0225] In an optional embodiment of this embodiment, the processing module 602 is used to:

[0226] If the maximum information gain in the first information gain set and the second information gain set is greater than the preset threshold, the partition feature corresponding to the maximum information gain is used as the target partition feature of the current node, and the target partition feature is the initiator feature or the participant feature.

[0227] In an optional embodiment of this embodiment, the sending module 603 is used to:

[0228] If the target partitioning feature of the current node is the initiator feature, first node partitioning information is sent to the initiator device, where the first node partitioning information includes the number of the initiator feature and a feature threshold.

[0229] In an optional embodiment of this embodiment, the processing module 602 is used to:

[0230] If the target partitioning feature of the current node is the participant feature, updating the sample set of the child nodes of the current node according to the number of the participant feature and the feature threshold, and generating an encrypted sample set of the child nodes of the current node;

[0231] The sending module 603 is used to send second node division information to the initiator device, where the second node division information includes the number of the participant feature, the feature threshold, and an encrypted sample set of the child nodes of the current node.

[0232] The data prediction model creation device provided in this embodiment can execute Figures 3 to 5 The technical solutions of the participating equipment in any of the method embodiments shown have similar implementation principles and technical effects, which will not be repeated here.

[0233] Fig. 9 A schematic diagram of a device for creating a data prediction model provided in an embodiment of the present application Figure 2 .like Fig. 9 As shown, the data prediction model creation device 700 provided in this embodiment includes: a processing module 701, a sending module 702 and a receiving module 703.

[0234] Processing module 701 is used to generate a first encrypted aggregate value according to a model iteration parameter, a sample set of a current node known to an initiator device, and a public key of a participant; the model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of an i-th model, the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of the encrypted sample set using the initiator characteristics of the sample;

[0235] Encrypt the model iteration parameter according to the initiator's public key to obtain the encrypted model iteration parameter;

[0236] The sending module 702 is used to send the encryption model iteration parameter and the first encrypted aggregate value to the participant device.

[0237] In an optional embodiment of this embodiment, the receiving module 703 is used to receive a second encrypted aggregate value from the participant device, where the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the sample;

[0238] The processing module 701 is used to decrypt the second encrypted aggregate value according to the initiator's private key to obtain a second aggregate value including a random number, where the random number is generated by the participant's device;

[0239] The sending module 702 is used to send a second aggregate value including the random number to the participant device.

[0240] In an optional embodiment of this embodiment, if the target division feature of the current node is the initiator feature, the receiving module 703 is used to receive first node division information from the participant device, where the first node division information includes the number of the initiator feature and the feature threshold;

[0241] The processing module 701 is used to update the encrypted sample set of the child nodes of the current node according to the first node division information and the encrypted sample set of the current node;

[0242] The sending module 702 is used to send the encrypted sample set of the child nodes of the current node to the participant device.

[0243] In an optional embodiment of this embodiment, if the target division feature of the current node is the participant feature, the receiving module 703 is used to receive second node division information from the participant device, and the second node division information includes the number of the participant feature, the feature threshold and the encrypted sample set of the child nodes of the current node.

[0244] The data prediction model creation device provided in this embodiment can execute Figures 3 to 5 The technical solution of the initiator device in any of the method embodiments shown has similar implementation principles and technical effects, which will not be repeated here.

[0245] Fig.10 A schematic diagram of the structure of the data prediction device provided in the embodiment of the present application Figure 1 .like Fig.10 As shown, the data prediction device 800 provided in this embodiment includes: a receiving module 801, a processing module 802 and a sending module 803.

[0246] The receiving module 801 is used to receive a data prediction request, where the data prediction request includes an identifier of a target object;

[0247] The processing module 802 is used to obtain feature data of the target object on the initiator device according to the identifier, and obtain a first prediction result based on the feature data and the data prediction model, where the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0248] The sending module 803 is used to send the data prediction request and the encrypted first prediction result to the participant device;

[0249] The receiving module 801 is further used to receive a third prediction result returned by the participant device; the third prediction result is determined by the participant device in combination with the weight information of the leaf node of the data prediction model, the encrypted first prediction result and the second prediction result, and the second prediction result is generated by the participant device based on the feature data of the target object in the participant device and the data prediction model;

[0250] The processing module 802 is further configured to obtain a final label prediction value of the target object by decrypting the third prediction result.

[0251] In an optional embodiment of this embodiment, the processing module 802 is used to generate the encrypted first prediction result according to the first prediction result and the initiator's private key.

[0252] The data prediction device provided in this embodiment can execute Figure 6 or Figure 7 The technical solution of the initiator device in the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0253] Fig.11 A schematic diagram of the structure of the data prediction device provided in the embodiment of the present application Figure 2 .like Fig.11 As shown, the data prediction device 900 provided in this embodiment includes: a receiving module 901, a processing module 902 and a sending module 903.

[0254] The receiving module 901 is used to receive a data prediction request and an encrypted first prediction result from an initiator device, wherein the data prediction request includes an identifier of a target object, and the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device;

[0255] The processing module 902 is used to obtain the characteristic data of the target object on the participant device according to the identifier, and obtain a second prediction result based on the characteristic data of the participant device and the data prediction model;

[0256] Generate a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model;

[0257] The sending module 903 is used to send the third prediction result to the initiator device.

[0258] In an optional embodiment of this embodiment, the processing module 902 is used to:

[0259] Obtaining a cross product result of the second prediction result and the encrypted first prediction result;

[0260] The third prediction result is then obtained by performing a dot product operation on the weight information of the leaf nodes of the data prediction model and the cross product operation result.

[0261] The data prediction device provided in this embodiment can execute Figure 6 or Figure 7 The technical solutions of the participating equipment in the method embodiment shown have similar implementation principles and technical effects, which will not be repeated here.

[0262] Fig.12 The hardware structure diagram of the electronic device provided in the embodiment of the present application. Fig.12As shown, the electronic device 1000 provided in this embodiment includes: a memory 1001, a processor 1002 and a computer program; wherein the computer program is stored in the memory 1001 and is configured to be executed by the processor 1002 to implement the technical solution of the initiator device in any of the aforementioned method embodiments, or to be executed to implement the technical solution of the participant device in any of the aforementioned method embodiments.

[0263] Optionally, the memory 1001 may be independent or integrated with the processor 1002. When the memory 1001 is a device independent of the processor 1002, the electronic device 1000 further includes a bus 1003 for connecting the memory 1001 and the processor 1002.

[0264] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by the processor 1002 to implement the technical solution of the initiator device in any of the aforementioned method embodiments, or the technical solution of the participant device in any of the aforementioned method embodiments.

[0265] An embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the computer program implements the technical solution of the initiator device in any of the aforementioned method embodiments, or the technical solution of the participant device in any of the aforementioned method embodiments.

[0266] An embodiment of the present application also provides a chip, including: a processing module and a communication interface, wherein the processing module can execute the technical solution of the initiator device in any of the aforementioned method embodiments, or the technical solution of the participant device in any of the aforementioned method embodiments.

[0267] Optionally, the chip also includes a storage module (such as a memory), the storage module is used to store instructions, the processing module is used to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module enables the processing module to execute the technical solution of the initiator device in any of the aforementioned method embodiments, or the technical solution of the participating device in any of the aforementioned method embodiments.

[0268] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0269] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0270] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0271] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0272] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device.

[0273] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for creating a data prediction model, characterized in that: Applied to a participant device, the method comprises: Receive an encrypted model iteration parameter and a first encrypted aggregate value from an initiator device; the encrypted model iteration parameter is used to indicate an encrypted derivative of a difference between a sample label prediction value and a true value of an i-th model, wherein the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate a division of a sample set of a current node using the initiator feature of the sample; Generate a second encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key, wherein the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the sample; Determine a first information gain set for dividing the sample set by the initiator's characteristics according to the first decrypted encrypted aggregate value; determine a second information gain set for dividing the sample set by the participant's characteristics according to the second decrypted encrypted aggregate value; the first information gain set and the second information gain set each include at least one information gain; If the maximum information gain in the first information gain set and the second information gain set is less than or equal to a preset threshold, determining that the current node is a leaf node of the data prediction model of the i+1th model iteration, and after determining the weight information of the current node, storing the weight information in the participant device; the weight information is used to indicate the label prediction value of the current node sample after the i+1th model training; The generating a second encrypted aggregate value according to the encryption model iteration parameter, the sample set, and the initiator public key includes: Generate a third encrypted aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key; the third encrypted aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample; Generate an encrypted random number based on the random number generated by the participant's device and the initiator's public key; The second encrypted aggregate value is obtained by adding the encrypted random number to the third encrypted aggregate value.

2. The method according to claim 1, characterized in that Before determining the second information gain set for dividing the sample set by the participant characteristics according to the decrypted second encrypted aggregate value, the method further includes: Sending the second encrypted aggregate value to the initiator device, where the second encrypted aggregate value includes an encrypted random number; Receiving a second aggregate value including a random number returned by the initiator device; After removing the random number, a third aggregate value is obtained, which is the decrypted third encrypted aggregate value, and includes the derivative of the difference between the predicted value and the true value of the sample label in the sub-sample set after the sample set is divided by the characteristics of the participant.

3. The method according to claim 1, characterized in that Before determining the first information gain set for dividing the sample set by the initiator's characteristics according to the decrypted first encrypted aggregate value, the method further includes: Decrypting the first encrypted aggregate value according to the participant's private key to obtain a first aggregate value; The first aggregate value includes a derivative of a difference between a predicted value of a sample label and a true value in a sub-sample set after the sample set is divided using the initiator feature.

4. The method according to claim 1, characterized in that: The method further comprises: If the maximum information gain in the first information gain set and the second information gain set is greater than the preset threshold, the partition feature corresponding to the maximum information gain is used as the target partition feature of the current node, and the target partition feature is the initiator feature or the participant feature.

5. The method according to claim 4, characterized in that The method further comprises: If the target partitioning feature of the current node is the initiator feature, first node partitioning information is sent to the initiator device, where the first node partitioning information includes the number of the initiator feature and a feature threshold.

6. The method according to claim 4, characterized in that The method further comprises: If the target partitioning feature of the current node is the participant feature, updating the sample set of the child nodes of the current node according to the number of the participant feature and the feature threshold, and generating an encrypted sample set of the child nodes of the current node; Sending second node division information to the initiator device, where the second node division information includes the serial number of the participant feature and an encrypted sample set of child nodes of the current node.

7. A method for creating a data prediction model, characterized in that: Applied to an initiator device, the method includes: Generate a first encrypted aggregate value according to a model iteration parameter, a sample set of the current node known to the initiator device, and a public key of a participant; the model iteration parameter is used to indicate the encrypted derivative of the difference between the sample label prediction value and the true value of the first i-1 models, the i-th model is a data prediction model that has undergone i-model iterations, and i is a positive integer; the first encrypted aggregate value is used to indicate the division of the encrypted sample set using the initiator feature of the sample; Encrypt the model iteration parameter according to the initiator's public key to obtain the encrypted model iteration parameter; The encryption model iteration parameter and the first encryption aggregate value are sent to the participant device, so that the participant device generates a second encryption aggregate value according to the encryption model iteration parameter, the sample set and the initiator public key, the second encryption aggregate value is used to indicate the division of the sample set of the current node using the participant characteristics of the sample, the participant device determines the first information gain set of the sample set divided by the initiator characteristics according to the decrypted first encryption aggregate value, and determines the second information gain set of the sample set divided by the participant characteristics according to the decrypted second encryption aggregate value, if the maximum information gain of the first information gain set and the second information gain set is less than or equal to a preset threshold, determine the current The previous node is a leaf node of the data prediction model of the i+1th model iteration. After determining the weight information of the current node, the weight information is stored in the participant device; the first information gain set and the second information gain set each include at least one information gain, and the weight information is used to indicate the label prediction value of the current node sample after i+1 model training; wherein, the second encrypted aggregate value is generated by the participant device according to the encryption model iteration parameters, the sample set and the initiator public key to generate a third encrypted aggregate value, and is generated by adding an encrypted random number to the third encrypted aggregate value, and the encrypted random number is generated by the participant device according to the random number generated by the participant device and the initiator public key.

8. The method according to claim 7, characterized in that The method further comprises: Receiving a second encrypted aggregate value from the participant device, where the second encrypted aggregate value is used to indicate a division of the sample set of the current node using the participant characteristics of the samples; Decrypting the second encrypted aggregate value according to the initiator's private key to obtain a second aggregate value including a random number, where the random number is generated by the participant's device; A second aggregate value including the random number is sent to the participant device.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: If the target partitioning feature of the current node is the initiator feature, receiving first node partitioning information from the participant device, the first node partitioning information including the number of the initiator feature and a feature threshold; Update the encrypted sample set of the child nodes of the current node according to the first node division information and the encrypted sample set of the current node; Sending an encrypted sample set of child nodes of the current node to the participant device.

10. The method according to claim 7 or 8, characterized in that: The method further comprises: If the target partitioning feature of the current node is the participant feature, second node partitioning information is received from the participant device, where the second node partitioning information includes the serial number of the participant feature and an encrypted sample set of child nodes of the current node.

11. A data prediction method, characterized in that: Applied to an initiator device, the initiator device includes a data prediction model created by the method according to any one of claims 7 to 10, the data prediction model is obtained after T model iterations, where T is a positive integer; the method includes: receiving a data prediction request, wherein the data prediction request includes an identifier of a target object; Acquire feature data of the target object on the initiator device according to the identifier, and obtain a first prediction result based on the feature data and the data prediction model, where the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device; Sending the data prediction request and the encrypted first prediction result to the participant device; Receive a third prediction result returned by the participant device; the third prediction result is determined by the participant device in combination with the weight information of the leaf node of the data prediction model, the encrypted first prediction result, and the second prediction result, the second prediction result is generated by the participant device based on the feature data of the target object on the participant device and the data prediction model; By decrypting the third prediction result, the final label prediction value of the target object is obtained.

12. The method according to claim 11, characterized in that The method further comprises: The encrypted first prediction result is generated according to the first prediction result and the initiator's private key.

13. A data prediction method, characterized in that: Applied to a participant device, the participant device includes weight information of a leaf node of a data prediction model created by the method according to any one of claims 1 to 6, the data prediction model is obtained after T model iterations, where T is a positive integer; the method includes: Receiving a data prediction request and an encrypted first prediction result from an initiator device, wherein the data prediction request includes an identifier of a target object, and the first prediction result is used to indicate an initial label prediction value obtained by the target object on the initiator device; Acquire feature data of the target object on the participant device according to the identifier, and obtain a second prediction result based on the feature data of the participant device and the data prediction model; Generate a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model; Send the third prediction result to the initiator device.

14. The method according to claim 13, characterized in that The step of generating a third prediction result according to the encrypted first prediction result, the second prediction result, and the weight information of the leaf node of the data prediction model includes: Obtaining a cross product result of the second prediction result and the encrypted first prediction result; The third prediction result is then obtained by performing a dot product operation on the weight information of the leaf nodes of the data prediction model and the cross product operation result.

15. An electronic device, characterized in that: include: A memory, a processor and a computer program; the computer program is stored in the memory and is configured to be executed by the processor to implement the method as claimed in any one of claims 1 to 6, or the method as claimed in any one of claims 7 to 10, or the method as claimed in claim 11 or 12, or the method as claimed in claim 13 or 14.

16. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 6, or the method according to any one of claims 7 to 10, or the method according to claim 11 or 12, or the method according to claim 13 or 14.

17. A computer program product, characterized in that The method comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6, or the method according to any one of claims 7 to 10, or the method according to claim 11 or 12, or the method according to claim 13 or 14.

Citation Information

Patent Citations

  • Gradient boosting tree model generation method and device, electronic equipment and storage medium

    CN113722739A