Method for creating data prediction model, prediction method, device and storage medium

By employing a binary tree structure and random numbering in vertical federated learning, and combining sample partitioning evaluation parameters of the initiator and participants, a high-performance and secure data prediction model was created. This solves the problems of model performance and privacy protection in vertical federated learning, and achieves more accurate and interpretable prediction results.

CN114139019BActive Publication Date: 2026-05-19JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINGDONG TECH HLDG CO LTD
Filing Date
2021-12-02
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In the context of vertical federated learning, how can we create high-performance and secure data prediction models, especially while ensuring user privacy, and improve the model's prediction accuracy and interpretability?

Method used

A data prediction model with a binary tree structure is used. The target partitioning features are determined by the sample partitioning evaluation parameters of the initiating device and the participating devices. Random numbers are used to represent the features of the participating devices. The node partitioning is performed by combining the sample partitioning evaluation parameters of all parties until a threshold is reached, thus creating a data prediction model.

Benefits of technology

It improves the prediction accuracy and security of data prediction models, ensures data privacy protection, avoids the leakage of feature information and the transmission of malicious data, and enhances the interpretability of models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139019B_ABST
    Figure CN114139019B_ABST
Patent Text Reader

Abstract

The application provides a data prediction model creation method, a prediction method, an apparatus and a storage medium. The model creation method comprises: an initiator device obtaining an initial first sample set of a root node of a binary tree structure, the first sample set comprising samples common to the initiator device and a participant device; determining how to divide the first sample set of the root node according to sample division evaluation parameters of the first sample set at the initiator device and the participant device; dividing sample sets of child nodes of the root node based on the same principle until the sample division evaluation parameters of the sample sets in all child nodes are less than or equal to a threshold value, stopping sample division, and completing creation of the data prediction model. The above process comprehensively considers sample division evaluation parameters of sample sets of nodes by all parties, determines whether to divide and how to divide the sample sets of the nodes based on the sample division evaluation parameters, and the prediction result of the data prediction model created by the method is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method for creating a data prediction model, a prediction method, an apparatus, and a storage medium. Background Technology

[0002] Federated machine learning, also known as federated learning, effectively helps multiple organizations use data and perform machine learning modeling while ensuring user privacy and data security. Depending on the characteristics of the data and tasks, it can be divided into vertical federated learning, horizontal federated learning, and federated transfer learning.

[0003] Vertical federated learning involves splitting two datasets along a vertical axis (i.e., feature dimension) when there is significant overlap in users but limited overlap in user features. The datasets are then used to train the model by extracting the portion of data where users from both datasets share similarities but not identical features. For example, in the field of credit risk control, a predictive model of a user's loan repayment ability can be built based on user data samples from different institutions (such as banks and e-commerce companies). This predictive model allows for the analysis of multi-dimensional feature data of the target user, ultimately determining whether the user has the ability to repay the loan.

[0004] In the context of vertical federated learning, how to create high-performance and secure data prediction models is a hot research topic. Summary of the Invention

[0005] This application provides a method for creating a data prediction model, a prediction method, an apparatus, and a storage medium, which can improve the performance of the created data prediction model.

[0006] A first aspect of this application provides a method for creating a data prediction model, the method being applied to an initiating device, wherein the data prediction model employs a binary tree structure, and the method includes:

[0007] Obtain a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices.

[0008] Based on the sample partitioning evaluation parameters of the first sample set in the initiator device and the participant device, the target partitioning feature of the root node is determined; the sample partitioning evaluation parameters are used to indicate the error rate of sample partitioning, and the target partitioning feature is one of the features of the sample in the initiator device or the participant device;

[0009] The sample set of child nodes of the root node is obtained based on the target partitioning features;

[0010] Send the actual partitioning information of the root node to the participating device, wherein the actual partitioning information is at least used to indicate the target partitioning feature;

[0011] Based on the partitioning method of the first sample set of the root node by the initiating device, the partitioning result of the sample set of each level child node of the root node is obtained until the sample partitioning evaluation parameter of the sample set in all child nodes is less than or equal to the threshold, then the sample partitioning is stopped, and the binary tree structure at the time of stopping the partitioning is used as the data prediction model.

[0012] In an optional embodiment of the first aspect, determining the target partitioning feature of the root node based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device includes:

[0013] The system obtains a first partitioning result of the initiating device partitioning the first sample set using a first feature, and a second partitioning result of the participating device partitioning the first sample set using a second feature; the first feature includes at least one feature of the sample in the initiating device, and the second feature includes at least one feature of the sample in the participating device.

[0014] Based on the first partitioning result, determine the sample partitioning evaluation parameters of the first sample set on the initiator's device; based on the second partitioning result, determine the sample partitioning evaluation parameters of the first sample set on the participant's device;

[0015] Based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device, the target partitioning feature is determined from the first feature and the second feature, and the target partitioning feature is the feature of the first sample set that actually partitions the root node.

[0016] In an optional embodiment of the first aspect, the first partitioning result includes a first feature number, a first sub-sample set partitioned by the first feature, and the number of samples in the second sub-sample set, wherein the first feature number is a random number corresponding to the first feature generated by the initiating device;

[0017] The step of determining the sample division evaluation parameters of the first sample set on the initiating device based on the first division result includes:

[0018] Based on the annotation results of the samples in the first sample set, the number of samples in the first sub-sample set and the second sub-sample set in the first partitioning result, the first sample partitioning evaluation parameter of the first sub-sample set and the second sample partitioning evaluation parameter of the second sub-sample set are determined.

[0019] Based on the first sample segmentation evaluation parameters and the second sample segmentation evaluation parameters, the sample segmentation evaluation parameters of the first sample set in the initiating device are determined.

[0020] In an optional embodiment of the first aspect, the second partitioning result includes a second feature number, the number of samples in the third sub-sample set and the fourth sub-sample set that are partitioned using the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device.

[0021] The step of determining the sample division evaluation parameters of the first sample set in the participating device based on the second division result includes:

[0022] Based on the labeling results of samples in the first sample set, the number of samples in the third sub-sample set and the fourth sub-sample set in the second partitioning result, the third sample partitioning evaluation parameters of the third sub-sample set and the fourth sample partitioning evaluation parameters of the fourth sub-sample set are determined.

[0023] Based on the third sample segmentation evaluation parameter and the fourth sample segmentation evaluation parameter, the sample segmentation evaluation parameter of the first sample set in the participating device is determined.

[0024] In an alternative embodiment of the first aspect, the actual partitioning information is used at least to indicate the target partitioning features, including:

[0025] The actual partitioning information includes the random number corresponding to the target partitioning feature;

[0026] If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or

[0027] If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

[0028] In an optional embodiment of the first aspect, the actual partitioning information further includes sample sets of the two child nodes of the root node, wherein the sample set of each child node is a subset of the first sample set.

[0029] A second aspect of this application provides a method for training a data prediction model, which is applied to a participant device. The data prediction model employs a binary tree structure. The method includes:

[0030] Obtain a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices.

[0031] The first sample set of the root node is divided using a second feature to obtain a second division result, wherein the second feature includes at least one feature of the sample in the participating device;

[0032] The second partitioning result is sent to the initiating device, and the second partitioning result is used by the first device to determine the target partitioning features of the root node.

[0033] Receive actual partitioning information from the root node of the initiating device, the actual partitioning information being used to indicate at least the target partitioning feature, the target partitioning feature being one of the features of the sample in the initiating device or the participating device;

[0034] Based on the partitioning method of the first sample set of the root node by the participating device, obtain the third partitioning result of the sample set of each level child node of the root node;

[0035] The third partitioning result is sent to the initiating device until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to the threshold. Then, a notification message is received from the initiating device. The notification message is used to indicate that the sample partitioning is stopped, and the binary tree structure at the time of stopping the partitioning is used as the data prediction model.

[0036] In an optional embodiment of the second aspect, the second partitioning result includes a second feature number, the number of samples in the third sub-sample set and the fourth sub-sample set that are partitioned using the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device.

[0037] In an alternative embodiment of the second aspect, the actual partitioning information is used at least to indicate target partitioning features, including:

[0038] The actual partitioning information includes the random number corresponding to the target partitioning feature;

[0039] If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or

[0040] If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

[0041] In an optional embodiment of the second aspect, the actual partitioning information further includes sample sets of the two child nodes of the root node, wherein the sample set of each child node is a subset of the first sample set.

[0042] A third aspect of this application provides a data prediction method, which is applied to a first device, the first device being either an initiating device or a participating device, the method comprising:

[0043] Receive a data prediction request, wherein the data prediction request includes a query object;

[0044] The feature data of the query object on the first device is obtained. Based on the feature data of the query object on the first device and N data prediction models, N data prediction results are obtained. Each data prediction model outputs a data prediction result, and each data prediction result is used to indicate the feature category of the query object. Each data prediction model adopts a binary tree structure and is obtained by partitioning the sample objects through the sample set shared by the first device and the second device. The sample objects in the sample sets used by any two data prediction models are partially or completely different.

[0045] Based on the N data prediction results, determine the feature category of the query object;

[0046] Output the feature category.

[0047] In an optional embodiment of the third aspect, obtaining N data prediction results based on the feature data of the query object in the first device and N data prediction models includes:

