Federal learning-based sample feature binning method and apparatus, and electronic device

By adopting a sample feature binning method based on federated learning in the federated learning system, the coordinator and participants jointly process the encrypted user feature statistics information and determine the binning strategy, solving the problems of inefficient binning efficiency and inaccurate results in the existing technology, and improving the accuracy and privacy protection capabilities of binning.

CN120145004APending Publication Date: 2025-06-13上海勃池信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510222254.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The sample feature binning technology under the existing federated learning framework has problems such as low binning efficiency, inaccurate binning results, or inability to adapt well to the data distribution differences between different participants, which affects the performance of subsequent data analysis and model training.

Method used

A sample feature binning method based on federated learning is adopted. Through the collaboration between the coordinator and multiple participants, each participant preprocesses and encrypts the local credit sample data, calculates and encrypts the user feature statistics information. The coordinator aggregates the encrypted information and determines the binning strategy, and returns it to the participant for binning operations.

Benefits of technology

Improve the accuracy and rationality of feature binning, ensuring maximum data privacy without affecting the binning process, and reducing the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145004A_ABST
    Figure CN120145004A_ABST
Patent Text Reader

Abstract

The invention provides a federal learning-based sample feature binning method and apparatus, and an electronic device. The method comprises the following steps: each participant encrypts user feature data to obtain encrypted user feature data; calculating user feature statistical information of the encrypted user feature data of each participant; the coordinator performs aggregation operation on the encrypted user feature statistical information to obtain global user feature statistical information, determines a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information, encrypts the global user feature statistical information and the feature binning strategy, and returns the encrypted global user feature statistical information and the encrypted feature binning strategy to each participant; and each participant decrypts the encrypted global user feature statistical information and the feature binning strategy, and performs binning operation on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain a feature binning result. According to the invention, the accuracy and rationality of feature binning are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a sample feature binning method, device and electronic device based on federated learning. Background Art

[0002] In the fields of data analysis and machine learning, feature binning is an important data preprocessing technique. Traditional feature binning methods are usually carried out in a centralized data environment, that is, data is centrally stored in a central node, and then binning operations are performed on this data. However, with the enhancement of data privacy protection awareness, the privacy and security of data have become crucial. In many practical application scenarios, data is scattered among multiple different participating parties (such as different enterprises, institutions or individuals), and due to privacy policies, trade secrets, etc., these participating parties cannot directly share the original data. For example, in the financial field, each financial institution has privacy data such as customer account information and credit records.

[0003] As an emerging privacy-preserving machine learning technique, federated learning allows model training without sharing the original data. However, the current sample feature binning technology under the federated learning framework is not yet perfect. Existing methods may have problems such as low binning efficiency, inaccurate binning results, or inability to well adapt to the data distribution differences of different participating parties, which will affect the performance of subsequent data analysis, model training and other tasks based on the binned features. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a sample feature binning method, device and electronic device based on federated learning to improve the accuracy and rationality of feature binning.

[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for binning sample features based on federated learning, which is applied to a federated learning system. The federated learning system includes a coordinator and multiple participants. The method includes: each participant preprocesses the local credit sample data to obtain the user feature data of each participant, and encrypts the user feature data to obtain encrypted user feature data; calculates the user feature statistical information of the encrypted user feature data of each participant, and transmits the encrypted user feature statistical information to the coordinator; the coordinator performs an aggregation operation on the encrypted user feature statistical information to obtain global user feature statistical information, and determines a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information, and returns the encrypted global user feature statistical information and the feature binning strategy to each participant; each participant decrypts the encrypted global user feature statistical information and the feature binning strategy, and performs a binning operation on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain a feature binning result.

[0007] Optionally, encrypting the user feature data to obtain encrypted user feature data includes: extracting target feature data from the user feature data, and encrypting the target feature data to obtain encrypted user feature data.

[0008] Optionally, transmitting the encrypted user feature statistical information to the coordinator includes: encrypting the user feature statistical information using a preset encryption algorithm; wherein, the preset encryption algorithm includes at least one of the following: homomorphic encryption algorithm, differential privacy algorithm, quantum encryption algorithm; compressing the encrypted user feature statistical information, and transmitting the compressed user feature statistical information to the coordinator.

[0009] Optionally, the coordinator performs an aggregation operation on the encrypted user feature statistical information to obtain global user feature statistical information, including: for each sample feature, obtaining the maximum value and the minimum value of the sample feature among all participants to obtain the global maximum value and the global minimum value of the sample feature; for each sample feature, calculating the union of the value ranges of the sample feature among all participants and the weighted average of the means of the sample feature.

[0010] Optionally, determining the feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information includes: obtaining the distribution characteristics of the encrypted user feature data of each participant; determining the feature binning strategy of each participant based on the distribution characteristics and the global user feature statistical information.

[0011] Optionally, it further includes: each participating party encrypts the feature binning result and sends it to the coordinator; the coordinator decrypts the encrypted feature binning result, aggregates the decrypted feature binning result, and obtains the global binning result statistical information; based on the global binning result statistical information, verifies the feature binning results of each participating party, and if the feature binning result does not meet the expected binning target, adjusts the feature binning strategy and performs the binning operation again.

[0012] Optionally, it further includes: monitoring the credit sample data of each participating party in real time, and if it is detected that the credit sample data has changed, re-determining the user feature data and the feature binning strategy according to the new credit sample data; recording the binning strategy information during the binning process in real time, and visualizing the binning strategy information.

[0013] In a second aspect, the present invention provides a sample feature binning device based on federated learning, which is applied to a federated learning system. The federated learning system includes: a coordinator and multiple participating parties; the device includes: a feature processing module, configured to preprocess the local credit sample data of each participating party to obtain the user feature data of each participating party, and encrypt the user feature data to obtain encrypted user feature data; a feature statistics module, configured to calculate the user feature statistical information of the encrypted user feature data of each participating party, and transmit the encrypted user feature statistical information to the coordinator; a binning strategy determination module, configured to aggregate the encrypted user feature statistical information by the coordinator to obtain global user feature statistical information, determine a feature binning strategy based on the encrypted user feature data of each participating party and the global user feature statistical information, and encrypt and return the global user feature statistical information and the feature binning strategy to each participating party; a binning module, configured to decrypt the encrypted global user feature statistical information and the feature binning strategy by each participating party, and perform a binning operation on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain a feature binning result.

[0014] In a third aspect, the present invention provides an electronic device, including a processor and a memory. The memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of any of the methods provided in the first aspect above.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of any of the methods provided in the first aspect above.

[0016] The present invention brings the following beneficial effects:

[0017] The above-mentioned sample feature binning method, device and electronic device based on federated learning of the present invention are applied to a federated learning system, which includes a coordinator and multiple participants. First, each participant preprocesses the local credit sample data to obtain the user feature data of each participant, and encrypts the user feature data to obtain encrypted user feature data. Then, calculate the user feature statistical information of the encrypted user feature data of each participant, and transmit the encrypted user feature statistical information to the coordinator. Next, the coordinator performs an aggregation operation on the encrypted user feature statistical information to obtain global user feature statistical information, and determines a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information, and encrypts and returns the global user feature statistical information and the feature binning strategy to each participant. Finally, each participant decrypts the encrypted global user feature statistical information and the feature binning strategy, and performs a binning operation on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain a feature binning result. In the above method, by encrypting the user feature data of each participant and encrypting the user feature statistical information, global user feature statistical information, feature binning strategy, etc. during data transmission between each participant and the coordinator, it is possible to protect data privacy to the greatest extent without affecting the binning process and reduce the risk of data leakage. At the same time, in the above method, it is possible to determine a feature binning strategy by combining the encrypted user feature data of each participant and the global user feature statistical information, thereby improving the accuracy and rationality of binning.

[0018] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention are achieved and obtained by the structures specifically pointed out in the specification, claims and drawings.

[0019] In order to make the above objectives, features and advantages of the present invention more obvious and understandable, the following specifically gives preferred embodiments and, in conjunction with the accompanying drawings, detailed descriptions are as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0021] Figure 1 It is a flowchart of a sample feature binning method based on federated learning provided by an embodiment of the present invention;

