Business processing method and electronic device based on federated learning

By using encryption and sharding technology to process characteristic data under the federated learning framework, the problem of low business prediction accuracy and poor security when multi-party data cooperation in the financial industry is solved, and higher business prediction accuracy and security are achieved.

CN119783855APending Publication Date: 2025-04-08CHINA TELECOM BESTPAY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411974407.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the business processing of the financial industry, the existing technology uses plain text to calculate the combination characteristics, resulting in low data leakage and security, especially when multi-party data cooperation, business prediction accuracy and poor security.

Method used

A federated learning-based approach is adopted to process feature data through encryption and sharding techniques. The initiator and the partner end respectively hold shards with privacy combination characteristics, and securely transmit and calculate the results through encrypted shard weights and linear combination results, and finally obtain the target business prediction results.

Benefits of technology

Without exposing the privacy of the original data, the accuracy and security of business forecasts are improved, and the problem of low accuracy and poor security of business forecasts when multi-party data cooperation is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783855A_ABST
    Figure CN119783855A_ABST
Patent Text Reader

Abstract

The present invention discloses a business processing method and electronic device based on federated learning. Involving the field of privacy computing, the method includes: obtaining a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature and a corresponding first shard weight; encrypting the first shard weight to obtain a first encrypted shard weight, and sending the first encrypted shard weight to a cooperation end; receiving the encrypted linear combination result sent by the cooperation end; decrypting the encrypted linear combination result to obtain a second linear combination result; obtaining a target business prediction result based on the first linear combination result and the second linear combination result. The present invention solves the technical problem of low accuracy and poor security of business prediction caused by business prediction based on multi-party data cooperation in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of privacy computing, and in particular to a business processing method and electronic device based on federated learning. Background Art

[0002] Logistic regression is one of the most commonly used machine learning algorithms in the financial industry during business processing. Since logistic regression is essentially a linear model and cannot learn the nonlinear laws of features, feature combination is often used to improve nonlinear capabilities and enhance the expressiveness of the model. When the features are all in the same party, the combined features can be obtained through plain text calculation and used as new regular features. However, in the relevant technology, when the sub-features of the combined features belong to different institutions during business processing, the plain text method in the relevant technology is still used for business calculation or storage, but this method is prone to data leakage and has low security.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present invention provide a business processing method and electronic device based on federated learning, so as to at least solve the technical problem in the related art that business prediction is performed based on multi-party data cooperation, resulting in low accuracy and poor security of business prediction.

[0005] According to one aspect of an embodiment of the present invention, a business processing method based on federated learning is provided, including: obtaining a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by an initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiator; encrypting the first shard weight to obtain a first encrypted shard weight, and sending the first encrypted shard weight to the cooperating end; receiving an encrypted linear combination result sent by the cooperating end, wherein the encrypted linear combination result is generated by the cooperating end based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, and the second shard feature is used to indicate the shard of the privacy combination feature at the cooperating end; decrypting the encrypted linear combination result to obtain a second linear combination result; and obtaining a target business prediction result based on the first linear combination result and the second linear combination result.

[0006] According to another aspect of an embodiment of the present invention, another business processing method based on federated learning is also provided, including: receiving a first encrypted sharding weight sent by an initiator, wherein the first encrypted sharding weight is obtained by encrypting a first sharding weight corresponding to a first sharding feature by the initiator, the first sharding feature is used to indicate the sharding of the privacy combination feature at the initiator, and the privacy combination feature is obtained based on a combination of first feature data and second feature data, the first feature data is obtained based on business data held by the initiator, and the second feature data is obtained based on business data held by the cooperation end; based on the second feature data, the second weight corresponding to the second feature data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature, an encrypted linear combination result is generated, wherein the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end; sending the encrypted linear combination result to the initiator, for the initiator to obtain a target business prediction result based on the first linear combination result and the second linear combination result obtained by decrypting the encrypted linear combination result, wherein the first linear combination result is obtained by the initiator based on the first feature data, the first weight corresponding to the first feature data, the first sharding feature, and the first sharding weight.

[0007] According to another aspect of an embodiment of the present invention, another business processing method based on federated learning is also provided, including: the initiator obtains a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on the business data held by the initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on the combination of the first feature data and the second feature data, and the second feature data is obtained based on the business data held by the cooperation end cooperating with the initiator; the initiator encrypts the first shard weight to obtain a first encrypted shard weight, and sends the first encrypted shard weight to the cooperation end; the cooperation end generates an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, wherein the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end; the initiator decrypts the encrypted linear combination result to obtain a second linear combination result; the initiator obtains a target business prediction result based on the first linear combination result and the second linear combination result.

[0008] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the business processing methods based on federated learning.

[0009] In an embodiment of the present invention, a first linear combination result is obtained based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by the initiating end, the first shard feature is used to indicate the sharding of the privacy combination feature at the initiating end, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiating end; the first shard weight is encrypted to obtain a first encrypted shard weight, and the first encrypted shard weight is sent to the cooperating end; the encrypted linear combination result sent by the cooperating end is received, wherein the encrypted linear combination result is the result of the cooperation end receiving the encrypted linear combination result based on the second feature data, the second feature data The second weight corresponding to the data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature are generated, and the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end; the encrypted linear combination result is decrypted to obtain the second linear combination result; based on the first linear combination result and the second linear combination result, the target business prediction result is obtained, and the purpose of using encryption and sharding technology under the federated learning framework is achieved, so that the initiator and the cooperation end can perform business prediction without exposing the privacy of the original data, thereby achieving the technical effect of effectively improving the accuracy and security of business prediction, and then solving the technical problem of low accuracy and poor security of business prediction based on multi-party data cooperation in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0011] Figure 1 is a flow chart of a service processing method based on federated learning according to an embodiment of the present invention;

[0012] Figure 2 is a flowchart of another service processing method based on federated learning according to an embodiment of the present invention;

[0013] Figure 3 is a flowchart of another service processing method based on federated learning according to an embodiment of the present invention;

[0014] Figure 4 is a flowchart of an optional service processing method based on federated learning according to an embodiment of the present invention;

[0015] Figure 5 It is a flowchart of another optional business processing method based on federated learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0018] First, to facilitate understanding of the embodiments of the present invention, some terms or nouns involved in the present invention are explained below:

[0019] Privacy Computing refers to a collection of technologies that implement data analysis and computing while protecting the data itself from external leakage, so as to achieve the goal of making data "available but invisible"; it realizes the transformation and release of data value while fully protecting data and privacy security.