[0048] For any data prediction model, starting from the root node of the data prediction model, the partitioning path of the query object in the data prediction model is determined based on the partitioning information of each node in the data prediction model and the feature data of the query object in the first device, until the bottom node of the data prediction model; the partitioning information is at least used to indicate the partitioning features of the node, and the partitioning features are the features of the query object in the first device or the second device.

[0049] The feature category of the lowest-level node is used as a data prediction result for the query object.

[0050] In an optional embodiment of the third aspect, determining the partitioning trend of the query object in the data prediction model based on the partitioning information of each node in the data prediction model and the feature data of the query object on the first device includes:

[0051] Regarding the first node, the first node is any node in the data prediction model other than the lowest-level node:

[0052] If the partitioning information of the first node indicates a partitioning feature that corresponds to the query object on the first device, obtain the partitioning threshold corresponding to the partitioning feature; based on the partitioning threshold and the feature data of the query object on the first device, determine whether the query object is partitioned into the left or right child node of the first node; or

[0053] If the partitioning information of the first node indicates that the partitioning feature is the feature of the query object in the second device, a partitioning request is sent to the second device; the partitioning result of the first node returned by the second device is received, and the partitioning result is used to indicate that the query object is partitioned into the left child node or right child node of the first node.

[0054] In an optional embodiment of the third aspect, determining the feature category of the query object based on the N data prediction results includes:

[0055] The feature category indicated by the data prediction result with the most identical predicted values ​​among the N data prediction results is taken as the feature category of the query object.

[0056] A fourth aspect of this application provides an apparatus for creating a data prediction model, comprising:

[0057] The acquisition module is used to acquire a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices.

[0058] The processing module is configured to determine the target partitioning feature of the root node based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device; the sample partitioning evaluation parameters are used to indicate the error rate of sample partitioning, and the target partitioning feature is one of the features of the sample in the initiating device or the participating device;

[0059] The acquisition module is also used to acquire a sample set of child nodes of the root node based on the target partitioning features;

[0060] The sending module is used to send the actual partitioning information of the root node to the participating device, wherein the actual partitioning information is used to indicate at least the target partitioning feature;

[0061] The acquisition module is further configured to acquire the partitioning result of the sample set of each level child node of the root node according to the partitioning method of the first sample set of the root node by the initiating device, until the sample partitioning evaluation parameter of the sample set in all child nodes is less than or equal to the threshold, the processing module stops the sample partitioning, and uses the binary tree structure at the time of stopping the partitioning as the data prediction model.

[0062] A fifth aspect of this application provides an apparatus for creating a data prediction model, comprising:

[0063] The acquisition module is used to acquire a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices.

[0064] The acquisition module is further configured to divide the first sample set of the root node using a second feature to obtain a second division result, wherein the second feature includes at least one feature of the sample in the participating device;

[0065] The sending module is used to send the second partitioning result to the initiating device, wherein the second partitioning result is used by the first device to determine the target partitioning features of the root node;

[0066] The receiving module is configured to receive actual partitioning information from the root node of the initiating device, wherein the actual partitioning information is used to indicate at least the target partitioning feature, and the target partitioning feature is one of the features of the sample in the initiating device or the participating device;

[0067] The acquisition module is further configured to acquire a third partitioning result of the sample set of each level child node of the root node according to the partitioning method of the first sample set of the root node by the participating device.

[0068] The sending module is further configured to send the third partitioning result to the initiating device until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to the threshold. The receiving module is further configured to receive a notification message from the initiating device, the notification message being used to indicate stopping the sample partitioning and using the binary tree structure at the time of stopping the partitioning as the data prediction model.

[0069] A sixth aspect of this application provides a data prediction apparatus, comprising:

[0070] A receiving module is used to receive data prediction requests, wherein the data prediction requests include query objects;

[0071] The acquisition module is used to acquire the feature data of the query object in the first device;

[0072] The processing module is used to obtain N data prediction results based on the feature data of the query object on the first device and N data prediction models. Each data prediction model outputs a data prediction result, and each data prediction result is used to indicate the feature category of the query object. Each data prediction model adopts a binary tree structure and is obtained by partitioning the sample objects through the sample set shared by the first device and the second device. The sample objects in the sample sets used by any two data prediction models are partially or completely different.

[0073] The processing module is also used to determine the feature category of the query object based on the N data prediction results;

[0074] The sending module is used to output the feature category.

[0075] A seventh aspect of this application provides an apparatus for creating a data prediction model, comprising:

[0076] Memory;

[0077] Processor; and

[0078] Computer programs;

[0079] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of the first aspects.

[0080] An eighth aspect of this application provides an apparatus for creating a data prediction model, comprising:

[0081] Memory;

[0082] Processor; and

[0083] Computer programs;

[0084] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of the second aspects.

[0085] A ninth aspect of this application provides an apparatus for creating a data prediction model, comprising:

[0086] Memory;

[0087] Processor; and

[0088] Computer programs;

[0089] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of the third aspects.

[0090] A tenth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any one of the first aspects.

[0091] The eleventh aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any one of the second aspects.

[0092] A twelfth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any of the third aspects.

[0093] The thirteenth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the first aspects.

[0094] The fourteenth aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described in any one of the second aspects.

[0095] The fifteenth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any one of the third aspects.

[0096] This application provides a method for creating a data prediction model, a prediction method, an apparatus, and a storage medium. The model creation method includes: an initiating device acquiring a first sample set of the root node of an initial binary tree structure, the first sample set including samples shared by the initiating and participating devices; determining the target partitioning feature of the root node based on the sample partitioning evaluation parameters of the first sample set on both the initiating and participating devices; acquiring the sample set of the root node's child nodes based on the target partitioning feature; acquiring the partitioning results of the sample sets of each level of the root node's child nodes based on the same principle, until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to a threshold, at which point the sample partitioning stops, and the binary tree structure at the point of stopping partitioning is used as the data prediction model. This modeling process integrates the sample partitioning evaluation parameters of various parties for a given node's sample set, determining whether the node's sample set should be partitioned and based on which party's sample features. The data prediction model created using this method yields more accurate prediction results. Attached Figure Description

[0097] Figure 1 A schematic diagram illustrating a scenario for creating a data prediction model provided in an embodiment of this application;

[0098] Figure 2 Interactive illustration of the data prediction model creation method provided in the embodiments of this application Figure 1 ;

[0099] Figure 3 A schematic diagram of the data prediction model provided in the embodiments of this application;

[0100] Figure 4 Interactive illustration of the data prediction model creation method provided in the embodiments of this application Figure 2 ;

[0101] Figure 5 A schematic diagram of sample division provided for embodiments of this application;

[0102] Figure 6 A schematic diagram illustrating the partitioning process of any node in the data prediction model provided in this application embodiment;

[0103] Figure 7 Flowchart of the data prediction method provided in the embodiments of this application Figure 1 ;

[0104] Figure 8 Flowchart of the data prediction method provided in the embodiments of this application Figure 2 ;

[0105] Figure 9 Flowchart of the data prediction method provided in the embodiments of this application Figure 3 ;

[0106] Figure 10 Structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 1 ;

[0107] Figure 11 Structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 2 ;

[0108] Figure 12 A structural diagram of the data prediction device provided in the embodiments of this application;

[0109] Figure 13 Hardware structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 1 ;

[0110] Figure 14 Hardware structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 2 ;

[0111] Figure 15 This is a hardware structure diagram of the data prediction device provided in an embodiment of this application. Detailed Implementation

[0112] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0113] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated or described herein.

[0114] It should be understood that the terms “comprising” and “having” as used herein, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are expressly listed, but may include other steps or units that are not expressly listed or that are inherent to such process, method, product, or apparatus.

[0115] The following is a brief explanation of the technical terms involved in the embodiments of this application.

[0116] Gini impurity is a technical term in decision trees, referring to the expected error rate when a certain outcome from one set is randomly applied to a data item in another set. It's a metric used to predict the degree of heterogeneity when creating a decision tree. The lower the Gini impurity, the higher the purity, the more ordered the set, and the better the classification performance. A Gini impurity of 0 indicates that the sets are of consistent categories.

[0117] Figure 1 This is a schematic diagram illustrating a scenario for creating a data prediction model provided in an embodiment of this application. For example... Figure 1 As shown, the scenario includes initiator device 11 and at least one participant device, such as... Figure 1 Participating devices 12 and 13 are connected to the initiating device 11. The initiating device 11 and participating devices 12 and 13 can jointly participate in the federated learning process to establish a data prediction model. The data prediction model can be used to predict whether a sample has a certain attribute feature.

[0118] In one possible scenario, the initiating device 11 and the participating devices 12 and 13 contain a large number of identical data samples and a small number of identical data features. The process of building a data prediction model falls under the category of vertical federated learning.

[0119] In another possible scenario, the initiating device 11 and the participating devices 12 and 13 contain a small number of identical data samples and a large number of identical data features. The process of building a data prediction model falls under the category of horizontal federated learning.

[0120] In another possible scenario, the initiating device 11 and the participating devices 12 and 13 contain a small number of identical data samples and a small number of identical data features. The process of building a data prediction model falls under the category of federated transfer learning.

[0121] This embodiment mainly focuses on the aforementioned vertical federated learning scenario. Below, we present some specific implementation scenarios based on practical applications.