[0022] Figure 2 Schematic structural diagram of a sample feature binning device provided by an embodiment of the present invention;

[0023] Figure 3 Schematic structural diagram of an electronic device provided by an embodiment of the invention. Detailed implementation manners

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0025] Currently, the following problems exist in the sample feature binning technology under the federated learning framework:

[0026] 1. In terms of binning accuracy

[0027] (1) Handling of data distribution differences

[0028] The data of different participants may have different distribution characteristics (such as skewed distribution, multimodal distribution, etc.). Existing binning methods may be difficult to fully adapt to such complex data distribution differences. For example, when using a unified binning strategy (such as equal-width binning), it may cause the data of some participants not to well reflect the internal laws of the data after binning, thus affecting the accuracy of the subsequent federated learning model.

[0029] (2) Insufficient consideration of feature correlation

[0030] In the process of sample feature binning, existing methods may rarely fully consider the correlation between features. In the federated learning scenario, there may be complex correlation relationships among the features in the datasets of multiple participants. If the correlation is not considered during the binning process, it may result in the feature combinations after binning not being able to provide effective information for the federated learning model well. For example, in financial risk assessment, the income level and debt level of customers are highly correlated features. If the correlation is not considered during binning, it may cause the model to deviate when assessing risks.

[0031] 2. In terms of model applicability and scalability

[0032] (1) Dependence on specific models

[0033] Some sample feature binning methods based on federated learning may be designed for specific federated learning models (such as federated linear regression models). When applied to other types of federated learning models (such as federated neural networks, federated decision trees, etc.), incompatibility or poor performance may occur. For example, the binning method designed for the federated linear regression model may focus on capturing linear relationships, while in the federated neural network, due to its complex non-linear structure, this binning method may not provide effective data preprocessing.

[0034] (2) Party expansion, poor adaptability to dynamic data

[0035] When new parties join the federated learning system, the existing binning methods may be difficult to quickly and effectively adapt to this change. The data characteristics of the new parties may be quite different from those of the existing parties, and the existing binning rules may need to be readjusted, but the current products may lack a flexible mechanism to handle this situation of party expansion. This may lead to the need for complex data preprocessing and model adjustment processes after new parties join, increasing the complexity and time cost of the system.

[0036] 3. In terms of communication cost

[0037] (1) Frequent interaction overhead

[0038] During the process of sample feature binning in federated learning, multiple data interactions may be required between parties and the coordinator (such as transmitting encrypted statistical information, receiving binning rules, etc.). This frequent interaction incurs a high communication cost, especially in cases where the network conditions are poor, or the parties are geographically dispersed, the number of sample features is large, or the number of parties is numerous. For example, if the binning process requires multiple iterations to determine the optimal binning strategy, and each iteration involves the transmission of a large amount of data, this will consume a large amount of network bandwidth and time, reducing the efficiency of the entire federated learning system.

[0039] (2) Insufficient optimization of data transmission volume

[0040] Existing methods may not effectively optimize the amount of data transmitted. When transmitting data such as encrypted statistical information or binning results, there may be some unnecessary redundant information, or efficient data compression techniques are not adopted. This not only increases the communication cost but may also affect the stability and security of data transmission, especially when dealing with large-scale user feature data, this problem may be more prominent.

[0041] Based on this, an embodiment of the present invention provides a sample feature binning method, device, and electronic device based on federated learning, which can improve the accuracy and rationality of feature binning.

