Federal learning model generation method, electronic equipment, storage medium and program product

By aligning the existing decision tree model with the data provider's features in sequence and converting it into a federated learning model, the problem of waste of training resources of federated learning model is solved, efficient model conversion and application is achieved, and performance and privacy are ensured.

CN119204168APending Publication Date: 2024-12-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411265078.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The training process of federated learning models consumes a lot of resources, affecting modeling efficiency, especially after the participants already have a traditional modeling method, it needs to be retrained, resulting in repeated work and waste of computing resources.

Method used

A federated learning model generation method is adopted, and the existing decision tree model is aligned with the feature order of the data provider, and the update decision tree model is generated and converted into the federated learning model format, and imported into the basic federated learning model to retain the existing decision tree. The leaf node weight information of the model avoids retraining.

Benefits of technology

The traditional decision tree model is converted into a federated learning model, which ensures model performance, saves training costs, time and computing resources, improves the construction and application efficiency of federated learning models, and ensures data privacy and feature name matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119204168A_ABST
    Figure CN119204168A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning model generation method, electronic equipment, a storage medium and a program product, and relates to the technical field of federated learning, and the federated learning model generation method comprises the following steps: aligning a feature sequence in a stock decision tree model with a feature sequence of a data provider to obtain an updated decision tree model; sending the updated decision tree model to a data provider, so that the data provider replaces feature names of non-leaf nodes in the updated decision tree model with feature names of local data to obtain a corresponding tree structure; establishing a basic federated learning model based on preset pseudo data, and importing leaf nodes of the stock decision tree model into the basic federated learning model; and generating a target federated learning model based on the basic federated learning model after the leaf nodes are imported and the tree structure imported by the data provider. According to the technical scheme, a traditional stock decision tree model is converted into the federal learning model, and the modeling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of federated learning technology, and in particular to a method for generating a federated learning model, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Federated learning models are widely used in scenarios where rich data is needed for joint modeling and where data privacy and data value sharing security need to be protected. In the training process of the federated learning model, the data provider usually outputs the data to the other party first, and the other party completes the training of the joint model locally. Then the two parties deploy it on the federated learning modeling platform and import the training data to train the federated learning model. Since the above modeling method builds the federated learning model from scratch, it requires a lot of manpower, computing resources and time costs. Especially after the federated learning participants have applied the model formed by the traditional modeling method, retraining the federated learning model will cause duplication of work, affect the modeling efficiency, and cause a waste of computing resources.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a federated learning model generation method, electronic device, computer-readable storage medium and computer program product, aiming to solve the technical problem that the training process of the federated learning model consumes a lot of resources and affects the modeling efficiency.

[0005] To achieve the above-mentioned purpose, the present application proposes a method for generating a federated learning model, which is applied to a model provider, wherein the model provider deploys an existing decision tree model, the model provider is in communication connection with a data provider, and the data provider stores user financial data. The method for generating a federated learning model includes:

[0006] Aligning the feature order in the stock decision tree model with the feature order of the data provider to obtain an updated decision tree model, wherein the stock decision tree model is used to predict the user's financial risk assessment results based on the user's financial data;

[0007] Sending the updated decision tree model to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain a corresponding tree structure;

[0008] Establishing a basic federated learning model based on preset pseudo data, and importing the leaf nodes of the stock decision tree model into the basic federated learning model;

[0009] Based on the basic federated learning model after importing the leaf nodes and the tree structure imported by the data provider, a target federated learning model is generated, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

[0010] In one embodiment, the federated learning model generation method further includes:

[0011] Deleting the weight information of the leaf nodes in the existing decision tree model;

[0012] Deleting weight information of non-leaf nodes in the existing decision tree model;

[0013] Based on the existing decision tree model after deleting the weight information of the leaf nodes and non-leaf nodes, the step of aligning the feature order in the existing decision tree model with the feature order of the data provider is performed.

[0014] In one embodiment, after the step of aligning the feature sequence in the existing decision tree model with the feature sequence of the data provider to obtain an updated decision tree model, the method further includes:

[0015] Converting the file format of the updated decision tree model into the file format of a preset federated learning model;

[0016] Based on the updated decision tree model after format conversion, the step of sending the updated decision tree model to the data provider is performed.