[0122] For example, suppose there are two different institutions: a bank in a certain region and an e-commerce platform in the same region. Their user bases are likely to encompass a large portion of the region's residents, resulting in significant overlap between their users. The bank records users' income and expenditure details, as well as credit ratings, while the e-commerce platform records users' browsing and purchase history; therefore, the overlap in user characteristics between the two is relatively small. A data prediction model can be jointly constructed using data samples from both institutions. For instance, the data prediction model could be used to predict whether a user has the ability to purchase a certain item. Or, for example, it could be used to predict whether a user has the ability to repay a loan.

[0123] For example, suppose there are three different service providers: one is a book recommendation service provider for a certain region, another is a movie recommendation service provider for the same region, and both likely have user groups that encompass a large portion of the region's residents, thus their user overlap is significant. The book recommendation service provider records users' browsing and reading history, while the movie recommendation service provider records users' browsing and watching history; therefore, their user characteristics overlap less. A data prediction model can be jointly constructed using data samples from both service providers. For example, the data prediction model could be used to predict whether a user is interested in purchasing a particular book. Or, for example, it could be used to predict whether a user is interested in a particular movie.

[0124] The above-mentioned implementation scenarios are merely examples. Any other scenarios that can involve multiple parties in vertical federated learning modeling and data prediction are within the scope of protection of the embodiments of this application, and the embodiments of this application do not impose any restrictions on them.

[0125] The key to creating a longitudinal federated learning model lies in how to improve its performance while ensuring the data privacy of all parties. To address this issue, this application proposes a method for creating a data prediction model. This method can be applied to the initiating device. After the initiating device and at least one participating device complete sample encryption and alignment, the initiating device obtains the partitioning of the sample set for each node in the model from each party's devices. It then determines the sample partitioning evaluation parameters (e.g., Gini impurity) for each node under different partitioning conditions. Based on these evaluation parameters, the actual partitioning method for each partitioning node in the model is determined. The data prediction model created based on this principle yields more accurate prediction results.

[0126] Considering that if participating devices disclose the meaning of their features and the feature number of each node to the initiating device, the initiating device may infer the feature values ​​of samples within the participating devices based on some prior knowledge. For example, for the feature "whether there are any illegal records in the past five years," the vast majority of users usually select "no" for this feature, with only a small number of users selecting "yes." Therefore, after this feature is made public, the node where the user is located may be able to infer the user's value for this feature because the distribution of users for this feature is extremely uneven.

[0127] To avoid the aforementioned issues, traditional federated learning never discloses the true features during the modeling process (for example, when a participant sends the partitioning information of a node to the initiator, it carries a fixed feature number corresponding to a local feature, and the initiator cannot know the specific meaning of the partitioning feature transmitted by the participant). This makes the prediction results obtained by the model uninterpretable, and the hidden feature information makes it impossible to detect malicious transmission of erroneous data, further increasing the security risks of federated models. For federated models in financial risk control scenarios, interpretability and security are crucial; therefore, the aforementioned characteristics of federated learning become significant obstacles to its application in this scenario.

[0128] To address this issue, this application also proposes a method for creating a data prediction model. During model creation, participating devices can send the partitioning features of a certain node in the model to the initiating device. These partitioning features are represented by randomly encoded numbers. This allows participating devices to disclose their partitioning features of a certain node to the initiating device while ensuring data security, thereby achieving the interpretability of the data prediction model. It should be understood that the same partitioning feature of a participating device may correspond to different randomly encoded numbers. Compared with existing solutions that send fixed feature numbers, it can be determined that the meaning of the participating device's partitioning features disclosed to the initiating device by the participating device is secure; that is, randomly encoded feature information has higher security.

[0129] In this embodiment of the application, the initiator is also called the guest party, and the participant is also called the host party.

[0130] The creation process of the data prediction model of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0131] Figure 2 Interactive illustration of the data prediction model creation method provided in the embodiments of this application Figure 1 This method involves the interaction process between an initiating device and at least one participating device. For ease of understanding, the following embodiment uses one initiating device and one participating device as an example to illustrate the solution.

[0132] like Figure 2 As shown, the method for creating a data prediction model in this embodiment includes the following steps:

[0133] Step 101: The initiating device obtains the first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices.

[0134] This step is the initial stage of creating the data prediction model and is used to obtain aligned samples from the initiating and participating devices. The initiating and participating devices identify common samples by exchanging sample IDs from their respective devices. Specifically, each party can use a combination of public-key encryption algorithm RSA and hash algorithm to encrypt the sample IDs, and then perform different operations to determine if the resulting values ​​are equal, thus achieving sample alignment.

[0135] In one optional embodiment of this example, the first sample set includes all samples shared by the initiating device and the participating devices.

[0136] In one optional embodiment of this example, the first sample set includes a portion of samples shared by the initiating device and the participating devices. Specifically, the first sample set is a preset number of samples randomly selected by the initiating device from all samples shared by the initiating device and the participating devices.

[0137] For example, suppose that the initiating device and the participating device have 3,000 common samples after sample alignment, and the preset number of samples for model training is 2,000. The initiating device can randomly select 2,000 samples from the 3,000 common samples as samples in the first sample set.

[0138] Through the above random selection process, the initiating device can obtain different first sample sets. Based on the samples in these different random sample sets, multiple data prediction models can be created using the following model creation steps. It should be understood that, in practical applications, the prediction results of multiple data prediction models created using different first sample sets may differ for the same test sample.

[0139] Step 102: The initiating device determines the target partitioning features of the root node based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating devices.

[0140] Among them, the sample partitioning evaluation parameter is used to indicate the error rate of sample partitioning, and the target partitioning feature is one of the features of the sample on the initiator's device or the participant's device.

[0141] The sample partitioning evaluation parameters of the first sample set on the initiating device are used to indicate the error rate of the initiating device in partitioning the first sample set; the sample partitioning evaluation parameters of the first sample set on the participating device are used to indicate the error rate of the participating device in partitioning the first sample set.

[0142] In an optional embodiment of this example, if the sample partitioning evaluation parameter of the first sample set on the initiator device is greater than the sample partitioning evaluation parameter of the first sample set on the participant device, the target partitioning feature of the root node can be determined as the feature of the sample on the participant device.

[0143] In an optional embodiment of this example, if the sample partitioning evaluation parameter of the first sample set on the initiator device is less than the sample partitioning evaluation parameter of the first sample set on the participant device, the target partitioning feature of the root node can be determined as the feature of the sample on the initiator device.

[0144] In an optional embodiment of this example, if the sample partitioning evaluation parameter of the first sample set on the initiator device is equal to the sample partitioning evaluation parameter of the first sample set on the participant device, the target partitioning feature of the root node can be defaulted to the feature of the sample on the initiator device.

[0145] It should be understood that the initiating device, after considering the partitioning of the first sample set by all parties at the root node, determines which party's sample features to use as the actual partitioning features of the root node.

[0146] Step 103: The initiating device obtains the sample set of child nodes of the root node based on the target partitioning features.

[0147] In an optional embodiment of this example, if the target partitioning feature of the root node is the feature of the sample on the participating device, the sample set of the child nodes of the root node can be obtained through the participating device.

[0148] In an optional embodiment of this example, if the target partitioning feature of the root node is the feature of the sample on the initiating device, the initiating device partitions the first sample set of the root node according to the target partitioning feature, and obtains the sample set of the child nodes of the root node.

[0149] As can be seen from the two embodiments above, if the target partitioning feature is a feature local to the initiator, the initiator directly partitions the samples in the first sample set; if the target partitioning feature is a feature local to the participant, the initiator informs the participant, and the participant partitions the samples in the first sample set. After the participant finishes partitioning, the partitioning result is synchronized to the initiator.

[0150] Step 104: The initiating device sends the actual partitioning information of the root node to the participating devices. The actual partitioning information is used to indicate at least the target partitioning features.

[0151] In an optional embodiment of this example, if the target partitioning feature of the root node is a feature of the sample on the participating device, the initiating device sends the actual partitioning information of the root node to the participating device. The actual partitioning information is used to indicate at least the target partitioning feature. In this embodiment, the actual partitioning information includes a random number corresponding to the target partitioning feature, wherein the random number corresponding to the target partitioning feature is randomly generated by the participating device, and the participating device records the correspondence between the target partitioning feature, the partitioning feature threshold, and the random number.

[0152] In an optional embodiment of this example, if the target partitioning feature of the root node is a feature of the sample on the initiating device, the initiating device sends the actual partitioning information of the root node to the participating devices. The actual partitioning information is used to at least indicate the target partitioning feature. In this embodiment, the actual partitioning information includes a random number corresponding to the target partitioning feature, wherein the random number corresponding to the target partitioning feature is randomly generated by the initiating device, and the initiating device records the correspondence between the target partitioning feature, the partitioning feature threshold, and the random number.

[0153] In an optional embodiment of this example, if the target partitioning feature of the root node is the feature of the sample on the initiating device, the actual partitioning information includes not only the random number corresponding to the target partitioning feature, but also the sample sets of the two child nodes of the root node. The sample set of each child node is a subset of the first sample set, and the sample set of each child node of the root node is determined by the initiating device.

[0154] Step 105: The initiating device obtains the partitioning results of the sample sets of each level of the root node according to the partitioning method of the first sample set of the root node. The partitioning continues until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to the threshold. Then the sample partitioning stops and the binary tree structure at the time of partitioning stops is used as the data prediction model.