[0020] Federated Learning (FL) is a machine learning framework that can effectively help multiple institutions use data and conduct machine learning modeling while meeting the requirements of user privacy protection, data security, and security rules.

[0021] Vertical Logistic Regression is a logistic regression algorithm under federated learning. The features of the same sample are distributed in different organizations to ensure that the training and prediction of the logistic regression algorithm can be achieved while meeting data security requirements.

[0022] According to an embodiment of the present invention, a method embodiment of business processing based on federated learning is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0023] Figure 1 is a flowchart of a service processing method based on federated learning according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0024] Step S100, obtaining a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by the initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiator;

[0025] Optionally, obtaining the first linear combination result based on the first feature data and the first weight is performed by the initiator alone during the model prediction process. The initiator uses the plaintext feature data it holds to perform a multiplication operation with the corresponding weight (first weight) to obtain the contribution of the feature to the model output, that is, the first linear combination result.

[0026] Among them, the privacy combination feature can be obtained by combining the first feature data with the second feature data. The combination can be performed by multiplication or other meaningful mathematical operations to explore the potential correlation between different data sets, thereby improving the nonlinear fitting ability and prediction accuracy of the model. In order to protect this combination feature from being stored in plain text by any unilateral institution, the privacy combination feature is converted into a sharded form, in which the initiator (i.e., the label owner, which can be the risk control department in a financial company) holds the first shard feature and the cooperation end (i.e., the cooperation party) holds the second shard feature. It can ensure that even if the data of one party is leaked, the complete privacy combination feature cannot be directly restored, thereby protecting the privacy of the data.

[0027] Step S102, encrypting the first shard weight to obtain a first encrypted shard weight, and sending the first encrypted shard weight to the cooperation end;

[0028] Optionally, the execution subject of steps S100 to S108 may be the initiator. The initiator encrypts the first shard weight it holds, generates a first encrypted shard weight, and securely transmits it to the cooperating end, wherein the encryption method may be achieved by using the Paillier encryption algorithm or other homomorphic encryption techniques. By encrypting the first shard weight to obtain the first encrypted shard weight, and then sending it to the cooperating end, it can be ensured that even if the cooperating end receives the encrypted information, it cannot directly recover the sensitive data of the initiator from it, thereby protecting the security of the privacy combination feature.

[0029] In a federated learning environment, by encrypting the first shard weight and securely transmitting it to the cooperating end, the cooperating end can use the encrypted shard weight to participate in the calculation of the encrypted linear combination results without knowing the specific data of the initiating end, thereby enabling the entire model prediction process to be carried out under the premise of protecting the data privacy of all parties.

[0030] Optionally, the first shard weight can be encrypted by using a semi-homomorphic encryption algorithm such as Paillier. The above method can not only protect data privacy, but also utilize specific operations (such as addition and scalar multiplication) in the ciphertext state supported by these algorithms. The first encrypted shard weight received by the cooperation end can be operated with the local encrypted information without decryption first, avoiding direct exposure of plaintext data during the calculation process and maintaining data security.

[0031] It should be noted that in industries such as financial institutions and healthcare, data is often stored in different institutions, and these data contain sensitive information, so direct sharing is unrealistic. By encrypting the transmission of shard weights, different institutions can jointly train and use models without leaking their own data, which can effectively promote cross-institutional data collaboration while meeting industry standards for data security and privacy protection.

[0032] Step S104, receiving the encrypted linear combination result sent by the cooperation end, wherein the encrypted linear combination result is generated by the cooperation end based on the second feature data, the second weight corresponding to the second feature data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature, and the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end;

[0033] Optionally, the first encrypted shard weight received by the cooperation end is the weight of the shard information of the privacy combination feature held by the initiator for encryption processing. By using the encrypted weight, the cooperation end can generate an encrypted linear combination result based on its own feature data and weight without accessing the plaintext data of the initiator, thereby participating in the process of business prediction. Setting the encrypted linear combination result is the result of the cooperation end's calculation based on its local feature data (including the second feature data and the second shard feature of the privacy combination feature). Specifically, the cooperation end uses its feature data and local weights (the second weight and the second shard weight) for linear combination, while considering the impact of the received first encrypted shard weight on the calculation. The encrypted linear combination result contains the contribution of the cooperation end feature data to the model prediction, which exists in an encrypted form to protect the security of the data. In addition, due to the introduction of the privacy combination feature, the cooperation end considers the contribution of the privacy combination feature when generating the encrypted linear combination result. Even if these features exist in the form of shards, they can still accurately capture the interaction between different features, thereby improving the nonlinear fitting ability of the target business prediction result.

[0034] Step S106, decrypting the encrypted linear combination result to obtain a second linear combination result;

[0035] Optionally, since the linear combination result exists in encrypted form during the transmission process, only the party holding the corresponding private key can decrypt it. As the holder of the private key, the initiator can only reflect the contribution of the feature data and weights of the cooperation end to the prediction after decryption, without exposing the original data or complete information of the combination features of the cooperation end, which can ensure the safe transmission and processing of data in the federated learning process. In addition, the introduction of the privacy combination feature enables the model to pre-learn the nonlinear relationship between the characteristics of different institutions, thereby improving the nonlinear fitting ability. The decryption process can ensure that the encrypted linear combination result generated by the privacy combination feature can accurately restore the contribution of each institution to the improvement of nonlinear capabilities, thereby making the final prediction result more accurate and better able to capture the complex patterns in the data set.

[0036] Step S108, obtaining a target business prediction result based on the first linear combination result and the second linear combination result.

[0037] Optionally, the decrypted second linear combination result is combined with the first linear combination result calculated by the initiator to form the linear combination part of the model prediction. This complete linear combination result contains the contribution of all feature data to the prediction result and is the basis for generating the final prediction result. Specifically, the first linear combination result is calculated by the initiator based on the feature data and weights it holds, while the second linear combination result is calculated by the partner based on its own feature data and weights, as well as the encrypted privacy combination feature weights, but in encrypted form. Integrating these two linear combination results can ensure that the data contributions from different institutions are fully and accurately considered in the model prediction. The combination of the first linear combination result and the second linear combination result is essentially the summarization of the contributions of all features in the model (including common features and privacy combination features) to the prediction result. This summarization process is carried out in the form of linear combination, and the final target business prediction result is the comprehensive analysis result of the model based on the data of all participants. In business scenarios such as finance and healthcare, this means that credit risks can be predicted more accurately, thereby supporting better business decisions.

