Data processing methods, apparatus, equipment and storage media

CN114547635BActive Publication Date: 2026-08-14WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-27
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

在联邦机制下,用于计算信息价值的数据可能分布在不同的设备上,如何在保证数据安全的情况下,快速有效地确定信息价值成为亟待解决的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547635B_ABST
    Figure CN114547635B_ABST
Patent Text Reader

Abstract

This invention discloses a data processing method, apparatus, device, and storage medium. The method includes: determining whether a participant is a target variable provider; if so, homomorphically encrypting the target variables corresponding to multiple data IDs and sending the multiple data IDs and the encrypted target variables to a feature variable provider; determining whether a participant is a feature variable provider; if so, binning the multiple data IDs according to the feature variables corresponding to the multiple data IDs stored locally, summing the encrypted target variables in each bin, and sending the summation results for each bin to the target variable provider; if the participant is a target variable provider, decrypting the summation results and calculating the information value of the feature variables based on the decrypted data. This invention can securely and quickly enable different participants to jointly determine information value, improving the efficiency of determining information value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous development of computer technology and big data processing technology, federated learning is being applied more and more widely. Federated learning can unite multiple parties to train models and improve the effectiveness of artificial intelligence.

[0003] When building federated learning models, it is often necessary to select feature variables. In selecting feature variables, their information value must often be considered. Under a federated mechanism, the data used to calculate information value may be distributed across different devices. Therefore, how to quickly and effectively determine information value while ensuring data security becomes a pressing problem. Summary of the Invention

[0004] The main objective of this invention is to provide a data processing method, apparatus, device, and storage medium, which aims to improve the computational efficiency of information value while ensuring data security.

[0005] To achieve the above objectives, the present invention provides a data processing method applicable to any participant in the calculation of information value, the method comprising:

[0006] Determine whether the participant is the target variable provider. If the participant is the target variable provider, homomorphically encrypt the target variables corresponding to the multiple data IDs respectively, and send the multiple data IDs and the encrypted target variables to the feature variable provider.

[0007] Determine whether the participant is a feature variable provider. If the participant is a feature variable provider, then according to the feature variables corresponding to the multiple data IDs stored locally, bin the multiple data IDs, sum the encrypted target variable in each bin, and send the summation results corresponding to each bin to the target variable provider.

[0008] If the participant is the provider of the target variable, the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data.

[0009] In one possible implementation, the method further includes:

[0010] Obtain source code for calculating information value, the source code including multiple role identifiers and operation code belonging to each role identifier; wherein, each role identifier includes the identifier of the target variable provider and / or feature variable provider, and the operation code belonging to the role identifier is used to instruct the participant corresponding to the role identifier to perform the operation;

[0011] The source code is compiled to obtain target code, which is used to perform information value calculation. The role identifier is generated as a corresponding judgment statement after compilation to determine whether the participant executing the target code is the participant corresponding to the role identifier. The operation code belonging to the role identifier is generated as a corresponding operation statement after compilation to be executed when the judgment result of the judgment statement is yes.

[0012] In one possible implementation, calculating the information value of the feature variables based on the decrypted data includes:

[0013] For each sub-box, calculate the positive and negative quantity percentages corresponding to that sub-box based on the decrypted data;

[0014] The information value of the feature variables is calculated based on the positive and negative quantity proportions corresponding to each sub-box.

[0015] Wherein, the positive quantity ratio is the ratio of the number of positive data IDs in the bin to the total number of all positive data IDs, and the negative quantity ratio is the ratio of the number of negative data IDs in the bin to the total number of all negative data IDs.

[0016] The positive data ID is the data ID corresponding to the first value of the target variable, and the negative data ID is the data ID corresponding to the non-first value of the target variable.

[0017] In one possible implementation, the target variables corresponding to multiple data IDs are homomorphically encrypted, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider, including:

[0018] For each of the plurality of data IDs, homomorphic encryption is performed on the target variable and the inverse variable corresponding to the data ID;

[0019] Send the plurality of data IDs, along with the encrypted target variable and the encrypted inverse variable corresponding to each data ID, to the feature variable provider;

[0020] Accordingly, the encrypted target variable is summed in each bin, including:

[0021] For each bin, calculate the sum of the encrypted target variables and the sum of the encrypted inverse variables corresponding to each data ID in the bin; wherein each bin includes at least one data ID.

[0022] In one possible implementation, based on the decrypted data, the positive and negative quantity proportions corresponding to the bins are calculated, including:

[0023] Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs;

[0024] The percentage of negative data is calculated based on the sum of the decrypted inverse variables corresponding to the bins and the total number of all negative data IDs.

[0025] In one possible implementation, the method further includes:

[0026] If the participant is a feature variable provider, then the number of data IDs in each bin is sent to the target variable provider;

[0027] Accordingly, based on the decrypted data, the proportion of positive and negative quantities is calculated, including:

[0028] Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs;

[0029] The percentage of negative data IDs is calculated based on the sum of the decrypted target variables corresponding to the bins, the number of data IDs in the bins, and the total number of all negative data IDs.

[0030] In one possible implementation, the multiple data IDs are binned according to the feature variables corresponding to the multiple data IDs stored locally, and the encrypted target variable is summed in each bin. The summation results corresponding to each bin are then sent to the target variable provider, including:

[0031] Obtain feature variables of various types;

[0032] For each type, the multiple data IDs are binned according to the characteristic variables of the type, and the encrypted target variable is summed in each bin;

[0033] For each type, the type and the summation results corresponding to each bin under the type are sent to the target variable provider;

[0034] Accordingly, the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data, including:

[0035] For each type, the summation results corresponding to each sub-box are decrypted, and the information value of the characteristic variables of the type is calculated based on the decrypted data;

[0036] Accordingly, the method further includes:

[0037] If the participant is the provider of the target variable, then after obtaining the information value corresponding to multiple types, the information value is sorted, and the type of feature variable used for training the federated model is selected according to the sorting result.