[0155] In this embodiment, the division of the sample set of each level child node of the root node can refer to the division process of the first sample set of the root node, that is, steps 102 to 104 above. The implementation principle of the two is the same.

[0156] It should be understood that if the sample splitting evaluation parameter of the sample set in a certain node is less than or equal to the threshold, that is, the error rate of further splitting the sample set in that node is very small, indicating that the purity (or feature similarity) of the samples in the sample set is high and there is no need to split them further.

[0157] For example, Figure 3 This is a schematic diagram of the data prediction model provided in an embodiment of this application. Figure 3 As shown, the data prediction model uses a binary tree structure. Starting from the root node 1, the first sample set of root node 1 is partitioned to determine the sample sets of its child nodes 2 and 3. Using the same partitioning principle, the sample set of child node 2 is partitioned to obtain its child nodes 4 and 5. If the evaluation parameter for the sample set of child node 4 is less than or equal to a threshold, the partitioning of the sample set of child node 4 is stopped. When the bottom-level nodes on all branches of the binary tree structure satisfy the same stopping condition, the current binary tree structure is used as the data prediction model. Figure 3 The evaluation parameters for further partitioning of the sample sets at nodes 4, 5, 7, 8, and 9 are all less than or equal to the threshold.

[0158] The data prediction model creation method shown in this embodiment involves the initiating device acquiring a first sample set of the root node of an initial binary tree structure. This first sample set includes samples shared by both the initiating and participating devices. Based on the sample partitioning evaluation parameters of the first sample set in both the initiating and participating devices, the target partitioning feature of the root node is determined. Based on this target partitioning feature, the sample sets of the root node's child nodes are obtained. The partitioning results of the sample sets of each level of the root node's child nodes are obtained based on the same principle until the sample partitioning evaluation parameters of all child nodes are less than or equal to a threshold. At this point, sample partitioning stops, and the binary tree structure at the point of stopping partitioning is used as the data prediction model. This modeling process integrates the sample partitioning evaluation parameters of each party for a given node's sample set, determining whether the node's sample set should be partitioned and based on which party's sample features. The data prediction model created using this method yields more accurate prediction results.

[0159] Figure 4 Interactive illustration of the data prediction model creation method provided in the embodiments of this application Figure 2 For ease of understanding, the following embodiments also use an initiator device and a participant device as examples to illustrate the scheme.

[0160] like Figure 4 As shown, the method for creating a data prediction model in this embodiment includes the following steps:

[0161] Step 201: Align the samples between the initiator's device and the participant's device. The implementation principle of this step is the same as... Figure 2 Step 101 of the illustrated embodiment will not be repeated here.

[0162] Step 202: The initiating device obtains the first partitioning result of the first sample set by the initiating device using the first feature, wherein the first feature includes at least one feature of the sample in the initiating device.

[0163] For example, the first feature includes feature a and feature b. The initiating device obtains partitioning result 1, which uses feature a to partition the first sample set, and partitioning result 2, which uses feature b to partition the first sample set. Assuming that the feature value of feature a is either 0 or 1, then partitioning result 1 includes the number of samples n1 where the feature value of feature a is 0, and the number of samples n2 where the feature value of feature a is 1. Assuming that the feature value of feature b is greater than or equal to x and belongs to category 1, and the feature value of feature b is less than x and belongs to category 2, then partitioning result 2 includes the number of samples n3 in category 1 and the number of samples n4 in category 2.

[0164] The above examples illustrate two types of features: discrete features and continuous features. The feature type of a sample can be either of these two types, and this application embodiment does not impose any restrictions on this.

[0165] Step 203: The participating device sends the second partitioning result of the first sample set to the initiating device using the second feature, wherein the second feature includes at least one feature of the sample in the participating device.

[0166] Similar to the first feature in step 202, the second feature can be any type of feature, and there can be one or more second features.

[0167] The first and second features respectively indicate different meanings of the sample. For example, the sample is a user, and the user's first features include "gender" and "age", while the user's second features include "income" and "expenditure".

[0168] The second partitioning result of the first sample set using the second feature is similar to the first partitioning result of the first sample set using the first feature in step 202, as shown in the example of step 202. The only difference is that the former partitions the first sample set using a participating device, and the partitioning feature is the characteristic of the sample on the participating device; the latter partitions the first sample set using an initiating device, and the partitioning feature is the characteristic of the sample on the initiating device.

[0169] Step 204: The initiating device determines the sample partitioning evaluation parameters of the first sample set in the initiating device based on the first partitioning result.

[0170] In an optional embodiment of this example, the first partitioning result includes a first feature number, a first sub-sample set partitioned by the first feature, and the number of samples in the second sub-sample set. The first feature number is a random number corresponding to the first feature generated by the initiating device. The initiating device records the correspondence between the first feature number, the first feature, and the partitioning threshold of the first feature. The partitioning threshold of the first feature can be determined based on the feature values ​​of the first feature of all samples in the first sample set, for example, by taking the median or average of the feature values ​​of the first feature of all samples. In this embodiment, the first feature number in the first partitioning result is a feature with hidden meaning for the participating devices. The initiating device can send this first feature number to the participating devices, and data transmission is secure.

[0171] Specifically, step 204 includes: determining the first sample partitioning evaluation parameters for the first sub-sample set and the second sample partitioning evaluation parameters for the second sub-sample set based on the annotation results of samples in the first sample set, the number of samples in the first sub-sample set and the second sub-sample set in the first partitioning result; and determining the sample partitioning evaluation parameters of the first sample set on the initiating device based on the first and second sample partitioning evaluation parameters. The sample partitioning evaluation parameters of the first sample set on the initiating device can be understood as the comprehensive sample partitioning evaluation parameters of the sub-sample sets partitioned by the first sample set on the initiating device.

[0172] Optional, sample splitting evaluation parameters include Gini impurity.

[0173] Optionally, the Gini impurity of the first sub-sample set and the Gini impurity of the second sub-sample set are determined based on the labeling results of the samples in the first sample set, the number of samples in the first sub-sample set and the second sub-sample set in the first partitioning result.

[0174] Optionally, the combined Gini impurity of the sub-sample sets partitioned by the first sample set in the initiating device is determined based on the Gini impurity of the first sub-sample set and the Gini impurity of the second sub-sample set.

[0175] The following is in conjunction with the appendix Figure 5 This paper provides a detailed explanation of how to determine the Gini impurity of the first and second subsample sets, as well as how to determine the combined Gini impurity of the subsample sets of the first sample set. Figure 5 This is a schematic diagram of sample division provided for an embodiment of this application. For example... Figure 5 As shown, the two-dimensional coordinate system includes 10 sample points, denoted as the first sample set. Each sample point corresponds to coordinates (x, y), and each sample point corresponds to a sample. x and y correspond to the two features of the sample, respectively.

[0176] Assuming x is the dividing feature and the dividing value is 1.5, the 10 sample points are divided into two regions. The left region contains 4 sample points, denoted as the first sub-sample set, and the right region contains 6 sample points, denoted as the second sub-sample set. The 10 sample points in the first sub-sample set are labeled into two classes: black dots represent the first class, and white dots represent the second class. From... Figure 5 It can be seen that 4 sample points in the first sub-sample set belong to the first class, and 5 of the 6 sample points in the second sub-sample set belong to the second class and 1 sample point belongs to the first class.

[0177] The Gini impurity of the first subsample set and the Gini impurity of the second subsample set can be calculated using the following formulas:

[0178]

[0179] Where k represents the number of sample categories, p i This represents the proportion of samples of type i. Based on this formula, the Gini impurity G1 = 1 - 1 of the first subsample set can be determined. 2 =0, the Gini impurity G2 of the second subsample set = 1 - (5 / 6) 2 -(1 / 6) 2 =0.278.

[0180] The combined Gini impurity of a subset of samples from the first sample set can be calculated using the following formula:

[0181]

[0182] Where l represents the number of subsample sets (l is 2 in a binary tree structure), n i Let represent the number of samples in the i-th sub-sample set, and n represent the number of samples in the first sample set. Based on this formula, the comprehensive Gini impurity of the sub-sample sets of the first sample set can be determined as G′=(0.4*0)+(0.6*0.278)=0.167. The lower the Gini impurity, the better the partitioning effect.

[0183] Through the above steps, the initiating device can determine the comprehensive sample partitioning evaluation parameter of the first sample set of the root node after partitioning the sub-sample sets on the initiating device. The value of this parameter indicates the partitioning effect of the first sample set partitioning on the initiating device.

[0184] Step 205: The initiating device determines the sample division evaluation parameters of the first sample set in the participating device based on the second division result.

[0185] In an optional embodiment of this example, the second partitioning result includes a second feature number, the number of samples in a third sub-sample set and a fourth sub-sample set partitioned using the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device. The participating device records the correspondence between the second feature number, the second feature, and the partitioning threshold of the second feature. The partitioning threshold of the second feature is determined based on the feature values ​​of the second feature of all samples in the first sample set, such as the median or mean of the feature values ​​of the second feature of all samples. In this embodiment, the second feature number in the second partitioning result is a feature with hidden meaning for the initiating device; the initiating device is unaware of the meaning of the second feature.