[0042] To facilitate the understanding of this embodiment, first, a method for binning sample features based on federated learning disclosed in the embodiments of the present invention will be introduced in detail. This method is applied to a federated learning system, which includes: a coordinator and multiple participants (such as different institutions or terminals like Institution A, Institution B, etc.). The coordinator can be a trusted third party or a party jointly trusted by the participants. This method can be executed by an electronic device, such as a smartphone, a computer, a tablet, etc. Refer to Figure 1 The flowchart of a method for binning sample features based on federated learning as shown, which indicates that this method mainly includes the following steps S101 to S104:

[0043] Step S101: Each participant preprocesses the local credit sample data to obtain the user feature data of each participant, and encrypts the user feature data to obtain encrypted user feature data.

[0044] In one implementation, for each participant in the federated learning system, for example: Party A can be regarded as the Host party (without Y label), and Party B can be regarded as the Guest party (with Y label). Each participant holds a local credit sample data set. Each credit sample data set contains multiple credit sample data, and each sample has multiple features. Each participant can perform preliminary processing on the local credit sample data, such as: data cleaning, removing missing values or outliers, etc., to obtain the user feature data and its corresponding credit sample data. The participant can also find common users through sample alignment and associate to common samples through sample primary key matching.

[0045] At each participant, the local user feature data is respectively encrypted to ensure the privacy of the data in the subsequent calculation process. Assume that the user feature data set of the i-th participant is: D i ={x ij, y ij}, where x ij represents the feature vector of the j-th sample, and y ij represents the corresponding label.

[0046] Encrypt each sample feature to obtain the encrypted data set:

[0047] In vertical federated learning, as the Guest party, Party B performs encrypted calculation on the sample labels to ensure privacy protection, and sends the encrypted labels and sample primary keys to Party A as the Host party. The Guest party and the Host party obtain the common samples of both parties through encrypted sample alignment.

[0048] In the embodiments of the present invention, in order to reduce the amount of encryption calculation and improve the calculation efficiency, so that feature binning on a large-scale data set can be completed quickly. When encrypting user feature data to obtain encrypted user feature data, the following methods may be adopted, including but not limited to: extracting target feature data from the user feature data and encrypting the target feature data to obtain encrypted user feature data. In specific implementation, by preprocessing the user feature data and extracting key information (i.e., target feature data) for encryption, rather than performing complex encryption operations on the entire user feature data, the amount of encryption calculation can be reduced and the calculation efficiency can be improved.

[0049] After encrypting the user feature data, each participating party also needs to initialize the relevant parameters of federated learning, including the encryption key (used to encrypt the interactive data during the federated learning process), local model parameters (for example, the initial binning model parameters, including the number of bins, the type of bins (equal-width binning, equal-frequency binning, chi-square binning), etc.).

[0050] Step S102: Calculate the user feature statistical information of the encrypted user feature data of each participating party, and transmit the encrypted user feature statistical information to the coordinator.

[0051] In one implementation, each participating party locally calculates the user feature statistical information of the encrypted user feature data, such as: the minimum value, maximum value, mean value, median value, quantile value, variance, etc. of the sample features. Then, use the encryption key to encrypt these user feature statistical information and transmit the encrypted user feature statistical information to the coordinator.

[0052] Step S103: The coordinator performs an aggregation operation on the encrypted user feature statistical information to obtain the global user feature statistical information, determines a feature binning strategy based on the encrypted user feature data of each participating party and the global user feature statistical information, and encrypts and returns the global user feature statistical information and the feature binning strategy to each participating party.

[0053] In one implementation, each participating party sends the above-mentioned encrypted locally calculated user feature statistical information to the coordinator of the federated learning. The coordinator receives and aggregates the encrypted user feature statistical information from each participating party, and can perform an aggregation operation on the encrypted user feature statistical information without decrypting it to obtain the global user feature statistical information, which is used for the exchange and integration of the user feature statistical information of each participating party.

[0054] The coordinator can also preliminarily determine the feature binning strategy and the binning range for each feature based on the integrated global user feature statistical information and the encrypted user feature data of each participating party. Specifically, in the embodiments of the present invention, an adaptive binning strategy is adopted, which can adapt to the data distribution differences of different participating parties. First, obtain the distribution characteristics of the encrypted user feature data of each participating party; then determine the feature binning strategy of each participating party based on the distribution characteristics and the global user feature statistical information.

[0055] In specific implementation, first analyze the data distribution of each participating party at the coordinator side, and comprehensively consider the distribution characteristics of the data of each participating party (such as skewness, kurtosis, etc.) and the global user feature statistical information to determine the binning rules. For example, for a participating party with a more discrete data distribution, a more flexible binning method can be adopted, such as binning based on local statistics, and then integrating with the global binning strategy to ensure that the binning results of each participating party can reasonably reflect its data characteristics and improve the accuracy and rationality of binning.

[0056] Specifically, if equal-width binning is adopted, calculate the boundary values of each bin according to the global minimum value, the global maximum value, and the preset number of bins. If equal-frequency binning is adopted, preliminarily give the boundary values of each bin according to the global maximum value, the global minimum value, the preset number of bins, and the number of samples of each participating party. If chi-square binning is adopted, calculate the chi-square value based on equal-width or equal-frequency, and achieve the optimal binning through feature adjustment.

[0057] Finally, the coordinator sends the preliminary feature binning strategy (including information such as binning boundary values) and the global user feature statistical information to each participating party in an encrypted form.

[0058] Step S104: Each participating party decrypts the encrypted global user feature statistical information and the feature binning strategy, and performs binning operations on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain the feature binning result.

[0059] In one embodiment, each participating party uses its local decryption key to decrypt the encrypted global user feature statistics information and the feature binning strategy, and then performs binning operations on the locally encrypted user feature data according to the decrypted global statistics information and the feature binning strategy to obtain the feature binning results (such as the bin number to which each sample belongs after binning, the number of samples in each bin, the statistical information of the sample features, etc.). For example, if the equal-frequency binning method is adopted, the boundaries of each bin are determined according to the global number of samples and the number of bins; if the binning method based on chi-square test is adopted, the chi-square value is calculated using the global statistics information to determine the bin boundaries. Since the data is encrypted and the binning operation is performed on the encrypted data, the correctness of the calculation result can be ensured by utilizing the properties of homomorphic encryption.