[0038] Determine whether the feature variable provider is a participant in the federated model training. If so, send the type of feature variable used to the feature variable provider to jointly train the federated model with the feature variable provider.

[0039] The present invention also provides a data processing apparatus, applicable to any participant in the calculation of information value, the apparatus comprising:

[0040] The first processing module is used to determine whether the participant is the target variable provider. If the participant is the target variable provider, the target variables corresponding to the multiple data IDs are homomorphically encrypted respectively, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider.

[0041] The second processing module is used to determine whether the participant is a feature variable provider. If the participant is a feature variable provider, the module bins the multiple data IDs according to the feature variables corresponding to the multiple data IDs stored locally, sums the encrypted target variable in each bin, and sends the summation result corresponding to each bin to the target variable provider.

[0042] The third processing module is used to decrypt the summation result when the participant is the provider of the target variable, and to calculate the information value of the feature variable based on the decrypted data.

[0043] The present invention also provides a data processing apparatus, the data processing apparatus comprising: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program, when executed by the processor, implements the steps of the data processing method as described in any of the preceding claims.

[0044] The present invention also provides a computer-readable storage medium storing a data processing program, which, when executed by a processor, implements the steps of the data processing method as described in any of the preceding claims.

[0045] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data processing method described in any of the preceding claims.

[0046] The data processing method, apparatus, device, and storage medium provided by this invention are applied to any participant in the calculation of information value. The method can determine whether the participant is a target variable provider. If the participant is a target variable provider, the target variables corresponding to multiple data IDs are homomorphically encrypted, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider. The method further determines whether the participant is a feature variable provider. If the participant is a feature variable provider, the multiple data IDs are binned according to the feature variables corresponding to the multiple data IDs stored locally, and the encrypted target variables are summed in each bin. The summation results for each bin are sent to the target variable provider. If the participant is a target variable provider, the summation results are decrypted, and the information value of the feature variables is calculated based on the decrypted data. This invention enables different participants to perform homomorphic encryption and binning summation on the target variable, thereby enabling different participants to jointly determine the information value in a secure and fast manner, improving the overall efficiency of model training. Furthermore, by determining the identity of the participants and providing different execution operations for different participants, a single code can be used by multiple participants without having to write different code for different participants. This effectively reduces the development difficulty of information value calculation code and improves the efficiency of determining information value. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram of a multi-party interaction for calculating information value, provided by an embodiment of the present invention.

[0049] Figure 3 A flowchart illustrating a data processing method provided in an embodiment of the present invention;

[0050] Figure 4 A schematic diagram illustrating the principle of information value calculation provided in an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of a process for binning and summing based on type, provided by an embodiment of the present invention;

[0052] Figure 6 A flowchart illustrating another data processing method provided in an embodiment of the present invention;

[0053] Figure 7This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention;

[0054] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention.

[0055] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0056] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0057] In federated learning, multiple participants each possess sample data, and the federated model is trained collaboratively. The sample data may contain various types of feature variables. For each type of feature variable, its information value can be calculated to determine whether it should be used during model training. The information value of a feature variable reflects its predictive power, thus effectively measuring its contribution to the model's prediction results.

[0058] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of the present invention. For example... Figure 1 As shown, the federated model can be used to predict whether a user will default on a loan. The types of feature variables that can be used for training the federated model include age, region, and savings. In the feature selection stage before training the federated model, the information value corresponding to each type of feature variable can be calculated. The information value reflects the degree to which the feature variable of that type contributes to the model's predictive ability.

[0059] For example, suppose a user's deposits have a significant impact on whether they will default on payments; the more deposits a user has, the less likely they are to default, and the less deposits a user has, the more likely they are to default. In this case, the information value corresponding to the deposit category is relatively high. On the other hand, suppose a user's location does not have a significant impact on whether they will default on payments, and the default rates in different regions are relatively similar. In this case, the information value corresponding to the region category is relatively low.

[0060] Assuming the information values ​​of age, region, and savings are 0.6, 0.1, and 0.9 respectively, age and savings have higher information value. Therefore, age and savings can be selected as the feature variables for model training. During the model training phase, users' age and savings can be input as feature variables into the model, which can effectively improve the model's predictive ability.

[0061] Under a federal mechanism, the data used to calculate the value of information may be distributed among different stakeholders. Figure 2 This is a schematic diagram illustrating a multi-party interaction for calculating information value, provided as an embodiment of the present invention. Figure 2 As shown, Party A has a data ID and corresponding feature variables such as deposit amount, while Party B has a data ID and corresponding target variable, for example, 1 represents overdue users and 0 represents non-overdue users. Party A and Party B jointly calculate the information value based on the data ID, feature variables, and target variable.

[0062] In this situation, neither party may want the other to know the data they possess, so how to securely calculate the value of information is a problem that needs to be solved.

[0063] Furthermore, in order to calculate the value of information, it may be necessary to perform some operations on party A and some operations on party B. Therefore, developers need to design different code logic implementations for each participant, which involves multi-party programming and is quite complex. This results in a longer time spent determining the value of information and lower efficiency.

[0064] In view of this, embodiments of the present invention provide a data processing method applicable to any of the aforementioned participants. The method can determine whether a participant is a provider of the target variable; if so, the target variable is homomorphically encrypted and sent. It can also determine whether a participant is a provider of the feature variable; if so, the binning summation result is determined by combining its own feature variable and the encrypted target variable and sent. Finally, the target variable provider calculates the information value based on the summation result. Embodiments of the present invention enable different participants to perform homomorphic encryption and binning summation on the target variable separately, thereby enabling different participants to jointly determine the information value securely and quickly, improving the overall efficiency of model training. Furthermore, by determining the identity of the participants and providing different execution operations for different participants, a single code can be used by multiple participants, eliminating the need to write different code for different participants, effectively reducing the development difficulty of information value calculation code and improving the efficiency of determining information value.

[0065] The following detailed description of some embodiments of the present invention is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features thereof can be combined with each other.