[0017] In one embodiment, the model provider deploys a federated learning system, and the step of establishing a basic federated learning model based on preset pseudo data includes:

[0018] Acquire pseudo data with a preset number of features, wherein the preset number of features is consistent with the number of pseudo data features used by the data provider to establish a basic federated learning model;

[0019] A basic federated learning model is established in the federated learning system according to the pseudo data, wherein the basic federated learning model is consistent with the basic federated learning model established by the data provider.

[0020] In one embodiment, the federated learning model generation method further includes:

[0021] Obtain the user ID that needs to be risk assessed;

[0022] Sending the user identifier to the data provider, wherein the data provider inputs the user financial data corresponding to the user identifier into the target federated learning model;

[0023] The target federated learning model is used to predict the financial risk assessment result corresponding to the user identifier, and the financial risk assessment result is obtained.

[0024] The present application also proposes a method for generating a federated learning model, which is applied to a data provider, wherein the data provider stores user financial data, the data provider is in communication connection with a model provider, and the model provider deploys an existing decision tree model. The method for generating a federated learning model includes:

[0025] Receiving an updated decision tree model sent by a model provider, wherein a feature sequence of the updated decision tree model is aligned with a feature sequence of the data provider;

[0026] Replacing the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain a processed tree structure;

[0027] Establishing a basic federated learning model based on preset pseudo data, and importing the tree structure into the basic federated learning model;

[0028] Based on the basic federated learning model after importing the tree structure and the leaf nodes imported by the model provider, a target federated learning model is generated, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

[0029] In one embodiment, the federated learning model generation method further includes:

[0030] After receiving the user identifier sent by the model provider, determining the user financial data corresponding to the user identifier in the local data;

[0031] The user financial data is input into the target federated learning model to predict the financial risk assessment result corresponding to the user identifier through the target federated learning model, and the financial risk assessment result is output to the model provider.

[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the federated learning model generation method as described above.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the federated learning model generation method described above are implemented.

[0034] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the federated learning model generation method described above.

[0035] The present application proposes a method for generating a federated learning model, in which a model provider deploys a stock decision tree model, the model provider is in communication connection with a data provider, and the data provider stores user financial data. In the method for generating a federated learning model applied to the model provider, the feature order in the stock decision tree model is first aligned with the feature order of the data provider to obtain an updated decision tree model, wherein the stock decision tree model is used to predict the user's financial risk assessment results based on the user's financial data, so that the data provider can replace the feature names of non-leaf nodes with the feature names of local data, which is conducive to the fusion of the stock decision tree model and the data features, and then the updated decision tree model is sent to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain the corresponding A tree structure is formed, so that the tree structure integrates the feature names of local data, so as to utilize the data provided by the data provider, and then establish a basic federated learning model based on preset pseudo data, and import the leaf nodes of the stock decision tree model into the basic federated learning model, and then generate a target federated learning model based on the basic federated learning model after the leaf nodes are imported and the tree structure imported by the data provider, wherein the target federated learning model is used to predict the financial risk assessment results of the user based on the user's financial data, and the target federated learning model utilizes the leaf nodes of the stock decision tree model, and the weight information therein is retained, thereby ensuring that the evaluation effect of the target federated learning model is consistent with that of the original stock decision tree model and no retraining is required, and the data structure is provided by the data provider, thereby ensuring the privacy of the data and the feature name matching between the target federated learning model and the data provider's data.

[0036] The technical solution of this application realizes the conversion of the traditional existing decision tree model into the corresponding federated learning model, which not only ensures the performance of the model, but also eliminates the need for the participants to retrain the federated learning model in the actual business scenario, saving a lot of training costs, time and computing power resources, and effectively improving the construction and application efficiency of the federated learning model. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] 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.

[0038] 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.

[0039] Figure 1 A flowchart of a method for generating a federated learning model applied to a model provider in an embodiment of the present application;

[0040] Figure 2 A timing diagram for generating a target federated learning model in the federated learning model generation method of this application;

[0041] Figure 3 A timing diagram of applying the target federated learning model to perform user financial risk assessment in an embodiment of the present application;