[0038] Optionally, the formula of the business prediction model built based on logistic regression prediction can be set as follows:

[0039] y ′ prob =sigmoid(u ′ )

[0040] From the above formula we can know:

[0041]

[0042] Among them, u ′ represents the sum of the first linear combination result and the second linear combination result, w a represents the first weight, a ′ represents the first feature data, represents the weight of the first shard, r a ′ represents the first shard feature, b ′ represents the target bias, w h represents the second weight, h ′ represents the second characteristic data, represents the second shard weight, r h ′ The process of obtaining the first shard feature is the same as the process of obtaining the first historical shard feature in the federated learning process involved in the following embodiments; the process of obtaining the second shard feature is the same as the process of obtaining the second historical shard feature in the federated learning process involved in the following embodiments, and will not be repeated here.

[0043] Specifically, the initiator A generates the public and private keys Key_pub and Key_priv for Paillier encryption and decryption, and sends Key_pub to the partner H; the initiator A encrypts r a Get the first encrypted shard weight Encrypted Sharding Features a ′ ]]Send to partner H; partner H calculates: encrypted linear combination result And send it to the initiator A; the initiator A decrypts [[u ′ h ]], get the second linear combination result u h ′ , and calculate: Initiator A calculates: y ′ prob =sigmoid(u a ′ +u h ′ ) to obtain the target business prediction result.

[0044] In an optional embodiment, before obtaining a first linear combination result based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight corresponding to the first shard feature, the method also includes: encrypting the first feature data to obtain a first encrypted feature, and sending the first encrypted feature to the cooperation end; receiving the encrypted shard feature sent by the cooperation end, wherein the encrypted shard feature is obtained by sharding the privacy combination feature by the cooperation end, and the privacy combination feature is obtained by multiplying the first encrypted feature and the second feature data by the cooperation end; decrypting the encrypted shard feature to obtain the first shard feature.

[0045] Optionally, the initiator can use a secure encryption algorithm (such as Paillier encryption) to encrypt the first feature data held locally to obtain a first encrypted feature. The first encrypted feature is securely sent to the cooperating end. This operation can ensure that the data will not be intercepted or interpreted during the transmission process, and protect the privacy of the feature data of the initiator. After receiving the first encrypted feature, the cooperating end performs a multiplication operation with the second feature data held by the cooperating end to generate a ciphertext form of the privacy combination feature. In order to ensure the security of the privacy combination feature, this feature is further processed into a fragmented feature, namely, a first fragmented feature and a second fragmented feature, which are held by the initiator and the cooperating end respectively. By fragmenting the combined feature, even if the data of one party is leaked, it is difficult to restore the complete privacy combination feature, thereby protecting the security of the data. The cooperating end sends the encrypted fragmented feature to the initiator. After receiving the encrypted fragmented feature, the initiator uses its own private key to decrypt it and obtains the first fragmented feature, that is, the part of the information in the privacy combination feature that belongs to the initiator. This process can ensure that the fragmented information of the privacy combination feature can only be decrypted between authorized parties, further enhancing the privacy protection of the data.

[0046] Optionally, by introducing privacy combination features into model training, more complex nonlinear relationships between different data sets can be learned, thereby improving the model's nonlinear fitting ability when processing business data and enhancing the model effect.

[0047] In an optional embodiment, before obtaining a first linear combination result based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight corresponding to the first shard feature, the method also includes: in a process of federated learning, iteratively updating the first initial weight and the first initial shard weight to obtain the first weight and the first shard weight; wherein the second weight and the second shard weight are obtained by iteratively updating the second initial weight and the second shard weight by the cooperation end in the process of federated learning.

[0048] Optionally, the first shard weight is used to indicate the weight distribution of the combined feature weight at the initiator, and the combined feature weight is the weight corresponding to the privacy combined feature.

[0049] Optionally, at the beginning of federated learning, the initiator and the cooperator each initialize the weights corresponding to the features they hold, including the initial weights of common features and the initial shard weights of privacy combination features. In each iteration, the initiator and the cooperator update the weights held locally. The update process involves calculating gradients, which needs to be performed securely through encryption and secret sharing technology in a federated learning environment where plaintext data cannot be directly shared. When the initiator updates its first shard weight, it uses the local calculation intermediate result to update; when the cooperator updates its corresponding second shard weight, it also uses its local calculation intermediate result to update the corresponding update. By iteratively updating the weights, the data can be fitted more accurately in each round of training, and the prediction error can be gradually reduced. In the process of iterative updating, the privacy combination feature is introduced. The privacy combination feature is composed of the feature data of both parties and is stored in the form of shards to the initiator and the cooperator. Even if the weight update involves the privacy combination feature, it will only be performed at the shard level, and the complete form of the combination feature will not be directly exposed, thereby protecting the security of the data while optimizing the model.

[0050] In an optional embodiment, during the process of federated learning, the first initial weight and the first initial shard weight are iteratively updated to obtain the first weight and the first shard weight, including: during the process of federated learning, based on the first historical feature data, the first initial weight, the first historical shard feature, and the first initial shard weight, a first historical linear combination result is obtained, wherein the first historical feature data is obtained based on the historical business data held by the initiator, the first historical shard feature is used to indicate the shard of the historical privacy combination feature at the initiator, and the historical privacy combination feature is obtained based on the first historical feature data and the second historical feature data; the first initial shard weight is encrypted to obtain the historical encrypted shard weight, and the historical encrypted shard weight is sent to the cooperation end; the historical encrypted linear combination result sent by the cooperation end is received, wherein the historical encrypted linear combination result is generated by the cooperation end based on the second historical feature data, the second initial weight, the second historical shard feature, the first initial shard weight and the second initial shard weight, wherein the second historical feature data is obtained based on the historical business data held by the cooperation end , the second historical sharding feature is used to indicate the sharding of the historical privacy combination feature at the cooperation end; the historical encrypted linear combination result is decrypted to obtain the second historical linear combination result, and based on the first linear combination result and the second linear combination result, the historical business prediction result is obtained; based on the historical business prediction result and the corresponding actual business result, the loss value is calculated, and the first initial weight and the first initial sharding weight are gradient updated based on the loss value to obtain the first updated weight and the first updated sharding weight; the loss value is encrypted to obtain the encrypted loss, and the encrypted loss is sent to the cooperation end, for the cooperation end to perform a gradient update on the second initial weight and the second initial sharding weight based on the encrypted loss to obtain the second updated weight and the second updated sharding weight; the above operations are repeated until the predetermined termination condition is reached, and the first updated weight and the first updated sharding weight obtained when the predetermined termination condition is reached are used as the first weight and the first sharding weight, respectively, wherein the cooperation end is used to use the second updated weight and the second updated sharding weight obtained when the predetermined termination condition is reached as the second weight and the second sharding weight, respectively.