[0186] Step 205 includes: determining the third sample partitioning evaluation parameters for the third sub-sample set and the fourth sample partitioning evaluation parameters for the fourth sub-sample set based on the annotation results of samples in the first sample set, the number of samples in the third sub-sample set and the fourth sub-sample set in the second partitioning results; and determining the sample partitioning evaluation parameters of the first sample set on the participating equipment based on the third and fourth sample partitioning evaluation parameters. The sample partitioning evaluation parameters of the first sample set on the participating equipment can be understood as the comprehensive sample partitioning evaluation parameters of the sub-sample sets partitioned by the first sample set on the participating equipment.

[0187] Optional, sample splitting evaluation parameters include Gini impurity.

[0188] Optionally, the Gini impurity of the third sub-sample set and the Gini impurity of the fourth sub-sample set can be determined based on the labeling results of the samples in the second sample set, the number of samples in the third sub-sample set and the fourth sub-sample set in the second partitioning result.

[0189] Optionally, the combined Gini impurity of the first sample set in the participating device can be determined based on the Gini impurity of the third and fourth sub-sample sets.

[0190] The principles for determining the Gini impurity of the third and fourth sub-sample sets, and for determining the combined Gini impurity of the sub-sample sets of the first sample set, are the same as in step 204. See Appendix [link to appendix]. Figure 5 The embodiments shown are not described in detail here.

[0191] Step 206: The initiating device determines the target partitioning feature from the first feature and the second feature based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device.

[0192] The target partitioning feature is the feature of the first sample set that actually partitions the root node.

[0193] It should be understood that the number of sample partitioning evaluation parameters for the first sample set on the initiating device is one or more, and this number depends on the types of features of the sample on the initiating device. For example, if the sample on the initiating device has three features, then the number of sample partitioning evaluation parameters for the first sample set on the initiating device is three. Similarly, the number of sample partitioning evaluation parameters for the second sample set on the participating device is one or more, and this number depends on the types of features of the sample on the participating device.

[0194] After determining the sample partitioning evaluation parameters of the first sample set in the initiator's device and the participant's device, select the sample partitioning evaluation parameters whose values ​​are less than or equal to a threshold (e.g., 0.05), and use the feature corresponding to the sample partitioning evaluation parameter as the target partitioning feature.

[0195] If there are multiple sample partitioning evaluation parameters, and the values ​​of all sample partitioning evaluation parameters are greater than the threshold, the sample partitioning evaluation parameter with the smallest value can be selected, and the feature corresponding to the sample partitioning evaluation parameter can be used as the target partitioning feature.

[0196] The target segmentation feature may be the first feature of the sample on the initiator, or it may be the second feature of the sample on the participant.

[0197] Step 207: The initiating device sends the actual partitioning information of the root node to the participating devices. This actual partitioning information is at least used to indicate the target partitioning features. The implementation principle of this step is the same as... Figure 2 Step 104 of the illustrated embodiment will not be repeated here.

[0198] The data prediction model creation method shown in this embodiment involves comprehensively analyzing the sample partitioning evaluation parameters (e.g., Gini impurity) of the first sample set of the root node based on the partitioning results of each party by the initiating device. Features corresponding to sample partitioning evaluation parameters whose values ​​are less than or equal to a threshold are selected and used as the actual partitioning features of the root node. The initiating device synchronizes the actual partitioning features of the root node with each party. Based on the same principle, the initiating device can also determine the actual partitioning features of each level of child nodes of the root node, ultimately completing the sample partitioning and obtaining the final data prediction model. This modeling process integrates the sample partitioning evaluation parameters of a node's sample set from each party to determine whether the node's sample set has been partitioned and based on which party's sample features. The data prediction model created using this method yields more accurate prediction results.

[0199] The above embodiments all fall under the category of vertical federated learning. Vertical federation typically includes one guest party (containing a y-label and x features) and one or more host parties (containing only z features). The y-label can be considered as the output variable of the prediction model (i.e., the category of the prediction model's output). Taking a credit risk control scenario as an example, y refers to the two categories: whether a user defaults or not. The features of the guest party and the host party largely do not overlap. The guest and host parties can build a prediction model by sharing features, thereby improving model performance. During model building, the guest and host parties cannot see each other's data information to protect the data privacy of each party.

[0200] Figure 6 This is a schematic diagram illustrating the partitioning process of any node in the data prediction model provided in this embodiment. This embodiment involves the interaction between the guest and one host. Figure 6 As shown, the process includes the following steps:

[0201] Step 1: The guest generates a public key pair and encrypts the label y of all aligned samples using Paillier. Then, it sends the public key and the [[y]] corresponding to each sample to the host.

[0202] Step 2: The host performs a binary split based on the local features of the sample, and records the splitting feature f, the splitting threshold v, and the random number rand. f,v After each binary search, the host will generate a vector group (part1, n1, part2, n2, rand). f,v ), where part1 represents the set of the first type of samples in the binary search result, n1 represents the number of samples in part1, part2 represents the set of the second type of samples in the binary search result, and n2 represents the number of samples in part2.

[0203] Step 3: The host returns an encryption matrix to the guest. The encryption matrix consists of one or more vector groups (each vector group is a row).

[0204] Step 4: The guest side calculates the Gini impurity of the bisection samples from each side and determines the optimal bisection point.

[0205] The optimal bisection point corresponds to a feature, which can be a feature of the sample on the guest side or the host side. Specifically, step 4 includes:

[0206] Step 41: The guest decrypts the encryption matrix transmitted by the host and traverses each row of the matrix to determine the Gini impurity of the binary sample and the Gini impurity of the entire sample in each row.

[0207] Step 42: The guest side performs a binary split based on the local characteristics of the samples, obtaining the number of samples in each class and the total number of samples in the binary split, and determines the Gini impurity of the samples in the guest side binary split.

[0208] Step 43: The guest side determines the optimal bisection point based on the Gini impurity of the bisection samples from the guest and host sides.

[0209] If the feature corresponding to the optimal bisection point belongs to the guest side, proceed to step 5;

[0210] If the feature corresponding to the optimal bisection point belongs to the host, proceed to step 7.

[0211] Step 5: The guest side partitions the samples based on local features to obtain (I l ,I r ).

[0212] Among them I l I represents the set of samples in the left child node after the sample is partitioned on the guest side. r This represents the set of samples in the right child node after the sample is partitioned on the guest side.

[0213] Step 6: The guest sends (I) to the host. l ,I r ).

[0214] Step 7: The guest sends rand' to the host. f,v .

[0215] rand' f,v This represents the random number corresponding to the partitioning feature determined by the guest side.

[0216] Step 8: The host performs sample segmentation based on local features to obtain (I l',I r ').

[0217] Among them I l ' represents the set of samples in the left child node after the sample is partitioned on the host side, I r 'Represents the set of samples in the right child node after the sample is partitioned on the host side.

[0218] Step 9: The host returns data to the guest (I) l ',I r ').

[0219] The above steps illustrate the partitioning process for any node in the sample set to be partitioned in the data prediction model. The partitioning process for other nodes in the model is similar until no more nodes need to be partitioned, thus completing the creation of the model.

[0220] In the above embodiments, the sample set can be a set of users, and the features of the samples can be certain features of the users. For different application scenarios, the user features are different, and the prediction functions of the constructed data prediction models are different; please refer to the above for details.

[0221] Based on the data prediction models created in the above embodiments, the following embodiments illustrate the application schemes of the data prediction models.

[0222] Figure 7 Flowchart of the data prediction method provided in the embodiments of this application Figure 1 .like Figure 5 As shown, the data prediction method in this embodiment includes the following steps:

[0223] Step 301: The first device receives a data prediction request, which includes a query object.

[0224] Step 302: The first device obtains the feature data of the query object on the first device.

[0225] Based on the practical scenarios described above, for example, a data prediction request might be used to predict whether a user (i.e., the query object) has the ability to repay a loan. A user's characteristic data on the first device (e.g., a banking platform) includes their income and expenditure history, credit rating, etc. Another example is a data prediction request used to predict whether a user is interested in purchasing a certain book. A user's characteristic data on the first device (e.g., a book recommendation service platform) includes their browsing history, book reading records, and book purchase records, etc.

[0226] Step 303: Based on the feature data of the query object on the first device and N data prediction models, obtain N data prediction results.

[0227] In this embodiment, each data prediction model outputs a data prediction result, and each data prediction result is used to indicate the feature category of the query object. Each data prediction model adopts a binary tree structure and is obtained by dividing the sample objects through the sample set shared by the first device and the second device. The sample objects in the sample sets used by any two data prediction models are partially or completely different.

[0228] It should be noted that each of the N data prediction models in this embodiment can be created based on the schemes of the above embodiments. The difference lies in the initial sample set used by each data prediction model (i.e., the samples in the first sample set of the model root node are different). It should be understood that the prediction results of data prediction models created based on different initial sample sets may differ. The data prediction method proposed in this embodiment uses N created data prediction models for data prediction, which can further improve the accuracy of data prediction compared to using only a single data prediction model.

[0229] For any data prediction model, the process of outputting the data prediction result includes the following steps:

[0230] Starting from the root node of the data prediction model, based on the partitioning information of each node in the data prediction model and the feature data of the query object on the first device, the partitioning path of the query object in the data prediction model is determined until the bottom-level node of the data prediction model. The feature category of the bottom-level node is used as a data prediction result of the query object.

[0231] The partitioning information is used to indicate the partitioning features of the node, and the partitioning features are the characteristics of the query object on the first or second device.

[0232] Step 304: The first device determines the feature category of the query object based on the prediction results of N data.