[0066] Figure 3 This is a flowchart illustrating a data processing method provided in an embodiment of the present invention. The executing entity of the method provided in this embodiment can be any participant in the calculation of information value.

[0067] Specifically, the data used for information value calculation can be distributed among multiple participants. For example, these participants may include a target variable provider and a feature variable provider, respectively providing the target variable and feature variables. The method can be applied to any of these participants. These participants can specifically be servers or terminal devices, etc. Figure 3 As shown, the method may include:

[0068] Step 301: Determine whether the participant is the target variable provider. If the participant is the target variable provider, homomorphically encrypt the target variables corresponding to the multiple data IDs respectively, and send the multiple data IDs and the encrypted target variables to the feature variable provider.

[0069] In this embodiment of the invention, when calculating the value of information, the participants first determine whether they are the provider of the target variable or the provider of the feature variable, and perform different operations according to their different identities.

[0070] The participants can determine their own identity in several ways. Optionally, they can determine whether they possess the target variable required for value calculation, thereby identifying themselves as the target variable provider; alternatively, they can determine their identity by comparing their own identifier with the identifiers of target variable providers or feature variable providers; or, the user can input the participant's identity information.

[0071] If the participant is the target variable provider, the target variables corresponding to multiple data IDs (Identity document) can be homomorphically encrypted respectively, and the multiple data IDs and the encrypted target variables can be sent to the feature variable provider.

[0072] Figure 4 This is a schematic diagram illustrating the principle of information value calculation according to an embodiment of the present invention. For example... Figure 4 As shown, the provider of the target variable possesses both a data ID and the target variable. The data ID can refer to the ID of the sample data used for training the federated model. The sample data may include the target variable and / or feature variables. The data ID can be user identification information corresponding to the sample data, such as an ID card number, mobile phone number, account number, or ID number. The target variable can be the label of the sample data, and the feature variables can be data that is not the target variable.

[0073] Specifically, the data IDs of the feature variable provider and the target variable provider can overlap, allowing both providers to use sample data with the same data IDs to calculate information value and select features.

[0074] See Figure 4 The target variable provider possesses data IDs: ID1 to Idn, and corresponding target variables: Y1 to Yn. For each data ID, the target variable corresponding to that data ID is homomorphically encrypted. Then, the multiple data IDs and the encrypted target variables are sent to the feature variable provider, i.e., IDi and encry(Yi) are sent to the feature variable provider, where i ranges from 1 to n, and encry() represents homomorphic encryption. Examples of target variables can be found in Table 1.

[0075] Table 1. Examples of one type of target variable

[0076] ID1 0 ID2 1 ID3 1 ID4 0 ID5 0 ID6 0 ID7 0 ID8 0 ID9 1

[0077] In this system, a target variable of 0 indicates that the corresponding user has no overdue payment behavior, while a target variable of 1 indicates that the corresponding user has overdue payment behavior. The target variable corresponding to each ID is homomorphically encrypted, resulting in n encrypted target variables, which are then sent to the feature variable provider along with their corresponding data IDs.

[0078] Step 302: Determine whether the participant is a feature variable provider. If the participant is a feature variable provider, then according to the feature variables corresponding to the multiple data IDs stored locally, bin the multiple data IDs, sum the encrypted target variable in each bin, and send the summation results corresponding to each bin to the target variable provider.

[0079] The participating party can first perform the judgment in the previous step. If the judgment result is yes, then the encryption and sending operations in the previous step are performed; if the judgment result is no, then the encryption and sending operations in the previous step are not performed.

[0080] Then, regardless of the judgment result of the previous step, the participating party can continue to perform the judgment in this step. If the judgment result is yes, the binning and summation operation in this step is performed; otherwise, the binning and summation operation is not performed.

[0081] Specifically, if the judgment result in this step is yes, the multiple data IDs can be binned according to the feature variables corresponding to the multiple data IDs stored locally, so as to obtain the ID of each bin and the data IDs contained in each bin.

[0082] like Figure 4 As shown, after binning n data IDs, k bins are obtained, where k and n are both positive integers and k < n. The ID of the i-th bin is denoted as ID_set_i. Each bin can include one or more data IDs. For example, in the first bin ID_set_i, the following data IDs are included: ID1, ID2, ID5, etc.

[0083] Binning is similar to grouping data IDs. When binning, the characteristic variables corresponding to the data IDs can be considered. For example, if the characteristic variable is a user's deposit, the data IDs can be binned according to deposit. Examples of characteristic variables can be found in Table 2.

[0084] Table 2 Examples of a characteristic variable

[0085] ID1 10000 ID2 0 ID3 2000 ID4 5000 ID5 10000 ID6 20000 ID7 3500 ID8 50 ID9 2500

[0086] Based on the deposit amount, deposits can be divided into three tiers: 0-999; 1000-4999; and 5000 and above. Binning the data IDs in Table 2 according to this tier yields three bins: Bin 1, corresponding to the 0-999 tier, includes ID2 and ID8; Bin 2, corresponding to the 1000-4999 tier, includes ID3, ID7, and ID9; and Bin 3, corresponding to the 5000 and above tier, includes ID1, ID4, ID5, and ID6. Of course, other binning methods can be used, and this embodiment does not impose any restrictions on them.

[0087] After binning, the encrypted target variable can be summed in each bin, and the summation results for each bin can be sent to the target variable provider.

[0088] Specifically, for each bin, the encrypted target variables corresponding to all data IDs within that bin are summed to obtain the summation result for that bin. This summation result for each bin is then sent to the target variable provider. See also... Figure 4 , sum(encry(Yi)) represents the summation result corresponding to the i-th bin.

[0089] Step 303: If the participant is the provider of the target variable, then the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data.

[0090] After obtaining the summation result, the provider of the target variable can decrypt the summation result to obtain the plaintext of the summation result. Since homomorphic encryption is used in this embodiment of the invention, encrypting the data first and then summing it yields the same result as summing the data first and then encrypting it. Therefore, in this step, directly decrypting the summation result will yield the correct plaintext, while also ensuring that the original data is not obtained by the other party. Throughout the process, no party leaks any original data.