[0051] Optionally, during the training phase of federated learning, the initiator and the cooperator each use their own historical feature data to calculate the historical linear combination results. These historical feature data can refer to the past business data used to train the model. The processing of these data can help learn the inherent laws of the data. At the same time, the use of privacy combination features to shard the data ensures that even when calculating the linear combination results, the original data of the participants will not be directly accessed by the other party, protecting the privacy of the data. During the iterative update process, the information transmitted between the initiator and the cooperator (such as historical encrypted shard weights, historical encrypted linear combination results, encryption losses, etc.) is encrypted, and the advantages of semi-homomorphic encryption algorithms such as Paillier are used to ensure the security of information transmission. The initiator decrypts the received encrypted linear combination results to obtain the contribution value of the cooperator. Similarly, the sending of encryption losses also ensures that the cooperator can safely perform gradient updates without exposing sensitive information. In each round of iteration, based on the loss between the predicted results and the actual business results of the previous round of iteration, the initiator and the cooperator update their weights (including the weights of common features and the shard weights of privacy combination features) respectively. This process is essentially a process of self-correction and gradually approaching the optimal solution. In this way, even if the feature data of both parties are independent and do not share plaintext data, the model can still be effectively trained to improve prediction performance. In the gradient update phase, each participant adjusts the initial weights based on the calculated loss value to obtain updated weights and updated shard weights. By encrypting the loss value and securely transmitting it to the cooperating end, the cooperating end can update its local weights based on the received information without knowing the exact value of the plaintext data or loss value of the initiating end, further enhancing data security. Iterate and update until the predetermined termination condition is met, which refers to the convergence of parameters or the preset number of iterations. After the termination condition is met, the initiating end and the cooperating end use the updated weights and shard weights obtained in the last iteration as the weight parameters of the final model.

[0052] As an optional embodiment, an optional implementation of a service processing method based on federated learning is proposed, and the method includes:

[0053] Step S1, generating privacy combination features;

[0054] In step S11, the tag owner (ie, the initiator A) generates the public and private keys Key_pub and Key_priv for Paillier encryption and decryption, and sends Key_pub to the cooperating terminal H.

[0055] Step S12: The initiator uses the public key Key_pub to encrypt the local feature data (i.e., the first historical feature data) of the user-generated combined feature, and obtains the first historical encrypted feature [[a]]=([[a 1 ]],[[a 2]],…,[[a x ]]), and send [[a]] to the partner.

[0056] Step S13, the cooperation end calculates the historical privacy combination feature [[m ij ]]=[[a i ]]*h j Here, we assume that k privacy combination features are generated [[m]] = ([[m 1 ]],[[m 2 ]],…,[[m k ]]). At the same time, the partner H generates a random number matrix r h The historical privacy combination feature corresponds to the shard of the cooperation end H (i.e., the first historical shard feature), and the processed privacy combination feature (i.e., the historical encrypted shard feature) is calculated locally:

[0057]

[0058] The cooperation end will a ]] is sent to the initiator. At this time, the partner locally stores the random number matrix r h and historical privacy combined features [[m]];

[0059] Step S14, the initiator decrypts [[r a ]] and store, where r a The privacy combination feature corresponds to the shard of the initiator (i.e., the second historical shard feature).

[0060] Step S2, logistic regression training, specifically includes:

[0061] Step S21, weight initialization, specifically includes:

[0062] Step S211: The initiator generates a first initial weight corresponding to the plaintext feature and bias b, where w a That is, it represents the weight of feature a held by the initiator, indicating the degree of influence of feature a on the model prediction result. B represents the bias term of the model, which is a fixed value other than the feature in the model, and is used to adjust the starting point of the model so that the model can better fit the data.

[0063] Step S212: The cooperation end generates a second initial weight corresponding to the plaintext feature w h That is, it represents the weight of feature h held by the cooperation end, indicating the influence of feature h on the model prediction results.

[0064] Step S213: The cooperation end generates the initial weight of the combination corresponding to the privacy combination feature w mixThat is, it represents the weight of the privacy combination feature m, which indicates the influence of the privacy combination feature on the model prediction result. Further, according to the initial weight w mix Generate the corresponding shard weight, that is, the first shard weight and the second shard weight ensure and will Sent to the initiator.

[0065] Step S22, calculating the predicted value;

[0066] u=u a +u h +u mix =w a *a+w h *h+w mix *m+b

[0067] y prob =sigmoid(u)

[0068] The above is the formula for calculating the predicted value, the focus is on w mix *m, where:

[0069]

[0070] Therefore, the above formula becomes:

[0071]

[0072] Among them, u a Indicates the feature data a and the corresponding weight w owned by the initiator a The result of the first historical linear combination of the multiplication reflects the contribution of the plaintext features of the label owner to the predicted value. h Represents the feature data h and corresponding weight w owned by the partner H h The result of the second historical linear combination of the multiplication reflects the contribution of the H-square plaintext features to the predicted value. mix Represents the historical privacy combination feature m and the corresponding weight w mix The multiplied linear combination result reflects the contribution of the privacy combination features obtained by combining the features of different institutions to the predicted value. The m here is actually calculated in the encrypted state, and its value is determined by r a and r hIt consists of two parts, which are held by the initiator and the cooperating end H respectively. a represents the plaintext feature data (i.e., the first historical feature data) owned by the initiator A. The data is in matrix form, where each column represents a feature and each row represents the feature value of a sample. h represents the plaintext feature data (i.e., the second historical feature data) owned by the cooperating end H. The data is in matrix form, where each column represents a feature and each row represents the feature value of a sample. m represents the historical privacy combination feature, which is in matrix form, generated by combining the feature data of A and H, and exists in ciphertext form. a and r h It consists of two parts. prob Represents the predicted probability after the sigmoid function conversion, indicating the probability that the sample predicted by the model belongs to the positive class. The sigmoid function maps the value of the linear combination u to between 0 and 1, which is used for the prediction output of logistic regression.

[0073] The first part is calculated at the initiating end A, and the second part is calculated at the cooperating end H. The calculation steps are as follows:

[0074] Step S221: The initiator calculates the first historical linear combination result And encrypt Get the historical encrypted shard weight Send to the partner H.

[0075] Step S222, the cooperation terminal H calculates the historical encrypted linear combination result And [[u h ]] is sent to the initiator A.

[0076] Step S223, the initiator A decrypts [[u h ]]Get the second historical linear combination result, based on the first historical linear combination result u a and the second history linear combination result u h Calculate the model prediction result y prob =sigmoid(u a +u h );

[0077] Step S23, calculate the loss and update the gradient;

[0078] The gradient update principle formula is as follows:

[0079] d=y prob -y true

[0080] g=d*x

[0081] w new =w old -ηg

[0082] Among them, d represents the model prediction result y prob The actual result y true The error between the two, x represents the input value; g represents the gradient, which is the result of multiplying the error by the input value x; w new represents the updated weight value; w old represents the weight value before the update; η represents the learning rate, which controls the step size of each gradient update and is used to control the rate at which the model parameters are updated. The choice of learning rate has an important impact on the convergence speed of model training and the final fitting effect.

[0083] Since the combined features are stored in different parts, x=m a +m h , the calculation can be done as follows:

[0084]

[0085] in, and They represent the common feature weights of the model in the previous iteration, that is, the values ​​of the combined feature weights held by the initiator and the cooperator in the previous training round; these weights are parameters that are gradually adjusted during the training process and are used to calculate the contribution of the features to the predicted value. and They represent the combined feature weights updated by the model after the current iteration, that is, the values ​​of the feature weights held by the initiator and the cooperator after adjustment in the current training round; the purpose of updating these weights is to make the model fit the data better. a and m h The privacy combination feature m is generated by combining the features of the initiator and the cooperator. Due to privacy protection, it is decomposed into two shards. The initiator A holds m a , the partner H holds m h η*d(m a +m h ) represents the gradient update term corresponding to the privacy combination feature. η is multiplied by d to get the weight update size, which is then multiplied by the sharding and m of the privacy combination feature. a +m h , and get the updated value of the combined feature weight. Since the shards of the combined feature are stored in different places, the gradient of the combined feature is indirectly calculated by summing the shards.

[0086] It can be found that the initiator A and the cooperating end H can both calculate and update the local shard weights independently.

[0087] The specific implementation process of the initiator A separately calculating and updating the weight of the local first shard is as follows:

[0088] Step S231, the initiator A calculates: d = y prob -y true

[0089] The initiator A calculates: g a =d*a

[0090] Initiator A calculates:

[0091] Initiator A calculates:

[0092] Initiator A calculates:

[0093] Among them, g a The gradient when the initiator performs gradient update, Indicates the mixed gradient when the initiator performs gradient update; Indicates the first shard weight after the gradient corresponding to the initiator is updated; Indicates the first shard weight before the gradient update corresponding to the initiator.

[0094] The initiator A encrypts the error d to obtain the encryption error [[d]] and sends it to the cooperating terminal H. The cooperating terminal H calculates and updates the local second shard weight separately. The specific implementation process is as follows:

[0095] Step S232, the cooperation terminal H calculates: [[g h ]]=[[d]]*h

[0096] Partner H calculation:

[0097] Partner H generation and get

[0098]

[0099] Among them, [[g h ]] represents the encrypted gradient when the partner H performs gradient update. represents the encrypted mixed gradient when the partner H performs gradient update; is a random value used to confuse [[g h ]], initiator A decrypts [[g shuffle ]] will not get any valid information; [[g shuffle ]] represents the original feature gradient after confusion; Is a random value used to confuse Decryption by initiator A No valid information will be obtained. is the shard gradient of the confused combined feature at the cooperation end H.

[0100] Cooperation end H will Sent to the initiator.

[0101] Step S233, the initiator decrypts [[g shuffle ]], Get g shuffle , And send it to the partner H;

[0102] Step S234, the partner H obtains g h , And perform gradient update:

[0103] Partner H calculation:

[0104] Partner H calculation:

[0105] Partner H calculation:

[0106] Partner H calculation:

[0107] Among them, g h represents the gradient when the partner H performs gradient update, represents the mixed gradient when the cooperation end H performs gradient update; represents the second shard weight after the gradient update corresponding to the cooperation end H; Indicates the second shard weight before the gradient update corresponding to the cooperation end H.

[0108] Step S24, looping steps S22 and S23 until a termination condition is reached, and outputting a business prediction model for business prediction.

[0109] It should be noted that this embodiment enables the longitudinal logistic regression model to be trained efficiently and securely under the framework of federated learning. By using encryption technology for data processing and weight update, the model can fully tap the value of all participants' data without directly accessing the other party's plaintext data and improve prediction accuracy. At the same time, data privacy is strictly protected to meet the regulatory requirements of data security and privacy protection, providing a feasible technical path for cross-institutional cooperation in sensitive data fields such as financial institutions and medical institutions.

[0110] Through the above steps S100 to S108, it is possible to achieve the effect of effectively improving the accuracy and security of business predictions by utilizing encryption and sharding technologies under the federated learning framework, so that the initiating end and the cooperating end can perform business predictions without exposing the privacy of the original data.

[0111] According to an embodiment of the present invention, another method embodiment of business processing based on federated learning is also provided. Figure 2 is a flowchart of a service processing method based on federated learning according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0112] Step S200, receiving a first encrypted sharding weight sent by the initiator, wherein the first encrypted sharding weight is obtained by encrypting the first sharding weight corresponding to the first sharding feature by the initiator, the first sharding feature is used to indicate the sharding of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of first feature data and second feature data, the first feature data is obtained based on business data held by the initiator, and the second feature data is obtained based on business data held by the cooperation end;

[0113] Step S202, generating an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, wherein the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end;

[0114] Step S204, sending the encrypted linear combination result to the initiator, which is used for the initiator to obtain the target business prediction result based on the first linear combination result and the second linear combination result obtained by decrypting the encrypted linear combination result, wherein the first linear combination result is obtained by the initiator based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight.

[0115] Optionally, the execution subject of steps S200 to S204 can be the cooperation end. The encrypted information received by the cooperation end can ensure that the contribution of the initiator will not be leaked in plain text. At the same time, the cooperation end avoids data leakage by generating a random number matrix (as the second shard feature) and performing a subtraction operation. The cooperation end receives the encrypted historical shard weights, participates in generating the encrypted historical linear combination results, and performs secure information exchange (encrypted loss value) with the initiator. It can securely update the feature weights and privacy combination feature shard weights based on the difference between the model prediction results and the actual business results.