[0042] Figure 4 A flowchart of a method for generating a federated learning model applied to a data provider in an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the federated learning model generation method 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 technical solutions of the present application and are not used to limit the present application.

[0046] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0047] The execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a server, etc., or an electronic device, a control device, etc. capable of realizing the above functions. The following takes a computer as an execution subject as an example to illustrate this embodiment and the following embodiments.

[0048] This application embodiment provides a method for generating a federated learning model. Figure 1 , Figure 1This is a flow chart of a method for generating a federated learning model applied to a model provider in an embodiment of the present application. The model provider deploys an existing decision tree model. The model provider is in communication connection with a data provider. The data provider stores user financial data. The method for generating a federated learning model includes:

[0049] Step S10, aligning the feature order in the stock decision tree model with the feature order of the data provider to obtain an updated decision tree model, wherein the stock decision tree model is used to predict the user's financial risk assessment results based on the user's financial data;

[0050] It should be noted that the stock decision tree model refers to the decision tree model trained by the model provider unilaterally using a non-federated learning method, which can predict the corresponding financial risk assessment results based on the input user financial data. The model has been put into use in actual business scenarios, and its performance and accuracy meet business needs. In some business scenarios, in order to avoid leakage of user privacy data and ensure data security, it is necessary to further generate a corresponding federated learning model to achieve data privacy protection while realizing secure data sharing and joint modeling.

[0051] The model provider refers to the party that provides the existing decision tree model. The parties involved in federated learning usually include data providers and application parties (or business parties). The application party refers to the party that needs to apply the federated learning model to obtain prediction results. In the financial field, the data provider can be a financial institution that stores user financial data, and the application party refers to other financial institutions or other types of business institutions that need to obtain the user's financial risks. In order to ensure that the user's financial data is not leaked, the data provider is responsible for providing the user's financial data to the federated learning model. The application party can only obtain the prediction results (i.e., financial risk assessment results) output by the federated learning model, and will not access the original user's financial data, thus ensuring the user's data privacy.

[0052] Among them, the model provider is the holder of the stock decision tree model, which can be either the application party or the data provider. Usually, the holder of the stock decision tree model is the application party, and the application and data provider are relatively independent. One party provides the stock decision tree model and the other party provides the user's financial data, so as to separate the prediction results from the user's financial data and better ensure the privacy of the user's financial data and financial risk assessment results.

[0053] It is understandable that in order to make the stock decision tree model match the local data of the data provider, it is necessary to align the feature order in the stock decision tree model with the feature order of the data provider to obtain the aligned stock decision tree model, so that the data provider can replace the feature names of the non-leaf nodes in the updated decision tree model with the feature names of the local data, and provide a data basis for the tree structure of the new federated learning model. Among them, the model provider and the data provider can communicate online or offline in advance to receive the feature order provided by the data provider, so that the model provider can align the feature order of the stock decision tree model.

[0054] Step S20, sending the updated decision tree model to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain a corresponding tree structure;

[0055] In order to integrate the tree structure of the existing decision tree model with the local data features of the data provider, the processed updated decision tree model should be sent to the data provider so that the data provider can replace the decision features of the non-leaf nodes in the updated decision tree model to obtain the corresponding tree structure and prepare for the generation of the federated learning model.

[0056] It should be noted that before step S20, the model provider, data provider and other participating parties need to prepare the data dictionary corresponding to the existing decision tree model, which is used for the data provider to provide a reference for the decision features of the leaf nodes in the replacement and update decision tree model. The data dictionary of the data provider can be provided by the model provider.

[0057] Step S30, establishing a basic federated learning model based on preset pseudo data, and importing the leaf nodes of the existing decision tree model into the basic federated learning model;

[0058] Among them, pseudo data refers to non-real user financial data, which can be sample data similar to real data generated on the basis of existing real data through a series of algorithms and models. These samples are not observational data in the real world, but are generated by computers. Their purpose is to expand and enrich the existing data set so that it can be applied in the process of building a basic federated learning model. The process of establishing a basic federated learning model is equivalent to the step of initializing the model in the federated learning system. The model has not been trained with real user financial data, and only has a preliminary architecture. It is necessary to further enrich the model hierarchy and model parameter characteristics. Among them, the type of this basic federated learning model belongs to the decision tree model.