[0060] In the above sample feature binning method based on federated learning of the present invention, by encrypting the user feature data of each participating party and encrypting the user feature statistics information, the global user feature statistics information, the feature binning strategy, etc. during the data transmission between each participating party and the coordinator, it is possible to maximize the protection of data privacy and reduce the risk of data leakage without affecting the binning process; at the same time, in the above method, the feature binning strategy can be determined by combining the encrypted user feature data of each participating party and the global user feature statistics information, thereby improving the accuracy and rationality of binning.

[0061] In the embodiment of the present invention, in order to avoid the problem of encryption leakage of user feature statistics information and the problem of low data transmission efficiency, for the foregoing step S102, that is, when the encrypted user feature statistics information is transmitted to the coordinator, the following methods may be adopted, including but not limited to:

[0062] First, encrypt the user feature statistics information using a preset encryption algorithm.

[0063] In specific implementation, before transmitting the user feature statistics information, special processing is performed on the user feature statistics information (that is, encrypt the user feature statistics information using a preset encryption algorithm, and the preset encryption algorithm includes at least one of the following: homomorphic encryption algorithm, differential privacy algorithm, quantum encryption algorithm) to prevent the leakage of user feature statistics information. For example, the homomorphic encryption algorithm is combined with other emerging encryption technologies (such as certain principles or concepts of the quantum encryption algorithm to enhance security) to encrypt the user feature statistics information to improve the overall security of the encryption algorithm; or the differential privacy algorithm is used to perturb the user feature statistics information and add an appropriate amount of noise, so that the attacker cannot obtain meaningful information about the original data by analyzing a large amount of user feature statistics information, and maximize the protection of data privacy without affecting the binning process.

[0064] Meanwhile, in the embodiments of the present invention, a key management strategy can also be adopted. For example, a distributed key management system can be used to store keys dispersedly on multiple secure nodes and update the keys regularly, reducing the risk of key leakage and comprehensively protecting data privacy and security.

[0065] Then, the encrypted user feature statistical information is compressed, and the compressed user feature statistical information is transmitted to the coordinator.

[0066] In specific implementation, an efficient data compression and transmission scheme is adopted. Before transmitting the encrypted user feature statistical information to the coordinator, the data is compressed to reduce the amount of data transmitted. At the same time, the frequency and content of data interaction are optimized, and only necessary information is transmitted, thereby significantly reducing communication costs, improving data transmission efficiency, and avoiding network congestion.

[0067] In one implementation manner, for the aforementioned step S103, that is, when the coordinator performs an aggregation operation on the encrypted user feature statistical information to obtain the global user feature statistical information, the following methods can be adopted, including but not limited to:

[0068] (1) For each sample feature, obtain the maximum and minimum values of the sample feature in each participating party to obtain the global maximum and global minimum values of the sample feature.

[0069] In specific implementation, for the minimum value of the sample feature, the coordinator finds the minimum value among all participating parties; for the maximum value of the sample feature, the coordinator finds the maximum value among all participating parties, and then determines the range of the global minimum and global maximum values, etc.

[0070] (2) For each sample feature, calculate the union of the value ranges of the sample feature in each participating party and the weighted average of the means of the sample feature.

[0071] In specific implementation, calculate the union of the value ranges of the sample features of all participating parties and the weighted average of the means (the weights can be determined according to factors such as the data volume of the participating parties).

[0072] In one implementation manner, after obtaining the feature binning result, the above method further includes:

[0073] (1) Each participating party encrypts the feature binning result and sends it to the coordinator.

[0074] In specific implementation, each participating party can encrypt the locally binned feature binning result again and send it to the coordinator.

[0075] (2) The coordinator decrypts the encrypted feature binning result and summarizes the decrypted feature binning result to obtain the global binning result statistical information.

[0076] (3) Verify the feature binning results of each party based on the global binning result statistical information. If the feature binning results do not meet the expected binning objectives, adjust the feature binning strategy and perform the binning operation again.

[0077] In specific implementation, the coordinator can aggregate the encrypted feature binning results from each party and decrypt the aggregated encrypted feature binning results (if the coordinator has the decryption key) to obtain the global binning result statistical information. Then, evaluate the feature binning results based on the obtained global binning result statistical information. If the feature binning results do not meet the expected binning objectives, adjust the feature binning strategy and perform the binning operation again.

[0078] Specifically, the evaluation and adjustment of the binning results obtained by using the equal-frequency or equal-distance binning strategy include:

[0079] 1) The coordinator aggregates the feature binning results of each party, calculates the distribution of the overall samples in each bin, verifies whether the feature binning results meet the expected binning objectives (such as: whether the equal-distance or equal-frequency requirements are met, etc.), and evaluates the binning effects of each party.

[0080] 2) If the feature binning effect of a certain party is not good (such as: the data points in a certain bin are too concentrated or sparse), and the feature binning results do not meet the requirements, the coordinator can adjust the binning parameters and restart the binning process, reset the binning boundary values and other information for fine-tuning the binning, and feedback the relevant parameters (in encrypted form) of the fine-tuning to each party.

[0081] 3) Each party performs local binning again, and the party encrypts and sends the binned results (such as the number of samples in each bin, the statistical information of the sample features, etc.) to the coordinator again.

[0082] 4) The coordinator evaluates the binning effect and evaluates whether the binning results meet the requirements.

[0083] 5) Repeat the above steps until a binning strategy that meets the equal-frequency or equal-distance requirements of each party is achieved.

[0084] 6) Encrypt and send the final binning results to each party.