[0091] After obtaining the summation result for each sub-box, the corresponding information value can be calculated. There are various ways to calculate the information value, and this embodiment does not limit this method.

[0092] In practical applications, code corresponding to the above steps can be constructed. Participants can execute the same set of code to implement the above steps. Participants execute the judgment statements in the above steps in sequence, and perform the corresponding operation when the judgment result is yes, so that different participants can share a set of code.

[0093] The data processing method provided in this embodiment is applied to any participant in the calculation of information value. It can determine whether the participant is a target variable provider. If the participant is a target variable provider, the target variables corresponding to multiple data IDs are homomorphically encrypted, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider. It can also determine whether the participant is a feature variable provider. If the participant is a feature variable provider, the multiple data IDs are binned according to the feature variables corresponding to the multiple data IDs stored locally, and the encrypted target variables are summed in each bin. The summation results for each bin are sent to the target variable provider. If the participant is a target variable provider, the summation results are decrypted, and the information value of the feature variables is calculated based on the decrypted data. The embodiments of the present invention can enable different participants to perform homomorphic encryption and binning summation on the target variable, thereby enabling different participants to jointly determine the information value in a secure and fast manner. Furthermore, by determining the identity of the participants and providing different execution operations for different participants, a single code can be used by multiple participants without having to write different code for different participants. This effectively reduces the development difficulty of information value calculation code and improves the efficiency of determining information value.

[0094] Based on the technical solutions provided in the above embodiments, optionally, special statements can be designed in the source code to identify the operations of different participants, such as the `with role` statement. See the following source code for reference:

[0095]

[0096]

[0097] In this configuration, the `mpc` statement in line 1 indicates that the encryption method is homomorphic. Line 2 indicates the creation of a new `fed_feature` function. The `with role` statement in line 3 indicates which participant will execute the following code.

[0098] For ease of description, the provider of the target variable is denoted as Guest, or G for short, and the provider of the feature variables can be denoted as Host, or H for short. `with role(G, H)` means that both G and H will execute the following code; `with role(G)` means that only G will execute the corresponding code; and `with role(H)` means that only H will execute the corresponding code.

[0099] Referring to the code above, the initialization condition is set to "with role(G, H)". The initialization operations can include reading data, which is implemented by the statement `date = fed_sess.reader`. Both G and H will perform the corresponding operations. If one of them has a separate operation, the "with role()" syntax can be nested.

[0100] The code executed in Guest uses the with_role(G) modifier to perform homomorphic encryption on Yi and 1-Yi, and pushes (sends) the Guest's data ID and the homomorphically encrypted result to Host.

[0101] The code executed in the Host, decorated with `with_role(H)`, performs binning based on the Host's feature variables. It extracts the encrypted Yi and 1-Yi sent by the Guest, and performs ciphertext summation within the bins. Finally, the Guest decrypts the sum and calculates the information value, thus obtaining the predictive power of the feature variables.

[0102] The following section provides a detailed explanation of the information value calculation process, referring to the code above.

[0103] First, the target variable provider (Guest) homomorphically encrypts the target variables corresponding to multiple data IDs, and then sends the multiple data IDs and the encrypted target variables to the feature variable provider (Host). Optionally, the inverse variables of the target variables can be encrypted simultaneously with the target variables, where for any data ID, the value of the target variable is exactly the opposite of the value of its inverse variable.

[0104] When the target variable takes the value of 1 or 0, the inverse variable can also take the values ​​of 1 and 0, but they are opposite to the target variable. See Table 3 for details.

[0105] Table 3. Examples of target and inverse variables

[0106]

[0107]

[0108] As shown in Table 3, the corresponding inverse variable can be calculated based on the target variable for each data ID. Assuming the target variable is Y, the inverse variable is 1-Y.

[0109] Specifically, homomorphically encrypting the target variables corresponding to multiple data IDs and sending the multiple data IDs and the encrypted target variables to the feature variable provider can include: for each data ID, homomorphically encrypting the target variable and its inverse variable; and sending the multiple data IDs, along with the encrypted target variable and its inverse variable for each data ID, to the feature variable provider. Homomorphically encrypting the target variable and its inverse variable separately effectively protects them, ensuring that the data is not leaked.

[0110] Referring to the code above, for the i-th data ID: IDi, homomorphic encryption is performed on its corresponding target variable Yi and inverse variable 1-Yi to obtain the encrypted target variable encry(Yi) and inverse variable encry(1-Yi). Then, IDi, encry(Yi), and encry(1-Yi) are sent (push) to the Host.

[0111] Optionally, summing the encrypted target variables in each bin can include: for each bin, calculating the sum of the encrypted target variables and the sum of the encrypted inverse variables corresponding to each data ID in the bin; wherein each bin includes at least one data ID. By summing the target variables and inverse variables separately in each bin, the number of positive data IDs and the number of negative data IDs in each bin can be effectively determined, improving data processing efficiency while ensuring data security.

[0112] Referring to the code above, after binning, the Host retrieves (pull) encry(Yi) and encry(1-Yi). For each bin, it calculates the sum of the encrypted target variables corresponding to at least one data ID in the bin, sum(encry(Yi)) and the sum of the encrypted inverse variables, sum(encry(1-Yi)), and then feeds sum(encry(Yi)) and sum(encry(1-Yi)) back to the Guest.

[0113] The Guest decrypts sum(encry(Yi)) to obtain the sum of the target variables npos_i corresponding to the i-th bin; the Guest decrypts sum(encry(1-Yi)) to obtain the sum of the inverse variables nneg_i corresponding to the i-th bin. Then, the information value can be calculated based on the decrypted data.

[0114] Optionally, calculating the information value of the feature variable based on the decrypted data may include: for each bin, calculating the positive and negative quantity proportions corresponding to that bin based on the decrypted data; and calculating the information value of the feature variable based on the positive and negative quantity proportions corresponding to each bin. Calculating the positive and negative quantity proportions allows for quick and accurate calculation of information value.