[0059] In order to make the final target federated learning model have the same prediction ability and application effect as the stock decision tree model, it is necessary to import the leaf nodes (including weight information) of the stock decision tree model into the basic federated learning model. The weight information included in the leaf nodes is obtained in the process of establishing and training the stock decision tree model, which is the training result of the stock decision tree model. Directly applying these leaf nodes in the process of generating the federated learning model can effectively reduce the cost of secondary training, save computer computing resources, and more efficiently apply the stock decision tree model to generate the corresponding federated learning model, which is suitable for business scenarios that need to protect user privacy.

[0060] Step S40, generating a target federated learning model based on the basic federated learning model after importing the leaf nodes and the tree structure imported by the data provider, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

[0061] In addition to importing the leaf nodes of the stock decision tree model into the basic federated learning model, the federated learning model also needs to be combined with the characteristics of the local data of the data provider. Therefore, the data provider also imports the tree structure obtained in the aforementioned step S20 into the basic federated learning model, so that the basic federated learning model has both the leaf nodes of the stock decision tree model and the tree structure corresponding to the local data of the data provider. Therefore, the target federated learning model finally obtained can perform risk prediction based on the user financial data provided by the data provider, and has the same risk prediction ability as the stock decision tree model, thereby outputting the financial risk assessment results corresponding to the user financial data.

[0062] Among them, the financial risk assessment result can be a binary classification result, such as risk or no risk, or one of the preset risk levels, or a numerical form (such as a percentage), which can be set according to the needs of the actual business scenario.

[0063] The embodiment of the present application proposes a method for generating a federated learning model, in which a model provider deploys an existing decision tree model, the model provider is in communication connection with a data provider, and the data provider stores user financial data. In the method for generating a federated learning model applied to the model provider, the feature order in the existing decision tree model is first aligned with the feature order of the data provider to obtain an updated decision tree model, wherein the existing decision tree model is used to predict the user's financial risk assessment results based on the user's financial data, so that the data provider can replace the feature names of non-leaf nodes with the feature names of local data, which is conducive to the fusion of the existing decision tree model and the data features, and then the updated decision tree model is sent to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain the corresponding A tree structure is formed so that the tree structure integrates local data feature names, so as to utilize the data provided by the data provider, and then establish a basic federated learning model based on preset pseudo data, import the leaf nodes of the stock decision tree model into the basic federated learning model, and then generate a target federated learning model based on the basic federated learning model after the leaf nodes are imported and the tree structure imported by the data provider, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data, and the target federated learning model utilizes the leaf nodes of the stock decision tree model, and the weight information therein is retained, thereby ensuring that the evaluation effect of the target federated learning model is consistent with that of the original stock decision tree model and no retraining is required, and the data structure is provided by the data provider, thereby ensuring the privacy of the data and the feature name matching between the target federated learning model and the data provider's data.

[0064] The technical solution of the embodiment of the present application realizes the conversion of the traditional existing decision tree model into a corresponding federated learning model, which not only ensures the performance of the model, but also eliminates the need for the participants to retrain the federated learning model in actual business scenarios, saving a lot of training costs, time and computing power resources, and effectively improving the construction and application efficiency of the federated learning model.

[0065] Furthermore, in a feasible implementation manner, the federated learning model generation method further includes:

[0066] Step S11, deleting the weight information of the leaf nodes in the existing decision tree model;

[0067] Step S12, deleting the weight information of non-leaf nodes in the existing decision tree model;

[0068] Step S13, based on the existing decision tree model with the weight information of the leaf nodes and non-leaf nodes deleted, execute the step of aligning the feature order in the existing decision tree model with the feature order of the data provider.

[0069] Normally, the data provider is not the user of the model and is only used to provide user financial data. The user's financial risk assessment results predicted based on the user's financial data belong to the user's privacy, and the data provider has no right to read them. The existing decision tree model needs to be sent to the data provider so that the data provider can replace the feature names of the non-leaf nodes with the feature names of the local data. If the weight information of the leaf nodes and non-leaf nodes is retained in the updated decision tree model sent to the data provider, it is easy to generate the risk that the data provider can infer the financial risk assessment results of each user in the local data by updating the decision tree model, and there is a possibility of privacy leakage.