[0233] In one optional embodiment of this example, the feature category indicated by the data prediction result with the most identical predicted values ​​among the N data prediction results is taken as the feature category of the query object.

[0234] For example, if N is 100, and the data prediction results of 90 data prediction models are feature category 1 and the data prediction results of 10 data prediction models are feature category 2, then feature category 1 will be used as the feature category of the query object.

[0235] Step 305: First device output feature category.

[0236] In this embodiment, the first device can be either the initiator device or the participant device, and this application embodiment does not impose any restrictions on this.

[0237] The data prediction method illustrated in this embodiment receives a data prediction request including a query object, obtains the local feature data of the query object, and, based on the local feature data of the query object and N data prediction models jointly created by various parties, obtains N prediction results of the query object using different data prediction models. Each prediction result indicates the feature category of the query object. The final feature category of the query object is determined by a voting method (i.e., majority rule). Since the above prediction process involves multiple data prediction models (which can be called random forest models), the final prediction result integrates the prediction results of multiple data prediction models, greatly improving the accuracy of data prediction.

[0238] Optionally, for the first node, which is any node in the data prediction model other than the lowest level node, two examples are used below to illustrate how to determine the partitioning trend (prediction trend) of the query object at the first node.

[0239] Figure 8 Flowchart of the data prediction method provided in the embodiments of this application Figure 2 .like Figure 8 As shown, the data prediction method in this embodiment includes the following steps:

[0240] Step 401: If the partitioning feature indicated by the partitioning information of the first node is the feature of the query object on the first device, obtain the partitioning threshold corresponding to the partitioning feature.

[0241] Step 402: Based on the partitioning threshold and the feature data of the query object on the first device, determine whether the query object is partitioned into the left or right child node of the first node.

[0242] If the feature data of the query object in the first device is discrete data (e.g., binary data 0 or 1), for example, if the partitioning threshold is 0, then query objects with feature data of 0 are partitioned into the left child node of the first node, and query objects with feature data of 1 are partitioned into the right child node of the first node. Alternatively, if the partitioning threshold is 1, then query objects with feature data of 1 are partitioned into the left child node of the first node, and query objects with feature data of 0 are partitioned into the right child node of the first node.

[0243] If the feature data of the query object on the first device is continuous data, the first device determines whether the query object is assigned to the left or right child node of that first node by comparing the feature data of the query object on the first device (i.e., the feature value of the query object in the partitioning feature) with the partitioning threshold corresponding to that partitioning feature. For example, if the feature data is greater than or equal to the partitioning threshold, the query object is assigned to the left child node of the first node. If the feature data is less than the partitioning threshold, the query object is assigned to the right child node of the first node.

[0244] Figure 9 Flowchart of the data prediction method provided in the embodiments of this application Figure 3 .like Figure 9 As shown, the data prediction method in this embodiment includes the following steps:

[0245] Step 501: If the partitioning information of the first node indicates that the partitioning feature is a feature of the query object in the second device, the first device sends a partitioning request to the second device.

[0246] Step 502: The second device determines the partitioning features and the partitioning thresholds corresponding to the partitioning features based on the partitioning request.

[0247] The partitioning request includes a random number corresponding to the partitioning feature. The second device can obtain from the local records which local feature the partitioning feature is based on the random number, as well as the partitioning threshold corresponding to that partitioning feature.

[0248] Step 503: The second device obtains the feature data of the partitioning features of the query object.

[0249] Step 503: The second device determines whether the query object is assigned to the left or right child node of the first node based on the partitioning threshold and the feature data of the partitioning features of the query object.

[0250] Step 504: The second device sends the partitioning result of the first node to the first device.

[0251] The partitioning result is used to indicate whether the query object is partitioned into the left or right child node of the first node.

[0252] Optionally, the partitioning result includes the sample set of the left child node of the first node and the sample set of the right child node of the first node.

[0253] The above embodiments all use Gini impurity as the evaluation parameter for node partitioning in the data prediction model. In some embodiments, other evaluation parameters (including but not limited to information gain) can also be used to partition the sample set in the node.

[0254] This application embodiment can divide the data prediction model creation device and the data prediction device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or software functional modules. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the division of functional modules according to each function as an example.

[0255] In this embodiment of the application, the device for creating the data prediction model can be an initiating device. The data prediction device can be either an initiating device or a participating device.

[0256] Figure 10 Structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 1 .like Figure 10 As shown, the data prediction model creation device 600 includes: an acquisition module 601, a processing module 602, and a sending module 603.

[0257] The acquisition module 601 is used to acquire a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure, and the first sample set includes samples shared by the initiating device and the participating devices.

[0258] Processing module 602 is configured to determine the target partitioning feature of the root node based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device; the sample partitioning evaluation parameters are used to indicate the error rate of sample partitioning, and the target partitioning feature is one of the features of the sample in the initiating device or the participating device;

[0259] The acquisition module 601 is further configured to acquire a sample set of child nodes of the root node based on the target partitioning features;

[0260] Sending module 603 is used to send the actual partitioning information of the root node to the participating device, wherein the actual partitioning information is used to indicate at least the target partitioning feature;

[0261] The acquisition module 601 is further configured to acquire the partitioning result of the sample set of each level child node of the root node according to the partitioning method of the first sample set of the root node by the initiating device, until the sample partitioning evaluation parameter of the sample set in all child nodes is less than or equal to the threshold, the processing module 602 stops the sample partitioning, and uses the binary tree structure at the time of stopping the partitioning as the data prediction model.

[0262] In an optional embodiment of this example, the acquisition module 601 is used to acquire a first partitioning result of the initiating device partitioning the first sample set using a first feature, and a second partitioning result of the participating device partitioning the first sample set using a second feature; the first feature includes at least one feature of the sample in the initiating device, and the second feature includes at least one feature of the sample in the participating device.

[0263] Processing module 602 is configured to determine the sample division evaluation parameters of the first sample set on the initiator's device based on the first division result; and to determine the sample division evaluation parameters of the first sample set on the participant's device based on the second division result.

[0264] Based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device, the target partitioning feature is determined from the first feature and the second feature, and the target partitioning feature is the feature of the first sample set that actually partitions the root node.

[0265] In an optional embodiment of this embodiment, the first partitioning result includes a first feature number, a first sub-sample set of the first sample set partitioned by the first feature, and the number of samples in the second sub-sample set. The first feature number is a random number corresponding to the first feature generated by the initiating device.

[0266] Processing module 602 is used to determine the first sample partitioning evaluation parameter of the first sub-sample set and the second sample partitioning evaluation parameter of the second sub-sample set based on the annotation results of the samples in the first sample set, the number of samples in the first sub-sample set and the second sub-sample set in the first partitioning result;

[0267] Based on the first sample segmentation evaluation parameters and the second sample segmentation evaluation parameters, the sample segmentation evaluation parameters of the first sample set in the initiating device are determined.

[0268] In an optional embodiment of this embodiment, the second division result includes a second feature number, the number of samples in the third sub-sample set and the fourth sub-sample set that are divided by the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device.

[0269] The processing module 602 is used to determine the third sample partitioning evaluation parameters of the third sub-sample set and the fourth sample partitioning evaluation parameters of the fourth sub-sample set based on the annotation results of the samples in the first sample set, the number of samples in the third sub-sample set and the fourth sub-sample set in the second partitioning result;

[0270] Based on the third sample segmentation evaluation parameter and the fourth sample segmentation evaluation parameter, the sample segmentation evaluation parameter of the first sample set in the participating device is determined.

[0271] In an optional embodiment of this embodiment, the actual partitioning information is at least used to indicate the target partitioning feature, including: the actual partitioning information includes a random number corresponding to the target partitioning feature;

[0272] If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or

[0273] If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

[0274] In an optional embodiment of this example, the actual partitioning information further includes the sample sets of the two child nodes of the root node, wherein the sample set of each child node is a subset of the first sample set.

[0275] The data prediction model creation apparatus provided in this embodiment can execute... Figure 2 or Figure 4 The technical solution of the initiating device in the method embodiment shown can also be executed. Figure 6 The technical solution of the guest side in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0276] Figure 11 Structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 1 .like Figure 11 As shown, the data prediction model creation device 700 includes: an acquisition module 701, a sending module 702, and a receiving module 703.

[0277] The acquisition module 701 is used to acquire a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure, and the first sample set includes samples shared by the initiating device and the participating device.

[0278] The acquisition module 701 is further configured to divide the first sample set of the root node using a second feature to obtain a second division result, wherein the second feature includes at least one feature of the sample in the participating device;

[0279] Sending module 702 is used to send the second partitioning result to the initiating device, wherein the second partitioning result is used by the first device to determine the target partitioning features of the root node;

[0280] The receiving module 703 is configured to receive actual partitioning information from the root node of the initiating device, wherein the actual partitioning information is used to indicate at least the target partitioning feature, and the target partitioning feature is one of the features of the sample in the initiating device or the participating device;

[0281] The acquisition module 701 is further configured to acquire a third partitioning result of the sample set of each level child node of the root node according to the partitioning method of the first sample set of the root node by the participating device.

[0282] The sending module 702 is further configured to send the third partitioning result to the initiating device until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to the threshold. The receiving module 703 receives a notification message from the initiating device. The notification message is used to indicate that the sample partitioning is stopped and the binary tree structure at the time of stopping the partitioning is used as the data prediction model.