[0115] Wherein, the positive quantity ratio is the ratio of the number of positive data IDs in the bin to the total number of all positive data IDs, and the negative quantity ratio is the ratio of the number of negative data IDs in the bin to the total number of all negative data IDs; the positive data ID is the data ID whose corresponding target variable is a first value, and the negative data ID is the data ID whose corresponding target variable is not a first value.

[0116] The first value can be designed according to actual needs. Optionally, the first value can be 1. When the target variable is 1, it indicates that the user has overdue behavior, and the user's data ID is a positive data ID. Conversely, when the target variable is 0, the data ID is a negative data ID, indicating that the corresponding user has no overdue behavior.

[0117] Optionally, calculating the positive and negative quantity proportions corresponding to each bin based on the decrypted data can include: calculating the positive quantity proportion based on the sum of the decrypted target variables corresponding to each bin and the total number of all positive data IDs; and calculating the negative quantity proportion based on the sum of the decrypted inverse variables corresponding to each bin and the total number of all negative data IDs. By using the sum of the target variables and the sum of the inverse variables, the positive and negative quantity proportions can be determined quickly and accurately, improving data processing efficiency without data leakage.

[0118] Referring to the code above, distpos_i = npos_i / pos_total, where distpos_i is the percentage of positive data IDs in the i-th bin, and pos_total is the total number of all positive data IDs, that is, the total number of positive data IDs among the multiple data IDs; distneg_i = nneg_i / neg_total, where distneg_i is the percentage of negative data IDs in the i-th bin, and neg_total is the total number of all negative data IDs, that is, the total number of negative data IDs among the multiple data IDs.

[0119] After obtaining the proportions of positive and negative data for the i-th bin, we can calculate the WOE (weight of evidence) for the i-th bin: woe_i = 100 * log(dispos_i / distneg_i), and the IV (Information Value): IV = (dispos_i - distneg_i) * log(dispos_i / distneg_i). The WOE can reflect the predictive ability of a feature to some extent, and the IV can be calculated based on the WOE.

[0120] Using the above code, for each of the multiple data IDs, the target variable and its inverse variable corresponding to the data ID can be homomorphically encrypted and sent. For each bin, the sum of the encrypted target variable and the sum of the encrypted inverse variable corresponding to each data ID in the bin can be calculated. Thus, the positive quantity ratio and negative quantity ratio can be calculated based on the sum of the target variable and the sum of the inverse variable, so as to quickly and accurately calculate the information value and improve the efficiency of calculating the information value.

[0121] Based on the technical solutions provided in the above embodiments, alternatively, the encrypted inverse variable may not be used, and other methods may be employed to determine the proportion of negative quantities.

[0122] Optionally, if the participant is a feature variable provider, the number of data IDs in each bin is sent to the target variable provider. If the number of data IDs in each bin is equal, only the number of data IDs in a single bin may be sent.

[0123] Accordingly, based on the decrypted data, the positive quantity ratio and the negative quantity ratio are calculated, including: calculating the positive quantity ratio based on the sum of the decrypted target variables corresponding to the bin and the total number of all positive data IDs; and calculating the negative quantity ratio based on the sum of the decrypted target variables corresponding to the bin, the number of data IDs in the bin, and the total number of all negative data IDs.

[0124] Specifically, when calculating the percentage of negative quantities for each bin, the number of data IDs in the bin can be subtracted from the sum of the target variables corresponding to the bin, and the difference can be divided by the total number of all negative IDs to obtain the percentage of negative quantities.

[0125] In this implementation, the specific implementation scheme for calculating the positive quantity ratio and other steps can be found in the above embodiments, and will not be repeated here.

[0126] In this implementation, there is no need to transmit information about the inverse variables between the feature variable provider and the target variable provider. This effectively reduces the problem of target variable leakage caused by inferring the target variable from the inverse variable, and improves the efficiency of data transmission and computation.

[0127] Of course, the number of data IDs within the transmission bin is not mandatory. The target variable provider can pre-store the number of data IDs within the bin, or the user can input the number of data IDs within the bin, thereby further improving the efficiency of data transmission.

[0128] Based on the technical solutions provided in the above embodiments, it is optional to process multiple types of feature variables separately. Figure 5 This is a schematic diagram illustrating a process for binning and summing based on type, provided as an embodiment of the present invention. For example... Figure 5 As shown, based on the feature variables corresponding to the multiple data IDs stored locally, the multiple data IDs are binned, and the encrypted target variable is summed in each bin. The summation results corresponding to each bin are then sent to the target variable provider. This process may include:

[0129] Step 501: Obtain feature variables of various types.

[0130] For example, characteristic variables can include various types such as age and savings.

[0131] Step 502: For each type, bin the multiple data IDs according to the characteristic variables of the type, and sum the encrypted target variables in each bin.

[0132] Suppose we have two types of feature variables: age and savings. We can then use the method described above to bin the data IDs based on age, and calculate the sum of the encrypted target variables in each bin. This sum of target variables will then allow us to calculate the information value corresponding to the age.

[0133] Similarly, following the aforementioned method, data IDs can be binned according to deposits, and the sum of encrypted target variables can be calculated in each bin to obtain the information value corresponding to the deposits based on the sum of target variables.

[0134] The calculation of the value of different types of information can be carried out in parallel or sequentially, and the embodiments of the present invention do not impose any restrictions on this.

[0135] Step 503: For each type, send the type and the summation results of each bin under the type to the target variable provider.

[0136] Accordingly, the target variable provider decrypts the summation result and calculates the information value of the feature variable based on the decrypted data. This may include: for each type, decrypting the summation result corresponding to each bin and calculating the information value of the feature variable of that type based on the decrypted data.

[0137] Specifically, for each type, the information value corresponding to that type can be calculated using the method described in the above embodiments, and finally, the information values ​​corresponding to multiple types can be obtained.