[0070] Therefore, in the federated learning model generation method of the embodiment of the present application, the model provider first erases the weight information of all leaf nodes and non-leaf nodes in its own existing decision tree model to eliminate the risk that the data provider infers the user's financial risk assessment results based on this information.

[0071] In a feasible implementation manner, after the step of aligning the feature sequence in the existing decision tree model with the feature sequence of the data provider to obtain an updated decision tree model, the method further includes:

[0072] Step S21, converting the file format of the updated decision tree model into the file format of a preset federated learning model;

[0073] Step S22, based on the updated decision tree model after format conversion, execute the step of sending the updated decision tree model to the data provider.

[0074] In order to convert the decision tree model established by traditional methods into the form of a federated learning model, the updated decision tree model needs to be formatted before being sent to the data provider.

[0075] Exemplarily, the data provider can use a pre-written script or tool to convert the file format corresponding to the processed updated decision tree model into the model file format required by the federated learning system, so as to facilitate importing into the federated learning system and thus construct a target federated learning model that can be put into use. For example, the file formats of the stock decision tree model and the decision tree model before format conversion are usually text (txt), DOT (dot) and other formats, while the file format of the federated learning model is usually binary format (such as pt, pth, pkl, etc.), text format (such as json, yaml, etc.) and also involves the characteristics of distributed storage and processing.

[0076] In addition, during the format conversion process, it is necessary to align the feature names and feature values ​​of the traditional decision tree model with those of the data provider. After the file format of the updated decision tree model is converted into the file format of the federated learning model, the updated decision tree model in the file format of the federated learning model is sent to the data provider.

[0077] Furthermore, when the leaf node of the existing decision tree model is imported into the basic federated learning model in step S30, the file format corresponding to the leaf node is also the file format of the converted federated learning model, which is conducive to better integration with the basic federated learning model and the tree structure imported by the data provider, thereby obtaining the target federated learning model.

[0078] In a feasible embodiment, the model provider deploys a federated learning system, and the step of establishing a basic federated learning model based on preset pseudo data includes:

[0079] Step S31, obtaining pseudo data with a preset number of features, wherein the preset number of features is consistent with the number of pseudo data features used by the data provider to establish a basic federated learning model;

[0080] Step S32: establishing a basic federated learning model in the federated learning system based on the pseudo data, wherein the basic federated learning model is consistent with the basic federated learning model established by the data provider.

[0081] Among them, when the model provider uses pseudo data for modeling, the number of features is the same as the number of pseudo data features used by the data provider when modeling. Since the embodiment of the present application essentially discloses a method for converting an existing decision tree model into a federated learning model, there is no need to use real data to train the federated learning model. Moreover, in a federated learning scenario, the data of the participants are usually highly sensitive, so the use of pseudo data for preliminary modeling in the embodiment of the present application can build a model without exposing real data. Moreover, by generating pseudo data, the federated learning model can complete the preliminary model construction based on simulated data while protecting user data.

[0082] The basic federated learning model established by the model provider in step S32 is consistent with the basic federated learning model established by the data provider. Both can create a basic machine learning or deep learning model (type is a decision tree model) as a basic federated learning model on the central server of the federated learning system or the local participant to complete the initialization of the federated learning model. Unlike the traditional federated learning model, after the basic federated learning model is established, no further model training is required. The model provider and the data provider only need to import the leaf nodes and tree structure respectively, so as to realize the use of the model parameters of the stock decision tree model to quickly complete the parameter adjustment and learning of the federated learning model, and efficiently obtain the target federated learning model consistent with the performance of the stock decision tree model.

[0083] Furthermore, in a feasible embodiment, the method for generating a federated learning model further includes:

[0084] Step A10, obtaining the user identification for which risk assessment is required;

[0085] Step A20, sending the user identifier to the data provider, wherein the data provider inputs the user financial data corresponding to the user identifier into the target federated learning model;

[0086] Step A30, predicting the financial risk assessment result corresponding to the user identifier through the target federated learning model, and obtaining the financial risk assessment result.