[0283] In an optional embodiment of this example, the second partitioning result includes a second feature number, the number of samples in the third sub-sample set and the fourth sub-sample set that are partitioned using the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device.

[0284] In an optional embodiment of this example, the actual partitioning information is at least used to indicate the target partitioning feature, including: the actual partitioning information includes a random number corresponding to the target partitioning feature;

[0285] If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or

[0286] If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

[0287] In an optional embodiment of this example, the actual partitioning information further includes the sample sets of the two child nodes of the root node, wherein the sample set of each child node is a subset of the first sample set.

[0288] The data prediction model creation apparatus provided in this embodiment can execute... Figure 2 or Figure 4 The technical solution of the participating equipment in the method embodiment shown can also be implemented. Figure 6 The technical solution of the host side in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0289] Figure 12 This is a structural diagram of the data prediction device provided in an embodiment of this application. Figure 12 As shown, the data prediction device 800 includes: a receiving module 801, an acquisition module 802, a processing module 803, and a sending module 804.

[0290] Receiving module 801 is used to receive a data prediction request, wherein the data prediction request includes a query object;

[0291] The acquisition module 802 is used to acquire the feature data of the query object in the first device;

[0292] The processing module 803 is used to obtain N data prediction results based on the feature data of the query object in the first device and N data prediction models. Each data prediction model outputs a data prediction result, and each data prediction result is used to indicate the feature category of the query object. Each data prediction model adopts a binary tree structure and is obtained by partitioning the sample objects through the sample set shared by the first device and the second device. The sample objects in the sample sets used by any two data prediction models are partially or completely different.

[0293] The processing module 803 is further configured to determine the feature category of the query object based on the N data prediction results;

[0294] The sending module 804 is used to output the feature category.

[0295] In an optional embodiment of this example, for any data prediction model, the processing module 803 is used to:

[0296] Starting from the root node of the data prediction model, the partitioning path of the query object in the data prediction model is determined based on the partitioning information of each node in the data prediction model and the feature data of the query object in the first device, until the bottom node of the data prediction model; the partitioning information is at least used to indicate the partitioning features of the node, and the partitioning features are the features of the query object in the first device or the second device;

[0297] The feature category of the lowest-level node is used as a data prediction result for the query object.

[0298] In one optional embodiment of this example, the first node is any node in the data prediction model other than the lowest-level node.

[0299] If the partitioning information of the first node indicates that the partitioning feature is a feature of the query object on the first device, the acquisition module 802 is used to acquire the partitioning threshold corresponding to the partitioning feature; the processing module 803 is used to determine, based on the partitioning threshold and the feature data of the query object on the first device, whether the query object is partitioned into the left child node or the right child node of the first node; or

[0300] If the partitioning information of the first node indicates that the partitioning feature is the feature of the query object in the second device, the sending module 804 is used to send a partitioning request to the second device; the receiving module 801 is used to receive the partitioning result of the first node returned by the second device, the partitioning result being used to indicate that the query object is partitioned into the left child node or right child node of the first node.

[0301] In an optional embodiment of this example, the processing module 803 is configured to:

[0302] The feature category indicated by the data prediction result with the most identical predicted values ​​among the N data prediction results is taken as the feature category of the query object.

[0303] The data prediction device provided in this embodiment can perform... Figures 7 to 9 The technical solution of the first device in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0304] Figure 13 Hardware structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 1 .like Figure 13 As shown, the data prediction model creation device 900 includes:

[0305] Memory 901;

[0306] Processor 902; and

[0307] Computer programs;

[0308] The computer program is stored in memory 901 and configured to be executed by processor 902 to implement... Figure 2 or Figure 4 The technical solution of the initiating device in the method embodiment shown, or Figure 6 The technical solution of the guest side in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0309] Optionally, the memory 901 can be either standalone or integrated with the processor 902. When the memory 901 is a device independent of the processor 902, the creation device 900 further includes a bus 903 for connecting the memory 901 and the processor 902.

[0310] Figure 14 Hardware structure of the data prediction model creation apparatus provided in the embodiments of this application Figure 2 ,like Figure 14 As shown, the data prediction model creation device 1000 includes:

[0311] Memory 1001;

[0312] Processor 1002; and

[0313] Computer programs;

[0314] The computer program is stored in memory 1001 and configured to be executed by processor 1002 to implement... Figure 2 or Figure 4 The technical solutions of the participating devices in the method embodiments shown, or Figure 6 The technical solution of the host side in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0315] Optionally, the memory 1001 can be either standalone or integrated with the processor 1002. When the memory 1001 is a device independent of the processor 1002, the creation device 1000 further includes a bus 1003 for connecting the memory 1001 and the processor 1002.

[0316] Figure 15 This is a hardware structure diagram of the data prediction device provided in an embodiment of this application. Figure 15 As shown, the data prediction device 1100 includes:

[0317] Memory 1101;

[0318] Processor 1102; and

[0319] Computer programs;

[0320] The computer program is stored in memory 1101 and configured to be executed by processor 1102 to implement... Figures 7 to 9 The technical solution of the first device in the method embodiment shown has a similar implementation principle and technical effect, and will not be described again here.

[0321] Optionally, the memory 1101 can be either standalone or integrated with the processor 1102. When the memory 1101 is a device independent of the processor 1102, the creation device 1100 also includes a bus 1103 for connecting the memory 1101 and the processor 1102.

[0322] This application embodiment also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor 902 to implement... Figure 2 or Figure 4 The technical solution of the initiating device in the method embodiment shown, or Figure 6 The technical solution of the guest party in the method embodiment shown.

[0323] This application embodiment also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor 1002 to implement... Figure 2 or Figure 4 The technical solutions of the participating devices in the method embodiments shown, or Figure 6 The technical solution of the host in the method embodiment shown.

[0324] This application embodiment also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by processor 1102 to implement... Figures 7 to 9 The technical solution of the first device in the method embodiment shown.

[0325] This application provides a computer program product, including a computer program, which is implemented when executed by a processor. Figure 2 or Figure 4 The technical solution of the initiating device in the method embodiment shown, or Figure 6 The technical solution of the guest party in the method embodiment shown.

[0326] This application provides a computer program product, including a computer program, which is implemented when executed by a processor. Figure 2 or Figure 4 The technical solutions of the participating devices in the method embodiments shown, or Figure 6 The technical solution of the host in the method embodiment shown.

[0327] This application provides a computer program product, including a computer program, which is implemented when executed by a processor. Figures 7 to 9 The technical solution of the first device in the method embodiment shown.

[0328] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0329] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.

[0330] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0331] The aforementioned storage medium can be implemented from 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 storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0332] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an application-specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in the aforementioned device.

[0333] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for creating a data prediction model, characterized in that, Applied to the initiating device, the data prediction model adopts a binary tree structure, and the method includes: Obtain a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices. Generate a set of public-key pairs, encrypt the tags of all aligned samples, and send the public key and the tag corresponding to each sample to the participating devices; The encryption matrix returned by the participating device is received. The encryption matrix is ​​generated by the participating device after performing a binary division based on the local features of the sample. The encryption matrix contains one or more vector groups, each vector group serving as a row of the encryption matrix. The vector group includes the number of samples in the set of the first type of samples in the binary division result, the number of samples in the set of the second type of samples, and the random number corresponding to the partitioning feature and partitioning threshold. The partitioning evaluation parameters of the first sample set on the initiating device and the sample partitioning evaluation parameters of the first sample set on the participating device are compared to determine the device to which the smaller partitioning evaluation parameter belongs. The characteristics of the device to which the smaller parameter belongs are used to determine the target partitioning feature of the root node. The sample partitioning evaluation parameters are used to indicate the error rate of sample partitioning. The target partitioning feature is one of the characteristics of the sample on the initiating device or the participating device. The sample partitioning evaluation parameters include Gini impurity. If the target partitioning feature of the root node is the feature of the sample on the participant's device, the sample set of the root node's child nodes is obtained through the participant's device; if the target partitioning feature of the root node is the feature of the sample on the initiator's device, the initiator's device partitions the first sample set of the root node according to the target partitioning feature, and obtains the sample set of the root node's child nodes. The actual partitioning information of the root node is sent to the participating device, and the actual partitioning information is at least used to indicate the target partitioning feature; the actual partitioning information includes a random number corresponding to the target partitioning feature. Based on the partitioning method of the first sample set of the root node by the initiating device, the partitioning result of the sample set of each level child node of the root node is obtained until the sample partitioning evaluation parameter of the sample set in all child nodes is less than or equal to the threshold, then the sample partitioning is stopped, and the binary tree structure at the time of stopping the partitioning is used as the data prediction model.

2. The method according to claim 1, characterized in that, The step of determining the target partitioning features of the root node based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device includes: The system obtains a first partitioning result of the initiating device partitioning the first sample set using a first feature, and a second partitioning result of the participating device partitioning the first sample set using a second feature; the first feature includes at least one feature of the sample in the initiating device, and the second feature includes at least one feature of the sample in the participating device. Based on the first partitioning result, determine the sample partitioning evaluation parameters of the first sample set on the initiator's device; based on the second partitioning result, determine the sample partitioning evaluation parameters of the first sample set on the participant's device; Based on the sample partitioning evaluation parameters of the first sample set in the initiating device and the participating device, the target partitioning feature is determined from the first feature and the second feature, and the target partitioning feature is the feature of the first sample set that actually partitions the root node.