[0085] The evaluation and adjustment of the binning results obtained based on the IV binning strategy include: decrypting the ciphertext sum of the boundary values ​​of the feature bins, calculating WOE (Weight of Evidence) and IV (Information Value), WOE reflects the proportional relationship between positive and negative samples in each bin, and IV measures the predictive ability of the bins for labels. Based on this, in the embodiment of the present invention, the binning strategy can be adjusted and optimized according to the WOE and IV values ​​after the feature binning of the calculating parties to improve the performance of the model. For example, the binning strategy can be optimized by adjusting the number and width of the bins or merging adjacent bins.

[0086] Furthermore, in the embodiments of the present invention, the feature binning strategy can be adjusted by establishing a dynamic monitoring and adjustment mechanism. Specifically, the credit sample data of each participant is monitored in real time. If changes in the credit sample data are detected, the user feature data and feature binning strategy are re-determined based on the new credit sample data. In specific implementation, during the federated learning process, the changes in the data of each participant are continuously monitored (such as changes in data distribution, the addition of new samples, etc.). If significant changes in the data are detected, the feature binning strategy is re-evaluated, and the binning range and strategy are re-determined based on the new user feature data. For example, user feature statistics can be recalculated regularly, and the binning boundaries can be adjusted based on the new feature statistics, so that the binning strategy always maintains good adaptability to the data.

[0087] At the same time, in the embodiment of the present invention, the binning process can also be recorded and displayed in a visual manner. Specifically, the binning strategy information in the binning process is recorded in real time, and the binning strategy information is visualized. In the specific implementation, during the binning process, key binning strategy information is recorded, such as the basis for binning (whether it is based on data distribution, specific business rules or other factors), the impact of binning on data characteristics, etc. Then, this information is presented in a visual manner (such as decision trees, flow charts, etc.), so that regulatory agencies, business personnel, etc. can clearly understand the binning process and results, improve the interpretability of the model, and promote the application and promotion of the present invention in actual business.

[0088] For ease of understanding, the embodiment of the present invention provides steps and principles for feature binning on the A-side host and the B-side guest in vertical federated learning. The steps are as follows:

[0089] Step 1: The host on side A initiates a request for sub-boxing and waits for the guest on side B to agree.

[0090] Step 2: The B-side guest agrees to the request, generates a key, and sets the primary key id of each sample i The corresponding label yi The value is encrypted using the homomorphic encryption key to obtain: Encry(y i ), Encry(1 - y i ), and sent to the coordinator.

[0091] It should be noted that the result of each homomorphic encryption is different. For labels 0 and 1, the results of encrypting the same label value 0 each time are different. Therefore, it is irreversible for the A - side Host to compare and classify through the encrypted objects sent.

[0092] Step 3: The A - side Host obtains the encrypted y value from the coordinator, and for each feature x i , it counts the occurrences of Encry(yi) and Encry(1 - yi) for each bin segment id_set_i of each feature x (note: each discrete segment value is split by equal - frequency or equal - distance method), and finally sums them to obtain sum(Encry(yi)) and sum(Encry(1 - yi)), and encodes each segment value id_set_i (for example: the original segment values are in order: 0.3, 0.7, 1.2; after encoding: a1, a2, a3) to get Encode(id_set_i), and then uploads it to the coordinator.

[0093] Step 4: The B - side Guest obtains each feature x i from the coordinator, and the statistical values of sum(Encry(yi)) and sum(Encry(1 - yi)) for each Encode(id_set_i) segment, then decrypts Decry(sum(Encry(yi))) and Decry(sum(Encry(1 - yi))) to obtain the number of positive samples npos_i and the number of negative samples nneg_i for each bin respectively, and calculates the proportion of positive and negative samples in each bin. The formula is as follows:

[0094] distpos_i = npos_i / pos_total, distneg_i = nneg_i / neg_total;

[0095] where pos_total and neg_total are the total number of positive samples and the total number of negative samples respectively;

[0096] After that, calculate the WOE value of each bin. The formula is as follows:

[0097] WOE_i = log(distpos_i / distneg_i);

[0098] Finally, calculate the IV value of each feature x i . The formula is as follows:

[0099] IV i = (distpos_i - distneg_i) * log(distpos_i / distneg_i);

[0100] Store the calculation result as a local file for later display.

[0101] Specifically, taking Table 1 and Table 2 as examples (the sample alignment between the A - end Host side and the B - end Guest side has been completed), on the left side of the A - end Host side, there are sample primary key ID and age feature Age, without Y - label; on the right side of the B - end Guest side, there are income feature income and label Label. The calculation of WOE and IV values for feature binning in vertical federated learning includes:

[0102] For each sample id i The corresponding y i value is encrypted using the homomorphic encryption key to obtain: Encry(y i ), Encry(1 - y i ), as shown in the table, Encry(y i ) = {a1(0), a2(1), a3(1), a4(0), a5(1)}, Encry(1 - y i ) = {b1(1), b2(0), b3(0), b4(1), b5(0)} represent the encrypted values, and the values in the parentheses represent the decrypted values. Suppose the age feature of five samples is divided into two bin ids_set1 = {1, 2, 3} and id_set2 = {4, 5} through binning (equal - frequency binning, equal - distance binning, chi - square binning, etc.).

[0103] For the first bin id_set1 = {1, 2, 3}, the number of positive and negative samples is as follows:

[0104] The number of positive samples npos_i = Decry(sum(Encry(yi))) = 2;

[0105] The number of negative samples nneg_i = Decry(sum(Encry(1 - yi))) = 1;

[0106] After the B - end Guest side obtains the information on the number of positive and negative samples in the first bin, it can calculate the WOE value of the age feature Age for each bin. According to its own label, it can be known that Countlabel = 1 = 3, Countlabel = 0 = 2. Therefore, the WOE of the age feature Age for the first bin id_set1 = {1, 2, 3} is:

[0107] WOE1 = ln(ratio of good samples / ratio of bad samples) = ln((2 / 3) / (1 / 2)) = -1.09;

[0108] Similarly, for the WOE of the second bin id_set2 = {4, 5} of the age feature Age:

[0109] WOE2 = ln(ratio of good samples / ratio of bad samples) = ln((1 / 3) / (1 / 2)) = -1.79;

[0110] Then the IV value of the age feature Age can be obtained as:

[0111]

[0112] Through the above steps, the WOE and IV value evaluation indicators after vertical federated learning feature binning are calculated to measure the discrimination ability of its variables.

[0113] Table 1 Credit sample data of Party A's Host

[0114]

[0115] Table 2 Credit sample data of Party B's Guest

[0116]

[0117] In one implementation, after obtaining the feature binning results, if it is necessary to build a machine learning model based on the binned features, the coordinator can perform model building or updating operations after receiving the encrypted binning results from each participating party. For example, when building a logistic regression model, the coordinator calculates the coefficients of the model according to the binning results. During the model building or updating process, the coordinator can encrypt the intermediate results and feedback them to the participating parties, and the participating parties update the local model parameters according to the feedback results. For a deep learning model, the binned features are processed by embedding to better adapt to the input requirements of the deep learning model, thereby improving the compatibility of the binning method of the present invention with different types of models (linear models, deep learning models, etc.) and giving full play to the performance of different models.

[0118] In the embodiments of the present invention, feature binning can also be combined with other feature engineering techniques. Before binning, feature selection is first performed to screen out the features that are important for model building and perform binning operations to reduce unnecessary calculations. After binning, feature combination is performed according to the binning results. For example, the features of adjacent bins are combined to generate new feature representations, so as to more comprehensively explore the potential information of the data and improve the accuracy and generalization ability of the model.

[0119] For ease of understanding, in the embodiments of the present invention, the financial field is taken as an example to introduce the above-mentioned sample feature binning method based on federated learning in detail.

[0120] In the financial field, there are multiple financial institutions (such as Bank A and Bank B for joint lending). Each bank has its own customer data, which contains various features, such as customer age, income level, credit score, loan balance, deposit balance, etc., and Bank B has the customer repayment performance Y. Due to financial data involving customer privacy, commercial secrets, and strict financial regulatory requirements, banks cannot directly share raw data with each other, but need to cooperate to build more accurate risk assessment models, credit decision-making models, etc. The sample feature binning method based on federated learning provides a solution for this need. The specific example and steps are as follows:

[0121] Step 1: Data preparation and initialization

[0122] 1. Bank internal data collation

[0123] Each bank (taking Bank A as an example) first determines the credit sample data to be used for analysis locally. These data are extracted from multiple data sources such as the bank's core business system and credit management system. The participating party first cleans the local data. For example, Party A finds that there are some obviously incorrect entries in the age feature (such as negative age), and then removes these outliers.

[0124] 2. Data encryption processing

[0125] Each bank encrypts its own customer user feature data for the local credit sample data set using a homomorphic encryption algorithm (such as the Paillier encryption algorithm). For example, for the age feature of customers, the age value of each customer is encrypted and stored on the local server.

[0126] 3. Initialize federated learning parameters

[0127] Initialize the local binning model parameters. Initialize the binning parameters for each feature (such as age, credit score, income level, etc.) in the selected credit sample data according to its own business needs and analysis objectives. For example, the three participating parties jointly determine to bin the age feature, the binning type is equal-width binning, and the range of the number of bins is initially set to 5 - 10; for the credit score, Bank A decides to use equal-frequency binning and sets the number of bins to 10; for the income level, equal-width binning is used and the number of bins is set to 5.

[0128] 4. Feature standardization (optional)

[0129] Since the data of different banks may have different dimensions and data distributions, in order to better perform binning and subsequent joint analysis, banks can standardize the data locally. For example, for the feature of income level, it can be transformed into a relative value based on a certain standard amount (such as the local average income level).

[0130] Step 2: Encryption and Exchange of User Feature Statistical Information

[0131] 1. Encryption of User Feature Statistical Information

[0132] Each participating bank A and B calculate the maximum value, minimum value, mean value, variance and other statistical information of features such as customer age, income level, credit score, etc. in the local customer sample, and encrypt these statistical information using the AES encryption key.

[0133] For example, if participating bank A calculates the minimum value as 19 years old, the maximum value as 67 years old, the mean value as 35 years old, the median as 33 years old and other statistical information based on the local age data, and then uses the homomorphic encryption algorithm to encrypt these statistical information and send them to the coordinator (which can be a research institution jointly trusted by these financial institutions). Similarly, bank B also performs the same operation and encrypts and sends the age user feature statistical information calculated by itself to the coordinator.

[0134] 2. Exchange of Statistical Information

[0135] After the coordinator receives the encrypted statistical information from banks A and B, it uses the corresponding decryption algorithm to decrypt it, and then integrates these statistical information. For example, assuming that the minimum age of bank A is 19 years old and that of bank B is 20 years old, then the coordinator determines that the minimum value of the global age is 19 years old. Similarly, the global maximum value is integrated, such as 68 years old, so the global age range is 19 years old - 68 years old.

[0136] For the mean value and variance, the weighted average method (the weights can be determined according to the number of customer samples of each bank institution) is used to obtain the global mean value and variance. Then these encrypted global statistical information are encrypted and distributed to banks A and B.

[0137] Step 3: Distribution of Binning Rules and Local Binning

[0138] 1. Determination of Binning Strategy

[0139] The coordinator determines the preliminary binning strategy according to the range of the global age feature. For example, for equal-width binning, if the number of bins is determined to be 5 and the bin width is 10 years old, then the 5 bins are: 19 - 28 years old, 29 - 38 years old, 39 - 48 years old, 49 - 58 years old, 59 - 68 years old. Using the same method, the coordinator can determine the binning range for other features such as income level.

[0140] The coordinator encrypts the binning rules for the determined age and other features (including information such as binning boundary values) and sends them to Bank A and Bank B.

[0141] 2. Local binning operation