[0116] It should be noted that in the entire process, encrypted communication and data sharding processing strategies build a trust mechanism. The cooperating parties can be sure that even in the process of data sharing, their own data and model weights are safe and will not be directly accessed by the initiating party or other parties. The above method can ensure that both parties can jointly generate privacy combination features without directly sharing plaintext data, improve the nonlinear fitting ability of the model, protect the privacy and security of the data, and gradually improve the accuracy of the prediction.

[0117] In an optional embodiment, a first encrypted feature sent by a cooperation end is received, wherein the first encrypted feature is obtained by encrypting first feature data by the cooperation end; a multiplication operation is performed on the first encrypted feature and second feature data to obtain a privacy combination feature; a random number matrix is ​​generated, and the random number matrix is ​​used as a second sharding feature; a subtraction operation is performed on the privacy combination feature and the second sharding feature to obtain an encrypted sharding feature, and the encrypted sharding feature is sent to an initiating end, so that the initiating end decrypts the encrypted sharding feature to obtain a first sharding feature.

[0118] In an optional embodiment, before generating an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, the method also includes: in the process of federated learning, iteratively updating the second initial weight and the second initial shard weight to obtain the second weight and the second shard weight; wherein the first weight and the first shard weight are obtained by iteratively updating the first initial weight and the first shard weight by the initiator in the process of federated learning.

[0119] In an optional embodiment, during the process of federated learning, the second initial weight and the second initial sharding weight are iteratively updated to obtain the second weight and the second sharding weight, including: during the process of federated learning, receiving the historical encrypted sharding weight sent by the initiator, wherein the historical encrypted sharding weight is obtained by encrypting the first initial sharding weight corresponding to the first historical sharding feature by the initiator, wherein the first historical sharding feature is used to indicate the sharding of the historical privacy combination feature at the initiator, and the historical privacy combination feature is obtained based on the combination of the first historical feature data and the second historical feature data, the first historical feature data is obtained based on the historical business data held by the initiator, and the second historical feature data is obtained based on the historical business data held by the cooperation end; based on the second historical feature data, the second initial weight, the second historical sharding feature, the first initial sharding weight and the second initial sharding weight, generate a historical encrypted linear combination result, and send the historical encrypted linear combination result to the initiator, wherein the second historical sharding feature is used to indicate the sharding of the historical privacy combination feature at the cooperation end; receiving the encryption loss sent by the initiator, wherein the encryption loss is the encryption loss caused by the initiator to the The loss value is encrypted; the loss value is calculated by the initiator based on the historical business prediction results and the corresponding actual business results; the historical business prediction results are obtained by the initiator based on the first historical linear combination result and the second historical linear combination result obtained by decrypting the historical encrypted linear combination result; the first historical linear combination result is obtained by the initiator based on the first historical feature data, the first initial weight, the first historical shard feature and the first initial shard weight; the second initial weight and the second initial shard weight are gradient updated based on the encryption loss to obtain the second updated weight and the second updated shard weight, wherein the initiator is also used to perform gradient updates on the first initial weight and the first initial shard weight based on the loss value during the federated learning process to obtain the first updated weight and the first updated shard weight; the above operations are repeated until the predetermined termination condition is reached, and the second updated weight and the second updated shard weight obtained when the predetermined termination condition is reached are used as the second weight and the second shard weight in turn, wherein the initiator is also used to use the first updated weight and the first updated shard weight obtained when the predetermined termination condition is reached as the first weight and the first shard weight in turn.

[0120] According to an embodiment of the present invention, another method embodiment of business processing based on federated learning is also provided. Figure 3 is a flowchart of a service processing method based on federated learning according to an embodiment of the present invention. Figure 3 As shown, the method comprises the following steps:

[0121] Step S300: The initiator obtains a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by the initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiator;

[0122] Step S302: the initiating end encrypts the first shard weight to obtain a first encrypted shard weight, and sends the first encrypted shard weight to the cooperating end;

[0123] Step S304: The cooperation end generates an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature, wherein the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end;

[0124] Step S306, the initiator decrypts the encrypted linear combination result to obtain a second linear combination result;

[0125] Step S308: The initiator obtains a target service prediction result based on the first linear combination result and the second linear combination result.

[0126] Optionally, the execution entities of steps S300 to S308 may be the initiator and the cooperating end. The initiator uses the business data it holds and the corresponding weights and privacy combination features at its own shards and its shard weights to calculate the first linear combination result. The result can reflect the contribution of the initiator's features to the business prediction. In order to interact with the cooperating end securely, the initiator encrypts the first shard weight and then sends it to the cooperating end. The cooperating end calculates the encrypted linear combination result based on the business data it holds, its corresponding weights, and the second shard feature as the privacy combination feature shard information, combined with the first encrypted shard weight and the corresponding second shard weight received from the initiator. After receiving the encrypted linear combination result sent by the cooperating end, the initiator performs decryption processing to obtain the second linear combination result. Then add the first linear combination result and the second linear combination result to obtain the final target business prediction result. This integration process ensures that the feature contributions of all participants are accurately taken into account.

[0127] This embodiment can achieve efficient federated learning prediction under data privacy protection through sophisticated ciphertext calculation, shard weight processing, and encrypted transmission and decryption integration of linear combination results. It can not only ensure the security of data, but also improve the performance of the model and promote cross-institutional data cooperation.

[0128] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation mode: Figure 4 is a flowchart of an optional service processing method based on federated learning according to an embodiment of the present invention. Figure 4 As shown, the method includes:

[0129] The initiator generates the Paillier company key and uses the public key to encrypt feature a i , the first historical encryption feature [[a]] is sent to the cooperation end; the cooperation end calculates the combined feature [[m]] under the ciphertext = [[a i ]]*h j , the generated combined features correspond to the fragmentation information r of the cooperation end h , calculate the fragmentation information corresponding to the initiator [[r a ]]=[[m]]-r h , and sends the corresponding fragment information back to the initiator; the initiator decrypts the fragment information to obtain the fragment information corresponding to the initiator, and initializes the common feature weight w a , and the cooperation end initializes the common feature weight w h ; The cooperation end initializes the privacy combination feature weight w mix , and generate shard information, which is stored locally Will Sent to the initiator; the initiator receives and stores The result is encrypted and sent To the partner, the partner calculates w h *x h And the combined features correspond to the partial results of the cooperation end, and we get [[u h ]], and send this result to the initiator, which decrypts it to get u h , calculate w a *x a And the partial results of the combined features corresponding to the initiator, we get u a ; Calculate the predicted value and deviation to get d; encrypt d and send the result to the cooperation end; the cooperation end calculates the gradient corresponding to the common feature [[g h ]] and the shard gradient corresponding to the privacy combination feature The gradient is obfuscated and the ciphertext obfuscated gradient is sent to the initiator; the initiator decrypts and calculates the gradient g corresponding to the initiator. a Shard gradient corresponding to privacy combination feature Send the decrypted obfuscated gradient to the partner and update the gradient w a and The cooperating end deobfuscates and obtains g h and Update the gradient w a and Repeat encryption To update the gradient process.