[0138] The above scheme can calculate the information value corresponding to different types, and then select feature variables according to the information value corresponding to different types to meet the needs of federated learning.

[0139] Optionally, the method further includes: if the participant is a target variable provider, after obtaining the information values ​​corresponding to multiple types, sorting the information values, and selecting the feature variable type used for federated model training according to the sorting result; determining whether the feature variable provider is a participant in federated model training, and if so, sending the used feature variable type to the feature variable provider to jointly implement the training of the federated model with the feature variable provider.

[0140] Specifically, the information value of multiple types can be sorted first, and a preset number of types can be selected as the feature variable types used during federated model training based on the sorting.

[0141] In practical applications, the federated model can be used to predict whether a user will default on a loan. After the model is trained, the characteristic variables of the user to be analyzed can be input into the model to obtain corresponding results. These results can be used to indicate whether the user will default, or the likelihood of default. Based on the results, appropriate processing can be performed, such as sending the results to staff, or adjusting the user's loan amount based on the results, etc.

[0142] Furthermore, the target variable provider can determine whether the feature variable provider it interacts with is a participant in the federated model training. If so, it sends the type of feature variable it uses to the feature variable provider, thereby enabling the target variable provider and the feature variable provider to jointly train the federated model. If it determines that the feature variable provider is not a participant in the federated model training, it does not need to send the type of feature variable it uses.

[0143] By identifying the provider of the feature variables and determining whether to send the type of feature variables used, the efficiency of federated model training and data security can be effectively improved.

[0144] The above embodiments provide the execution process of the participating parties. Based on this, the embodiments of the present invention also provide a compilation process. Figure 6 This is a flowchart illustrating another data processing method provided in an embodiment of the present invention. Figure 6 As shown, the method may include:

[0145] Step 601: Obtain the source code used for information value calculation.

[0146] The source code includes role identifiers and operation codes.

[0147] Optionally, the source code may include multiple role identifiers and operation codes belonging to each role identifier; each role identifier includes the identifier of the target variable provider and / or feature variable provider, and the operation codes belonging to the role identifier are used to instruct the corresponding participant to perform the operation.

[0148] Specifically, the source code used for calculating information value can be in any language, and optionally, the source code can be written in Python.

[0149] Examples of the source code can be found in the code provided in the foregoing embodiments. Role identifiers can be qualified by the withrole statement, such as with role(G,H), with role(G), and with role(H), which are all role identifiers used to indicate the provider of the target variable and / or the provider of the feature variable.

[0150] The operation code belonging to each role identifier can be the code that the participant corresponding to the role identifier needs to execute. For example, the operation code under the role identifier with role(G): {IDi, encry(Yi), encry(1-Yi)}<- Homomorphic encryption of Yi and 1-Yi is used to indicate to the target variable provider that the operation of homomorphic encryption is required.

[0151] Step 602: Compile the source code to obtain target code for information value calculation.

[0152] Specifically, the source code is compiled to obtain target code for information value calculation. The role identifier, after compilation, generates a corresponding judgment statement to determine whether the participant executing the target code is the participant corresponding to the role identifier. Operation code belonging to the role identifier, after compilation, generates corresponding operation statements to be executed when the judgment statement's result is yes.

[0153] For example, compiling the role identifier with role(G) generates a conditional statement to determine whether a participant is the provider of the target variable.

[0154] The judgment statement points to its corresponding operation statement when the result is yes. Compiling the operation code yields the corresponding operation statement.

[0155] In this embodiment of the invention, a federated learning compiler can be used to compile the source code to obtain the corresponding target code, which can be machine-executable code.

[0156] Optionally, the federated learning compiler can first generate a computation graph from the source code. This computation graph includes role nodes corresponding to role identifiers and branch nodes belonging to those role nodes. The branch nodes are generated based on the operation code belonging to the role identifiers. After obtaining the computation graph, target code can be generated, where conditional statements are generated for the corresponding role nodes, and operation statements are generated for the other nodes.

[0157] Optionally, all variables, operators, control characters, etc., in the function can be compiled into intermediate code. The intermediate code consists of operations (OPs), including data OPs, computation OPs, and control OPs. The target code can be obtained from the intermediate code.

[0158] Step 603: Execute the target code.

[0159] Specifically, when the participating parties execute the target code, they can implement the method described in any of the foregoing embodiments, thereby realizing the calculation of information value and the selection of features. The specific implementation principles and processes can be found in the foregoing embodiments, and will not be repeated here.

[0160] The data processing method provided in this embodiment obtains the source code used for information value calculation. The source code includes multiple role identifiers and operation code belonging to each role identifier. The source code is compiled to obtain target code. Executing the target code can realize information value calculation and feature selection. This simplifies the development process of information value calculation and feature selection functions in a federated scenario, eliminates the need for parties to switch back and forth to run code, and facilitates user use and debugging.

[0161] Figure 7 This is a schematic diagram of a data processing device provided in an embodiment of the present invention. The data processing device can be applied to any participant in the calculation of information value. Figure 7 As shown, the data processing device may include:

[0162] The first processing module 701 is used to determine whether the participant is the target variable provider. If the participant is the target variable provider, the target variables corresponding to the multiple data IDs are homomorphically encrypted respectively, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider.

[0163] The second processing module 702 is used to determine whether the participant is a feature variable provider. If the participant is a feature variable provider, the multiple data IDs are binned according to the feature variables corresponding to the multiple data IDs stored locally, and the encrypted target variable is summed in each bin. The summation results corresponding to each bin are sent to the target variable provider.

[0164] The third processing module 703 is used to decrypt the summation result when the participant is the target variable provider, and to calculate the information value of the feature variable based on the decrypted data.