[0087] The embodiment of the present application also provides a method for predicting the financial risk of a user by applying the target federated learning model after the target federated learning model is successfully converted. Among them, the model provider can be a business party, which is equivalent to the application party of the model, that is, the party that needs to make business decisions (such as whether to pass the loan request and determine the specific loan amount) based on the user's financial risk assessment results in a specific business scenario. In this case, the business party has the need to obtain the user's financial risk assessment results. In order to protect user privacy, the data provider does not have the right to read the financial risk assessment results. In addition, the data provider is responsible for providing user financial data (including user basic information, consumption income information, and historical financial business information, etc.). In order to protect privacy, the business party does not have the right to read this part of the user's financial data. For the above reasons, this assessment process of user financial risk can be completed using the generated federated learning model.

[0088] Specifically, the business party determines one or more user IDs that need to be risk assessed based on actual needs, and then sends them to the data provider for the data provider to align the user IDs (IDs) and determine the information of one or a group of users. The data provider can query the user financial data corresponding to these user IDs in the local data, and input them into the target federated learning model in turn. The target federated learning model performs risk assessment and prediction on the users corresponding to these user IDs, thereby determining the financial risk assessment results corresponding to each user ID.

[0089] In another feasible embodiment, the federated learning model generation method of the embodiment of the present application can be applied to various scenarios, such as financial risk control modeling, Internet marketing modeling, and other application scenarios, and has broad application prospects.

[0090] For ease of understanding, combined with the contents of the aforementioned application embodiments, a feasible method for generating a federated learning model is described as follows: Figure 2 As shown, the model provider (i.e., the application party) first erases the weight information of all leaf nodes and non-leaf nodes in the existing tree model, and then aligns the feature order with the data provider to obtain the corresponding updated decision tree model, and then converts the model file of the updated decision tree model into the model file format corresponding to the federated learning system, and then sends the updated decision tree model after eliminating risks to the data provider; after receiving the updated decision tree model, the data provider replaces the decision features of the non-leaf nodes in the updated decision tree model with the feature names corresponding to the local features based on the data dictionary to obtain the processed tree structure; the model provider and the data provider respectively use pseudo data with the same number of features for modeling to obtain a basic federated learning model, the model provider imports the leaf nodes into the basic federated learning model, and the data provider imports the processed tree structure into the basic federated learning model to obtain the target federated learning model.

[0091] Reference Figure 3 When the business party (i.e., the model provider) needs to predict the user's financial risk, the user ID is sent to the data provider for the data provider to align the user ID. The data provider queries the user's financial data corresponding to the user ID and inputs it into the target federated learning model. The target federated learning model predicts and outputs the corresponding financial risk assessment results to the business party.

[0092] The present application also provides a method for generating a federated learning model applied to a data provider, wherein the data provider stores user financial data, the data provider is in communication connection with a model provider, and the model provider deploys an existing decision tree model, referring to Figure 4 , Figure 4 The following is a flow chart of a method for generating a federated learning model applied to a data provider in an embodiment of the present application. The method for generating a federated learning model includes:

[0093] Step B10, receiving an updated decision tree model sent by a model provider, wherein the feature sequence of the updated decision tree model is aligned with the feature sequence of the data provider;

[0094] Step B20, replacing the feature names of non-leaf nodes in the updated decision tree model with the feature names of the local data to obtain a processed tree structure;

[0095] Step B30, establishing a basic federated learning model based on preset pseudo data, and importing the tree structure into the basic federated learning model;

[0096] Step B40, generating a target federated learning model based on the basic federated learning model after the tree structure is imported and the leaf nodes imported by the model provider, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

[0097] In the process of generating a federated learning model, the data provider is mainly used to provide user financial data. It is understandable that since the purpose of generating a federated learning model is to evaluate the user's financial risk based on the user's financial data provided by the data provider, the tree structure of the federated learning model needs to be consistent with the local data feature name of the data provider.

[0098] After the data provider receives the updated decision tree model (converted into the file format of the federated learning model) sent by the model provider, the feature names of the non-leaf nodes are replaced with the feature names of the local data to obtain a localized tree structure.