[0130] Based on the above embodiments and optional embodiments, the present invention proposes another optional implementation mode: Figure 5 is a flowchart of another optional service processing method based on federated learning according to an embodiment of the present invention. Figure 5 As shown, the method includes:

[0131] The initiator generates the Paillier company key and uses the public key to encrypt feature a i , the first historical encryption feature [[a]] is sent to the cooperation end; the cooperation end calculates the combined feature [[m]] under the ciphertext = [[a i ]]*h j , the generated combined features correspond to the fragmentation information r of the cooperation end h , calculate the fragmentation information corresponding to the initiator [[r a ]]=[[m]]-r h , the corresponding fragment information r a Send it back to the initiator; the initiator decrypts the fragment information to obtain the fragment information corresponding to the initiator, and [[r a ]] to encrypt [[r a ]]Sent to the partner, the partner calculates w h *x h And the combined features correspond to the partial results of the cooperation end, and we get [[u h ]], and send this result to the initiator, which decrypts it to get u h , calculate w a *x a And the partial results of the combined features corresponding to the initiator, we get u a ; Calculate the predicted value.

[0132] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any of the above-mentioned business processing methods based on federated learning.

[0133] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.

[0134] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight corresponding to the first shard feature, a first linear combination result is obtained, wherein the first feature data is obtained based on the business data held by the initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on the combination of the first feature data and the second feature data, and the second feature data is obtained based on the business data held by the cooperation end cooperating with the initiator; the first shard weight is encrypted to obtain a first encrypted shard weight, and the first encrypted shard weight is sent to the cooperation end; the encrypted linear combination result sent by the cooperation end is received, wherein the encrypted linear combination result is generated by the cooperation end based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, and the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end; the encrypted linear combination result is decrypted to obtain a second linear combination result; based on the first linear combination result and the second linear combination result, a target business prediction result is obtained.

[0135] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein when the program is run, any of the above-mentioned business processing methods based on federated learning is executed.

[0136] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, it is suitable for executing a program that initializes any of the steps of the above-mentioned federated learning-based business processing method.

[0137] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: obtaining a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on the business data held by the initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on the combination of the first feature data and the second feature data, and the second feature data is obtained based on the business data held by the cooperation end cooperating with the initiator; encrypting the first shard weight to obtain a first encrypted shard weight, and sending the first encrypted shard weight to the cooperation end; receiving the encrypted linear combination result sent by the cooperation end, wherein the encrypted linear combination result is generated by the cooperation end based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, and the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end; decrypting the encrypted linear combination result to obtain a second linear combination result; obtaining a target business prediction result based on the first linear combination result and the second linear combination result.

[0138] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, a first linear combination result is obtained, wherein the first feature data is obtained based on business data held by an initiator, the first shard feature is used to indicate the shard of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperation end cooperating with the initiator; the first shard weight is encrypted to obtain a first encrypted shard weight, and the first encrypted shard weight is sent to the cooperation end; the encrypted linear combination result sent by the cooperation end is received, wherein the encrypted linear combination result is generated by the cooperation end based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, and the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end; the encrypted linear combination result is decrypted to obtain a second linear combination result; based on the first linear combination result and the second linear combination result, a target business prediction result is obtained.

[0139] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.

[0140] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0141] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above modules can be a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.

[0142] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0143] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0144] If the above-mentioned integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0145] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A business processing method based on federated learning, characterized in that: include: A first linear combination result is obtained based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by an initiating end, the first shard feature is used to indicate a shard of a privacy combination feature at the initiating end, the privacy combination feature is obtained based on a combination of the first feature data and second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiating end; Encrypting the first sharding weight to obtain a first encrypted sharding weight, and sending the first encrypted sharding weight to the cooperation end; Receiving an encrypted linear combination result sent by the cooperation end, wherein the encrypted linear combination result is generated by the cooperation end based on the second feature data, the second weight corresponding to the second feature data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature, and the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end; Decrypting the encrypted linear combination result to obtain a second linear combination result; A target business prediction result is obtained based on the first linear combination result and the second linear combination result.

2. The method according to claim 1, characterized in that Before obtaining a first linear combination result based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight corresponding to the first shard feature, the method further includes: Encrypting the first feature data to obtain a first encrypted feature, and sending the first encrypted feature to the cooperation end; Receiving the encrypted fragmented feature sent by the cooperation end, wherein the encrypted fragmented feature is obtained by the cooperation end by fragmenting the privacy combination feature, and the privacy combination feature is obtained by the cooperation end by multiplying the first encrypted feature and the second feature data; The encrypted fragmentation feature is decrypted to obtain the first fragmentation feature.

3. The method according to claim 1, characterized in that Before obtaining a first linear combination result based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight corresponding to the first shard feature, the method further includes: During the federated learning process, the first initial weight and the first initial shard weight are iteratively updated to obtain the first weight and the first shard weight; The second weight and the second shard weight are obtained by the cooperation end iteratively updating the second initial weight and the second initial shard weight during the federated learning process.