[0165] The data processing apparatus provided by this invention is applied to any participant in information value calculation. It can determine whether the participant is a target variable provider. If the participant is a target variable provider, it homomorphically encrypts the target variables corresponding to multiple data IDs and sends the multiple data IDs and the encrypted target variables to the feature variable provider. It also determines whether the participant is a feature variable provider. If the participant is a feature variable provider, it bins the multiple data IDs according to the feature variables corresponding to the multiple data IDs stored locally, sums the encrypted target variables in each bin, and calculates the summation results for each bin. The result is sent to the target variable provider. If the participant is the target variable provider, the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data. This allows different participants to perform homomorphic encryption and binning summation on the target variable separately, thereby enabling different participants to jointly determine the information value securely and quickly, improving the overall efficiency of model training. Furthermore, by determining the identity of the participants and providing different execution operations for different participants, a single code can be used by multiple participants without having to write different code for different participants. This effectively reduces the development difficulty of the information value calculation code and improves the efficiency of determining the information value.

[0166] In one alternative implementation, the data processing apparatus further includes:

[0167] A compilation module is used to acquire source code for information value calculation. The source code includes multiple role identifiers and operation code belonging to each role identifier. Each role identifier includes an identifier of the target variable provider and / or feature variable provider. The operation code belonging to the role identifier is used to instruct the participant corresponding to the role identifier to perform an operation. The source code is compiled to obtain target code, which is used to implement information value calculation. After compilation, each role identifier generates a corresponding judgment statement to determine whether the participant executing the target code is the participant corresponding to the role identifier. After compilation, the operation code belonging to the role identifier generates a corresponding operation statement to be executed when the judgment statement's result is yes.

[0168] In one optional implementation, when the third processing module 703 calculates the information value of the feature variable based on the decrypted data, it is specifically used for:

[0169] For each sub-box, calculate the positive and negative quantity percentages corresponding to that sub-box based on the decrypted data;

[0170] The information value of the feature variables is calculated based on the positive and negative quantity proportions corresponding to each sub-box.

[0171] Wherein, the positive quantity ratio is the ratio of the number of positive data IDs in the bin to the total number of all positive data IDs, and the negative quantity ratio is the ratio of the number of negative data IDs in the bin to the total number of all negative data IDs.

[0172] The positive data ID is the data ID corresponding to the first value of the target variable, and the negative data ID is the data ID corresponding to the non-first value of the target variable.

[0173] In one optional implementation, when the first processing module 701 performs homomorphic encryption on the target variables corresponding to multiple data IDs and sends the multiple data IDs and the encrypted target variables to the feature variable provider, it is specifically used for:

[0174] For each of the plurality of data IDs, homomorphic encryption is performed on the target variable and the inverse variable corresponding to the data ID;

[0175] Send the plurality of data IDs, along with the encrypted target variable and the encrypted inverse variable corresponding to each data ID, to the feature variable provider;

[0176] Accordingly, when the second processing module 702 performs the summation of the encrypted target variable in each bin, it is specifically used for:

[0177] For each bin, calculate the sum of the encrypted target variables and the sum of the encrypted inverse variables corresponding to each data ID in the bin; wherein each bin includes at least one data ID.

[0178] In one optional implementation, when the third processing module 703 calculates the positive and negative quantity proportions corresponding to the bins based on the decrypted data, it is specifically used for:

[0179] Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs;

[0180] The percentage of negative data is calculated based on the sum of the decrypted inverse variables corresponding to the bins and the total number of all negative data IDs.

[0181] In one alternative implementation, the second processing module 702 is further configured to:

[0182] If the participant is a feature variable provider, then the number of data IDs in each bin is sent to the target variable provider;

[0183] Accordingly, when the third processing module 703 calculates the positive and negative quantity ratios based on the decrypted data, it is specifically used for:

[0184] Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs;

[0185] The percentage of negative data IDs is calculated based on the sum of the decrypted target variables corresponding to the bins, the number of data IDs in the bins, and the total number of all negative data IDs.

[0186] In one optional implementation, when the second processing module 702 bins the multiple data IDs according to the feature variables corresponding to the multiple data IDs stored locally, sums the encrypted target variable in each bin, and sends the summation results corresponding to each bin to the target variable provider, it is specifically used for:

[0187] Obtain feature variables of various types;

[0188] For each type, the multiple data IDs are binned according to the characteristic variables of the type, and the encrypted target variable is summed in each bin;

[0189] For each type, the type and the summation results corresponding to each bin under the type are sent to the target variable provider;

[0190] Accordingly, when the third processing module 703 decrypts the summation result and calculates the information value of the feature variable based on the decrypted data, it is specifically used for:

[0191] For each type, the summation results corresponding to each sub-box are decrypted, and the information value of the characteristic variables of the type is calculated based on the decrypted data;

[0192] Accordingly, the third processing module 703 is also used for:

[0193] If the participant is the provider of the target variable, then after obtaining the information value corresponding to multiple types, the information value is sorted, and the type of feature variable used for training the federated model is selected according to the sorting result.

[0194] Determine whether the feature variable provider is a participant in the federated model training. If so, send the type of feature variable used to the feature variable provider to jointly train the federated model with the feature variable provider.

[0195] The data processing device provided in this embodiment can be used to execute the technical solutions provided in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0196] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of the present invention. Figure 8 As shown, the device may include: a memory 801, a processor 802, and a data processing program stored on the memory 801 and executable on the processor 802. When the data processing program is executed by the processor 802, it implements the steps of the data processing method as described in any of the foregoing embodiments.

[0197] Alternatively, the memory 801 can be either standalone or integrated with the processor 802.

[0198] The implementation principle and technical effects of the device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.

[0199] This invention also provides a computer-readable storage medium storing a data processing program, which, when executed by a processor, implements the steps of the data processing method as described in any of the foregoing embodiments.

[0200] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the data processing method described in any of the preceding claims.

[0201] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0202] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention.

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

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

[0205] The aforementioned storage medium can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium accessible to general-purpose or special-purpose computers.