3. The method according to claim 2, characterized in that, The first partitioning result includes a first feature number, a first sub-sample set partitioned by the first feature, and the number of samples in the second sub-sample set. The first feature number is a random number corresponding to the first feature generated by the initiating device. The step of determining the sample division evaluation parameters of the first sample set on the initiating device based on the first division result includes: Based on the annotation results of the samples in the first sample set, the number of samples in the first sub-sample set and the second sub-sample set in the first partitioning result, the first sample partitioning evaluation parameter of the first sub-sample set and the second sample partitioning evaluation parameter of the second sub-sample set are determined. Based on the first sample segmentation evaluation parameters and the second sample segmentation evaluation parameters, the sample segmentation evaluation parameters of the first sample set in the initiating device are determined.

4. The method according to claim 2, characterized in that, The second partitioning result includes a second feature number, a third sub-sample set that partitions the first sample set using the second feature, and the number of samples in the fourth sub-sample set. The second feature number is a random number corresponding to the second feature generated by the participating device. The step of determining the sample division evaluation parameters of the first sample set in the participating device based on the second division result includes: Based on the labeling results of samples in the first sample set, the number of samples in the third sub-sample set and the fourth sub-sample set in the second partitioning result, the third sample partitioning evaluation parameters of the third sub-sample set and the fourth sample partitioning evaluation parameters of the fourth sub-sample set are determined. Based on the third sample segmentation evaluation parameter and the fourth sample segmentation evaluation parameter, the sample segmentation evaluation parameter of the first sample set in the participating device is determined.

5. The method according to any one of claims 1-4, characterized in that, The actual partitioning information is used to indicate at least the target partitioning features, including: If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

6. The method according to claim 5, characterized in that, The actual partitioning information also includes the sample sets of the two child nodes of the root node, and the sample set of each child node is a subset of the first sample set.

7. A method for creating a data prediction model, characterized in that, Applied to participating devices, the data prediction model adopts a binary tree structure, and the method includes: Obtain a first sample set, which is the sample set to be partitioned of the root node of the initial binary tree structure. The first sample set includes samples shared by the initiating device and the participating devices. The device receives a public key and a tag corresponding to each sample from the sending device. The tag corresponding to each sample is obtained by the sending device generating a set of public key-secret key pairs and encrypting the tags of all aligned samples. An encryption matrix is ​​sent to the sending device. The encryption matrix is ​​generated by the participating device after binary division based on the local features of the samples. The encryption matrix contains one or more vector groups, each vector group serving as a row of the encryption matrix. The vector group includes the number of samples in the set of the first type of samples in the binary division result, the number of samples in the set of the second type of samples, and the random number corresponding to the partitioning feature and partitioning threshold. The first sample set of the root node is divided using a second feature to obtain a second division result, wherein the second feature includes at least one feature of the sample in the participating device; The second partitioning result is sent to the initiating device, and the second partitioning result is used by the first device to determine the target partitioning features of the root node; The system receives actual partitioning information from the root node of the initiating device. This actual partitioning information at least indicates the target partitioning feature, which is one of the features of a sample in either the initiating device or the participating device. The target partitioning feature is determined by the initiating device by comparing the partitioning evaluation parameters of the first sample set in the initiating device with the sample partitioning evaluation parameters of the first sample set in the participating device. The sample partitioning evaluation parameters include Gini impurity. The actual partitioning information includes a random number corresponding to the target partitioning feature. Based on the partitioning method of the first sample set of the root node by the participating device, obtain the third partitioning result of the sample set of each level child node of the root node; The third partitioning result is sent to the initiating device until the sample partitioning evaluation parameters of the sample sets in all child nodes are less than or equal to the threshold. Then, a notification message is received from the initiating device. The notification message is used to indicate that the sample partitioning is stopped, and the binary tree structure at the time of stopping the partitioning is used as the data prediction model.

8. The method according to claim 7, characterized in that, The second partitioning result includes a second feature number, the number of samples in the third sub-sample set and the fourth sub-sample set of the first sample set partitioned using the second feature, and the second feature number is a random number corresponding to the second feature generated by the participating device.

9. The method according to claim 7 or 8, characterized in that, The actual partitioning information is used to indicate at least the target partitioning features, including: The actual partitioning information includes the random number corresponding to the target partitioning feature; If the target partitioning feature is a feature of the sample on the initiating device, the random number corresponding to the target partitioning feature is randomly generated by the initiating device; or If the target segmentation feature is a feature of the sample on the participating device, the random number corresponding to the target segmentation feature is randomly generated by the participating device.

10. The method according to claim 9, characterized in that, The actual partitioning information also includes the sample sets of the two child nodes of the root node, and the sample set of each child node is a subset of the first sample set.

11. A data prediction method, characterized in that, Applied to a first device, the method includes: Receive a data prediction request, wherein the data prediction request includes a query object; The feature data of the query object on the first device is obtained. Based on the feature data of the query object on the first device and N data prediction models, N data prediction results are obtained. Each data prediction model outputs a data prediction result, and each data prediction result is used to indicate the feature category of the query object. Each data prediction model adopts a binary tree structure and is obtained by partitioning sample objects through a sample set shared by the first device and the second device. The sample objects in the sample sets used by any two data prediction models are partially or completely different. The data prediction model is obtained by obtaining the partitioning result of the sample set of each level child node of the root node according to the partitioning method of the first sample set of the root node by the initiating device, until the sample partitioning evaluation parameter of the sample set in all child nodes is less than or equal to the threshold, and the sample partitioning stops. The binary tree structure at the time of stopping the partitioning is used as the data prediction model. The partitioning method is that the initiating device generates a set of public key-private key pairs and encrypts the labels of all aligned samples. The public key and each The encrypted tag corresponding to the sample is sent to the participating device; the participating device returns an encryption matrix, which is generated by the participating device after binary division based on the local features of the sample. The encryption matrix contains one or more vector groups, each vector group serving as a row of the encryption matrix. The vector group includes the set of first-class samples in the binary division result, the number of samples in the set of first-class samples, the set of second-class samples, the number of samples in the set of second-class samples, and random numbers corresponding to the partitioning features and partitioning thresholds. The partitioning method is as follows: the initiating device compares the partitioning evaluation parameters of the first sample set on its own device with the sample partitioning evaluation parameters of the first sample set on the participating device, determines the device to which the smaller partitioning evaluation parameter belongs, and determines the target partitioning feature of the root node based on the features of the device to which the smaller partitioning evaluation parameter belongs. The sample partitioning evaluation parameters are used to indicate the error rate of sample partitioning, and the target partitioning feature is one of the features of the sample on the initiating device or the participating device. The sample partitioning evaluation parameters include Gini impurity. If the target partitioning feature of the root node is the feature of the sample on the participating device, the sample set of the root node's child nodes is obtained through the participating device; if the target partitioning feature of the root node is the feature of the sample on the initiating device, the initiating device partitions the first sample set of the root node according to the target partitioning feature, and obtains the sample set of the root node's child nodes; the actual partitioning information of the root node is sent to the participating device, the actual partitioning information being used at least to indicate the target partitioning feature; the actual partitioning information includes a random number corresponding to the target partitioning feature. Based on the N data prediction results, determine the feature category of the query object; Output the feature category.

12. The method according to claim 11, characterized in that, The process of obtaining N data prediction results based on the feature data of the queried object in the first device and N data prediction models includes: For any data prediction model, starting from the root node of the data prediction model, the partitioning path of the query object in the data prediction model is determined based on the partitioning information of each node in the data prediction model and the feature data of the query object in the first device, until the bottom node of the data prediction model; the partitioning information is at least used to indicate the partitioning features of the node, and the partitioning features are the features of the query object in the first device or the second device. The feature category of the lowest-level node is used as a data prediction result for the query object.

13. The method according to claim 12, characterized in that, The step of determining the partitioning trend of the query object in the data prediction model based on the partitioning information of each node in the data prediction model and the feature data of the query object on the first device includes: Regarding the first node, the first node is any node in the data prediction model other than the lowest-level node: If the partitioning information of the first node indicates a partitioning feature that corresponds to the query object on the first device, obtain the partitioning threshold corresponding to the partitioning feature; based on the partitioning threshold and the feature data of the query object on the first device, determine whether the query object is partitioned into the left or right child node of the first node; or If the partitioning information of the first node indicates that the partitioning feature is the feature of the query object in the second device, a partitioning request is sent to the second device; the partitioning result of the first node returned by the second device is received, and the partitioning result is used to indicate that the query object is partitioned into the left child node or right child node of the first node.

14. The method according to any one of claims 11-13, characterized in that, The step of determining the feature category of the query object based on the prediction results of the N data includes: The feature category indicated by the data prediction result with the most identical predicted values ​​among the N data prediction results is taken as the feature category of the query object.

15. An apparatus for creating a data prediction model, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-6.

16. An apparatus for creating a data prediction model, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 7-10.

17. A data prediction device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 11-14.

18. A computer-readable storage medium, characterized in that, It stores a computer program that is executed by a processor to implement the method as described in any one of claims 1-6, or the method as described in any one of claims 7-10, or the method as described in any one of claims 11-14.

19. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the method of any one of claims 1-6, or the method of any one of claims 7-10, or the method of any one of claims 11-14.