Cross-bank customer classification method based on multi-party security computing and related device
By using multi-party security calculation methods to cluster customer information in the cross-bank data sharing scenario of bank customer information, the contradiction between data security and clustering effect is solved, and accurate bank customer classification is achieved.
Patent Information
- Application Number
- CN202411743794.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-02-25
AI Technical Summary
On the premise of ensuring data security, how to improve the clustering effect of bank customer information and achieve accurate customer classification, especially in cross-bank data sharing scenarios.
A cross-bank customer classification method based on multi-party security calculation is adopted to ensure data security is not leaked through cross-bank data clustering and combining multi-party security calculation. The specific plan includes obtaining customer information sharding data provided by multiple banks, performing clustering processing based on the target-level clustering algorithm, determining the sub-clustering processing results, and feedback to each bank to determine the final clustering results.
On the premise of ensuring data security and not leaking bank customer information, the clustering effect is improved, accurate bank customer classification is achieved, and the speed and efficiency of cross-bank data clustering is improved.
Smart Images

Figure CN119513632A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial data processing and data security technology, and in particular to a cross-bank customer classification method based on multi-party secure computing and related devices. Background Art
[0002] Data, as the core driver of today's information age, is particularly important in the banking industry. Customer classification is a key step in customer profiling for banks, and how to accurately classify customers based on customer information data is a key issue.
[0003] Using clustering based on customer information data is an effective measure for customer classification. In addition, since the importance of data to banks is self-evident, how to improve the clustering effect and achieve accurate customer classification while ensuring data security and not leaking bank customer information has become a technical problem that needs to be solved urgently in this field. Summary of the Invention
[0004] In view of this, the present application provides a cross-bank customer classification method and related devices based on multi-party secure computing, which are used to improve the clustering effect and achieve accurate customer classification while ensuring data security and not leaking bank customer information through cross-bank data clustering and combining it with multi-party secure computing.
[0005] The specific technical solutions are as follows:
[0006] A cross-bank customer classification method based on multi-party secure computing is applied to a device of any computing party among multiple computing parties, the method comprising:
[0007] Obtain customer information shard data and the target number of clusters for multiple customers provided by multiple banks. Each customer corresponds to a piece of customer information, and each piece of customer information corresponding to each customer is divided into multiple shard data. Different shard data of the same customer information is distributed to different computing parties.
[0008] Performing clustering processing on the customer information fragment data based on a target hierarchical clustering algorithm to obtain clustering processing results for the customer information fragment data; the clustering processing is used to divide the obtained customer information fragment data of multiple customers into different classification categories of the target number of clusters;
[0009] Determining a sub-clustering processing result for each bank's customer information fragment data based on the clustering processing result;
[0010] Feeding back the sub-clustering processing results of each bank's customer information shard data to the corresponding bank, so that each bank determines the clustering result corresponding to the bank's customer information based on the sub-clustering processing results respectively fed back by the multiple computing parties;
[0011] Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-top heap; each node in the mini-top heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-top heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
[0012] Optionally, obtaining customer information fragment data of multiple customers provided by multiple banks includes:
[0013] The customer information shard data of multiple customers is obtained by sharding the customer information of multiple customers held by multiple banks through secret sharing.
[0014] Optionally, clustering the customer information fragment data based on the target hierarchical clustering algorithm to obtain a clustering processing result for the customer information fragment data includes:
[0015] By measuring the similarity of different clusters based on the inter-cluster distance, cluster merging is performed on different clusters formed by the fragmented data of customer information of multiple customers of different banks until the target number of target clusters is obtained and the clustering is terminated;
[0016] Among them, initially, the customer information shard data of each customer is regarded as a separate cluster; different target clusters correspond to different customer categories, and each target cluster contains the customer information shard data of customers of the same category obtained by the final clustering; during the clustering process, the inter-cluster distances between different clusters are stored in the corresponding nodes of the mini-heap, and the inter-cluster distance comparison is performed based on the data structure of the mini-heap.
[0017] Optionally, the similarity measurement of different clusters based on the inter-cluster distance is performed, and cluster merging is performed on different clusters formed by the fragmented data of customer information of multiple customers of different banks until the target number of target clusters is obtained, including:
[0018] Based on the corresponding secure operation protocol in the secure operation protocol set, the distance between each two clusters in each current cluster in the current round of clustering is determined, and the inter-cluster distance between each two clusters in the current round of clustering is obtained;
[0019] Based on the inter-cluster distances corresponding to the clusters that are updated in the current round of clustering compared to the previous round of clustering and the corresponding security operation protocol in the security operation protocol set, the node information of the small top heap is updated to synchronously store the inter-cluster distances between every two clusters in the current round of clustering in the small top heap, and the inter-cluster distance stored in the top node of the small top heap is the minimum distance among the inter-cluster distances between every two clusters in the current round of clustering;
[0020] Determine a first cluster and a second cluster corresponding to the inter-cluster distance stored in the top node of the small top heap, merge the first cluster and the second cluster to obtain a merged third cluster;
[0021] The next round of clustering is started based on the third cluster and the clusters that have not participated in the merger in the current round of clustering, and the clustering is terminated when the target number of clusters is obtained.
[0022] Optionally, the secure operation protocols in the secure operation protocol set include: a secure multiplication protocol, a secure comparison protocol, a secure absolute value protocol, a secure division protocol, a secure division protocol and a secure power function protocol;
[0023] Among them, each secure operation protocol in the secure operation protocol set is used to: realize the corresponding operation processing of data divided among different computing parties, and while realizing the corresponding operation processing, it can ensure that the computing party cannot know the real business data corresponding to the data participating in the operation, and cannot know the data processing results of the real business data; or, it is used to realize the corresponding operation processing of the corresponding intermediate data; the intermediate data is the non-classified output result data obtained by processing the obtained sharded data.
[0024] Optionally, the customer information shard data is shard data generated by the bank performing sharding processing on the customer information based on an additive secret sharing method;
[0025] Each security operation protocol in the security operation protocol set is a protocol suitable for additive secret sharing.
[0026] Optionally, the customer information shard data of each customer corresponds to a bank identifier of the bank to which the customer belongs; and determining, based on the clustering processing result, a sub-clustering processing result for the customer information shard data of each bank includes:
[0027] Determining the classification category and bank to which each customer's customer information fragment data belongs based on the clustering processing result and the bank identifier corresponding to each customer's customer information fragment data;
[0028] According to the classification category and bank to which the customer information fragment data of each customer belongs, determining the customer information fragment data of each bank that is classified into each classification category;
[0029] The sub-clustering processing result of the customer information fragment data of each bank includes: the customer information fragment data of each bank divided into each classification category.
[0030] A cross-bank customer classification device based on multi-party secure computing, applied to a device of any computing party among multiple computing parties, comprising:
[0031] The acquisition module is used to obtain customer information shard data and the target cluster number for multiple customers provided by multiple banks. Each customer corresponds to a piece of customer information, and each piece of customer information corresponding to each customer is divided into multiple shard data. Different shard data of the same customer information is distributed to different computing parties.
[0032] a clustering processing module, configured to perform clustering processing on the customer information fragment data based on a target hierarchical clustering algorithm to obtain clustering processing results for the customer information fragment data; wherein the clustering processing is configured to divide the obtained customer information fragment data of multiple customers into different classification categories of the target number of clusters;
[0033] A determination module, configured to determine a sub-clustering processing result for each bank's customer information fragment data based on the clustering processing result;
[0034] a feedback module, configured to feed back the sub-clustering processing results of the customer information shard data of each bank to the corresponding bank, so that each bank can determine the clustering result corresponding to the customer information of the bank based on the sub-clustering processing results respectively fed back by the multiple computing units;
[0035] Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-top heap; each node in the mini-top heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-top heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
[0036] An electronic device, comprising:
[0037] Memory for storing computer programs;
[0038] The processor is configured to implement the cross-bank customer classification method based on multi-party secure computing as described in any one of the above items by calling and executing the computer program in the memory.
[0039] A computer-readable medium stores a computer program thereon, which, when executed by a processor, can be used to implement the cross-bank customer classification method based on multi-party secure computing as described in any one of the above.
[0040] According to the above scheme, the cross-bank customer classification method and related device based on multi-party secure computing provided by this application, in which the device of any one of the multiple computing parties obtains the customer information shard data and target number of clusters of multiple customers provided by multiple banks, and clusters the customer information shard data based on the target hierarchical clustering algorithm to obtain the clustering processing results of the customer information shard data. Based on the clustering processing results, the sub-clustering processing results of the customer information shard data of each bank are determined, and the sub-clustering processing results of the customer information shard data of each bank are fed back to the corresponding bank, so that each bank can determine the clustering result corresponding to the customer information of the bank based on the sub-clustering processing results respectively fed back by the multiple computing parties, thereby realizing the classification of bank customers accordingly. Therefore, this application proposes and implements a solution for classifying bank customers through cross-bank data clustering. Cross-bank data clustering has the characteristics of high data volume, which can make the clustering effect more excellent. In addition, this application combines the use of multi-party secure computing to ensure data security in the cross-bank data clustering process. Therefore, it improves the clustering effect and achieves accurate bank customer classification while ensuring data security and not leaking bank customer information.
[0041] In addition, the present application improves the hierarchical clustering algorithm based on the mini-heap, uses the mini-heap data structure to store the inter-cluster distances between different clusters in the hierarchical clustering process, and makes the inter-cluster distances stored in the top node of the mini-heap the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress, which can effectively speed up the comparison and search rate of the inter-cluster distances in the clustering process, thereby improving the speed and efficiency of cross-bank data clustering, correspondingly improving the classification efficiency of bank customers, and saving classification time. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0043] Figure 1 This is a flow chart of the cross-bank customer classification method based on multi-party secure computing provided by this application;
[0044] Figure 2 This is a framework diagram of the solution for cross-bank customer classification based on multi-party secure computing provided by this application;
[0045] Figure 3(a), Figure 3(b) and 3(c)They are schematic diagrams of the principles of Boolean SS, additive SS, and multiplicative SS provided in this application;
[0046] Figure 4 This is a schematic diagram comparing the ESSs before and after the merger of two clusters provided by this application;
[0047] Figure 5 It is a diagram of the small top pile structure provided by this application;
[0048] Figure 6 This is a structural diagram of the cross-bank customer classification device based on multi-party secure computing provided by this application;
[0049] Figure 7 This is a structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0051] When clustering bank customer information to achieve the classification of bank customers (such as the risk level classification of bank customers), the applicant's research found that a larger amount of data can mine more features, facilitate the discovery of potential features and summarize patterns, thereby making the clustering effect more excellent. However, for the classification scenario of bank customers, a larger amount of data often means data sharing among multiple banks. However, since the importance of data to banks is self-evident, it is necessary to ensure that bank data (such as bank customer information) is not leaked as much as possible to ensure the security of bank data. Therefore, how to break data silos while ensuring data security to improve clustering effects and achieve accurate bank customer classification has become a key issue today.
[0052] Based on this, the present invention provides a cross-bank customer classification method and related apparatus based on multi-party secure computing to address the above technical issues. The method provided in the present invention can be run on devices of multiple computing parties, including but not limited to cloud servers for multi-party secure computing.
[0053] See also Figure 1 As shown in the method flow chart, the cross-bank customer classification method based on multi-party secure computing provided in the embodiment of the present application can at least include the following steps 101 to 104, and these steps are described in detail below.
[0054] Step 101: Obtain customer information shard data and target cluster quantity for multiple customers provided by multiple banks. Each customer corresponds to a piece of customer information, and each piece of customer information corresponding to each customer is divided into multiple shard data.
[0055] Different shards of the same customer information are distributed to different computing parties.
[0056] A larger amount of data can make the clustering effect more excellent, and accordingly can improve the accuracy of classification of bank customers. Based on this, the embodiment of the present application performs cross-bank customer classification.
[0057] Among them, multiple banks participating in customer classification can first use their local devices to fragment / split the customer information of each customer to be classified through secret sharing (SS) to obtain multiple fragmented data corresponding to the customer information of each customer (that is, one piece of customer information corresponding to each customer).
[0058] Each customer's corresponding piece of customer information may include, but is not limited to, part or all of the following information:
[0059] 1. Basic information, including but not limited to the customer's name, age, occupation, contact information, residential address, etc.;
[0060] 2. Financial transaction records, including but not limited to customers' deposit, withdrawal, transfer, loan and other records;
[0061] 3. Credit status, including but not limited to the customer's repayment record, loan quota usage, and other information;
[0062] 4. Other additional information, including but not limited to the customer’s investment preferences, financial products purchased, purchase amount, etc.
[0063] The bank uses its local equipment to divide the customer information of each customer to be classified into multiple shards based on secret sharing, and encrypts the customer information to ensure that even if part of the secret (i.e., the customer information shard data) is leaked, the complete secret information (complete customer information) cannot be restored.
[0064] After segmenting the customer information of each customer to be classified into multiple shards, the bank's local device distributes the resulting customer information shards to the devices of each computing party. The computing party device (i.e., the execution entity of the present method), such as a cloud server, can correspondingly obtain the customer information shards of multiple customers obtained by multiple banks through sharding the customer information of multiple customers held by them through secret sharing.
[0065] See also Figure 2For example, assume that there are three banks participating in customer classification, namely: Bank 1, Bank 2 and Bank 3, and there are also three computing parties participating in multi-party secure computing. The devices of each computing party are server 1, server 2 and server 3 respectively. Optionally, these three servers can be cloud servers respectively.
[0066] like Figure 2 As shown, each bank divides each customer's customer information I into three shard data I0, I1, and I2 on its local device. For example, based on additive SS, each customer information (each customer corresponds to a customer information, and the corresponding customer information includes but is not limited to the above-mentioned basic information, financial transaction records, credit status, etc.) I is divided into three parts I0, I1, and I2, where I = I0 + I1 + I2, and the three shard data I of each customer are divided into i Distributed to three servers, each server holds a shard of the same customer information. Each computing device, such as each server, cannot hold all the shards of the same customer's data to ensure that the computing device cannot restore the real customer information and avoid the leakage of bank customer information.
[0067] Secret Sharing (SS) refers to the practice of distributing data across multiple computing parties (also known as participants), who are typically peers. If data security and privacy were simply guaranteed by sharding, the technology would be of little value. However, SS enables computations to be performed even in a sharded environment, ensuring their correctness and the ability to restore results across multiple parties. This is precisely the quality of data that privacy computing strives for: data that is available but invisible. Furthermore, SS's sharding and restoration processes do not involve encryption or decryption. Encryption and decryption are achieved solely through data sharding / splitting and consolidation / restoration. Sharding encrypts data, while consolidating the shards to restore the true data decrypts it. This makes it very cost-effective and easy to implement.
[0068] SS can be divided into arithmetic SS and Boolean SS according to whether the value to be shared is an arithmetic value or a binary value.
[0069] The data in a Boolean SS is a binary value, ensuring that all data falls within domain Z2. Furthermore, each shard value into which the data is divided during data sharing also falls within domain Z2. Figure 3(a) shows a Boolean SS diagram. During data consolidation / restoration, the shards to be consolidated can be combined into the final real data using an exclusive-or operation. Domain Z2 is the domain formed by the binary values 0 and 1.
[0070] The data and slice values of the arithmetic SS are guaranteed to be in the domain In the field, arithmetic SS can be divided into additive SS and multiplicative SS according to the different sharing and restoration methods. Refers to the real number domain. See Figures 3(b) and 3(c) for schematic diagrams of the additive and multiplicative SS principles, respectively. In additive SS, all slice values are added together to obtain the final real data, while in multiplicative SS, all slice values are multiplied to obtain the final real data.
[0071] Optionally, the embodiment of the present application uses additive SS to perform data segmentation and integration processing. Based on this, each bank involved in customer classification can use additive SS processing on its local device to segment each customer's customer information into multiple fragments, such as three fragments.
[0072] Step 102: cluster the customer information fragment data based on a target hierarchical clustering algorithm to obtain a clustering result of the customer information fragment data; the clustering process is used to divide the obtained customer information fragment data of multiple customers into different classification categories of the target number of clusters.
[0073] Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-top heap; each node in the mini-top heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-top heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
[0074] Clustering refers to the process of dividing a given set of samples (such as customer information) into multiple different classes or clusters with reference to a certain distance metric (Manhattan distance, Euclidean distance, etc.). This makes the similarity of each sample within the same cluster as large as possible, while making the gap between different clusters as large as possible. Optionally, the embodiment of the present application uses a hierarchical clustering algorithm to cluster customer information, and optimizes the clustering process of the hierarchical clustering algorithm based on a mini-heap to obtain the target hierarchical clustering algorithm, and finally uses the target hierarchical clustering algorithm to implement customer classification.
[0075] The principle of this target hierarchical clustering algorithm is to first regard all samples as a single cluster, and then continuously merge clusters according to the similarity measurement based on the inter-cluster distance until the required number of clusters is obtained. In the cluster merging process, the inter-cluster distances between different clusters are stored and compared based on the mini-heap data structure to screen suitable clusters for merging, thereby realizing hierarchical clustering of cross-bank customers.
[0076] In an embodiment of the present application, for cross-bank customer classification, the computing device can specifically perform cluster merging processing on different clusters formed by customer information fragmentation data of multiple customers of different banks by measuring the similarity of different clusters based on the inter-cluster distance, and terminate clustering when the target number of target clusters is obtained.
[0077] Initially, the computing device regards the customer information shard data of each customer as a separate cluster; different target clusters correspond to different customer categories, and each target cluster contains the customer information shard data of customers of the same category obtained by the final clustering; during the clustering process, the inter-cluster distances between different clusters are stored in the corresponding nodes of the mini-heap, and the inter-cluster distances are compared based on the data structure of the mini-heap.
[0078] The target number of clusters is the number of bank customer classification categories specified based on actual business needs. For example, assuming that bank customers need to be categorized by risk level, the target number of clusters can be the various risk levels pre-defined for bank customers, such as high risk, medium risk, and low risk, with each level considered a category.
[0079] Among them, by measuring the similarity of different clusters based on the inter-cluster distance, cluster merging is performed on different clusters formed by the customer information fragmentation data of multiple customers of different banks until the target number of target clusters is obtained, and the clustering is terminated. It can be further implemented as the following steps 1)-4):
[0080] 1) Based on the corresponding secure operation protocol in the secure operation protocol set, the distance between each two clusters in each current cluster in the current round of clustering is determined, and the inter-cluster distance between each two clusters in the current round of clustering is obtained.
[0081] The similarity between each two clusters is measured by determining the distance between them. The smaller the distance between clusters, the higher the similarity between the corresponding two clusters, and accordingly, the higher the probability of merging the two clusters.
[0082] The similarity between two different clusters can be measured by, but is not limited to, the following inter-cluster distance method:
[0083] a. Single-linkage: The inter-cluster distance between two clusters is equal to the minimum distance between the objects in the two clusters.
[0084] b. Complete-linkage: The inter-cluster distance between two clusters is equal to the maximum distance between the objects in the two clusters.
[0085] c. Average-linkage: The inter-cluster distance between two clusters is equal to the average distance between the objects in the two clusters.
[0086] d. Ward-linkage: Minimize the increment of ESS (the distance from all points in the cluster to the mean point in the cluster) of the two clusters selected for merging. Figure 4 The figure shows a schematic diagram comparing the ESS values of two clusters before and after merging. In other words, this method can specifically determine the ESS values of all two clusters before and after merging, and select the two clusters with the smallest increment to merge. In this method, the distance between the two clusters can be represented based on the ESS increment before and after the merger of the two clusters.
[0087] The embodiment of the present application pre-builds a set of secure computing protocols required for clustering processing on the computing side. The computing side device can use each secure computing protocol in this set as the underlying operator to implement clustering processing on the bank customer information shard data.
[0088] The secure operation protocols in the secure operation protocol set include, but are not limited to, a secure multiplication protocol, a secure comparison protocol, a secure absolute value protocol, a secure partitioning protocol, a secure division protocol, and a secure power function protocol.
[0089] Each secure computing protocol in the secure computing protocol set is used to implement corresponding computing processing on data split between different computing parties, and while implementing the corresponding computing processing, it can ensure that the computing party cannot know the real business data corresponding to the data involved in the computing, nor the data processing results of the real business data; or, it is used to implement corresponding computing processing on corresponding intermediate data; the intermediate data is the non-classified output result data obtained by processing the obtained sharded data. Taking the secure multiplication protocol as an example, it is a protocol for completing the multiplication of two numbers a and b (both of which are shared to each server in the form of shards) split between different servers. While completing the multiplication, the protocol does not let the participating servers know what the two multiplied numbers (i.e., a and b) are. The server only obtains its sharded data and performs computing on the sharded data, and the final multiplication result c=a*b is not obtained by the server.
[0090] The secure partitioning protocol is a pre-protocol of the secure division protocol, and is responsible for the relevant pre-processing of the data operation processing corresponding to the secure division protocol.
[0091] Optionally, in accordance with an embodiment of the present application, the bank's local device performs data sharding and shard integration processing based on an additive secret sharing method, and the above-mentioned various security operation protocols are respectively protocols applicable to the additive secret sharing method.
[0092] This application will provide detailed descriptions of these constructed secure computing protocols in the following embodiments.
[0093] 2) Based on the inter-cluster distances corresponding to the clusters that are updated in the current round of clustering compared to the previous round of clustering and the corresponding security operation protocols in the security operation protocol set, the node information of the small top heap is updated to synchronously store the inter-cluster distances between every two clusters in the current round of clustering in the small top heap, and the inter-cluster distance stored in the top node of the small top heap is made the minimum distance among the inter-cluster distances between every two clusters in the current round of clustering.
[0094] 3) Determine the first cluster and the second cluster corresponding to the inter-cluster distance stored in the top node of the small top heap, merge the first cluster and the second cluster to obtain a merged third cluster; start the next round of clustering based on the third cluster and the clusters that did not participate in the merger in the current round of clustering, and end the clustering until the target number of clusters is obtained.
[0095] The embodiment of the present application uses a small top heap data structure to organize and store the inter-cluster distances between different clusters at the corresponding progress during the clustering process. The heap sorting feature of the small top heap data structure is used to solve the problems related to search and sorting in the bank customer clustering process. Specifically, the minimum distance between the inter-cluster distances between each two clusters in the current round of clustering is stored in the top node of the small top heap during the clustering process. When clusters are merged, the minimum distance between the inter-cluster distances between different clusters can be directly obtained from the top of the small top heap, eliminating the need to perform complex sorting and minimum value search processing on each inter-cluster distance, thereby saving clustering time and improving clustering speed.
[0096] For more details, see Figure 5 As shown in the diagram of the mini-heap structure, in the embodiment of the present application, the value stored in the root node of the mini-heap is the minimum value of the values stored in all nodes, and the values in other parent nodes other than the root node are smaller than the values in their left and right child nodes. In this way, the problems related to search and sorting in the process of clustering bank customers can be quickly solved directly based on the data structure of the mini-heap. In the clustering process, the node data in the mini-heap and the structural relationship between the node values (referring to the nodes corresponding to the clusters that did not participate in the merger and the parent-child and other structural relationships between the nodes) can be reused for the clusters that did not participate in the merger, so as to save clustering time and improve the clustering rate.
[0097] Step 103: Determine a sub-clustering processing result for each bank's customer information fragment data based on the clustering processing result.
[0098] Each computing device's clustering results for the cross-bank customer information shards include a correspondence between each category (target cluster) and the multi-bank customer information shards assigned to that category, thereby representing the multi-bank customer information shards contained within each category (target cluster). It is important to note that the computing device is unaware of the actual business implications of each category and only needs to divide the customer information shards from multiple banks into the target number of categories (target clusters).
[0099] The sharded data of each customer's customer information corresponds to the bank identifier of the bank to which it belongs. Optionally, when a bank performs secret sharing-based sharding processing on the customer information it holds on its local device, it may add a flag representing the bank's data to each piece of its own customer information (e.g., flags 1, 2, and 3 for Bank 1, Bank 2, and Bank 3, respectively) as the bank identifier, so that each sharded data obtained after sharding each piece of customer information based on secret sharing corresponds to the corresponding bank identifier, such as flag 1, flag 2, or flag 3.
[0100] Based on this, after the computing device classifies the customer information of multiple banks and obtains the clustering processing results, it can determine the classification category and bank to which each customer's customer information fragment data belongs based on the clustering processing results and the bank identifier corresponding to each customer's customer information fragment data. Then, based on the classification category and bank to which each customer's customer information fragment data belongs, it can determine the customer information fragment data of each bank that is classified into each classification category. The sub-clustering processing results for each bank's customer information fragment data include: the customer information fragment data of each bank that is classified into each classification category. For example:
[0101] Bank 1 - {Category 1: Customer 1, Customer 5, Customer 9; Category 2: Customer 2, Customer 3, Customer 7; Category 3: Customer 4, Customer 6, Customer 11}; Bank 2 - {Category 1: ...; Category 2: ...; Category 3: ...}; Bank 3 - {Category 1: ...; Category 2: ...; Category 3: ...}, etc. Each customer identifier here, such as Customer 1 and Customer 6, represents the customer information shard data of the corresponding customer.
[0102] Step 104: Feedback the sub-clustering processing results of each bank's customer information shard data to the corresponding bank, so that each bank can determine the clustering results corresponding to the bank's customer information based on the sub-clustering processing results respectively fed back by the multiple computing parties.
[0103] Based on step 103, each computing device may feed back the sub-clustering processing results for each bank's customer information shard data to the corresponding bank. For example, the sub-clustering processing results for Bank 1, Bank 1-{Category 1: Customer 1, Customer 5, Customer 9; Category 2: Customer 2, Customer 3, Customer 7; Category 3: Customer 4, Customer 6, Customer 11}, may be fed back to the local device of Bank 1. The sub-clustering processing results for Bank 2, Bank 2-{Category 1: ...; Category 2: ...; Category 3: ...}, may be fed back to the local device of Bank 2. The sub-clustering processing results for Bank 3, Bank 3-{Category 1: ...; Category 2: ...; Category 3: ...}, may be fed back to the local device of Bank 3, and so on.
[0104] As a result, each bank will receive the sub-clustering processing results returned by each computing device respectively, and can integrate the sub-clustering processing results returned by each computing device based on a secret sharing method such as additive SS to restore the true clustering results corresponding to each sub-clustering processing result. For example, by performing additive SS-based integration processing on the sub-classification results of each sharded data of each customer, the category to which the customer belongs (such as category 1) can be restored. During implementation, the bank's local device can determine the business meaning of the customer's category based on the pre-defined correspondence between different categories and different business meanings, such as whether the customer belongs to a high-risk level, a medium-risk level or a low-risk level, thereby realizing the classification of bank customers.
[0105] According to the above scheme, the cross-bank customer classification method and related device based on multi-party secure computing provided by this application, in which the device of any one of the multiple computing parties obtains the customer information shard data and target number of clusters of multiple customers provided by multiple banks, and clusters the customer information shard data based on the target hierarchical clustering algorithm to obtain the clustering processing results of the customer information shard data. Based on the clustering processing results, the sub-clustering processing results of the customer information shard data of each bank are determined, and the sub-clustering processing results of the customer information shard data of each bank are fed back to the corresponding bank, so that each bank can determine the clustering result corresponding to the customer information of the bank based on the sub-clustering processing results respectively fed back by the multiple computing parties, thereby realizing the classification of bank customers accordingly. Therefore, this application proposes and implements a solution for classifying bank customers through cross-bank data clustering. Cross-bank data clustering has the characteristics of high data volume, which can make the clustering effect more excellent. In addition, this application combines the use of multi-party secure computing to ensure data security in the cross-bank data clustering process. Therefore, it improves the clustering effect and achieves accurate bank customer classification while ensuring data security and not leaking bank customer information.
[0106] In addition, the present application improves the hierarchical clustering algorithm based on the mini-heap, uses the mini-heap data structure to store the inter-cluster distances between different clusters in the hierarchical clustering process, and makes the inter-cluster distances stored in the top node of the mini-heap the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress, which can effectively speed up the comparison and search rate of the inter-cluster distances in the clustering process, thereby improving the speed and efficiency of cross-bank data clustering, correspondingly improving the classification efficiency of bank customers, and saving classification time.
[0107] The following provides exemplary implementations of each secure computing protocol constructed in the embodiments of the present application.
[0108] 1. Secure Multiplication Protocol
[0109] The algorithm of the secure multiplication protocol is as follows:
[0110]
[0111] Secure Multiplication Protocol (Π MULT ) is a protocol for multiplying two numbers a and b that are divided among different computing parties. While completing the multiplication, the protocol does not let the computing party devices participating in the calculation, such as the server, know what the two multiplied numbers (i.e., a and b) are, and the multiplication result c=a*b will not be obtained by each computing party.
[0112] The core design concept of the protocol is based on the following formula:
[0113] a*b=([a]0+[a]1+[a]2)*([b]0+[b]1+[b]2)=[a]0*[b]0+[a]0*[b]1+[a]0*[b]2+….
[0114] From the above formula, we can see that in order to calculate the entire a*b, we need to calculate [a] locally through the calculation square. i *[b] i , but completing this part is incomplete. [a] i *[b] j The part of also needs to be calculated. For this part, this protocol will be calculated by i Held[a] i Send to server S j (Or change the server S j held[b] j Send to server S i ), and then let the server complete this part of the calculation locally.
[0115] Although the server S j Got [a] iThis shard, but the real value can only be restored when all the shards of the same data are on the same server. Since the design of the embodiment of the present application is that each computing device such as a server can only hold a part of the shards, it will not cause the real data to be leaked on any computing device such as a server. Therefore, while ensuring data security, the secure multiplication protocol designed in the embodiment of the present application has more advantages than the traditional triple multiplication. The secure multiplication protocol of the embodiment of the present application can greatly reduce the number of communication rounds and the complexity of calculation. Precisely because the secure multiplication protocol does not need to use traditional triple multiplication, it does not need to use homomorphic encryption and oblivious transmission principles. The use of these two will make the implementation of multiplication complicated, because the encryption and decryption operations of homomorphic encryption are very time-consuming to implement.
[0116] In the embodiments of the present application, data without subscripts (such as a, b) represent real data, and data with subscripts (such as [a] i , [b] j ) represents sharded data.
[0117] 2. Security Comparison Protocol
[0118] The algorithm of the security comparison protocol is as follows:
[0119]
[0120] As the foundation of many computing protocols, the efficiency of the comparison protocol fundamentally affects the efficiency of other protocols, so an efficient and secure comparison protocol is very important. Currently, most comparison protocols proposed by the scheme are to convert decimal numbers into binary, and then compare them one by one from the highest bit to the lowest bit until the size of the two numbers can be determined. In this traditional method, there is the overhead of converting from decimal to binary, as well as the overhead of comparing each bit in a loop, both of which are very huge. The design of the embodiment of the present application is to complete the comparison protocol in decimal to improve efficiency and reduce overhead.
[0121] First, the server S0 randomly generates a random number α belonging to 0 or 1 and a (i.e., real number domain) a random number r, and then the server S0 shards the two data respectively. For example, in the case of three servers (i.e., three computing parties), each data is divided into three parts / three pieces. Server S0 retains one piece and sends the other two pieces to the other two other servers. In this way, the two numbers are transformed from existing only on one server to existing on three servers in the form of SS. Then each server calculates the following formula locally: [c] = [a] * ([a] + [r min]-[b])+(1-[α])*([b]-[a]). The purpose of this formula is to use the random number generated in the first step to choose whether to calculate [a]-[b]+1 or [b]-[a]. Here, a random number is actually generated to mask which result will be calculated next. min ] represents a very small random value in the computational domain. This value does not affect the final result but is only used to mask the situation when [a] and [b] are equal. If the two are the same, then this formula is actually ineffective. Therefore, this protocol requires such a small random value to play this role.
[0122] The above equation is then multiplied by the random number generated in the first step to mask the result. This result needs to be sent to server S2 for decryption, ensuring that server S2 cannot know the final result. The result obtained by server S2 decryption is the result of the equation selected by the random number α. The following four situations can be concluded:
[0123]
[0124]
[0125] From the above formula, we can see that ans=1 means a≥b. To finally get this result, we need to judge based on the positive or negative value of e obtained in the third step. In summary, when e≥0, we need to Thus we get the final result. The opposite is true for the case of e<0.
[0126] The secure comparison protocol proposed in the embodiment of the present application can effectively circumvent the comparison method of converting from decimal to binary, thereby greatly improving the computational efficiency of the protocol, while also ensuring that servers and other devices involved in the calculation cannot obtain the final comparison results.
[0127] Each server in the embodiment of the present application represents a computing party.
[0128] 3. Absolute Security Value Protocol
[0129] The algorithm of the secure absolute value protocol is as follows:
[0130]
[0131] The secure absolute value protocol can convert a value in the form of a shared value into an absolute value. In fact, obtaining the absolute value is to perform the operation by determining whether the number is positive or negative. Specifically, the secure comparison protocol proposed in the embodiment of this application can be used to compare the number for which the absolute value is to be obtained with 0. If the number is greater than 0, then the flag [sign] = 1, otherwise [sign] = 0. Then calculate:
[0132]
[0133] The absolute value of [a] can be obtained based on the value of sign. The secure comparison protocol and secure multiplication protocol provided in the embodiments of this application need to be used in this secure absolute value protocol. Given the security of the first two (secure comparison protocol and secure multiplication protocol), the security of this secure absolute value protocol can also be guaranteed. This secure absolute value protocol is generally used as an auxiliary protocol for other protocols.
[0134] 4. Security Partitioning Protocol
[0135] The secure split protocol is a pre-protocol of the secure division protocol and is responsible for the related preprocessing of the secure division protocol.
[0136] The algorithm of the secure partitioning protocol is as follows:
[0137]
[0138] The secure split protocol can split the input [a] and [b] into [d] parts of the value [b], and save the remainder (i.e., the remainder, for example, if 11 / 3 = 3 with a remainder of 2, then [a] = 11, [d] = 3, [b] = 3, and the remainder is 2) in [a] (i.e., using the remainder to update [a]). From the function of this protocol, it can be seen that it actually obtains a rough result of [a] / [b].
[0139] Specifically, we can start from the maximum value of the computational domain and loop downward to find the first value that makes [2 i ]*[b]<[a]. Because if the result is less than, then it means that [2 i ] is part of the result of [a] / [b]. Then just subtract [mid] from [a] and keep looking for the appropriate [2 i ], we can get the final result. However, this result is not actually an accurate division result, because the final remainder is actually closely related to [b]. If [b] is a large number, then the remainder of [a] will also be very large, which requires other methods to ensure the accuracy of the final division.
[0140] 5. Safe Division Protocol
[0141] The algorithm of the safe division protocol is as follows:
[0142]
[0143] The secure division protocol of the embodiment of the present application can implement a secure division operation for the input shared value, and can control the accuracy of the final division result by setting the parameter p to ensure that the required accuracy can be obtained. The design principle of the secure division protocol is to continuously divide the dividend into parts of the same size as the divisor, and obtain an approximate division result by adding these parts. However, this principle cannot actually obtain an accurate result. However, if the remainder can be continuously expanded and then the remainder is decomposed, the final division result can be continuously accurate. It is based on this principle that the embodiment of the present application designs and implements a secure division protocol.
[0144] Because there may be positive and negative numbers in the corresponding calculation domain, and the signs of positive and negative numbers will affect the result of division. Therefore, before performing the division calculation, the signs of the two [a] and [b] that need to be involved in the calculation are saved in [a sign ] and [b sign ], then the absolute values of [a] and [b] are processed using the safe absolute value protocol, making both numbers positive and avoiding the influence of the sign. The number of required loops is then controlled by the set precision parameter p. If p is still greater than 0 after the loop is decremented, it means that the required precision has not been reached, and the loop needs to continue. Within the loop body, there are two situations. If [a] < [b], the dividend needs to be expanded until the dividend is greater than the divisor.
[0145] The number of expansions actually corresponds to the set precision. Each time the dividend is expanded, the precision parameter p needs to be reduced once. As for why the dividend must be larger than the divisor, it is because the principle on which this protocol is based is to decompose the dividend into multiple blocks of the divisor size to obtain the result. In the loop, the obtained result is continuously added to [d] until the required precision is reached, then the loop can be exited. At this point, the result of the division has been obtained, but it is not the final result. Because the absolute value of the two numbers is processed at the beginning of the protocol, the sign of the result needs to be calculated and multiplied by the final result. The signs of the two numbers Since the flag bit of negative numbers in this embodiment is 1 and that of positive numbers is 0, then the XOR operation will result in the same value being 0 and the different value being 1. This can well complete the operation of the sign, and finally by calculating d = (1-2*d sign )*d, the final sign can be assigned to the result of the division, thus obtaining the final division result.
[0146] 6. Secure Power Function Protocol
[0147] The algorithm of the secure power function protocol is as follows:
[0148]
[0149] The function implemented by the secure power function protocol is to calculate the e of the input shared value [a] [a] The implementation principle of this protocol is that the multiplication of power functions is equal to the addition of powers. In this case, server S1 sends the shard [a]1 it holds to server S0, and then server S0 calculates b0=[a]0+[a]1 locally. Here, server S1 passes its own shared value to reduce the number of multiplications. To implement the power function itself, three servers holding shards need to be multiplied in sequence. However, if the shared value of one server is sent to another server, one multiplication can be reduced. This principle has more obvious advantages when there are n participants. All shared values can be concentrated on two servers, and then a single multiplication can be performed to complete the calculation of the power function.
[0150] In addition to the above protocols, related protocols such as secure addition protocol and secure subtraction protocol can also be constructed, but are not limited to, to provide the required underlying operators for cross-bank customer clustering processing in secure multi-party computing, depending on the actual needs of the clustering process.
[0151] The embodiments of the present application provide the necessary security underlying operator support for the clustering process of cross-bank customer classification by constructing the above-mentioned various security computing protocols. In addition to supporting the computational processing of relevant data according to the requirements of the clustering process, thereby realizing accurate and efficient cross-bank customer classification, it can also ensure the security of data during the computational process, and avoid the leakage of real data (such as bank customer information) and the computational results of real data (such as classification results) on the computing side, thereby ensuring data security.
[0152] In an optional embodiment, the target hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-heap in the embodiment of the present application can also be implemented as a corresponding protocol. The embodiment of the present application calls this protocol a secure clustering protocol, and by deploying this protocol on various computing devices such as cloud servers, cross-bank customer classification based on multi-party secure computing can be achieved.
[0153] The algorithm of the secure clustering protocol is as follows:
[0154]
[0155]
[0156] The cluster in the embodiment of the present application refers to a cluster.
[0157] In order to achieve secure clustering operations, the present application embodiment designs and implements a secure clustering protocol PI. SCC The algorithm of this protocol is based on the principle of hierarchical clustering, and clustering is achieved through step-by-step division. According to the different calculations of the distance between clusters, it can be divided into single linkage, average linkage, ward linkage and other distance methods. SCC In the protocol, the embodiment of the present application selects ward linkage as the basic method for clustering. In order to further simplify the implementation of the algorithm, the embodiment of the present application uses the Lance-Williams algorithm to optimize the update of the cluster distance in the ward linkage method.
[0158] To better describe the secure client clustering algorithm, the following first introduces some symbolic representations and the meaning of related custom operations:
[0159] ·D (i,j) : represents the distance between clusters i and j.
[0160] · It means deleting the element with index i in container A to obtain a new container C, for example:
[0161] · It means merging the elements with subscripts i and j in container A into a new element with subscript k, thus obtaining a new container C. For example:
[0162]
[0163] x,y = SMIN([D]): Gets the names of the two elements x and y in the container D that have the smallest distance.
[0164] UD(·,·,·): Calculates the distance between the newly generated cluster and other clusters.
[0165] A container is an array or list used to store data; an element is a cluster. For example, element names x and y refer to the clusters indicated by x and y, respectively. (3, 4): 2 indicates that the distance between cluster 3 and cluster 4 is 2. Numerical values for similar structures have similar meanings.
[0166] The secure clustering protocol uses the input matrix <[w0] s ,...,[w n-1 ] s > and the target cluster number l as input, each [w i ] sIt represents the sharding of the feature matrix of each customer. The feature matrix of each customer is constructed based on the original low-dimensional features of the customer. For example, if a customer has 10 original low-dimensional features: name, contact information, address, investment preferences, loan records, deposit records, etc., then a 10*10 feature matrix can be constructed for the customer based on these 10 original low-dimensional features. For multi-party secure computing, the matrix is specifically sharded based on SS. [w i ] s This means that the feature matrix is sliced. For a 10*10 feature matrix, the slice of the feature matrix is also a 10*10 structure. The final clustering result array of each customer <c>As output. First, the given input matrix <w>Flattening means expressing each feature matrix slice as 1×x (x represents the total number of comprehensive features in each layer of the feature matrix). For example, for the 10*10 feature matrix slice mentioned above, it can be converted into a 1*100 array by flattening. Then, initially, each customer (essentially the slice data of each customer, in this example, the result of the customer's feature matrix slice after flattening) is regarded as a cluster, and the Euclidean distance <[D]> between any two clusters is calculated as the initial value of hierarchical clustering. After calculating the initial value, clusters are continuously merged until the current number of clusters equals the specified target number l. The SMIN function is used to select the two clusters with the smallest distance <[D]> in a loop, and the numbers / labels x and y of the two clusters corresponding to the minimum distance are returned.
[0167] The secure clustering protocol achieves the minimum distance by constructing a small top heap. The distance contained in <[D]> is constructed as a small heap. Each time the minimum value is needed, it can be obtained from the top of the heap. Then the customer numbers contained in the two clusters x and y corresponding to the minimum distance in the top node of the heap are combined into a new cluster k, thus obtaining The distance between the new cluster k and the existing clusters that are currently retained / not updated is updated using the UD function, which takes as input the distance D between cluster x and cluster i (x,i) , the distance D between cluster y and cluster i (y,i) , and the distance D between clusters x and y (x,y) , based on the Lance-Williams algorithm, the following distance update formula can be obtained:
[0168]
[0169] at last <g>The customer numbers contained in different clusters will be saved. We only need to take out the customer number contained in each cluster i, and then we can know that this customer corresponds to cluster number i. SS The function appears after that, so the server cannot know the actual cluster result to which the client belongs from this cluster result.
[0170] In known technologies, each round of clustering requires The time complexity of the present application is to perform the minimum distance search between different clusters in all clusters. The embodiment of the present application uses a small top heap to reduce this time complexity to Specifically, when it is necessary to obtain the two points with the smallest direct distance among n points (the points here represent "clusters" in the scenario of this application), the simplest way is to compare the direct distances of each point pairwise and then extract the distance from them. However, if the method based on the embodiment of the present application uses a small top heap, first the direct distances of each node are calculated as the nodes of the small top heap, and then the two clusters indicated by the minimum distance at the top of the heap are taken out each time, and then the two clusters are merged into a new cluster, and the heap is updated at the same time, so that the top of the heap is always the minimum distance between the two clusters, the time complexity can be reduced to
[0171] This embodiment realizes the target hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the small top heap of this application as a corresponding protocol, namely the secure clustering protocol. By deploying this protocol on various computing devices such as cloud servers, cross-bank customer classification based on multi-party secure computing can be achieved. Cross-bank data clustering has the characteristics of high data volume, which can make the clustering effect more excellent. In addition, this application, by combining the use of multi-party secure computing, also ensures data security in the case of cross-bank data clustering, thereby improving the clustering effect and achieving accurate bank customer classification while ensuring data security and not leaking bank customer information. In addition, by improving the hierarchical clustering algorithm based on the small top heap and making the inter-cluster distance stored in the top node of the small top heap the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress, the speed and efficiency of cross-bank data clustering are effectively improved, and the classification efficiency of bank customers is correspondingly improved, saving classification time.
[0172] Corresponding to the above method, the embodiment of the present application also provides a cross-bank customer classification device based on multi-party secure computing, which is applied to the equipment of any computing party among multiple computing parties, see Figure 6 Schematic diagram of the composition structure, the device includes:
[0173] Acquisition module 601 is used to obtain customer information shard data and target cluster numbers for multiple customers provided by multiple banks. Each customer corresponds to a piece of customer information, and each piece of customer information corresponding to each customer is divided into multiple shard data. Different shard data of the same piece of customer information are distributed to different computing parties.
[0174] Clustering processing module 602 is used to perform clustering processing on the customer information fragment data based on a target hierarchical clustering algorithm to obtain clustering processing results for the customer information fragment data; the clustering processing is used to divide the obtained customer information fragment data of multiple customers into different classification categories of the target number of clusters;
[0175] Determination module 603, for determining a sub-clustering processing result for each bank's customer information fragment data based on the clustering processing result;
[0176] Feedback module 604, configured to feed back the sub-clustering processing results of each bank's customer information shard data to the corresponding bank, so that each bank can determine the clustering result corresponding to the bank's customer information based on the sub-clustering processing results respectively fed back by the multiple computing parties;
[0177] Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-top heap; each node in the mini-top heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-top heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
[0178] In an optional implementation manner, the acquisition module 601 is specifically configured to:
[0179] The customer information shard data of multiple customers is obtained by sharding the customer information of multiple customers held by multiple banks through secret sharing.
[0180] In an optional implementation, the clustering processing module 602 is specifically configured to:
[0181] By measuring the similarity of different clusters based on the inter-cluster distance, cluster merging is performed on different clusters formed by the fragmented data of customer information of multiple customers of different banks until the target number of target clusters is obtained and the clustering is terminated;
[0182] Among them, initially, the customer information shard data of each customer is regarded as a separate cluster; different target clusters correspond to different customer categories, and each target cluster contains the customer information shard data of customers of the same category obtained by the final clustering; during the clustering process, the inter-cluster distances between different clusters are stored in the corresponding nodes of the mini-heap, and the inter-cluster distance comparison is performed based on the data structure of the mini-heap.
[0183] In an optional embodiment, the clustering processing module 602 performs cluster merging on different clusters formed by the fragmented data of customer information of multiple customers of different banks by measuring similarities between different clusters based on inter-cluster distances until the target number of clusters is obtained and the clustering is terminated, specifically for:
[0184] Based on the corresponding secure operation protocol in the secure operation protocol set, the distance between each two clusters in each current cluster in the current round of clustering is determined, and the inter-cluster distance between each two clusters in the current round of clustering is obtained;
[0185] Based on the inter-cluster distances corresponding to the clusters that are updated in the current round of clustering compared to the previous round of clustering and the corresponding security operation protocol in the security operation protocol set, the node information of the small top heap is updated to synchronously store the inter-cluster distances between every two clusters in the current round of clustering in the small top heap, and the inter-cluster distance stored in the top node of the small top heap is the minimum distance among the inter-cluster distances between every two clusters in the current round of clustering;
[0186] Determine a first cluster and a second cluster corresponding to the inter-cluster distance stored in the top node of the small top heap, merge the first cluster and the second cluster to obtain a merged third cluster;
[0187] The next round of clustering is started based on the third cluster and the clusters that have not participated in the merger in the current round of clustering, and the clustering is terminated when the target number of clusters is obtained.
[0188] In an optional embodiment, the secure operation protocols in the secure operation protocol set include: a secure multiplication protocol, a secure comparison protocol, a secure absolute value protocol, a secure partitioning protocol, a secure division protocol, and a secure power function protocol;
[0189] Among them, each secure operation protocol in the secure operation protocol set is used to: realize the corresponding operation processing of data divided among different computing parties, and while realizing the corresponding operation processing, it can ensure that the computing party cannot know the real business data corresponding to the data participating in the operation, and cannot know the data processing results of the real business data; or, it is used to realize the corresponding operation processing of the corresponding intermediate data; the intermediate data is the non-classified output result data obtained by processing the obtained sharded data.
[0190] In an optional embodiment, the customer information shard data is shard data generated by the bank performing sharding processing on the customer information based on an additive secret sharing method;
[0191] Each security operation protocol in the security operation protocol set is a protocol suitable for additive secret sharing.
[0192] In an optional embodiment, the customer information shard data of each customer corresponds to the bank identifier of the bank to which the customer belongs;
[0193] The determination module 603 is specifically configured to:
[0194] Determining the classification category and bank to which each customer's customer information fragment data belongs based on the clustering processing result and the bank identifier corresponding to each customer's customer information fragment data;
[0195] According to the classification category and bank to which the customer information fragment data of each customer belongs, determining the customer information fragment data of each bank that is classified into each classification category;
[0196] The sub-clustering processing result of the customer information fragment data of each bank includes: the customer information fragment data of each bank divided into each classification category.
[0197] As for the cross-bank customer classification device based on multi-party secure computing disclosed in the embodiment of the present application, since it corresponds to the cross-bank customer classification method based on multi-party secure computing disclosed in the above method embodiment, the description is relatively simple. For relevant similarities, please refer to the description of the above method embodiments, and no further details will be given here.
[0198] The present application also discloses an electronic device, the composition structure of the electronic device is as follows: Figure 7 As shown, including at least:
[0199] The memory 10 is used to store computer programs.
[0200] The processor 20 is configured to implement the cross-bank customer classification method based on multi-party secure computing as provided in any of the above method embodiments by calling and executing the computer program in the memory.
[0201] The processor 20 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a neural network processor (NPU), a deep learning processor (DPU) or other programmable logic devices, etc.
[0202] In addition, the electronic device may also include components such as a communication interface and a communication bus. The memory, processor, and communication interface communicate with each other via the communication bus.
[0203] Communication interfaces are used for communication between electronic devices and other devices. The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, and a control bus.
[0204] In addition, the present application also provides a computer-readable medium on which a computer program is stored, wherein the computer program includes program code for executing the cross-bank customer classification method based on multi-party secure computing as disclosed in any of the method embodiments above. When executed by a processor, it can be used to implement the cross-bank customer classification method based on multi-party secure computing as disclosed in any of the method embodiments above.
[0205] In the context of the present application, a computer-readable medium (machine-readable medium) can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.
[0206] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other.
[0207] For the convenience of description, the above systems or devices are described as being divided into various modules or units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0208] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0209] Finally, it should be noted that, in this document, relational terms such as first, second, third, and target are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise," "include," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
[0210] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.< / g> < / w> < / c>
Claims
1. A cross-bank customer classification method based on multi-party secure computing, characterized in that: A device applied to any one of a plurality of computing parties, the method comprising: Obtain customer information shard data and target cluster numbers of multiple customers provided by multiple banks; each customer corresponds to a piece of customer information, and each piece of customer information corresponding to each customer is divided into multiple shard data; different shard data of the same customer information are distributed to different computing parties; Performing clustering processing on the customer information fragment data based on a target hierarchical clustering algorithm to obtain a clustering processing result of the customer information fragment data; the clustering processing is used to classify the obtained customer information fragment data of multiple customers into different classification categories of the target cluster number; Determine the sub-clustering processing result of the customer information fragment data of each bank according to the clustering processing result; Feeding back the sub-clustering processing results of the customer information shard data of each bank to the corresponding bank, so that each bank can determine the clustering results corresponding to the customer information of the bank according to the sub-clustering processing results respectively fed back by the multiple computing parties; Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-heap; each node in the mini-heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
2. The cross-bank customer classification method based on multi-party secure computing according to claim 1 is characterized in that: The obtaining of customer information fragmentation data of multiple customers provided by multiple banks respectively includes: The customer information shard data of multiple customers is obtained by sharding the customer information of multiple customers held by multiple banks in a secret sharing manner.
3. The cross-bank customer classification method based on multi-party secure computing according to claim 1 is characterized in that: The clustering process of the customer information fragment data based on the target hierarchical clustering algorithm to obtain the clustering process result of the customer information fragment data includes: By measuring the similarity of different clusters based on the inter-cluster distance, cluster merging is performed on different clusters formed by the fragmented data of customer information of multiple customers of different banks until the target number of target clusters is obtained and the clustering is terminated; Among them, initially, the customer information shard data of each customer is regarded as a separate cluster; different target clusters correspond to different customer categories, and each target cluster contains the customer information shard data of customers of the same category obtained by the final clustering; during the clustering process, the inter-cluster distances between different clusters are stored in the corresponding nodes of the mini-heap, and the inter-cluster distances are compared based on the data structure of the mini-heap.
4. The cross-bank customer classification method based on multi-party secure computing according to claim 3 is characterized in that: The method measures the similarity of different clusters based on the inter-cluster distance, performs cluster merging processing on different clusters formed by the customer information fragmentation data of multiple customers of different banks, and terminates clustering when the target cluster number is obtained, including: Based on the corresponding security operation protocol in the security operation protocol set, the distance between each two clusters in each current cluster in the current round of clustering is determined to obtain the inter-cluster distance between each two clusters in the current round of clustering; Based on the inter-cluster distances corresponding to the clusters updated in the current round of clustering compared to the previous round of clustering and the corresponding security operation protocols in the security operation protocol set, the node information of the small top heap is updated to synchronously store the inter-cluster distances between every two clusters in the current round of clustering in the small top heap, and the inter-cluster distance stored in the top node of the small top heap is the minimum distance among the inter-cluster distances between every two clusters in the current round of clustering; Determine a first cluster and a second cluster corresponding to the inter-cluster distance stored in the top node of the small top heap, merge the first cluster and the second cluster to obtain a merged third cluster; The next round of clustering is started based on the third cluster and the clusters that are not merged in the current round of clustering, and the clustering is terminated when the target number of clusters is obtained.
5. The cross-bank customer classification method based on multi-party secure computing according to claim 4 is characterized in that: The secure computing protocols in the secure computing protocol set include: secure multiplication protocol, secure comparison protocol, secure absolute value protocol, secure segmentation protocol, secure division protocol and secure power function protocol; Among them, each security operation protocol in the security operation protocol set is used to: realize the corresponding operation processing on the data divided among different computing parties, and while realizing the corresponding operation processing, it can ensure that the computing party cannot know the real business data corresponding to the data involved in the operation, and cannot know the data processing results of the real business data; or, it is used to realize the corresponding operation processing on the corresponding intermediate data; the intermediate data is the non-classified output result data obtained by processing the obtained sliced data.
6. The cross-bank customer classification method based on multi-party secure computing according to claim 4 or 5, characterized in that: The customer information shard data is the shard data generated by the bank performing sharding processing on the customer information based on the additive secret sharing method; Each of the security operation protocols in the security operation protocol set is a protocol suitable for additive secret sharing.
7. The cross-bank customer classification method based on multi-party secure computing according to claim 1 is characterized in that: The customer information shard data of each customer corresponds to the bank ID of the bank to which it belongs; Determining the sub-clustering processing result of the customer information fragment data of each bank according to the clustering processing result includes: Determine the classification category and bank to which the customer information fragment data of each customer belongs according to the clustering processing result and the bank identifier corresponding to the customer information fragment data of each customer; According to the classification category and bank to which the customer information fragment data of each customer belongs, determine the customer information fragment data of each bank that is classified into each classification category; The sub-clustering processing result of the customer information fragment data of each bank includes: the customer information fragment data of each bank is divided into each classification category.
8. A cross-bank customer classification device based on multi-party secure computing, characterized in that: A device applied to any one of a plurality of computing parties, the device comprising: The acquisition module is used to obtain the customer information shard data and target cluster quantity of multiple customers provided by multiple banks; each customer corresponds to a piece of customer information, and each customer's corresponding piece of customer information is divided into multiple shard data; different shard data of the same customer information are distributed to different computing parties; A clustering processing module, used for performing clustering processing on the customer information fragment data based on a target hierarchical clustering algorithm to obtain the clustering processing result of the customer information fragment data; the clustering processing is used for dividing the obtained customer information fragment data of multiple customers into different classification categories of the target cluster number; A determination module, used to determine the sub-clustering processing result of the customer information fragment data of each bank according to the clustering processing result; A feedback module, used to feed back the sub-clustering processing results of the customer information shard data of each bank to the corresponding bank, so that each bank can determine the clustering results corresponding to the customer information of the bank according to the sub-clustering processing results respectively fed back by the multiple computing parties; Among them, the target hierarchical clustering algorithm is a hierarchical clustering algorithm obtained by improving the hierarchical clustering algorithm based on the mini-heap; each node in the mini-heap is used to store the inter-cluster distances between different clusters under the corresponding clustering progress during the hierarchical clustering of the customer information shard data based on the hierarchical clustering algorithm, and the inter-cluster distance stored in the top node of the mini-heap is the minimum distance among the inter-cluster distances between different clusters under the corresponding clustering progress.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the cross-bank customer classification method based on multi-party secure computing as described in any one of claims 1 to 7 by calling and executing the computer program in the memory.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can be used to implement the cross-bank customer classification method based on multi-party secure computing as described in any one of claims 1-7.