[0206] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0207] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0208] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0210] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A data processing method, characterized in that, The method, applicable to any participant in the calculation of information value, includes: Determine whether the participant is the target variable provider. If the participant is the target variable provider, homomorphically encrypt the target variables corresponding to multiple data IDs respectively, and send the multiple data IDs and the encrypted target variables to the feature variable provider. The data IDs include the IDs of the sample data used for training the federated model. The federated model is used to predict whether a user will default on repayments. Determine whether the participant is a feature variable provider. If the participant is a feature variable provider, then based on the feature variables corresponding to the multiple data IDs stored locally, bin the multiple data IDs, sum the encrypted target variable in each bin, and send the summation results corresponding to each bin to the target variable provider. The types of the feature variables include age, region, and savings. If the participant is the provider of the target variable, the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data; the information value is used to determine the degree of contribution of the feature variable to the model's predictive ability. The participants determine their own identity by judging whether they possess the target variables required for value calculation.

2. The method according to claim 1, characterized in that, Also includes: Obtain source code for calculating information value, the source code including multiple role identifiers and operation code belonging to each role identifier; wherein, each role identifier includes the identifier of the target variable provider and / or feature variable provider, and the operation code belonging to the role identifier is used to instruct the participant corresponding to the role identifier to perform the operation; The source code is compiled to obtain target code, which is used to perform information value calculation. The role identifier is generated as a corresponding judgment statement after compilation to determine whether the participant executing the target code is the participant corresponding to the role identifier. The operation code belonging to the role identifier is generated as a corresponding operation statement after compilation to be executed when the judgment result of the judgment statement is yes.

3. The method according to claim 1 or 2, characterized in that, Calculating the information value of the feature variables based on the decrypted data includes: For each sub-box, calculate the positive and negative quantity percentages corresponding to that sub-box based on the decrypted data; The information value of the feature variables is calculated based on the positive and negative quantity proportions corresponding to each sub-box. Wherein, the positive quantity ratio is the ratio of the number of positive data IDs in the bin to the total number of all positive data IDs, and the negative quantity ratio is the ratio of the number of negative data IDs in the bin to the total number of all negative data IDs. The positive data ID is the data ID corresponding to the first value of the target variable, and the negative data ID is the data ID corresponding to the non-first value of the target variable.

4. The method according to claim 3, characterized in that, The target variables corresponding to multiple data IDs are homomorphically encrypted, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider, including: For each of the plurality of data IDs, homomorphic encryption is performed on the target variable and the inverse variable corresponding to the data ID; Send the plurality of data IDs, along with the encrypted target variable and the encrypted inverse variable corresponding to each data ID, to the feature variable provider; Accordingly, the encrypted target variable is summed in each bin, including: For each bin, calculate the sum of the encrypted target variables and the sum of the encrypted inverse variables corresponding to each data ID in the bin; wherein each bin includes at least one data ID.

5. The method according to claim 4, characterized in that, Based on the decrypted data, calculate the positive and negative quantity percentages corresponding to the respective bins, including: Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs; The percentage of negative data is calculated based on the sum of the decrypted inverse variables corresponding to the bins and the total number of all negative data IDs.

6. The method according to claim 3, characterized in that, The method further includes: If the participant is a feature variable provider, then the number of data IDs in each bin is sent to the target variable provider; Accordingly, based on the decrypted data, the proportion of positive and negative quantities is calculated, including: Calculate the percentage of positive data based on the sum of the decrypted target variables corresponding to the bins and the total number of all positive data IDs; The percentage of negative data IDs is calculated based on the sum of the decrypted target variables corresponding to the bins, the number of data IDs in the bins, and the total number of all negative data IDs.

7. The method according to claim 1 or 2, characterized in that, Based on the feature variables corresponding to the multiple data IDs stored locally, the multiple data IDs are binned, and the encrypted target variable is summed in each bin. The summation results corresponding to each bin are then sent to the target variable provider, including: Obtain feature variables of various types; For each type, the multiple data IDs are binned according to the characteristic variables of the type, and the encrypted target variable is summed in each bin; For each type, the type and the summation results corresponding to each bin under the type are sent to the target variable provider; Accordingly, the summation result is decrypted, and the information value of the feature variable is calculated based on the decrypted data, including: For each type, the summation results corresponding to each sub-box are decrypted, and the information value of the characteristic variables of the type is calculated based on the decrypted data; Accordingly, the method further includes: If the participant is the provider of the target variable, then after obtaining the information value corresponding to multiple types, the information value is sorted, and the type of feature variable used for training the federated model is selected according to the sorting result. Determine whether the feature variable provider is a participant in the federated model training. If so, send the type of feature variable used to the feature variable provider to jointly train the federated model with the feature variable provider.

8. A data processing apparatus, characterized in that, The device is applicable to any participant in the calculation of information value, and includes: The first processing module is used to determine whether the participant is the target variable provider. If the participant is the target variable provider, the target variables corresponding to multiple data IDs are homomorphically encrypted respectively, and the multiple data IDs and the encrypted target variables are sent to the feature variable provider. The data IDs include the IDs of the sample data used for training the federated model. The federated model is used to predict whether a user will default on repayment. The second processing module is used to determine whether the participant is a feature variable provider. If the participant is a feature variable provider, the module bins the multiple data IDs according to the feature variables corresponding to the multiple data IDs stored locally, sums the encrypted target variable in each bin, and sends the summation results corresponding to each bin to the target variable provider. The types of the feature variables include age, region, and savings. The third processing module is used to decrypt the summation result when the participant is the target variable provider, and to calculate the information value of the feature variable based on the decrypted data; the information value is used to determine the degree of contribution of the feature variable to the model's predictive ability. The participants determine their own identity by judging whether they possess the target variables required for value calculation.

9. A data processing device, characterized in that, The data processing device includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program, when executed by the processor, implements the steps of the data processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a data processing program, which, when executed by a processor, implements the steps of the data processing method as described in any one of claims 1-7.

11. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for detecting behaviors and mentalities of students based on homomorphic encryption federated learning

    CN111402095A

  • Alliance learning system based on security defense

    CN111935157A