[0099] Similar to step S31 to step S32, in step B30, the data provider uses the same number of features to model the pseudo data, and can create a basic machine learning or deep learning model (type is a decision tree model) as the basic federated learning model on the central server of the federated learning system or the local participator, complete the initialization of the federated learning model, and then import the processed tree structure, so that the basic federated learning model has both the characteristics of the leaf nodes of the stock decision tree model and the characteristics of the local data of the data provider. Therefore, the target federated learning model finally obtained can perform risk prediction based on the user financial data provided by the data provider, and has the same risk prediction ability as the stock decision tree model, thereby outputting the financial risk assessment results corresponding to the user financial data.

[0100] In a feasible embodiment, the updated decision tree model received by the data provider has the weight information of the leaf nodes and non-leaf nodes erased, which can effectively prevent the data provider from inferring the financial risk assessment results corresponding to the locally stored user financial data based on the updated decision tree model and weight information, thereby protecting the privacy of the user. Therefore, while performing joint modeling on the basis of protecting data security and privacy, the embodiment of the present application overcomes the defect of abandoning the existing decision tree model and re-performing federated modeling, which will lead to repeated investment in modeling work. It not only ensures that the effects of the federated learning model and the existing decision tree model are consistent, but also improves the efficiency of the modeling application work.

[0101] Furthermore, in a feasible embodiment, the method for generating a federated learning model further includes:

[0102] Step C10, after receiving the user identifier sent by the model provider, determining the user financial data corresponding to the user identifier in the local data;

[0103] Step C20, inputting the user's financial data into the target federated learning model to predict the financial risk assessment result corresponding to the user identifier through the target federated learning model, and outputting the financial risk assessment result to the model provider.

[0104] The embodiment of the present application also provides a method for applying the target federated learning model to predict the user's financial risk after the target federated learning model is successfully converted. Among them, the business party is equivalent to the application party of the model, that is, the party that needs to make business decisions based on the user's financial risk assessment results in a specific business scenario. In this case, the business party has the need to obtain the user's financial risk assessment results. In order to protect the user's privacy, the data provider does not have the right to browse the financial risk assessment results; in addition, the data provider is responsible for providing the user's financial data (including the user's basic information, consumption income information, and historical financial business information, etc.). In order to protect privacy, the business party does not have the right to browse this part of the user's financial data. For the above reasons, this assessment of the user's financial risk can use the generated federated learning model.

[0105] Specifically, the business party determines one or more user identifiers that need to be risk assessed based on actual needs, and then sends them to the data provider for the data provider to align the user identifiers and determine the information of a batch of users. Then, the data provider can query the user financial data corresponding to these user identifiers in the local data, and input them into the target federated learning model in turn. The target federated learning model is used to perform risk assessment and prediction on the users corresponding to these user identifiers, thereby determining the financial risk assessment results corresponding to each user identifier and sending them to the business party. The data provider itself cannot obtain the financial risk assessment results.

[0106] The federated learning model generation method applied to the data provider provided in the embodiment of the present application can solve the technical problem that the training process of the federated learning model consumes a lot of resources and affects the modeling efficiency. Compared with the prior art, the beneficial effects of the federated learning model generation method applied to the data provider provided in the present application are the same as the beneficial effects of the federated learning model generation method applied to the model provider provided in the above embodiment, and the other technical features in the federated learning model generation method applied to the data provider are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0107] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for generating a federated learning model in the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0108] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the federated learning model generation method in the above-mentioned embodiment one.

[0109] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0110] like Figure 5As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0111] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0112] The electronic device provided by the present application adopts the method for generating a federated learning model in the above embodiment, which can solve the technical problem that the training process of the federated learning model consumes a lot of resources and affects the modeling efficiency. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the method for generating a federated learning model provided in the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0113] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0115] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the federated learning model generation method in the above-mentioned embodiment.

[0116] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0117] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0118] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device executes: aligning the feature order in the existing decision tree model with the feature order of the data provider to obtain an updated decision tree model, wherein the existing decision tree model is used to predict the user's financial risk assessment results based on the user's financial data; sending the updated decision tree model to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain the corresponding tree structure; establishing a basic federated learning model based on preset pseudo data, and importing the leaf nodes of the existing decision tree model into the basic federated learning model; generating a target federated learning model based on the basic federated learning model after importing the leaf nodes and the tree structure imported by the data provider, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

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

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0122] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned federated learning model generation method, and can solve the technical problem that the training process of the federated learning model consumes a lot of resources and affects the modeling efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the federated learning model generation method provided in the above-mentioned embodiment, and will not be repeated here.

