Business risk prediction method and system
By using the processing module in the federal framework, combining the privacy collection model and federal model, the problem of data security and privacy leakage in existing technologies has been solved, and efficient business risk forecasts are achieved.
Patent Information
- Application Number
- CN202411445962.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-28
AI Technical Summary
Existing risk control methods have data security issues and data privacy leakage risks in data transmission and storage, and joint modeling is inefficient.
The processing module in the federal framework is used to determine the intersection data based on the data provider and the data provider data based on the data provider and data provider, and to extract key features from them, and use the trained federal model to predict risk probability.
Without leaking its own data, it has improved the security and privacy of multi -party data, reduced data security risks, and improved the accuracy and efficiency of business risk prediction.
Smart Images

Figure CN119378986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a business risk prediction method and system. Background Art
[0002] At present, various businesses in Internet applications, such as finance, insurance, retail, and health, all have the need to control business risks.
[0003] Existing risk control methods usually involve cooperation between business providers and data providers to conduct joint modeling through different business data provided by both parties, so as to use the joint model to perform risk prediction for the business; the existing joint modeling methods require the business provider and the data provider to export data from the database, which results in data security issues and data privacy leakage risks during data transmission and storage. In addition, the data export operation needs to go through the data provider's permission process, resulting in low efficiency of joint modeling. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a business risk prediction method and device, which can use the processing module in the federated framework to obtain the basic data of the object to be predicted provided by the business provider and the business data provided by the data provider in response to the prediction request of the business provider; determine the intersection data between the basic data and the business data based on the privacy set intersection model; extract multiple key features related to the business from the intersection data; and use the trained federated model and key features to determine the risk probability corresponding to the object to be predicted. The embodiment of the present invention uses the processing module in the federated framework to enable multiple parties to determine the intersection data and the key features of the prediction without leaking their own data, thereby improving the data security of multiple partners, reducing data security risks, and improving the accuracy of business risk prediction.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a business risk prediction method is provided, characterized in that a processing module applied to a federal framework includes: obtaining basic data of an object to be predicted provided by a business provider, determining one or more data providers associated with the business, and obtaining business data of the object to be predicted provided by one or more data providers; determining the intersection data between the basic data and the business data based on a privacy set intersection model; extracting a variety of key features related to the business from the intersection data; using the trained federal model and key features to determine the risk probability corresponding to the object to be predicted, and predicting the business risk of the object to be predicted based on the risk probability.
[0006] Optionally, the privacy set intersection model includes an encryption protocol between a business provider and one or more data providers and an encryption operation method corresponding to the encryption protocol; determining the intersection data between the basic data and the business data based on the privacy set intersection model includes: obtaining the encrypted data of the business provider and the encrypted data of the data provider; wherein the encrypted data of the business provider is obtained by executing the encryption operation method on the basic data, and the encrypted data of the data provider is obtained by executing the encryption operation method on the business data; and the aligned data obtained according to the encrypted data of the basic data and the encrypted data of the business data is used as the intersection data of the basic data and the business data.
[0007] Optionally, multiple key features related to the business are extracted from the intersection data, including: extracting all features from the intersection data; calculating the feature prediction impact value corresponding to each feature of all features; the feature impact value is calculated by the number of positive samples and the number of negative samples corresponding to the feature; determining the predicted impact degree of the feature on the object to be predicted based on the feature prediction impact value; and screening out key features whose predicted impact degree exceeds a set threshold from all features.
[0008] Optionally, the feature influence value corresponding to each feature of all the features is calculated, including: obtaining a feature label corresponding to the feature of the service provider; performing an additive homomorphic encryption method on the feature label to obtain an encrypted label corresponding to the sample label; sending the encrypted label and the unique identifier of the feature to the data provider; receiving a ciphertext sum value calculated based on the encrypted label and the unique identifier provided by the data provider, decrypting the ciphertext sum value, and determining the number of positive samples and the number of negative samples of the feature sample according to the decryption result; and calculating the feature influence value of the feature based on the number of positive samples and the number of negative samples.
[0009] Optionally, after sending the encrypted label and the unique identifier of the sample to the data provider, it further includes: obtaining the ciphertext sum values corresponding to multiple feature bins sent by the data provider and the total number of samples contained in each feature bin; wherein the feature bins are multiple feature bins associated with the features located by the data provider based on the unique identifier; the ciphertext sum values corresponding to the feature bins are obtained based on the encryption label of the service provider and the additive homomorphic encryption method; the ciphertext sum values are decrypted, and the number of positive samples and the number of negative samples of the feature samples are determined according to the decryption result, including: decrypting the ciphertext sum values corresponding to each feature bin to obtain the number of positive samples corresponding to the feature bin, and obtaining the number of negative samples of the feature bin according to the total number of samples in the feature bin.
[0010] Optionally, the business risk prediction method further includes: the federated model includes a tree structure for performing business risk prediction; the nodes of the tree structure represent the characteristics corresponding to the business provider or the data provider; the splitting direction of the node branch in the tree structure is determined by the comparison result between the characteristic value of the node and the characteristic threshold; the leaf node of the tree structure represents the prediction weight and prediction probability of the characteristics of the parent node of the leaf node for business risk prediction.
[0011] Optionally, the trained federal model and key features are used to determine the risk probability corresponding to the object to be predicted, including: for each key feature, obtaining the eigenvalue of the key feature, using the tree structure to which the eigenvalue belongs and the feature threshold corresponding to the node of the eigenvalue, determining the leaf node corresponding to the node splitting direction, and inferring the prediction weight and prediction probability corresponding to the key feature; accumulating the prediction weight and prediction probability of each key feature to obtain the risk probability of the object to be predicted.
[0012] Optionally, before using the trained federated model and key features to determine the risk probability corresponding to the object to be predicted, it further includes: training the federated model; training the federated model, including: joint training based on samples from the service provider and samples from the data provider; the samples from the service provider have labels, and the samples from the data provider do not have labels; for each feature node in the tree structure contained in the original federated model, performing the following iterative training until the trained federated model is determined: sending the ciphertext of the features corresponding to the feature nodes of the service provider to the data provider after homomorphic encryption; the data provider decrypts the ciphertext to obtain each feature and the initial feature threshold corresponding to the feature; based on the initial feature threshold, splitting the nodes corresponding to the feature into different sample spaces; wherein the initial feature threshold is the feature threshold of the feature in the current iteration cycle; the service provider calculates the splitting gain value based on the different sample spaces after the split sent by the data provider, determines the feature threshold corresponding to the feature with a larger splitting gain value as the target feature threshold, and sends the target feature threshold and the corresponding feature to the data provider; the data provider replaces the initial feature threshold with the target feature threshold for the feature, and performs the federated model training for the next iteration cycle based on the target feature threshold.
[0013] To achieve the above-mentioned purpose, according to a second aspect of an embodiment of the present invention, a business risk prediction device is provided, characterized in that it is applied to a federated framework and comprises: a data collection module, a data encryption module and a risk prediction module; wherein:
[0014] A data collection module is used to obtain basic data of the object to be predicted provided by the service provider, determine one or more data providers associated with the service, and obtain service data of the object to be predicted provided by one or more data providers;
[0015] The data encryption module is used to determine the intersection data between the basic data and the business data based on the privacy set intersection model; and extract multiple key features related to the business from the intersection data;
[0016] The risk prediction module is used to use the trained federated model and key features to determine the risk probability corresponding to the object to be predicted, and predict the business risk of the object to be predicted based on the risk probability.
[0017] Optionally, the privacy set intersection model includes an encryption protocol between a business provider and one or more data providers and an encryption operation method corresponding to the encryption protocol; a business risk prediction device is used to determine the intersection data between basic data and business data based on the privacy set intersection model, including: obtaining the encrypted data of the business provider and the encrypted data of the data provider; wherein the encrypted data of the business provider is obtained by executing the encryption operation method on the basic data, and the encrypted data of the data provider is obtained by executing the encryption operation method on the business data; the aligned data obtained according to the encrypted data of the basic data and the encrypted data of the business data is used as the intersection data of the basic data and the business data.
[0018] Optionally, a business risk prediction device is used to extract multiple key features related to the business from the intersection data, including: extracting all features from the intersection data; calculating the feature prediction impact value corresponding to each feature of all features; the feature impact value is calculated by the number of positive samples and the number of negative samples corresponding to the feature; determining the predicted impact degree of the feature on the object to be predicted based on the feature prediction impact value; and screening out key features whose predicted impact degree exceeds a set threshold from all features.
[0019] Optionally, a business risk prediction device is used to calculate the feature impact value corresponding to each feature of all features, including: obtaining a feature label corresponding to the feature of a business provider; performing an additive homomorphic encryption method on the feature label to obtain an encrypted label corresponding to the sample label; sending the encrypted label and the unique identifier of the feature to a data provider; receiving a ciphertext sum value calculated based on the encrypted label and the unique identifier provided by the data provider, decrypting the ciphertext sum value, and determining the number of positive samples and the number of negative samples of the feature sample according to the decryption result; and calculating the feature impact value of the feature based on the number of positive samples and the number of negative samples.
[0020] Optionally, the business risk prediction device, after sending the encrypted label and the unique identifier of the sample to the data provider, further includes: obtaining the ciphertext sum values corresponding to multiple feature bins sent by the data provider and the total number of samples contained in each feature bin; wherein the feature bins are multiple feature bins associated with the features located by the data provider based on the unique identifier; the ciphertext sum values corresponding to the feature bins are obtained based on the encryption label of the business provider and the additive homomorphic encryption method; the ciphertext sum values are decrypted, and the number of positive samples and the number of negative samples of the feature samples are determined according to the decryption result, including: decrypting the ciphertext sum values corresponding to each feature bin to obtain the number of positive samples corresponding to the feature bin, and obtaining the number of negative samples of the feature bin according to the total number of samples in the feature bin.
[0021] Optionally, a business risk prediction device, used for a federated model, includes a tree structure for performing business risk prediction; the nodes of the tree structure represent the characteristics corresponding to the business provider or the data provider; the splitting direction of the node branch in the tree structure is determined by the comparison result between the characteristic value of the node and the characteristic threshold; the leaf node of the tree structure represents the prediction weight and prediction probability of the characteristics of the parent node of the leaf node for the business risk prediction.
[0022] Optionally, a business risk prediction device is used to use a trained federal model and key features to determine the risk probability corresponding to an object to be predicted, including: for each key feature, obtaining a characteristic value of the key feature, using a tree structure to which the characteristic value belongs and a characteristic threshold corresponding to a node of the characteristic value, determining a leaf node corresponding to a node splitting direction, and inferring a prediction weight and a prediction probability corresponding to the key feature; accumulating the prediction weight and prediction probability of each key feature to obtain the risk probability of the object to be predicted.
[0023] Optionally, the business risk prediction device is further used to train the federated model before using the trained federal model and key features to determine the risk probability corresponding to the object to be predicted; training the federal model includes: joint training based on samples from the business provider and samples from the data provider; the samples from the business provider have labels, and the samples from the data provider do not have labels; for each feature node in the tree structure contained in the original federal model, the following iterative training is performed until the trained federal model is determined: the ciphertext of the features corresponding to the feature nodes of the business provider is homomorphically encrypted and sent to the data provider; the data provider decrypts the ciphertext to obtain each feature and the initial feature threshold corresponding to the feature; based on the initial feature threshold, the nodes corresponding to the feature are split into different sample spaces; wherein the initial feature threshold is the feature threshold of the feature in the current iteration cycle; the business provider calculates the splitting gain value based on the different sample spaces after the split sent by the data provider, determines the feature threshold corresponding to the feature with a larger splitting gain value as the target feature threshold, and sends the target feature threshold and the corresponding feature to the data provider; the data provider replaces the initial feature threshold with the target feature threshold for the feature, and performs the federal model training for the next iteration cycle based on the target feature threshold.
[0024] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, there is provided an electronic device for business risk prediction, characterized in that it includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned business risk prediction methods.
[0025] To achieve the above-mentioned purpose, according to the fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, a method such as any of the above-mentioned business risk prediction methods is implemented.
[0026] To achieve the above-mentioned purpose, according to the fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, characterized in that when the computer program is executed by a processor, a method such as any of the above-mentioned business risk prediction methods is implemented.
[0027] An embodiment of the above invention has the following advantages or beneficial effects: it is able to use the processing module in the federated framework to obtain the basic data of the object to be predicted provided by the business provider and the business data provided by the data provider in response to the prediction request of the business provider; determine the intersection data between the basic data and the business data based on the privacy set intersection model; extract multiple key features related to the business from the intersection data; use the trained federated model and key features to determine the risk probability corresponding to the object to be predicted, and predict the business risk of the object to be predicted based on the risk probability. The embodiment of the present invention uses the processing module in the federated framework to enable multiple parties to determine the intersection data and the key features of the prediction without leaking their own data, thereby improving the data security of each data provider, reducing data security risks, and improving the accuracy of business risk prediction.
[0028] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0030] Figure 1 It is a flowchart of a business risk prediction method provided by an embodiment of the present invention;
[0031] FIG2 is a schematic diagram of a process flow of business risk prediction provided by an embodiment of the present invention;
[0032] Figure 3 It is a flowchart of a training federated model provided by an embodiment of the present invention;
[0033] Figure 4 It is a structural schematic diagram of a business risk prediction device provided by an embodiment of the present invention;
[0034] FIG5 is a diagram of an exemplary system architecture in which an embodiment of the present invention may be applied;
[0035] Figure 6 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0037] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0038] The existing joint modeling process is usually initiated by the business provider (company A). Company A arranges its personnel to carry company A's modeling data to company B (data provider) for on-site modeling, generally using traditional machine learning models or deep learning models for modeling.
[0039] The shortcomings of existing technologies include: 1) Data security issues: In the existing joint modeling methods, the data of the business provider and the data provider need to be released from the warehouse, and there are security issues such as leakage and attack during the data transmission and storage process; and the amount of data for joint modeling is generally large, but the larger the amount of data, the higher the risk of data security issues. 2) Data privacy issues: Data often involves personal privacy data, such as loan records, e-commerce purchase records, consumption records, flight records, express logistics records, etc., and there is a risk of privacy data leakage in the data release and transmission industry; 3) Low efficiency issues: Since data release may require approval from multiple departments of the enterprise, the process is very long and the overall modeling efficiency is very low. In addition, joint modeling requires personnel from enterprise A to carry the modeling data of the enterprise to enterprise B for on-site modeling, which has the problem of a long modeling cycle and low efficiency.
[0040] In view of this, if Figure 1 As shown, an embodiment of the present invention provides a business risk prediction method, which may include the following steps:
[0041] Step S101: obtaining basic data of the object to be predicted provided by the service provider, determining one or more data providers associated with the service, and obtaining service data of the object to be predicted provided by the one or more data providers.
[0042] Specifically, in an embodiment of the present invention, the business provider is the party that initiates the business risk prediction. For example, the business provider is Group A, which operates multiple businesses, such as retail, logistics, insurance, finance, health, credit, smart cloud, etc. In order for the normal operation of multiple businesses, risk control for each business needs to be performed.
[0043] The object to be predicted is a business provider for one or more objects (such as users, products, etc.). The object to be predicted has basic data. For example, in the credit business, the object to be predicted is user A, and the basic data of user A may be age, gender, marital status, etc. The data providers related to the credit business are, for example, data provider 1 and data provider 2. Different data providers can provide business data related to the credit business for user A. For example, data provider 1 provides data such as the bill payment amount and education level of user A, and data provider 2 provides data such as the credit limit of user A. The risks of the object to be predicted can be of various types, and the risk type is related to the business. For example, for the credit business, the overdue risk of loan repayment of a certain user can be predicted.
[0044] The embodiment of the present invention improves the accuracy and efficiency of business risk prediction by using data from different data providers. The embodiment of the present invention adopts a federal architecture, which includes a processing module, a business provider, and one or more data providers. The present invention uses the federal architecture to prevent the data of the business provider and the data provider from being stored, and any party among the multiple parties cannot see the data of other parties, thereby protecting data security and data privacy.
[0045] Step S102: Determine the intersection data between the basic data and the business data based on the privacy set intersection model.
[0046] Specifically, an embodiment of the present invention utilizes a privacy set intersection model to determine the intersection data between basic data and business data, wherein the technology included in the privacy set intersection model is a technology designed to allow multiple participants to perform intersection calculations without leaking their own data. This model technology can be used to protect data privacy and data security, and achieve the effect of sample alignment of multi-party data. Among them, the basic protocols used for privacy-preserving sample alignment include garbled circuits (GC) in secure multi-party computing, oblivious transfer protocols (OT), secret sharing (SS), homomorphic encryption (HE), etc.
[0047] When the oblivious transfer protocol is used to determine the intersection data, public-private key encryption is used (such as RSA, elliptic curve encryption, etc.) to encrypt the data of multiple parties. This is an oblivious transfer protocol for 2-out-of-1. When N is 2 for a two-party protocol, the oblivious transfer protocol is a 2-out-of-1 OT protocol. Assuming that the sender A holds data m0 and m1, and the receiver B holds a bit b, b∈{0,1}, then according to the oblivious transfer protocol model, the receiver B can selectively receive one of the messages through 1 selection bit. Since the sender cannot know the bit selected by the receiver, and the receiver cannot determine the unselected message, the privacy encryption sample alignment of the data provider and the service provider is achieved, so that the service provider The intersection part of the two parties' data can be obtained without leaking the non-intersection part, which improves data privacy and data security; that is, the privacy set intersection model includes the encryption protocol between the business provider and one or more data providers and the encryption operation method corresponding to the encryption protocol; based on the privacy set intersection model, the intersection data between the basic data and the business data is determined, including: obtaining the encrypted data of the business provider and the encrypted data of the data provider; wherein the encrypted data of the business provider is obtained by executing the encryption operation method on the basic data, and the encrypted data of the data provider is obtained by executing the encryption operation method on the business data; the aligned data obtained according to the encrypted data of the basic data and the encrypted data of the business data is used as the intersection data of the basic data and the business data.
[0048] It can be understood that the intersection data of the embodiment of the present invention refers to the collection of a certain data in the business data and the business data matching the data in multiple data providers. For example: a data provided by the business provider is the ID card information of user x; the data provider provides loan limit information, education level, loan amount and other information matching the ID card information of user x; the ID card information of user x, and the matching loan limit information, education level, loan amount and other information are the intersection data determined by the privacy set intersection model, achieving the effect of sample alignment.
[0049] Step S103: extracting a variety of key features related to the business from the intersection data.
[0050] Specifically, key features for prediction are extracted from all features of the intersection data (ie, aligned samples) obtained in step S102.
[0051] Extracting multiple key features related to the business from the intersection data, including: extracting all features from the intersection data; calculating the feature prediction impact value corresponding to each feature of all features; the feature impact value is calculated by the number of positive samples and the number of negative samples corresponding to the feature; determining the prediction impact degree of the feature on the object to be predicted based on the feature prediction impact value; screening out key features whose prediction impact degree exceeds the set threshold from all features.
[0052] Among them, the feature prediction impact values corresponding to federated feature engineering include: WOE, IV, KS, etc.; among them, WOE (weight of evidence) is an indicator used to measure the predictive ability of a variable for a certain event. IV (Information Value) is an indicator to measure the predictive ability of a variable, and is often used in the scoring card model in the field of financial risk control. It evaluates the predictive ability of the variable by calculating the information entropy of the variable. The larger the value, the stronger the predictive ability of the variable; the KS (Kolmogorov-Smirnov) indicator is used to evaluate the model's ability to distinguish between positive and negative samples. The larger the KS value, the stronger the model's ability to distinguish between positive and negative samples.
[0053] Furthermore, the feature influence value corresponding to each feature of all the features is calculated, including: obtaining the feature label corresponding to the feature of the service provider; performing an additive homomorphic encryption method on the feature label to obtain an encrypted label corresponding to the sample label; sending the encrypted label and the unique identifier of the feature to the data provider; receiving the ciphertext sum value calculated based on the encrypted label and the unique identifier provided by the data provider, decrypting the ciphertext sum value, and determining the number of positive samples and the number of negative samples of the feature sample according to the decryption result; and calculating the feature influence value of the feature based on the number of positive samples and the number of negative samples.
[0054] Specifically, in an embodiment of the present invention, the basic data of the service provider has a label, and the service data of the data provider does not have a label; after obtaining the intersection data of both parties (i.e., sample alignment), the label y of the sample of the service provider is encrypted by an additive homomorphic encryption method to obtain y1 (the encrypted label corresponding to the sample label), and then y1 and the unique feature identifier are sent to the data provider; the data provider has multiple feature bins, and the data provider searches for one or more feature bins to which the unique feature identifier belongs, calculates the ciphertext sum of each feature bin, and sends it to the service provider; wherein the preset binning methods include: equal-width binning, which divides the data range into intervals with the same width. The number of intervals is a predefined parameter; equal-frequency binning, which divides the data into intervals with the same number of data points, and determines the interval boundaries by the quantile of the data; cluster-based binning, which uses a clustering algorithm (such as K-means) to group data points, and each cluster forms a box. The goal is to make the data points in the same box as similar as possible, and the data points in different boxes as different as possible; decision tree-based binning uses the decision tree algorithm to determine the best binning rules, and the leaf nodes of the decision tree define the boundaries of the box; custom binning, define the box according to business logic or expert knowledge, for example, binning according to age group (0-18 years old, 19-35 years old, etc.). Which binning method to use can be determined according to the business scenario.
[0055] Furthermore, the service provider receives the ciphertext sum value calculated based on the encryption tag and the unique identifier provided by the data provider, decrypts the ciphertext sum value, determines the number of positive samples and the number of negative samples of the feature according to the decryption result; and calculates the feature influence value of the feature based on the number of positive samples and the number of negative samples.
[0056] After sending the encrypted label and the unique identifier of the sample to the data provider, it further includes: obtaining the ciphertext sum values corresponding to the multiple feature bins sent by the data provider and the total number of samples contained in each feature bin; wherein the feature bins are multiple feature bins associated with the features located by the data provider based on the unique identifier; the ciphertext sum values corresponding to the feature bins are obtained based on the encryption label of the service provider and the additive homomorphic encryption method; the ciphertext sum values are decrypted, and the number of positive samples and the number of negative samples of the feature samples are determined according to the decryption result, including: decrypting the ciphertext sum values corresponding to each feature bin to obtain the number of positive samples corresponding to the feature bin, and obtaining the number of negative samples of the feature bin according to the total number of samples in the feature bin.
[0057] Specifically, positive samples or negative samples are for features with two categories. For example, for a certain feature, samples that meet the feature value are positive samples (for example, represented by Good), and samples that do not meet the feature value are negative samples (for example, represented by Bad). Assume that the data provider has two feature bins, bin0 and bin1, for the features provided by the service provider. Bin0 contains 3 samples and bin1 contains 2 samples. The data provider sums the ciphertexts of bin0 and bin1 respectively to obtain the ciphertext sum values encrypt-bin0 and encrypt-bin1. The ciphertext sum values corresponding to the feature bins are obtained based on the encryption tags of the service provider and the additive homomorphic encryption method. The data provider sends {encrypt-bin0, 3} corresponding to bin0 and {encrypt-bin1, 2} corresponding to bin1 to the service provider, where the numbers 3 and 2 represent the number of samples.
[0058] Furthermore, the service provider decrypts the received {encrypt-bin0, 3} and {encrypt-bin1, 2}. For example, the result of decrypting encrypt-bin0 is 2, which means that the number of positive samples in bin0 is 2. It is also known that the total number of bin0 samples is 3, so the number of negative samples is 1. After obtaining the positive and negative samples of each feature bin, the WOE (weight of evidence), IV (information value), and KS indicators corresponding to the feature bin can be calculated. The formulas for calculating the WOE (weight of evidence), IV (information value), and KS indicators based on positive and negative samples are as follows:
[0059]
[0060]
[0061]
[0062] Among them, Bad represents negative samples, Good represents positive samples, i represents each bin, and T represents the total number of samples.
[0063] Furthermore, based on WOE (weight of evidence), IV (information value), and KS indicators, the key features with strong predictive ability of each feature bin for a certain feature label can be evaluated.
[0064] Step S104: using the trained federated model and key features, determine the risk probability corresponding to the object to be predicted, and predict the business risk of the object to be predicted based on the risk probability.
[0065] Specifically, the embodiment of the present invention uses the tree structure included in the federated model to predict the risk probability.
[0066] That is, the federated model contains a tree structure for performing business risk prediction; the nodes of the tree structure represent the features corresponding to the business provider or the data provider; the splitting direction of the node branch in the tree structure is determined by the comparison result between the feature value of the node and the feature threshold; the leaf node of the tree structure represents the prediction weight and prediction probability of the feature of the parent node of the leaf node for business risk prediction.
[0067] For example, the service provider needs to know whether user X has the risk of overdue loan repayment. The features of the node include, for example, the age of the service provider, the bill amount of the data provider, the credit limit, etc.; the feature value of each node feature, and the feature threshold corresponding to the feature. For example, the feature threshold of the bill amount is 5000. If the bill amount of user X is 4000, since 4000 is less than 5000, it is split to the left leaf node of the binary tree branch of the bill amount feature node (i.e., the left split space), otherwise it is divided into the right leaf node (i.e., the right split space). Each leaf node has a corresponding weight value and prediction probability. By analogy, the corresponding prediction weight value and prediction probability can be obtained for each key feature. Furthermore, the product of the weight value and prediction probability of each leaf node is calculated, and then accumulated to obtain the final prediction probability. That is, the trained federal model and key features are used to determine the risk probability corresponding to the object to be predicted, including: for each key feature, the characteristic value of the key feature is obtained, and the leaf node corresponding to the node splitting direction is determined by using the tree structure to which the characteristic value belongs and the characteristic threshold corresponding to the node of the characteristic value, and the prediction weight and prediction probability corresponding to the key feature are inferred; the prediction weight and prediction probability of each key feature are accumulated to obtain the risk probability of the object to be predicted.
[0068] Furthermore, the business risk of the object to be predicted is predicted based on the risk probability. For example, the risk probability of whether user X has a loan repayment overdue is 0.3. Assuming that the risk probability threshold is 0.7, it can be determined that user X does not have a loan repayment overdue risk.
[0069] like Figure 2 As shown, an embodiment of the present invention provides a schematic diagram of a process of business risk prediction; the process may include the following steps:
[0070] Step S201: Determine the intersection data between basic data and business data based on the privacy set intersection model.
[0071] Step S202: extracting a variety of key features related to the business from the intersection data.
[0072] Step S203: using the trained federated model and key features, determine the risk probability corresponding to the object to be predicted.
[0073] In an embodiment of the present invention, the processing module 200 is in a federated framework together with the business provider and the data provider. Steps S201 to S203 are executed by the processing module 200, and the processing module 200 can be run independently or deployed in the operating environment of the business provider or the data provider. The servers of both parties (business provider and data provider) deploy frameworks respectively. The method for the business provider and the data provider to upload data is to connect to their own company's data warehouse on the federated framework to obtain the required data. In addition, the data of both parties will not be directly shipped out or transmitted, which ensures the security of the data and protects the data privacy of the user.
[0074] Furthermore, the processing module of the federal framework of the embodiment of the present invention may also include the following sub-modules: a client tool for uploading data, submitting training tasks, etc.; a service module: for deploying and serving various components; a scheduling module: responsible for the scheduling, monitoring and management of tasks; a processing module: for data preprocessing, privacy set intersection, federal engineering processing, etc.; a machine learning module: providing a variety of machine learning algorithms for federal model construction.
[0075] The security mechanism for data of multiple partners (service providers and data providers) in the embodiment of the present invention includes: 1. Data encryption: In federated learning, data needs to be encrypted during transmission to ensure data privacy, such as homomorphic encryption and secure multi-party computing. 2. Authentication and authorization: Ensure that only authorized users and systems can access services and data. 3. Privacy protection algorithm: A variety of privacy protection algorithms are used, such as differential privacy, to share statistical information without leaking personal information.
[0076] The communication protocol used in the implementation of the present invention can use gRPC as its main communication protocol. gRPC is a high-performance, open source and general RPC framework. gRPC allows two-way communication between the client and the server and supports multiple authentication mechanisms.
[0077] The embodiments of the present invention improve the data security of service providers and data providers and improve the data privacy of service providers and data providers through a federated framework.
[0078] like Figure 3 As shown, an embodiment of the present invention provides a method for training a federated model, which may include the following steps:
[0079] Step S301: The data samples of the service provider and the data provider are aligned.
[0080] Joint training is performed based on samples from service providers and samples from data providers; samples from service providers have labels, and samples from data providers do not have labels.
[0081] Step S302: The service provider generates additively homomorphically encrypted data based on its own sample labels and sends it to the data provider.
[0082] Specifically, the samples of the service provider have labels. The service provider generates additively homomorphically encrypted data based on its own sample labels and combines them with the prediction results of the previous iteration cycle, and sends them to the data provider.
[0083] Calculate the first-order derivative gn and second-order derivative hn of each sample to get (g1, h1)…, (gn, hn), and use the homomorphic encryption method that satisfies additive homomorphism to get (⟨g1>,⟨h1>)…, (⟨gn>,⟨hn>) and send it to the data party. Among them, ⟨hn> represents the ciphertext data after _n is homomorphically encrypted.
[0084] Step S303: The data provider bins its own features according to the binning method, and then calculates the gradient sum information of the samples in each box. The gradient sum information includes the sample space split according to the eigenvalue of each feature and the feature threshold (left split space), and returns the left split space to the service provider.
[0085] The data provider bins the features it owns according to the preset feature binning method, and then calculates the gradient sum information of the samples in each feature bin accordingly. , and returns to the service provider. L is the left split space after the node splits, i represents the sample, i∈I L Indicates that it belongs to I L Sample of space.
[0086] Step S304: The service provider decrypts according to the feature threshold of the data provider, calculates the splitting gain value, compares the splitting gain value of each feature threshold, selects the feature and feature threshold with the maximum splitting gain, and if it is the feature of the data provider, sends it to the data provider synchronously; if it is the feature of the service provider, it is directly split.
[0087] Specifically, the service provider decrypts the result sent by the data provider and calculates the splitting gain value. The formula #(1) for calculating the splitting gain value is as follows:
[0088]
[0089] Where Lsplit represents the split gain value, I R is the right-side split space, λ is the regularization coefficient, and γ is the complexity cost introduced after adding the split.
[0090] Furthermore, the service provider compares the Lsplit of each feature threshold, selects the largest Lsplit value, and obtains the feature and threshold with the maximum splitting gain. If the corresponding feature belongs to the data party, it is synchronized to the data party, and the sample space is divided using the feature returned by the data party; if the feature of the service provider is selected, it is directly split.
[0091] Step S305: The data provider replaces the existing initial feature threshold with the target feature threshold based on the feature determined by the service provider according to the splitting gain value and the corresponding target feature threshold, and divides the sample space to obtain the left split space.
[0092] Step S306: The service provider calculates the right splitting space based on the left splitting space of the feature sent by the data provider to complete a splitting training.
[0093] Steps S302 to S306 are a training process in model training, and multiple cycles of iterative training are performed until an optimized federated model is obtained. Through multiple iterative trainings, the optimal feature threshold is determined for each node feature, so that more accurate branches can be obtained through classification through the feature threshold, thereby improving the accuracy of prediction; it can be understood that the federated model in the embodiment of the present invention has multiple tree structures, and each tree structure represents different features.
[0094] That is, before using the trained federated model and key features to determine the risk probability corresponding to the object to be predicted, it further includes: training the federated model; training the federated model, including: joint training based on samples from the service provider and samples from the data provider; the samples from the service provider have labels, and the samples from the data provider do not have labels; for each feature node in the tree structure contained in the original federated model, the following iterative training is performed until the trained federated model is determined: the ciphertext of the features corresponding to the feature nodes of the service provider is homomorphically encrypted and sent to the data provider; the data provider decrypts the ciphertext to obtain each feature and the initial feature threshold corresponding to the feature; based on the initial feature threshold, the nodes corresponding to the feature are split into different sample spaces; wherein the initial feature threshold is the feature threshold of the feature in the current iteration cycle; the service provider calculates the splitting gain value based on the different sample spaces after the split sent by the data provider, determines the feature threshold corresponding to the feature with a larger splitting gain value as the target feature threshold, and sends the target feature threshold and the corresponding feature to the data provider; the data provider replaces the initial feature threshold with the target feature threshold for the feature, and performs the federated model training for the next iteration cycle based on the target feature threshold.
[0095] like Figure 4As shown, the embodiment of the present invention provides a business risk prediction device 400, including: a data collection module 401, a data encryption module 402 and a risk prediction module 403; wherein,
[0096] The data collection module 401 is used to obtain basic data of the object to be predicted provided by the service provider, determine one or more data providers associated with the service, and obtain service data of the object to be predicted provided by the one or more data providers;
[0097] The data encryption module 402 is used to determine the intersection data between the basic data and the business data based on the privacy set intersection model; and extract multiple key features related to the business from the intersection data;
[0098] The risk prediction module 403 is used to determine the risk probability corresponding to the object to be predicted by using the trained federated model and key features, and predict the business risk of the object to be predicted according to the risk probability.
[0099] An embodiment of the present invention also provides an electronic device for business risk prediction, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0100] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0101] An embodiment of the present invention further provides a computer program product, including a computer program, which implements any of the above-mentioned business risk prediction methods when executed by a processor.
[0102] Figure 5 An exemplary system architecture 500 is shown to which the business risk prediction method or business risk prediction device according to the embodiment of the present invention can be applied.
[0103] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0104] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, 503, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0105] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0106] The server 505 may be a server that provides various services, such as a background management server that provides support for client applications used by users using the terminal devices 501, 502, and 503. The background management server may process the received business risk prediction request and feed back the prediction probability obtained by the federated model to the terminal device.
[0107] It should be noted that the business risk prediction method provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the business risk prediction device is generally arranged in the server 505 .
[0108] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0109] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0110] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0111] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0112] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.
[0113] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0115] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be arranged in a processor, for example, they may be described as: a processor including a data acquisition module, a data encryption module, and a risk prediction module. The names of these modules do not, in some cases, constitute limitations on the modules themselves, for example, the data acquisition module may also be described as a "module for acquiring data from a service provider and a data provider".
[0116] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining basic data of the object to be predicted provided by the service provider, determining one or more data providers associated with the service, obtaining service data of the object to be predicted provided by one or more data providers; determining the intersection data between the basic data and the service data based on the privacy set intersection model; extracting multiple key features related to the service from the intersection data; using the trained federated model and key features, determining the risk probability corresponding to the object to be predicted, and predicting the service risk of the object to be predicted based on the risk probability.
[0117] The embodiments of the present invention can utilize the processing module in the federated framework to obtain the basic data of the object to be predicted provided by the business provider and the business data provided by the data provider in response to the prediction request of the business provider; determine the intersection data between the basic data and the business data based on the privacy set intersection model; extract multiple key features related to the business from the intersection data; utilize the trained federated model and key features to determine the risk probability corresponding to the object to be predicted, and predict the business risk of the object to be predicted based on the risk probability. The embodiments of the present invention use the processing module in the federated framework to enable multiple parties to determine the intersection data and the key features of the prediction without leaking their own data, thereby improving the data security of multiple parties, reducing data security risks, and improving the accuracy of business risk prediction.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A business risk prediction method, characterized in that: Processing modules used in the federation framework include: Obtaining basic data of the object to be predicted provided by a service provider, determining one or more data providers associated with the service, and obtaining service data of the object to be predicted provided by one or more data providers; Determine the intersection data between the basic data and the business data based on a privacy set intersection model; Extracting multiple key features related to the business from the intersection data; The trained federated model and the key features are used to determine the risk probability corresponding to the object to be predicted, and the business risk of the object to be predicted is predicted based on the risk probability.
2. The method according to claim 1, characterized in that The privacy set intersection model includes an encryption protocol between a service provider and one or more data providers and an encryption operation method corresponding to the encryption protocol; The determining the intersection data between the basic data and the business data based on the privacy set intersection model includes: Acquire the encrypted data of the service provider and the encrypted data of the data provider; wherein the encrypted data of the service provider is obtained by executing the encryption operation method on the basic data, and the encrypted data of the data provider is obtained by executing the encryption operation method on the service data; Aligned data obtained according to the encrypted data of the basic data and the encrypted data of the business data is used as intersection data of the basic data and the business data.
3. The method according to claim 1, characterized in that The extracting of multiple key features related to the business from the intersection data includes: Extracting all features from the intersection data; Calculating a feature prediction influence value corresponding to each of the features; the feature influence value is calculated by the number of positive samples and the number of negative samples corresponding to the feature; Determining the prediction influence degree of the feature on the object to be predicted according to the feature prediction influence value; From all the features, key features whose predicted impact exceeds a set threshold are selected.
4. The method according to claim 3, characterized in that The calculating of the feature impact value corresponding to each feature of all the features includes: obtaining a feature label corresponding to the feature of the service provider; performing an additive homomorphic encryption method on the feature label to obtain an encrypted label corresponding to the sample label; and sending the encrypted label and the unique identifier of the feature to the data provider; Receiving a ciphertext sum value calculated based on the encryption tag and the unique identifier provided by the data provider, decrypting the ciphertext sum value, and determining the number of positive samples and the number of negative samples of the sample of the feature according to the decryption result; A feature influence value of the feature is calculated based on the number of positive samples and the number of negative samples.
5. The method according to claim 4, characterized in that After sending the encrypted tag and the unique identifier of the sample to the data provider, the method further includes: Obtain the ciphertext sum values corresponding to the multiple feature bins sent by the data provider and the total number of samples contained in each feature bin; wherein the feature bins are multiple feature bins associated with the feature located by the data provider based on the unique identifier; the ciphertext sum values corresponding to the feature bins are obtained based on the encryption tag of the service provider and the additive homomorphic encryption method; The decrypting the ciphertext sum value and determining the number of positive samples and the number of negative samples of the characteristic samples according to the decryption result includes: The ciphertext sum value corresponding to each feature bin is decrypted to obtain the number of positive samples corresponding to the feature bin, and the number of negative samples of the feature bin is obtained according to the total number of samples of the feature bin.
6. The method according to claim 1, characterized in that Further including: The federated model includes a tree structure for performing business risk prediction; The nodes of the tree structure represent the corresponding features of the service provider or the data provider; The splitting direction of the node branch in the tree structure is determined by the comparison result between the characteristic value of the node and the characteristic threshold; The leaf nodes of the tree structure represent the prediction weights and prediction probabilities of the features of the parent nodes of the leaf nodes for business risk prediction.
7. The method according to claim 6, characterized in that The using the trained federated model and the key features to determine the risk probability corresponding to the object to be predicted includes: For each key feature, obtain the feature value of the key feature, use the tree structure to which the feature value belongs and the feature threshold corresponding to the node of the feature value to determine the leaf node corresponding to the splitting direction of the node, and infer the prediction weight and prediction probability corresponding to the key feature; The prediction weight and prediction probability of each key feature are accumulated to obtain the risk probability of the object to be predicted.
8. The method according to claim 1, characterized in that Before using the trained federated model and the key features to determine the risk probability corresponding to the object to be predicted, the method further includes: training the federated model; The training of the federated model comprises: Performing joint training based on samples from the service provider and samples from the data provider; the samples from the service provider have labels, and the samples from the data provider do not have labels; For each feature node in the tree structure contained in the original federated model, the following iterative training is performed until the trained federated model is determined: Sending the ciphertext of the feature corresponding to the feature node of the service provider to the data provider after homomorphic encryption; The data provider decrypts the ciphertext to obtain each feature and an initial feature threshold corresponding to the feature; based on the initial feature threshold, the nodes corresponding to the feature are split into different sample spaces; wherein the initial feature threshold is the feature threshold of the feature in the current iteration cycle; The service provider calculates a splitting gain value according to different sample spaces after splitting sent by the data provider, determines a feature threshold corresponding to a feature with a larger splitting gain value as a target feature threshold, and sends the target feature threshold and the corresponding feature to the data provider; The data provider replaces the initial feature threshold with the target feature threshold for the feature, and performs federated model training for the next iteration cycle based on the target feature threshold.
9. A business risk prediction device, characterized in that: Applied to the federal framework, including: data collection module, data encryption module and risk prediction module; among them, The data acquisition module is used to obtain basic data of the object to be predicted provided by the service provider, determine one or more data providers associated with the service, and obtain service data of the object to be predicted provided by one or more data providers; The data encryption module is used to determine the intersection data between the basic data and the business data based on the privacy set intersection model; and extract multiple key features related to the business from the intersection data; The risk prediction module is used to determine the risk probability corresponding to the object to be predicted by using the trained federal model and the key features, and predict the business risk of the object to be predicted according to the risk probability.
10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.