4. The method according to claim 3, characterized in that In the process of federated learning, iteratively updating the first initial weight and the first initial shard weight to obtain the first weight and the first shard weight includes: In the process of the federated learning, based on the first historical feature data, the first initial weight, the first historical shard feature, and the first initial shard weight, a first historical linear combination result is obtained, wherein the first historical feature data is obtained based on the historical business data held by the initiator, the first historical shard feature is used to indicate the shard of the historical privacy combination feature at the initiator, and the historical privacy combination feature is obtained based on the combination of the first historical feature data and the second historical feature data; Encrypting the first initial shard weight to obtain a historical encrypted shard weight, and sending the historical encrypted shard weight to the cooperation end; Receiving a historical encrypted linear combination result sent by the cooperation end, wherein the historical encrypted linear combination result is generated by the cooperation end based on second historical feature data, the second initial weight, the second historical sharding feature, the first initial sharding weight, and the second initial sharding weight, wherein the second historical feature data is obtained based on historical business data held by the cooperation end, and the second historical sharding feature is used to indicate the sharding of the historical privacy combination feature at the cooperation end; Decrypting the historical encrypted linear combination result to obtain a second historical linear combination result, and obtaining a historical business forecast result based on the first historical linear combination result and the second historical linear combination result; Based on the historical business prediction results and the corresponding actual business results, a loss value is calculated, and based on the loss value, the first initial weight and the first initial shard weight are gradient updated to obtain a first updated weight and a first updated shard weight; Encrypting the loss value to obtain an encrypted loss, and sending the encrypted loss to the cooperation end, so that the cooperation end performs a gradient update on the second initial weight and the second initial shard weight based on the encrypted loss to obtain a second updated weight and a second updated shard weight; Repeat the above operations until a predetermined termination condition is reached, and use the first updated weight and the first updated shard weight obtained when the predetermined termination condition is reached as the first weight and the first shard weight, respectively, wherein the cooperation end is used to use the second updated weight and the second updated shard weight obtained when the predetermined termination condition is reached as the second weight and the second shard weight, respectively.

5. A business processing method based on federated learning, characterized in that: include: Receive a first encrypted sharding weight sent by an initiator, wherein the first encrypted sharding weight is obtained by the initiator encrypting a first sharding weight corresponding to a first sharding feature, the first sharding feature is used to indicate a sharding of a privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of first feature data and second feature data, the first feature data is obtained based on business data held by the initiator, and the second feature data is obtained based on business data held by the cooperation end; Generate an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, wherein the second shard feature is used to indicate the shard of the privacy combination feature at the cooperation end; The encrypted linear combination result is sent to the initiator, so that the initiator obtains a target business prediction result based on the first linear combination result and the second linear combination result obtained by decrypting the encrypted linear combination result, wherein the first linear combination result is obtained by the initiator based on the first feature data, the first weight corresponding to the first feature data, the first shard feature, and the first shard weight.

6. The method according to claim 5, characterized in that The method further comprises: Receiving a first encrypted feature sent by the cooperation end, wherein the first encrypted feature is obtained by the cooperation end encrypting the first feature data; Performing a multiplication operation on the first encryption feature and the second feature data to obtain the privacy combination feature; Generate a random number matrix, and use the random number matrix as the second sharding feature; A subtraction operation is performed on the privacy combination feature and the second fragmentation feature to obtain an encrypted fragmentation feature, and the encrypted fragmentation feature is sent to the initiator so that the initiator decrypts the encrypted fragmentation feature to obtain the first fragmentation feature.

7. The method according to claim 5, characterized in that Before generating an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second shard feature, the first encrypted shard weight, and the second shard weight corresponding to the second shard feature, the method further includes: During the federated learning process, the second initial weight and the second initial shard weight are iteratively updated to obtain the second weight and the second shard weight; The first weight and the first shard weight are obtained by the initiator iteratively updating the first initial weight and the first initial shard weight during the federated learning process.

8. The method according to claim 7, characterized in that In the process of federated learning, iteratively updating the second initial weight and the second initial shard weight to obtain the second weight and the second shard weight includes: In the process of the federated learning, a historical encrypted sharding weight sent by the initiator is received, wherein the historical encrypted sharding weight is obtained by the initiator encrypting the first initial sharding weight corresponding to the first historical sharding feature, wherein the first historical sharding feature is used to indicate the sharding of the historical privacy combination feature at the initiator, and the historical privacy combination feature is obtained based on a combination of first historical feature data and second historical feature data, wherein the first historical feature data is obtained based on historical business data held by the initiator, and the second historical feature data is obtained based on historical business data held by the cooperation end; Generate a historical encrypted linear combination result based on the second historical feature data, the second initial weight, the second historical shard feature, the first initial shard weight and the second initial shard weight, and send the historical encrypted linear combination result to the initiating end, wherein the second historical shard feature is used to indicate the shard of the historical privacy combination feature at the cooperating end; Receive the encrypted loss sent by the initiator, wherein the encrypted loss is obtained by encrypting the loss value by the initiator; the loss value is calculated by the initiator based on historical business prediction results and corresponding actual business results; the historical business prediction result is obtained by the initiator based on a first historical linear combination result and a second historical linear combination result obtained by decrypting the historical encrypted linear combination result; the first historical linear combination result is obtained by the initiator based on the first historical feature data, the first initial weight, the first historical shard feature and the first initial shard weight; Performing a gradient update on the second initial weight and the second initial sharding weight based on the encryption loss to obtain a second updated weight and a second updated sharding weight, wherein the initiator is further configured to perform a gradient update on the first initial weight and the first initial sharding weight based on the loss value during the federated learning to obtain a first updated weight and a first updated sharding weight; Repeat the above operations until a predetermined termination condition is reached, and use the second updated weight and the second updated shard weight obtained when the predetermined termination condition is reached as the second weight and the second shard weight, respectively, wherein the initiator is also used to use the first updated weight and the first updated shard weight obtained when the predetermined termination condition is reached as the first weight and the first shard weight, respectively.

9. A business processing method based on federated learning, characterized in that: include: The initiator obtains a first linear combination result based on first feature data, a first weight corresponding to the first feature data, a first shard feature, and a first shard weight corresponding to the first shard feature, wherein the first feature data is obtained based on business data held by the initiator, the first shard feature is used to indicate the sharding of the privacy combination feature at the initiator, the privacy combination feature is obtained based on a combination of the first feature data and the second feature data, and the second feature data is obtained based on business data held by a cooperating end cooperating with the initiator; The initiating end encrypts the first sharding weight to obtain a first encrypted sharding weight, and sends the first encrypted sharding weight to the cooperating end; The cooperation end generates an encrypted linear combination result based on the second feature data, the second weight corresponding to the second feature data, the second sharding feature, the first encrypted sharding weight, and the second sharding weight corresponding to the second sharding feature, wherein the second sharding feature is used to indicate the sharding of the privacy combination feature at the cooperation end; The initiator decrypts the encrypted linear combination result to obtain a second linear combination result; The initiator obtains a target service prediction result based on the first linear combination result and the second linear combination result.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the business processing method based on federated learning as described in any one of claims 1 to 9.