[0123] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned federated learning model generation method when executed by a processor.

[0124] The computer program product provided in this application can solve the technical problem that the training process of the federated learning model consumes a lot of resources and affects the modeling efficiency. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the federated learning model generation method provided in the above embodiment, which will not be repeated here.

[0125] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for generating a federated learning model, characterized in that: Applied to a model provider, the model provider deploys an existing decision tree model, the model provider is in communication with a data provider, the data provider stores user financial data, and the federated learning model generation method includes: Aligning the feature order in the stock decision tree model with the feature order of the data provider to obtain an updated decision tree model, wherein the stock decision tree model is used to predict the user's financial risk assessment results based on the user's financial data; Sending the updated decision tree model to the data provider, wherein the data provider replaces the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain a corresponding tree structure; Establishing a basic federated learning model based on preset pseudo data, and importing the leaf nodes of the stock decision tree model into the basic federated learning model; Based on the basic federated learning model after importing the leaf nodes and the tree structure imported by the data provider, a target federated learning model is generated, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

2. The method for generating a federated learning model according to claim 1, wherein: The federated learning model generation method further includes: Deleting the weight information of the leaf nodes in the existing decision tree model; Deleting weight information of non-leaf nodes in the existing decision tree model; Based on the existing decision tree model after deleting the weight information of the leaf nodes and non-leaf nodes, the step of aligning the feature order in the existing decision tree model with the feature order of the data provider is performed.

3. The method for generating a federated learning model according to claim 1, wherein: After the step of aligning the feature sequence in the stock decision tree model with the feature sequence of the data provider to obtain an updated decision tree model, the method further includes: Converting the file format of the updated decision tree model into the file format of a preset federated learning model; Based on the updated decision tree model after format conversion, the step of sending the updated decision tree model to the data provider is performed.

4. The method for generating a federated learning model according to claim 1, wherein: The model provider deploys a federated learning system, and the step of establishing a basic federated learning model based on preset pseudo data includes: Acquire pseudo data with a preset number of features, wherein the preset number of features is consistent with the number of pseudo data features used by the data provider to establish a basic federated learning model; A basic federated learning model is established in the federated learning system according to the pseudo data, wherein the basic federated learning model is consistent with the basic federated learning model established by the data provider.

5. The method for generating a federated learning model according to claim 1, wherein: The federated learning model generation method further includes: Obtain the user ID that needs to be risk assessed; Sending the user identifier to the data provider, wherein the data provider inputs the user financial data corresponding to the user identifier into the target federated learning model; The target federated learning model is used to predict the financial risk assessment result corresponding to the user identifier, and the financial risk assessment result is obtained.

6. A method for generating a federated learning model, characterized in that: Applied to a data provider, the data provider stores user financial data, the data provider is in communication with a model provider, the model provider deploys an existing decision tree model, and the federated learning model generation method includes: Receiving an updated decision tree model sent by a model provider, wherein a feature sequence of the updated decision tree model is aligned with a feature sequence of the data provider; Replacing the feature names of non-leaf nodes in the updated decision tree model with the feature names of local data to obtain a processed tree structure; Establishing a basic federated learning model based on preset pseudo data, and importing the tree structure into the basic federated learning model; Based on the basic federated learning model after importing the tree structure and the leaf nodes imported by the model provider, a target federated learning model is generated, wherein the target federated learning model is used to predict the user's financial risk assessment results based on the user's financial data.

7. The method for generating a federated learning model according to claim 6, wherein: The federated learning model generation method further includes: After receiving the user identifier sent by the model provider, determining the user financial data corresponding to the user identifier in the local data; The user financial data is input into the target federated learning model to predict the financial risk assessment result corresponding to the user identifier through the target federated learning model, and the financial risk assessment result is output to the model provider.

8. An electronic device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for generating a federated learning model as described in any one of claims 1 to 5 or claims 6 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the federated learning model generation method as described in any one of claims 1 to 5 or claims 6 to 7 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 or claims 6 to 7 is implemented.