Federal modeling method, device, storage medium and program product of decision tree model
Through the federal modeling method of the decision tree model, the decision tree models of multiple participants are merged and updated, and the problems of poor stability and large generalization error of a single decision tree model are solved, and a higher quality and stable model is achieved, while ensuring data privacy.
Patent Information
- Application Number
- CN202011467292.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-14
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2040-12-14
AI Technical Summary
The existing single decision tree model based on a single participant cannot effectively utilize massive training data, resulting in poor model stability, large generalization errors, and large resource consumption.
The federal modeling method of the decision tree model is adopted. By receiving the model information after the interactive decision tree model established by different federal participants, combining this information using a preset algorithm, obtaining the aggregated model information, and distributing it to the participants to update the local model until the preset federal training end condition is reached.
On the basis of ensuring data privacy, use more training data to improve the quality and stability of the decision tree model, reduce generalization errors, and improve resource utilization efficiency.
Smart Images

Figure CN114626427B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a federated modeling method, device, storage medium and program product of a decision tree model. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are applied in the financial field, but the financial industry also has higher requirements for technology, such as higher requirements for modeling.
[0003] Due to its good interpretability, decision tree models are widely used in many fields. For example, financial institutions use decision tree models for financial risk control modeling, and medical institutions use interactive decision tree models for medical data analysis modeling. However, with people's attention to data privacy in recent years and the release of corresponding policies and regulations, the traditional practice of gathering data from various participants and performing machine learning modeling on the data is no longer feasible. Therefore, the current decision tree model is often a single decision tree model established based on a single participant. The amount of data that can be processed by a single decision tree model is small, the stability is poor, the generalization error is large, the resource consumption is high, and the effect is poor. In other words, how to obtain a decision tree model with good stability and small generalization error on the basis of ensuring data privacy is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of this application is to provide a federal modeling method, device, storage medium and program product for a decision tree model, aiming to solve the problem that the existing single decision tree model established based on a single participant cannot use massive training data for modeling, resulting in poor stability of the obtained decision tree model, large generalization error and high resource consumption.
[0005] To achieve the above object, the present application provides a federated modeling method of a decision tree model, which is applied to a server side. The federated interactive modeling method of the decision tree model includes:
[0006] Receive different model information sent by different federation participants after they respectively establish interactive decision tree models;
[0007] Merging the different model information by a preset algorithm to obtain aggregate model information;
[0008] Distribute the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model;
[0009] If feedback information is received that the preset federal training end conditions are not met, return to the step of receiving model information sent by different federal participants after they interactively establish decision tree models, until the corresponding federal participant feedback meets the preset federal training end conditions to obtain the target federal decision tree model.
[0010] Optionally, if feedback information that a preset federation training end condition is not met is received, the step of returning to the step of receiving model information sent by different federation participants after interactively establishing decision tree models, until the corresponding federation participant feedbacks that the preset federation training end condition is met to obtain the step of obtaining the target federation decision tree model, the method includes:
[0011] Acquire data to be processed, and input the data to be processed into the target federated decision tree model;
[0012] The data to be processed is predicted based on the target federated decision tree model to obtain a prediction result.
[0013] Optionally, after the step of performing prediction processing on the data to be processed based on the target federated decision tree model to obtain a prediction result, the method includes:
[0014] Determining prediction basis information corresponding to the prediction result based on the target federated decision tree model;
[0015] Output the prediction basis information.
[0016] Optionally, the aggregation model information includes node information;
[0017] The step of combining the different model information by a preset algorithm to obtain aggregate model information includes:
[0018] Based on the different model information, determining whether the same-layer node information of the decision tree models of different federation participants is the same;
[0019] If the node information of the same layer is different, the node information of the nodes of the same layer is merged to obtain the aggregated node information.
[0020] Optionally, the aggregation model information includes decision tree branch rule information;
[0021] The step of combining the different model information by a preset algorithm to obtain aggregate model information further includes:
[0022] Based on the different model information, determining whether branch rule information at the same branch position of decision tree models of different federation participants is the same;
[0023] If the branch rule information is different, the branch rule information is merged to obtain aggregated branch rule information.
[0024] Optionally, the step of receiving different model information sent by different federation participants after establishing interactive decision tree models respectively includes:
[0025] Receive different model information sent by different federation participants after they respectively establish interactive decision tree models;
[0026] Among them, the different federal participants obtain the decision tree model to be operated and the operation task of operating the decision tree model to be operated, and operate the decision tree model to be operated according to the operation task to obtain an interactive decision tree model, and determine the model information according to the interactive decision tree model.
[0027] Optionally, the step of distributing the aggregate model information to the different federation participants so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and providing feedback on whether a preset federation training end condition is met based on the updated interactive decision tree model, includes:
[0028] Distribute the aggregate model information to the different federation participants, so that after receiving the aggregate model information, the corresponding different federation participants update the corresponding local interactive decision tree model, and continue to perform local iterative training after reaching a preset number of local training times, and then perform federation training to provide feedback on whether the preset federation training end condition is met;
[0029] The preset federated training termination condition includes reaching a preset number of federated training times or model federated training convergence.
[0030] The present application also provides a federated modeling device of a decision tree model, which is applied to a server side. The federated interactive modeling device of the decision tree model includes:
[0031] A receiving module, used for receiving different model information sent by different federation participants after they respectively establish interactive decision tree models;
[0032] A preset algorithm merging module is used to merge the different model information through a preset algorithm to obtain aggregate model information;
[0033] A distribution module, used to distribute the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model;
[0034] The first acquisition module is used to return to the step of receiving model information sent by different federal participants after they interactively establish decision tree models if feedback information is received that the preset federal training end conditions are not met, until the corresponding federal participant feedback meets the preset federal training end conditions to obtain the target federal decision tree model.
[0035] The present application also provides a federated modeling device for a decision tree model, which is a physical device. The federated modeling device for a decision tree model includes: a memory, a processor, and a program of a federated modeling method for a decision tree model stored in the memory and executable on the processor. When the program of the federated modeling method for a decision tree model is executed by the processor, the steps of the federated modeling method for a decision tree model as described above can be implemented.
[0036] The present application also provides a readable storage medium, on which is stored a program for implementing a federated modeling method for a decision tree model. When the program for the federated modeling method for a decision tree model is executed by a processor, the steps of the federated modeling method for a decision tree model as described above are implemented.
[0037] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for federated modeling of the decision tree model described in any one of the above items.
[0038] The present application provides a federal modeling method, device, storage medium and program product for a decision tree model. Compared with the single decision tree model established based on a single participant in the prior art, which results in poor stability of the decision tree model, large generalization error and high resource consumption, the present application receives different model information sent by different federal participants after they respectively establish interactive decision tree models; merges the different model information through a preset algorithm to obtain aggregate model information; distributes the aggregate model information to the different federal participants, so that the corresponding different federal participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federal training end condition is met based on the updated interactive decision tree model; if feedback information that the preset federal training end condition is not met is received, return to the step of receiving the model information sent by different federal participants after they respectively interactively establish decision tree models, until the corresponding federal participants feedback that the preset federal training end condition is met, so as to obtain the target federal decision tree model. In this application, the joint modeling of decision tree models, especially interactive decision tree models, by multiple federated participants is implemented, so that the modeling process of the interactive decision tree model can use more training data while ensuring privacy, thereby improving the quality and stability of the model and reducing the generalization error of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 A flowchart of a first embodiment of a federated modeling method for a decision tree model of the present application;
[0042] Figure 2 This is a schematic diagram of a detailed process after step S40 in the third embodiment of the federated modeling method of the decision tree model of the present application;
[0043] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0044] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] The present application embodiment provides a federated modeling method for a decision tree model. In the first embodiment of the federated modeling method for a decision tree model of the present application, refer to Figure 1 , the federated modeling method of the decision tree model includes:
[0047] Step S10, receiving different model information sent by different federation participants after establishing interactive decision tree models respectively;
[0048] Step S20, merging the different model information through a preset algorithm to obtain aggregate model information;
[0049] Step S30, distributing the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model;
[0050] Step S40, if feedback information is received that the preset federal training end condition is not met, return to the step of receiving model information sent by different federal participants after they interactively establish decision tree models, until the corresponding federal participant feedback meets the preset federal training end condition to obtain the target federal decision tree model.
[0051] The specific steps are as follows:
[0052] Step S10, receiving different model information sent by different federation participants after establishing interactive decision tree models respectively;
[0053] In the present embodiment, it should be noted that the federal modeling method of the decision tree model is applied to the federal modeling device of the decision tree model, and the federal modeling device of the decision tree model is subordinate to the federal modeling equipment of the decision tree model. At present, with people's attention to data privacy and the release of corresponding policies and regulations, the traditional practice of gathering data of various participants in one place and performing machine learning modeling on the data is no longer feasible. Therefore, many decision tree models are often based on a single decision tree model established by a single participant. The single decision tree model can process a large amount of data, has poor stability, large generalization error, high resource consumption, and poor effect. In the present embodiment, multiple partners, i.e., multiple participants, cooperate in modeling to ensure the accuracy of the model and improve the efficiency of modeling. Moreover, since it is federal modeling, the privacy of the data can be guaranteed.
[0054] In this embodiment, it should be noted that the interactive decision tree model may include three layers of interaction modes or three layers of interaction meanings:
[0055] Interaction mode 1: refers to that the user can trigger the interactive operation instruction by operating the decision tree model displayed in the visual interactive interface, and then obtain the interactive decision tree model based on the interactive operation instruction, wherein there can be multiple decision tree models displayed in the visual interactive interface;
[0056] Interaction mode 2: Through manual intervention or manual interaction, you can perform common interactive operations such as splitting, deleting nodes, and importing subtrees on the displayed decision tree model;
[0057] Interaction mode three: Through manual intervention or manual interaction, you can adjust node branches, node rules, and other operations on the displayed decision tree model.
[0058] In this embodiment, it should be noted that the application scenario of the federated modeling method of the decision tree model can be: it is necessary to establish a decision tree model that is effective in prediction and has undergone manual intervention. In order to improve the generalization ability of the model, in the modeling process, the personnel involved in the modeling are divided into multiple groups, that is, through multiple groups of manual intervention, each group of participants obtains the decision tree model corresponding to the group based on the intervention method of the group and the data corresponding to the group, and then the decision tree models obtained by multiple groups are federated or combined to obtain the target federated decision tree model. It should be emphasized that in the process of local iterative training of the participants, manual intervention is carried out, such as manual intervention in the selection of reference factors, or the selection of reference factor ranges.
[0059] In this embodiment, it should be noted that the application scenario of the federated modeling method of the decision tree model can also be: it is necessary to establish a classification decision tree model that is effective in prediction and is manually intervened. In order to improve the generalization ability of the model, during the modeling process, the people participating in the modeling are divided into multiple groups, that is, through multiple groups of manual intervention, each group of participants obtains the classification decision tree model corresponding to the group based on the intervention method of the group and the classification data corresponding to the group, and then, the classification decision tree models obtained by multiple groups are federated or combined to obtain the target classification federal decision tree model.
[0060] Specifically, each participant has a classification model data set: X, where X contains n data x1, x2, x3, xi, xn, and each data xi contains k values (xi1, xi2, xi3, xi4, xik). The corresponding model data set of the main participant has a classification label Y: Y contains n data y1, y2, y3, y4, ...
[0061] Or the application scenario of the federated modeling method of the decision tree model can also be: it is necessary to establish a regression decision tree model with effective prediction and manual intervention. In order to improve the generalization ability of the model, during the modeling process, the people participating in the modeling are divided into multiple groups, that is, through multiple groups of manual intervention, each group of participants obtains the regression decision tree model corresponding to the group based on the intervention method of the group and the regression data corresponding to the group, and then, the regression decision tree models obtained by multiple groups are federated or combined to obtain the target federated regression decision tree model.
[0062] Specifically, each participant has a model data set: X, X contains n data x1, x2, x3, xi, xn, each data xi contains k values (xi1, xi2, xi3, xi4, xik). In this embodiment, the model data set corresponds to a label Y: Y contains n data y1, y2, y3, y4, ...
[0063] Receive different model information sent by different federated participants after establishing interactive decision tree models, that is, different participants establish interactive decision tree models through interaction, and then send local corresponding model information to the server, where the model information can include model parameters and other information. Specifically, the model parameters can be the number of decision tree layers, the reference factors (node information) selected for each layer of the decision tree, the range of reference factors, and the weight information of the decision tree branches. Specifically, after establishing the interactive decision tree model, participant A sends the model information corresponding to the interactive decision tree model to the server, and after establishing the interactive decision tree model, participant B sends the model information corresponding to the interactive decision tree model to the server.
[0064] The step of receiving different model information sent by different federation participants after establishing interactive decision tree models respectively includes:
[0065] Step S11, receiving different model information sent by different federation participants after establishing interactive decision tree models respectively;
[0066] Among them, the different federal participants obtain the decision tree model to be operated and the operation task of operating the decision tree model to be operated, and operate the decision tree model to be operated according to the operation task to obtain an interactive decision tree model, and determine the model information according to the interactive decision tree model.
[0067] In this embodiment, the method for each participant to establish an interactive decision tree model is described. Specifically, the training data for training the interactive decision tree model is stored in multiple participants respectively, that is, each participant stores some training data locally, and the server side can establish connections with multiple participants in advance, or the server side can establish connections with the participants when the participants request a connection. It should be noted that this embodiment does not limit the organization method of each participant.
[0068] In the interactive modeling process of each participant, the user of the corresponding participant can trigger the interactive operation instruction by operating the decision tree model displayed in the visual interactive interface. The participant can determine the decision tree model to be operated and the operation task to operate the decision tree model based on the interactive operation instruction. Among them, the operation task is different according to the different interactive operation instructions triggered by the user. For example, if the user wants to prune a node of the decision tree model displayed on the current interface, the interactive operation instruction is triggered through the interactive interface. Then, the decision tree model to be operated obtained by the participant is the decision tree model displayed in the current interface, and the operation task is to prune the node. In order to establish a unified federated model, each participating user needs to determine the corresponding and consistent decision tree model to be operated and the operation task.
[0069] Of course, in order to ensure the uniformity of federated modeling during the interactive modeling process of each participant, the corresponding user on the server side can trigger the interactive operation instruction by operating the decision tree model displayed in the visual interactive interface, and then determine the decision tree model to be operated and the operation task of operating the decision tree model based on the interactive operation instruction. Then, the server side distributes the obtained decision tree models and the corresponding operation tasks to each participant, where the operation tasks are different according to the different interactive operation instructions triggered by the user.
[0070] Specifically, in this embodiment, the operation task may include conventional interactive operations such as pruning nodes, further splitting nodes, deleting nodes, and importing subtrees, and may also include interactive operations such as type prediction and regression prediction. According to different operation tasks, the participants perform different operations on the decision tree model. For example, when the operation task is to perform classification prediction, the participants need to determine the classification prediction rules and then perform predictions based on the classification prediction rules, or when the operation task is to perform regression prediction, the participants need to determine the regression prediction rules and then perform predictions based on the regression prediction rules.
[0071] After each participant performs local operations on the decision tree model, i.e., local training, the participant determines the federated model information based on the decision tree model after the operation. Specifically, each participant continuously performs local iterative training on the decision tree model after the operation through local training data, and in the iterative training process, obtains the model information after manual intervention. For example, the model information after manual intervention includes the branch conditions and branch rules of the decision tree. When the local training is completed, the model information of the trained interactive decision tree model is obtained.
[0072] Specifically, for example, the model information after the training of participant A includes reference factors or node information of age, income and education level, and the branch conditions of the reference factors or node information are age under 35 years old or above, income under 200,000 or above, and education level below or above undergraduate degree, or, for example, the model information after the training of participant B includes reference factors or node information of age, household registration, income, position and credit, and the branch conditions of the reference factors or node information are age under 40 years old or above, income under 150,000 or above, position below or above supervisor, household registration is urban household registration or non-urban household registration, credit is greater than a preset score or less than a preset score, etc.
[0073] Step S20, merging the different model information through a preset algorithm to obtain aggregate model information;
[0074] In this embodiment, after obtaining different model information of different participants, the different model information is merged by a preset algorithm to obtain aggregate model information, wherein the manner of merging by the preset algorithm includes:
[0075] Method 1: Taking the union method;
[0076] Method 2: Taking the intersection method.
[0077] In this embodiment, the method of merging by a preset algorithm specifically refers to a method of taking a union.
[0078] Wherein, the aggregation model information includes node information;
[0079] The step of combining the different model information by a preset algorithm to obtain aggregate model information includes:
[0080] Step S21, based on the different model information, determining whether the same-layer node information of the decision tree models of different federation participants is the same;
[0081] In this embodiment, it should be noted that the decision tree has multi-level branches, and each level of branches, etc. After obtaining different model information, it is determined whether the same-level node information of the decision tree models of different federal participants is the same, specifically, it is determined whether the reference factors of the same-level nodes of the decision tree models of different federal participants are the same.
[0082] Step S22: If the node information of the same layer is different, the node information of the nodes of the same layer is merged to obtain the aggregated node information.
[0083] If the node information of the same layer is different, the node information of the nodes of the same layer is merged to obtain the aggregated node information. Specifically, for example, the reference factors of participant A are age, income and education, and the reference factors of participant B are age, household registration, income, position and credit. Then, after merging the node information of the nodes of the same layer, the reference factors obtained are age, income, education, household registration, position and credit, etc.
[0084] Among them, the node information also includes the reference factor range, that is, after the reference factors are merged, the corresponding range of the merged reference factors. For example, if the reference factor age range of participant A is under 35 years old or over 35 years old, if the reference factor age range of participant B is under 40 years old or over 40 years old, then the merged range is under 35 years old, 35 to 40 years old, and over 40 years old.
[0085] Among them, if the information of nodes in the same layer is the same, the weight information of the reference factor is further aggregated to obtain the aggregated information.
[0086] Alternatively, if the node information of the same layer is different, after the node information is merged, it is necessary to further aggregate the weight information of the reference factors, and then obtain the aggregated information.
[0087] Step S30, distributing the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model;
[0088] After obtaining the aggregate model information, the aggregate model information is distributed to the different federation participants, so that after receiving the aggregate model information, the corresponding local interactive decision tree model is updated, and feedback is given based on the updated interactive decision tree model to determine whether the preset federation training end condition is met. The preset federation training end condition may be that the training reaches a preset number of times, or the accuracy reaches a preset value, and the preset KS value (Kolmogorov-Smirnov), AUC (Area Under the Curve) value and other indicators are met.
[0089] It should be noted that, in this embodiment, the feedback on whether the preset federated training end condition is met can be feedback from the main participant, that is, feedback from the participant with the preset label data set.
[0090] Step S40, if feedback information is received that the preset federal training end condition is not met, return to the step of receiving model information sent by different federal participants after they interactively establish decision tree models, until the corresponding federal participant feedback meets the preset federal training end condition to obtain the target federal decision tree model.
[0091] If the feedback from each participant does not meet the preset federal training end condition, or if the feedback from the main participant (which can be preset) among the participants does not meet the preset federal training end condition, that is, if the server receives feedback information that does not meet the preset federal training end condition, it returns to the step of receiving the model information sent by different federal participants after they interactively establish the decision tree model, that is, each participant re-trains the interactive decision model updated based on the aggregated model information based on the local training data until the feedback from the corresponding federal participant meets the preset federal training end condition to obtain the target federal decision tree model.
[0092] In this embodiment, it should be noted that the preset federated training end condition may be that the training reaches a preset number of times or reaches an AUC indicator, etc.
[0093] The present application provides a federal modeling method, device, storage medium and program product for a decision tree model. Compared with the single decision tree model established based on a single participant in the prior art, which results in poor stability of the decision tree model, large generalization error and high resource consumption, the present application receives different model information sent by different federal participants after they respectively establish interactive decision tree models; merges the different model information through a preset algorithm to obtain aggregate model information; distributes the aggregate model information to the different federal participants, so that the corresponding different federal participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federal training end condition is met based on the updated interactive decision tree model; if feedback information that the preset federal training end condition is not met is received, return to the step of receiving the model information sent by different federal participants after they respectively interactively establish decision tree models, until the corresponding federal participants feedback that the preset federal training end condition is met, so as to obtain the target federal decision tree model. In this application, the joint modeling of decision tree models, especially interactive decision tree models, by multiple federated participants is implemented, so that the modeling process of the interactive decision tree model can use more training data while ensuring privacy, thereby improving the quality and stability of the model and reducing the generalization error of the model.
[0094] Further, based on the first embodiment of the present application, in another embodiment of the present application, the aggregation model information includes decision tree branch rule information;
[0095] The step of combining the different model information by a preset algorithm to obtain aggregate model information further includes:
[0096] Step S23, based on the different model information, determining whether the branch rule information at the same branch position of the decision tree models of different federation participants is the same;
[0097] Step S24: if the branch rule information is different, merge the branch rule information to obtain aggregate branch rule information.
[0098] In this embodiment, it should be noted that the aggregate model information includes decision tree branch rule information. Based on the different model information, it is determined whether the branch rule information at the same branch position of the decision tree models of different federation participants is the same. If the branch rule information is different, the branch rule information is merged to obtain aggregate branch rule information. Among them, the branch rule information mainly includes node weights, and merging the branch rule information includes averaging, summing, etc.
[0099] Specifically, for example, the age branch of participant A accounts for 15%, and the age branch of participant B accounts for 20%, then the age weight proportion obtained after aggregation is (15%+20%) / 2.
[0100] In this embodiment, based on the different model information, it is determined whether the branch rule information at the same branch position of the decision tree models of different federated participants is the same; if the branch rule information is different, the branch rule information is merged to obtain aggregated branch rule information. In this embodiment, the aggregation of branch rule information is achieved to lay the foundation for accurately obtaining the target federated decision tree model.
[0101] Further, based on the first embodiment of the present application, in another embodiment of the present application, the step of distributing the aggregate model information to the different federation participants so that the corresponding different federation participants receive the aggregate model information, update the corresponding local interactive decision tree model, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model, includes:
[0102] Step A1, distributing the aggregate model information to the different federation participants, so that after receiving the aggregate model information, the corresponding different federation participants update the corresponding local interactive decision tree model, and continue to perform local iterative training after reaching a preset number of local training times, and then perform federation training to feedback whether the preset federation training end condition is met;
[0103] The preset federated training termination condition includes reaching a preset number of federated training times or model federated training convergence.
[0104] In this embodiment, it should be noted that the aggregate model information is distributed to the different federation participants so that after the corresponding different federation participants receive the aggregate model information, they update the corresponding local interactive decision tree model, and continue to perform local iterative training until the preset number of local training times is reached, and then perform federal training to provide feedback on whether the preset federal training end condition is met. That is, in this embodiment, after each aggregation, the participant updates the local interactive decision tree model based on the aggregate model information, and after the update, continues to perform local training based on the local training data of the participant until the local iterative training reaches the preset number of local training times, and then performs aggregation of model parameters, and continuously repeats the process of local training and model parameter aggregation until the preset federal training end condition is met.
[0105] In this embodiment, different model information sent by different federation participants after establishing interactive decision tree models respectively is received; wherein the different federation participants obtain the decision tree model to be operated and the operation task to operate the decision tree model to be operated, and operate the decision tree model to be operated according to the operation task to obtain the interactive decision tree model, and determine the model information according to the interactive decision tree model. This lays the foundation for accurately obtaining the target federation decision tree model.
[0106] Further, based on the first embodiment of the present application, in another embodiment of the present application, the meal photo, Figure 2 , if feedback information that the preset federation training end condition is not met is received, the step of returning to the step of receiving model information sent by different federation participants after interactively establishing decision tree models, until the corresponding federation participant feedbacks that the preset federation training end condition is met to obtain the step of obtaining the target federation decision tree model, the method includes:
[0107] Step S50, obtaining data to be processed, and inputting the data to be processed into the target federated decision tree model;
[0108] Step S60: performing prediction processing on the data to be processed based on the target federated decision tree model to obtain a prediction result.
[0109] In this embodiment, after obtaining the target federated decision tree model, if data to be processed is detected, the data to be processed is obtained and input into the target federated decision tree model. Since the target federated decision tree model is a trained model, the data to be processed can be predicted based on the target federated decision tree model to obtain a prediction result, which can be a classification result or a prediction probability value.
[0110] After the step of performing prediction processing on the data to be processed based on the target federated decision tree model to obtain a prediction result, the method includes:
[0111] Step S70, determining prediction basis information corresponding to the prediction result based on the target federated decision tree model;
[0112] Step S80, outputting the prediction basis information.
[0113] In this embodiment, after obtaining the prediction result, the prediction basis information corresponding to the prediction result is determined based on the target federal decision tree model. Specifically, the prediction basis information includes the reference factors of each layer of nodes, the range of each reference factor, and the corresponding node probability, etc. The prediction basis information is output for user viewing or subsequent query.
[0114] In this embodiment, by obtaining the data to be processed, the data to be processed is input into the target federated decision tree model; the data to be processed is predicted based on the target federated decision tree model to obtain a prediction result. In this embodiment, the target federated decision tree model is used to accurately predict the data to be processed.
[0115] Further, based on the first embodiment of the present application, in another embodiment of the present application, the data to be processed includes loan data to be processed, or medical data to be processed;
[0116] The step of performing prediction processing on the data to be processed based on the target federated decision tree model to obtain a prediction result includes:
[0117] Step S61, if the data to be processed is loan data to be processed, predicting the loan data to be processed based on the target federated decision tree model to obtain a prediction result of whether the loan can be obtained;
[0118] Step S62, or if the data to be processed is medical data to be processed, predictive processing is performed on the medical data to be processed based on the target federated decision tree model to obtain a probability value that the medical data to be processed is a preset result.
[0119] In this embodiment, after the federated modeling method of the decision tree model models the target federated decision tree model, it can be applied to the prediction of the type of loan or not, or it can be applied to the prediction of nodule probability in the medical field. Specifically, if the data to be processed is the loan data to be processed, the loan data to be processed is predicted based on the target federated decision tree model to obtain the prediction result of whether the loan can be obtained, and the prediction result can be that the loan can be given to the user or not. If the data to be processed is the medical data to be processed, the medical data to be processed is predicted based on the target federated decision tree model to obtain the probability value of the medical data to be processed being the preset result. Among them, the preset result can be a lung nodule, and the probability value can be 0.9 or 0.8, etc.
[0120] In this embodiment, if the data to be processed is loan data to be processed, the loan data to be processed is predicted based on the target federated decision tree model to obtain a prediction result of whether a loan can be obtained; or if the data to be processed is medical data to be processed, the medical data to be processed is predicted based on the target federated decision tree model to obtain a probability value that the medical data to be processed is a preset result. In this embodiment, the medical data to be processed and the loan data to be processed are accurately processed through the target federated decision tree model.
[0121] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0122] like Figure 3 As shown, the federated modeling device of the decision tree model may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0123] Optionally, the federated modeling device of the decision tree model may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0124] Those skilled in the art will understand that Figure 3 The structure of the federated modeling device of the decision tree model shown in the figure does not constitute a limitation on the federated modeling device of the decision tree model, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0125] like Figure 3 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, and a federated modeling method program for a decision tree model. The operating system is a program that manages and controls the hardware and software resources of the federated modeling device for the decision tree model, and supports the operation of the federated modeling method program for the decision tree model and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and to communicate with other hardware and software in the federated modeling method system for the decision tree model.
[0126] exist Figure 3 In the federal modeling device of the decision tree model shown, the processor 1001 is used to execute the federal modeling method program of the decision tree model stored in the memory 1005 to implement the steps of the federal modeling method of the decision tree model described in any one of the above items.
[0127] The specific implementation of the federal modeling device of the decision tree model of the present application is basically the same as the various embodiments of the federal modeling method of the decision tree model mentioned above, and will not be repeated here.
[0128] The embodiment of the present application further provides a federated modeling device of a decision tree model, which is applied to a server side. The federated interactive modeling device of the decision tree model includes:
[0129] A receiving module, used for receiving different model information sent by different federation participants after they respectively establish interactive decision tree models;
[0130] A preset algorithm merging module is used to merge the different model information through a preset algorithm to obtain aggregate model information;
[0131] A distribution module, used to distribute the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive decision tree model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive decision tree model;
[0132] The first acquisition module is used to return to the step of receiving model information sent by different federal participants after they interactively establish decision tree models if feedback information is received that the preset federal training end conditions are not met, until the corresponding federal participant feedback meets the preset federal training end conditions to obtain the target federal decision tree model.
[0133] Optionally, the federated modeling device of the decision tree model further includes:
[0134] A second acquisition module is used to acquire data to be processed and input the data to be processed into the target federated decision tree model;
[0135] The prediction module is used to perform prediction processing on the data to be processed based on the target federated decision tree model to obtain a prediction result.
[0136] Optionally, the device further comprises:
[0137] A prediction basis information determination unit, used to determine prediction basis information corresponding to the prediction result based on the target federated decision tree model;
[0138] An output unit is used to output the prediction basis information.
[0139] Optionally, the aggregation model information includes node information;
[0140] The merging module by a preset algorithm includes:
[0141] A first determining unit, configured to determine whether the same-layer node information of the decision tree models of different federation participants is the same based on the different model information;
[0142] The first merging unit is used to merge the node information of the nodes in the same layer to obtain aggregated node information if the node information in the same layer is different.
[0143] Optionally, the aggregation model information includes decision tree branch rule information;
[0144] The merging module by a preset algorithm also includes:
[0145] A second determination unit is used to determine whether branch rule information at the same branch position of decision tree models of different federation participants is the same based on the different model information;
[0146] The second merging unit is used to merge the branch rule information to obtain aggregated branch rule information if the branch rule information is different.
[0147] Optionally, the receiving module includes:
[0148] A receiving unit, used for receiving different model information sent by different federation participants after establishing interactive decision tree models respectively;
[0149] Among them, the different federal participants obtain the decision tree model to be operated and the operation task of operating the decision tree model to be operated, and operate the decision tree model to be operated according to the operation task to obtain an interactive decision tree model, and determine the model information according to the interactive decision tree model.
[0150] Optionally, the distribution module includes:
[0151] A distribution unit, used for distributing the aggregate model information to the different federation participants, so that after receiving the aggregate model information, the corresponding different federation participants update the corresponding local interactive decision tree model, and continue to perform local iterative training after reaching a preset number of local training times, and then perform federation training to feedback whether the preset federation training end condition is met;
[0152] The preset federated training termination condition includes reaching a preset number of federated training times or model federated training convergence.
[0153] The specific implementation of the federal modeling device of the decision tree model of the present application is basically the same as the various embodiments of the federal modeling method of the decision tree model mentioned above, and will not be repeated here.
[0154] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for federated modeling of the decision tree model described in any one of the above items.
[0155] The specific implementation of the computer program product of the present application is basically the same as the various embodiments of the federal modeling method of the above-mentioned decision tree model, and will not be repeated here.
[0156] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A loan prediction method, characterized in that: Applied to the server side, the loan prediction method includes: Receiving different model information sent by different federation participants after establishing interactive loan prediction models respectively, wherein the interactive loan prediction model is an interactive decision tree model, and the model information includes branch conditions and branch rules of the decision tree with respect to user privacy data; Merging the different model information by a preset algorithm to obtain aggregate model information; Distribute the aggregate model information to the different federation participants, so that the corresponding different federation participants update the corresponding local interactive loan prediction model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive loan prediction model; If feedback information that the preset federal training end condition is not met is received, return to the step of receiving model information sent by different federal participants after they interactively establish loan prediction models, until the feedback from the corresponding federal participants meets the preset federal training end condition, so as to obtain the target federal loan prediction model; Acquire the user's pending loan data, and input the pending loan data into the target federal loan prediction model; Performing prediction processing on the loan data to be processed based on the target federal loan prediction model to obtain a prediction result, wherein the prediction result includes whether the loan can be provided to the user or whether the loan cannot be provided to the user; Determining prediction basis information corresponding to the prediction result based on the target federal loan prediction model; The prediction basis information is output, and the prediction basis information includes a reference factor of each layer of nodes, a range of each reference factor, and a corresponding node probability.
2. The loan prediction method according to claim 1, characterized in that: The aggregation model information includes node information; The step of combining the different model information by a preset algorithm to obtain aggregate model information includes: Based on the different model information, determining whether the same-layer node information of the loan prediction models of different federal participants is the same; If the node information of the same layer is different, the node information of the nodes of the same layer is merged to obtain the aggregated node information.
3. The loan prediction method according to claim 1, characterized in that: The aggregation model information includes decision tree branch rule information; The step of combining the different model information by a preset algorithm to obtain aggregate model information further includes: Based on the different model information, determining whether branch rule information at the same branch position of loan prediction models of different federal participants is the same; If the branch rule information is different, the branch rule information is merged to obtain aggregated branch rule information.
4. The loan prediction method according to claim 1, characterized in that: The step of receiving different model information sent by different federal participants after they respectively establish interactive loan prediction models includes: Receiving different model information sent by different federal participants after establishing interactive loan prediction models respectively; Among them, the different federal participants obtain the loan prediction model to be operated and the operation task of operating the loan prediction model to be operated, and operate the loan prediction model to be operated according to the operation task to obtain an interactive loan prediction model, and determine the model information according to the interactive loan prediction model.
5. The loan prediction method according to claim 1, characterized in that: The step of distributing the aggregate model information to the different federation participants so that the corresponding different federation participants update the corresponding local interactive loan prediction model after receiving the aggregate model information, and feedback whether the preset federation training end condition is met based on the updated interactive loan prediction model, includes: Distribute the aggregate model information to the different federation participants, so that after receiving the aggregate model information, the corresponding different federation participants update the corresponding local interactive loan prediction model, and continue to perform local iterative training after reaching a preset number of local training times, and then perform federal training to provide feedback on whether the preset federal training end condition is met; The preset federated training termination conditions include reaching a preset number of federated training times or model federated training convergence.
6. A loan prediction device, characterized in that: The loan prediction device comprises: a memory, a processor, and a program stored in the memory for implementing the loan prediction method. The memory is used to store a program for implementing the loan prediction method; The processor is used to execute a program for implementing the loan prediction method to implement the steps of the loan prediction method as claimed in any one of claims 1 to 5.
7. A readable storage medium, characterized in that: The readable storage medium stores a program for implementing the loan prediction method, and the program for implementing the loan prediction method is executed by a processor to implement the steps of the loan prediction method as claimed in any one of claims 1 to 5.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the loan prediction method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Interactive modeling method and device for decision tree model, equipment and storage medium
CN110782340A
Model parameter training method and device based on federated learning and mutual learning
CN112039702A