[0142] After receiving the binning strategy for age locally, Bank A uses the characteristics of homomorphic encryption technology to perform binning operations on the locally encrypted age data. For example, the encrypted age of each customer is classified into the corresponding binning interval. Similarly, Bank A also performs local binning operations on other feature data such as income level. Bank B also performs binning operations locally in the same way.

[0143] 3. Binning adjustment

[0144] Bank A performs binning operations on the locally encrypted customer age data according to the received encrypted binning strategy. If it is found that the number of customers in a certain bin is too small during the binning process (possibly due to special circumstances in the local customer age distribution), for example, the sample ratio in the first bin of 29 - 38 years old has a large deviation from the expected equidistant binning result, the binning strategy can be fine-tuned by adjusting the boundary value of a certain bin locally. Then, the relevant parameters (after encryption) of the fine-tuning are fed back to the coordinator.

[0145] The coordinator aggregates the fine-tuning information of each participating bank. If it is found that the global binning strategy needs to be adjusted (for example, Bank B also reports a problem with a certain bin), the binning strategy is re-determined and sent to each bank, and this process is repeated until the binning strategy is stable.

[0146] Step Four: Aggregation and evaluation of binning results

[0147] 1. Aggregation of binning results:

[0148] If a bank needs to know the global binning result statistics, such as the total number of customers in each bin (across banks), Bank A and Bank B can send the encrypted results after binning back to the coordinator.

[0149] Each financial institution sends the results after binning (in encrypted form) to the coordinator. The coordinator aggregates and processes these encrypted results.

[0150] 2. Evaluation of binning results

[0151] The coordinator (if it has the decryption key) decrypts the aggregated encrypted results, and through the feature binning of vertical federated learning between Bank A and Bank B, the global binning result statistics can be obtained. For example, the coordinator can determine the total number of samples of Bank A and Bank B in a certain binning interval of age, which helps to build a more accurate joint risk assessment model, such as analyzing the default probability of customers in different age intervals.

[0152] Step 5: Use by binning

[0153] In actual credit decisions, banks can use the joint model to assess the risks of new customers. For example, when a new customer applies for a loan from Bank A, Bank A can use the joint model (constructed based on federated learning and sample feature binning) to evaluate the credit risk of the customer, and decide whether to approve the loan, the loan amount, the interest rate, etc. according to the risk probability output by the model.

[0154] The above method provided by the embodiments of the present invention preprocesses user feature data, extracts key information for encryption, rather than performing complex encryption operations on the entire data, so as to reduce the encryption calculation amount and improve the calculation efficiency, enabling feature binning on a large-scale data set to be completed quickly; before transmitting the encrypted statistical information to the coordinator, the data is compressed to reduce the amount of data transmitted. At the same time, the frequency and content of data interaction are optimized, and only necessary information is transmitted, thereby significantly reducing the communication cost, improving the data transmission efficiency, and avoiding network congestion; at the coordinator side, the data distribution of each participating party is analyzed, not only relying on global statistical information, but comprehensively considering the distribution characteristics (such as skewness, kurtosis, etc.) of the data of each participating party to determine the binning rules, ensuring that the binning results of each participating party can reasonably reflect its data characteristics and improving the accuracy and rationality of binning; during the federated learning process, continuously monitor the changes in the data of the participating parties (such as changes in data distribution, addition of new samples, etc.). Once a significant change in the data is detected, re-evaluate the binning strategy, re-determine the binning range and rules according to the new data characteristics, so that the binning strategy always maintains good adaptability to the data; after completing feature binning, further transform or adjust the binned features according to the requirements of different types of models, so that they can better meet the input requirements of deep learning models, thereby improving the compatibility of the binning method of the present invention with different types of models (linear models, deep learning models, etc.) and giving full play to the performance of different models; organically combine sample feature binning with other feature engineering techniques; before binning, first perform feature selection, screen out features that are important for model construction for binning operations, and reduce unnecessary calculations; after binning, perform feature combination according to the binning results, for example, combine the features of adjacent bins to generate new feature representations, so as to more comprehensively mine the potential information of the data and improve the accuracy and generalization ability of the model; adopt a combination of multiple encryption techniques to improve the overall security of the encryption algorithm; adopt a strict key management strategy and update the key regularly to reduce the risk of key leakage and comprehensively protect data privacy and security; before transmitting the statistical information, perform special processing on the statistical information to protect data privacy to the greatest extent without affecting the binning process; during the binning process, record key binning decision information, such as the basis for binning (based on data distribution, specific business rules or other factors), the impact of binning on data characteristics, etc. Then, present this information in a visual way (such as in the form of decision trees, flowcharts, etc.), so that regulatory agencies, business personnel, etc. can clearly understand the binning process and results, improve the interpretability of the model, and promote the application and popularization of the present invention in actual business.

[0155] For the sample feature binning method based on federated learning provided in the foregoing embodiments, the embodiments of the present invention further provide a sample feature binning device based on federated learning, which is applied to a federated learning system. The federated learning system includes: a coordinator and multiple participants. Refer to Figure 2 The structural schematic diagram of a sample feature binning device based on federated learning shown in the figure schematically shows that the device mainly includes the following parts:

[0156] A feature processing module 201, configured to preprocess the local credit sample data of each participant to obtain the user feature data of each participant, and encrypt the user feature data to obtain encrypted user feature data;

[0157] A feature statistics module 202, configured to calculate the user feature statistics information of the encrypted user feature data of each participant, and transmit the encrypted user feature statistics information to the coordinator;

[0158] A binning strategy determination module 203, configured to aggregate the encrypted user feature statistics information by the coordinator to obtain global user feature statistics information, and determine a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistics information, and encrypt and return the global user feature statistics information and the feature binning strategy to each participant;

[0159] A binning module 204, configured to decrypt the encrypted global user feature statistics information and the feature binning strategy by each participant, and perform a binning operation on the encrypted user feature data based on the decrypted global user feature statistics information and the feature binning strategy to obtain a feature binning result.

[0160] In the above-mentioned federated learning system of the present invention, by encrypting the user feature data of each participant, and encrypting the user feature statistics information, the global user feature statistics information, the feature binning strategy, etc. when transmitting data between each participant and the coordinator, it is possible to maximize the protection of data privacy and reduce the risk of data leakage without affecting the binning process; at the same time, in the above system, a feature binning strategy can be determined by combining the encrypted user feature data of each participant and the global user feature statistics information, so as to improve the accuracy and rationality of binning.

[0161] It should be noted that the device provided in the embodiments of the present invention has the same implementation principle and the same technical effects as those in the foregoing method embodiments. For the sake of brief description, for the parts not mentioned in the device embodiments, reference may be made to the corresponding contents in the foregoing method embodiments. The specific numerical values provided in the embodiments of the present invention are only exemplary and are not limited herein.

[0162] An embodiment of the present invention further provides an electronic device. Specifically, the electronic device includes a processor and a storage device; a computer program is stored on the storage device, and when the computer program is run by the processor, it executes the method described in any one of the above embodiments.

[0163] Figure 3 FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device 100 includes: a processor 30, a memory 31, a bus 32, and a communication interface 33. The processor 30, the communication interface 33, and the memory 31 are connected through the bus 32. The processor 30 is configured to execute an executable module stored in the memory 31, such as a computer program.

[0164] Among them, the memory 31 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 33 (which can be wired or wireless), a communication connection is established between the system network element and at least one other network element. The Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0165] The bus 32 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only a bidirectional arrow is used in FIG. 4, but it does not mean that there is only one bus or one type of bus.

[0166] Among them, the memory 31 is used to store a program. After receiving an execution instruction, the processor 30 executes the program. The method executed by the device defined by the flow process disclosed in any one of the above embodiments of the present invention can be applied to the processor 30 or implemented by the processor 30.

[0167] The processor 30 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method may be completed by the integrated logic circuit of the hardware in the processor 30 or the instructions in the form of software. The above-mentioned processor 30 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention may be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 31, and the processor 30 reads the information in the memory 31 and combines its hardware to complete the steps of the above method.

[0168] The computer program product of the readable storage medium provided by the embodiments of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, reference can be made to the foregoing method embodiments, which will not be elaborated here.

[0169] If the above-mentioned functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0170] Finally, it should be noted that the above-mentioned embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions described in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A sample feature binning method based on federated learning, characterized in that: Applied to a federated learning system, the federated learning system comprising: a coordinator and multiple participants; including: Each participant pre-processes the local credit sample data to obtain user characteristic data of each participant, and encrypts the user characteristic data to obtain encrypted user characteristic data; Calculating user feature statistics of the encrypted user feature data of each participant, and encrypting the user feature statistics and transmitting them to the coordinator; The coordinator aggregates the encrypted user feature statistical information to obtain global user feature statistical information, determines a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information, encrypts the global user feature statistical information and the feature binning strategy and returns them to each participant; Each of the participants decrypts the encrypted global user feature statistical information and the feature binning strategy, and performs binning operations on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain feature binning results.

2. The method according to claim 1, characterized in that Encrypting the user characteristic data to obtain encrypted user characteristic data includes: Target feature data is extracted from the user feature data, and the target feature data is encrypted to obtain encrypted user feature data.

3. The method according to claim 1, characterized in that The method of encrypting the user characteristic statistical information and transmitting it to the coordinator comprises: The user characteristic statistical information is encrypted using a preset encryption algorithm; wherein the preset encryption algorithm includes at least one of the following: a homomorphic confidentiality algorithm, a differential privacy algorithm, and a quantum encryption algorithm; The encrypted user characteristic statistical information is compressed, and the compressed user characteristic statistical information is transmitted to the coordinator.

4. The method according to claim 1, characterized in that: The coordinator aggregates the encrypted user feature statistical information to obtain global user feature statistical information, including: For each sample feature, obtain the maximum value and minimum value of the sample feature in each participant, and obtain the global maximum value and global minimum value of the sample feature; For each sample feature, the union of the value ranges of the sample feature in each participant and the weighted average of the means of the sample feature are calculated.

5. The method according to claim 1, characterized in that Determining a feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information includes: Obtaining the distribution characteristics of encrypted user feature data of each participant; A feature binning strategy for each participant is determined based on the distribution features and the global user feature statistical information.

6. The method according to claim 1, characterized in that Also includes: Each participant encrypts the feature binning result and sends it to the coordinator; The coordinator decrypts the encrypted feature binning results, and summarizes the decrypted feature binning results to obtain global binning result statistics; The feature binning results of each participant are verified based on the global binning result statistical information. If the feature binning results do not meet the expected binning targets, the feature binning strategy is adjusted and the binning operation is performed again.

7. The method according to claim 1, characterized in that Also includes: Monitor the credit sample data of each participant in real time. If changes are detected in the credit sample data, re-determine the user feature data and feature binning strategy based on the new credit sample data. The binning strategy information during the binning process is recorded in real time, and the binning strategy information is visualized.

8. A sample feature binning device based on federated learning, characterized in that: Applied to a federated learning system, the federated learning system includes: a coordinator and multiple participants; the device includes: A feature processing module is used for each participant to pre-process the local credit sample data to obtain the user feature data of each participant, and encrypt the user feature data to obtain encrypted user feature data; A feature statistics module, used to calculate user feature statistics information of the encrypted user feature data of each participant, and encrypt the user feature statistics information and transmit it to the coordinator; A binning strategy determination module, which is used for the coordinator to aggregate the encrypted user feature statistical information to obtain global user feature statistical information, and determine the feature binning strategy based on the encrypted user feature data of each participant and the global user feature statistical information, and encrypt the global user feature statistical information and the feature binning strategy and return them to each participant; The binning module is used for each participant to decrypt the encrypted global user feature statistical information and the feature binning strategy, and to perform binning operations on the encrypted user feature data based on the decrypted global user feature statistical information and the feature binning strategy to obtain feature binning results.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.