Privacy protection DBSCAN clustering method and device based on secure multi-party computing environment
By using matrix multiplication and three-party replication secret sharing technology in a secure multi-party computing environment, the computing efficiency of the DBSCAN clustering algorithm is improved, the problem of low computing efficiency on large-scale data sets is solved, and efficient privacy protection clustering is achieved. Joint clustering of multiple data holders.
Patent Information
- Application Number
- CN202411298041.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-13
AI Technical Summary
The existing density-based clustering algorithm DBSCAN is incomputed on large-scale data sets, and traditional privacy protection methods have bottlenecks in performance and privacy leakage risks, making it difficult to apply to the joint clustering of privacy protection of large-scale data sets.
Adopting the privacy protection DBSCAN clustering method based on a secure multi-party computing environment, the expansion clustering step is realized through calculation matrix multiplication, combining three-party replication secret sharing and matrix computing, the computing efficiency is improved, and the GPU is accelerated, achieving efficient privacy computing. Cluster.
It significantly improves the computing efficiency of DBSCAN clustering algorithm on large-scale data sets, reduces the risk of privacy leakage, and is suitable for actual privacy protection data analysis, such as trajectory clustering, customer segmentation and image segmentation.
Smart Images

Figure CN119128556A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of privacy-preserving clustering algorithms, and in particular relates to a privacy-preserving DBSCAN clustering method and device based on a secure multi-party computing environment. Background Art
[0002] Clustering algorithm is a widely used machine learning algorithm that can classify data into different categories according to its characteristics. It is the basis for subsequent data analysis and is widely used in data mining, image processing and other fields. In clustering algorithms, data scale and data quality have a crucial impact on the effectiveness and accuracy of clustering results. Large-scale data sets can often more comprehensively reflect the true situation of data distribution, thus helping to discover more detailed and accurate clustering structures. Therefore, in many cases, multiple data holders need to share data for joint clustering.
[0003] However, directly sharing raw data often exposes sensitive information and even causes privacy leakage risks. Considering information security, privacy protection and related laws, data from multiple data holders are often not directly shared publicly. Instead, privacy protection technology is required to cluster information distributed in different data sources without exposing specific data privacy information. Therefore, how to achieve joint clustering between multiple data holders without exposing specific data content has become one of the current research hotspots.
[0004] DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm that shows unique advantages over the traditional K-means algorithm in processing non-convex data and noisy data. However, its complex algorithm structure and low computational efficiency limit its application in big data scenarios. In addition, although some studies have attempted to enhance the privacy protection capabilities of the DBSCAN algorithm through technologies such as homomorphic encryption and differential privacy, these methods are often accompanied by a significant increase in computational overhead and a certain degree of privacy leakage risk. Especially when applied to large-scale data sets, the performance bottlenecks of these methods are particularly prominent.
[0005] In order to overcome the shortcomings of traditional methods, privacy-preserving clustering algorithms based on secure multi-party computation (MPC) have emerged. MPC allows multiple participants to jointly perform computing tasks and obtain computing results without exposing their input data. This feature makes MPC an ideal tool for implementing privacy-preserving joint clustering. The literature Privacy-preserving density-based clustering first proposed a perfect confidentiality and accurate privacy-preserving DBSCAN algorithm based on MPC, but simply implemented the plaintext DBSCAN algorithm under the MPC model, and the computational efficiency is very low. For example, for a data set with 400 elements, it takes 6.5 minutes to complete clustering, while for a larger data set, such as a data set with 1000 elements, the clustering time is 94 minutes, which is difficult to apply to large-scale data sets. Therefore, it is necessary to further optimize the MPC-based DBSCAN algorithm to improve its computational efficiency on large-scale data sets. Summary of the invention
[0006] In view of the above, the purpose of the present invention is to provide a privacy-preserving DBSCAN clustering method and device based on a secure multi-party computing environment, which implements the expansion clustering step in the DBSCAN algorithm by calculating matrix multiplication, so that the DBSCAN clustering algorithm is suitable for MPC implementation, effectively improving the computational efficiency of the MPC-based DBSCAN clustering algorithm, and can be further accelerated with the help of GPU, so as to be efficiently applied to actual privacy computing clustering algorithms, such as trajectory clustering, customer segmentation and image segmentation, and further applied to privacy-preserving data analysis.
[0007] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention is as follows:
[0008] In a first aspect, an embodiment of the present invention provides a privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment, comprising the following steps:
[0009] Each data holder shares all the data it holds on three independent and non-collusive servers through a three-party replication secret sharing scheme;
[0010] Based on the shared data held by the three servers, the distance between the data is calculated to obtain a distance matrix; the distance matrix is converted into a Boolean matrix and then the one-step density reachability matrix is further calculated; based on the one-step density reachability matrix, the power operation is performed and then the density reachability matrix is further calculated;
[0011] The clustering results are obtained based on the density reachability matrix.
[0012] Specifically, each data holder shares all the data held by it on three independent and non-collusive servers through a three-party replication secret sharing scheme, including:
[0013] Based on the three-party replicated secret sharing scheme, for multiple data holders, each data holder splits the secret data it holds into three secret shards, and sends the three secret shards to three independent and non-collusive servers respectively.
[0014] Specifically, the distance between the data is calculated based on the shared data held by the three servers to obtain a distance matrix, including:
[0015] For n shared data, first initialize an n×n initial distance matrix and assign values to it, and let the element value of the i-th row and j-th column in the initial distance matrix [Dis[i, j]] = ([v i ]-[v j ]) 2 , where [v i ] and [v j ] are the i-th and j-th data respectively, 0≤i≤n-1, 0≤j≤n-1. After the assignment, the distance matrix [Dis] is obtained.
[0016] Specifically, the step of converting the distance matrix into a Boolean matrix and then further calculating the single-step density reachability matrix includes:
[0017] Initialize an n×n initial Boolean matrix of the same size as the distance matrix [Dis] and assign values to it, so that the element value of the i-th row and j-th column in the initial Boolean matrix is Among them, MSB (-) represents the most significant bit calculation protocol, [Dis[i, j]] represents the element value of the i-th row and j-th column in the distance matrix, and ε represents the threshold of the distance between data. It represents XOR operation, and after the assignment is completed, the Boolean matrix [BDis] is obtained;
[0018] For i=0, 1, ..., n-1, calculate the element value of the i-th row in the n×1 vector [SDis], [SDis]
[0019] Calculate the n×1 vector [ZDis], the element value of the i-th row in [ZDis] [ZDis[i]] = MSB([SDis[i]]-MinPts), where MinPts represents the minimum number of neighborhood points;
[0020] Expand [ZDis] into an n×n matrix [ZDis span ],[ZDis spanEach column in ] is the same as [ZDis];
[0021] Initialize an n×n initial single-step density reachable matrix and assign values to it, so that the element value of the i-th row and j-th column in the initial single-step density reachable matrix [M[i, j]] = [ZDis span [i, j]]×[BDis[i, j]], where [ZDis span [i, j]] represents the matrix [ZDis span ] is the element value of the i-th row and j-th column in , and after completing the assignment, we get the single-step density reachable matrix [M].
[0022] Specifically, further calculating the density reachable matrix after performing a power operation based on the single-step density reachable matrix includes:
[0023] Performing matrix multiplication of the single-step density reachable matrix [M] to the power of m yields the matrix Wherein m is a positive integer greater than or equal to 1;
[0024] All servers initialize a shared random matrix [R] whose elements are not zero, and calculate Representation Matrix [R[i, j]] represents the element value of the i-th row and j-th column in the matrix [R], [D[i, j]] represents the element value of the i-th row and j-th column in the density reachable matrix [D], and after completing the assignment, the density reachable matrix [D] is obtained.
[0025] Specifically, obtaining the clustering result based on the density reachable matrix includes:
[0026] Step (1), each server first recovers the density reachability matrix D of the plaintext and creates a set N = {0, 1, ..., n-1};
[0027] Step (2), select a value i from the set N. If there are less than MinPts non-zero elements in the i-th row D[i] in D, then mark i as noise and remove i from the set N. MinPts represents the minimum number of neighborhood points. Then reselect i. When i is non-noise, expand the cluster from point i.
[0028] Step (3), when expanding the cluster from point i, includes: first creating a new i-th cluster C i Then, for each element j that satisfies D[i,j]≠0 in the i-th row and j-th column of D, add j to cluster C. i and remove j from N;
[0029] Repeat steps (2) and (3) until the set N becomes an empty set, and output all clustering results.
[0030] In a second aspect, to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, comprising: a data sharing module, a clustering module, and a clustering result recovery module;
[0031] The data sharing module is used for each data holder to share all the data held by it to three independent and non-collusive servers through a three-party replication secret sharing scheme;
[0032] The clustering module is used to calculate the distance between the data based on the shared data held by the three servers to obtain a distance matrix; convert the distance matrix into a Boolean matrix and then further calculate the single-step density reachable matrix; perform a power operation based on the single-step density reachable matrix and then further calculate the density reachable matrix;
[0033] The clustering result recovery module is used to obtain all clustering results based on the density reachable matrix.
[0034] On the third aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention also provides a privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, comprising a memory and one or more processors, wherein the memory is used to store a computer program, and the processor is used to implement the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment when executing the computer program.
[0035] In a fourth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment is implemented.
[0036] In a fifth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment is implemented.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] The present invention proposes a new dilated clustering method, namely a method based on graph theory, which calculates the transitive closure by calculating matrix multiplication and then clusters the data set. Compared with the existing dilated distance method using loop statements and conditional statements, the use of matrix multiplication under MPC is more efficient and can be accelerated using GPU to achieve high parallelism, effectively improving the computational efficiency of the MPC-based DBSCAN clustering algorithm, thereby being efficiently applied to actual privacy computing clustering algorithms and further applied to privacy-preserving data analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 It is a flowchart of a privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment provided by an embodiment of the present invention;
[0041] Figure 2 It is the clustering result of the M-ppDBSCAN algorithm on the S1 data set provided by the embodiment of the present invention;
[0042] Figure 3 It is the clustering result on the Lsun data set using the M-ppDBSCAN algorithm provided by an embodiment of the present invention;
[0043] Figure 4 It is the clustering result on the Target data set using the M-ppDBSCAN algorithm provided by the embodiment of the present invention;
[0044] Figure 5 It is a structural diagram of a privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0046] The inventive concept of the present invention is: the present invention finds that the performance bottleneck of implementing the plaintext DBSCAN algorithm directly in the MPC environment is located in the expanded clustering part of the DBSCAN algorithm. Therefore, in view of the problem of low implementation efficiency of the DBSCAN algorithm based on conditional statements and loop statements in the prior art under MPC, the embodiment of the present invention provides a privacy-preserving DBSCAN clustering method and device based on a secure multi-party computing environment, which replaces traditional conditional statements and loop statements by calculating matrix multiplication, and then implements the expanded clustering step in the DBSCAN algorithm, so that the DBSCAN clustering algorithm is suitable for MPC implementation, effectively improving the computational efficiency of the DBSCAN clustering algorithm based on MPC.
[0047] First, the basic technologies used in the present invention are introduced, including three-party copy secret sharing, secure multiplication protocol and secure comparison protocol.
[0048] (1) Three-party replicated secret sharing: In the three-party replicated secret sharing model, each secret data is divided into three parts and then stored by three independent and non-collusive servers. Specifically, assume that there are k data holders P 0 ,P 1 ,...,P k -1 , and the data holder P i Holds at most m data The data holder first splits its secret data into three parts, namely Then shard the secret Send to server S0, split the secret Send to server S1, split the secret Sent to server S2, using the symbol This indicates repeated secret sharing. Since each server has only two secret shards, the original data cannot be restored, thus protecting the privacy of the original data.
[0049] (2) Secure multiplication protocol: Under three-party copy secret sharing, the implementation of the secure multiplication protocol is very simple. Assume that [x], [y] are two shared secret values, namely x = x0 + x1 + x2 mod L and y = y0 + y1 + y2 mod L. In this case, we have: x·y = (x0 + x1 + x2)·(y0 + y1 + y2) = (x0y0 + x0y1 + x1y0) + (x1y1 + x1y2 + x2y1) + (x2y2 + x2y0 + x0y2). Let z0 = x0y0 + x0y1 + x1y0, z1 = x1y1 + x1y2 + x2y1, z2 = x2y2 + x2y0 + x0y2. It can be seen that under three-party copy secret sharing, z i The server S iSafe multiplication can be achieved by performing calculations locally and then performing a re-sharing operation. Similar operations can be performed for matrix multiplication.
[0050] (3) Security comparison protocol: For sharing in the ring L = 2 l The element [u] on the graph has the most significant bit (MSB) MSB = MSB(u) = 1. Otherwise, MSB(u) = 0. The bit extraction method in the ABY3 framework can be directly called to calculate MSB(u). Input [u] into a Boolean adder, perform O(l) AND gate operations and then extract the highest Boolean share. The communication complexity of this method is O(l) bits.
[0051] The present invention uses matrix multiplication to implement the expansion clustering step in the DBSCAN algorithm. With the help of the method in graph theory, each element in the data set is first regarded as a point on the graph, and there is an edge between two points if and only if the distance between them is less than or equal to the threshold ε. Next, the single-step density reachable matrix and the density reachable matrix are defined. The single-step density reachable matrix M satisfies: M[i, j] = 1 if and only if element j is directly density reachable to element i, that is, there are more than MinPts elements within the ε range of i, and j is also within the ε range of i. The density reachable matrix D satisfies: D[i, j] ≠ 0 if and only if element j is density reachable to element i, that is, there is a chain i→i1→i2→…→j, in which each element is single-step density reachable to the previous element. Next, it is specifically explained how to construct the single-step density reachable matrix M and the density reachable matrix D, and obtain the clustering results from D.
[0052] Figure 1 FIG. 1 is a flow chart of a privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment provided by an embodiment of the present invention. Figure 1 As shown, the embodiment provides a privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment, comprising the following steps:
[0053] S1, each data holder shares all the data it holds on three independent and non-collusive servers through a three-party replication secret sharing scheme.
[0054] In an embodiment, based on a three-party replicated secret sharing scheme, for multiple data holders, each data holder splits the secret data it holds into three secret slices, and sends the three secret slices to three independent and non-colluding servers respectively.
[0055] S2, based on the shared data held by the three servers, calculates the distance between the data to obtain the distance matrix; converts the distance matrix into a Boolean matrix and further calculates the one-step density reachability matrix; performs a power operation based on the one-step density reachability matrix and further calculates the density reachability matrix.
[0056] S2.1, calculate the distance matrix.
[0057] In the embodiment, for n shared data, an n×n initial distance matrix is first initialized and assigned values, and the element value of the i-th row and j-th column in the initial distance matrix [Dis[i, j]]=([v i ]-[v j ]) 2 , where [v i ] and [v j ] are the i-th and j-th data respectively, 0≤i≤n-1, 0≤j≤n-1. After the assignment, the distance matrix [Dis] is obtained, and [] is used to indicate that the data is in a shared state.
[0058] S2.2, calculate the single-step density reachability matrix.
[0059] In the DBSCAN algorithm, only core points, that is, points with more than MinPts elements within the ε range, can be clustered, so non-core points need to be set as clusters that cannot be expanded. Specifically, for the i-th row of the matrix BDis, if the number of elements with a value of 1 in BDis[i] is less than MinPts, then the task element i is not a core point, so all elements in BDis[i] are set to 0 to avoid expansion from element i. The matrix obtained in this way is the single-step density reachable matrix M.
[0060] In the embodiment, constructing a single-step density reachable matrix specifically includes the following steps:
[0061] S2.2.1, initialize an n×n initial Boolean matrix of the same size as the distance matrix [Dis] and assign values to it, satisfying [BDis[i, j]] = 1 if and only if [Dis[i, j]] ≤ ε, otherwise BDis[i, j] = 0. When the distance is defined as the squared Euclidean distance, ε needs to be replaced by ε 2 In the embodiment, let the element value of the i-th row and j-th column in the initial Boolean matrix be Among them, MSB (-) represents the most significant bit calculation protocol, [Dis[i, j]] represents the element value of the i-th row and j-th column in the distance matrix, and ε represents the threshold of the distance between data. It represents the XOR operation, and after the assignment is completed, the Boolean matrix [BDis] is obtained.
[0062] S2.2.2, for i = 0, 1, ..., n-1, calculate the element value of the i-th row in the n×1 vector [SDis], [SDis]
[0063] S2.2.3, calculate the n×1 vector [ZDis], the element value of the i-th row in [ZDis] [ZDis[i]] = MSB([SDis[i]]-MinPts), where MinPts represents the minimum number of neighborhood points.
[0064] S2.2.4, expand [ZDis] into an n×n matrix [ZDis span ],[ZDis span Each column in ] is the same as [ZDis].
[0065] S2.2.5, initialize an n×n initial single-step density reachable matrix and assign values to it, so that the element value of the i-th row and j-th column in the initial single-step density reachable matrix [M[i, j]] = [ZDis span [i, j]]×[BDis[i, j]], where [ZDis span [i, j]] represents the matrix [ZDis span ] is the element value of the i-th row and j-th column in , and after completing the assignment, we get the single-step density reachable matrix [M].
[0066] S2.3, calculate the density reachability matrix.
[0067] First, if M is a single-step density reachable matrix, and M 2 [i, j]≠0, then element j is density-reachable by element i. 2 [i, j] ≠ 0, then there must be an h such that both M[i, h] and M[h, j] are not 0, so there exists a chain i→h→j, that is, element j is density-reachable by element i. Furthermore, if If and only if element j is density-reachable by element i, where m is a positive integer greater than or equal to 1. Similarly, there exists a set of elements i1, i2, ..., i n For any 1≤j≤n-1, M[i j ,i j+1 ]≠0, so there exists a chain i=i1→i2→…→i n =j, satisfying i j+1 is i j Density-reachable, so there is a density-reachable matrix that can be obtained by It should be noted that although theoretically 2 m The value of is large, but in practical applications, 2 mThe selection of is related to the size of the data set. For actual data sets, a smaller 2 is often used. m The value is sufficient to find all clustering results. Experiments show that for 2000 elements, taking 2 m =8 to find all the clustering results. At this time, the fast modular power algorithm can be used to calculate D = M 8 , that is, calculate D = ((M 2 ) 2 ) 2 , only three multiplications are required. For larger datasets, the value of 2 can be increased appropriately. m The value of , and then perform O(m) multiplications to get D.
[0068] In the embodiment, constructing a density reachable matrix specifically includes the following steps:
[0069] S2.3.1, perform a matrix multiplication operation of the power of 3 on the single-step density-reachable matrix [M] to obtain the matrix [M 8 ].
[0070] S2.3.2, all servers initialize a shared random matrix [R] whose elements are not 0, and calculate [D[i, j]] = [M 8 [i,j]]×[R[i,j]],[M 8 [i, j]] represents the matrix [M 8 ] represents the element value of the i-th row and j-th column in the matrix [R], [R[i, j]] represents the element value of the i-th row and j-th column in the matrix [R], and [D[i, j]] represents the element value of the i-th row and j-th column in the density reachable matrix [D]. After completing the assignment, the density reachable matrix [D] is obtained.
[0071] S3, obtain the clustering results based on the density reachability matrix.
[0072] After obtaining the density reachable matrix, the clustering results can be restored from the density reachable matrix. In the process of restoring the clustering results, first select an element and mark it as visited. Then check whether this element is a core point. If not, mark it as noise. If it is a core point, expand the cluster from this point as the starting point. The process of expanding clustering is as follows: for the starting point i, first construct a new cluster family, then check the i-th row of the density matrix, and add all points j that satisfy D[i, j]≠0 to this cluster. When all elements are visited or added to the cluster, the final clustering result is obtained.
[0073] In the embodiment, restoring the clustering result by expanding the clustering specifically includes the following steps:
[0074] S3.1, each server first restores the density reachability matrix D of the plaintext and creates a set N = {0, 1, ..., n-1}.
[0075] S3.2, select a value i from the set N. If there are less than MinPts non-zero elements in the i-th row D[i] in D, then mark i as noise and remove i from the set N. MinPts represents the minimum number of neighborhood points. Then reselect i. When i is non-noise, expand the clustering starting from point i.
[0076] S3.3, when expanding the cluster from point i, it includes: first creating a new i-th cluster C i Then, for each element j that satisfies D[i, j]≠0 in the i-th row and j-th column of D, add j to cluster C. i and remove j from N.
[0077] Repeat steps S3.2 and S3.3 until set N becomes an empty set, and output all clustering results.
[0078] The new privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment proposed in this invention is called M-ppDBSCAN (MPC-friendly Privacy-preserving DBSCAN). Compared with previous work, the efficiency of M-ppDBSCAN proposed in this invention is improved by 3 to 5 orders of magnitude. The specific time cost for a specific data set is shown in Table 1. Table 1 shows the computational efficiency comparison results of M-ppDBSCAN with the existing clustering algorithm (reference Privacy-preserving density-based clustering) and the plaintext algorithm.
[0079] Table 1 Comparison of computational efficiency of different clustering algorithms
[0080]
[0081] As can be seen from Table 1, M-ppDBSCAN can cluster a data set with 400 data in 0.396 seconds, which is nearly a thousand times more efficient than the existing clustering algorithms. Furthermore, M-ppDBSCAN can cluster a data set containing thousands of elements in a few seconds, which is 3 to 5 orders of magnitude more efficient than the existing clustering algorithms, and the larger the data set, the more obvious the efficiency improvement. In addition, M-ppDBSCAN is only 76 to 120 times slower than the plaintext DBSCAN algorithm. For a large-scale data set with 2000 elements, M-ppDBSCAN can complete clustering in 3.68 seconds, while the plaintext DBSCAN algorithm takes 0.0481 seconds. M-ppDBSCAN is only 76.5 times slower than the plaintext algorithm. Therefore, the M-ppDBSCAN proposed in the present invention is very efficient and practical, and can be efficiently applied to actual privacy computing clustering algorithms, and further applied to privacy-preserving data analysis.
[0082] The above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment can be applied to the fields of trajectory clustering, customer segmentation, and image segmentation. Each data holder shares its trajectory data, customer data, or image data to three independent servers through a three-party replication secret sharing scheme, and uses the M-ppDBSCAN provided by the embodiment of the present invention to calculate the transitive closure by calculating matrix multiplication and then expand the clustering, and finally realizes the privacy-preserving DBSCAN secure clustering based on MPC. For example, in the application field of trajectory clustering, the purpose of the trajectory clustering algorithm is to find similar trajectories and cluster these similar trajectories to find common trajectories and then analyze the user's behavioral characteristics. The DBSCAN algorithm can be applied to the trajectory clustering algorithm to cluster similar trajectories into the same cluster cluster based on trajectory density. However, since the existing DBSCAN algorithm based on conditional statements and loop statements has low implementation efficiency under MPC, it is necessary to use the M-ppDBSCAN provided by the embodiment of the present invention to calculate the transitive closure by calculating matrix multiplication and then expand the clustering. Under the model of three-party secret sharing, matrix multiplication can be implemented very efficiently, thereby greatly improving the computing efficiency. In the trajectory clustering application scenario, it is assumed that each data holder has a horizontally partitioned data set, that is, each data owner has a complete trajectory, such as the movement trajectory of an infectious patient. In order to protect these sensitive information, these data holders share their patient movement trajectory data on three servers and perform secure clustering through the M-ppDBSCAN solution provided by an embodiment of the present invention, thereby realizing behavioral analysis of infectious patients.
[0083] like Figure 2 , Figure 3 and Figure 4Shown are the clustering results of the M-ppDBSCAN algorithm provided by the embodiments of the present invention on the S1 dataset (reference K-means properties on six clustering benchmark datasets), the Lsun dataset and the Target dataset. Different colors represent different clustering clusters. It can be seen that the M-ppDBSCAN algorithm can achieve good clustering effect.
[0084] In summary, the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment provided by the embodiment of the present invention calculates the transitive closure by calculating matrix multiplication, and then expands the clustering. Since matrix multiplication can be implemented very efficiently under the three-party secret sharing model, compared with the method of expanding clustering through conditional statements and loop statements, M-ppDBSCAN is more suitable for the MPC environment. In addition, since matrix multiplication supports highly parallel implementation, M-ppDBSCAN can also be accelerated under the GPU, which greatly improves the implementation efficiency. Therefore, M-DBSCAN is very efficient and suitable for practical application scenarios.
[0085] Based on the same inventive concept, Figure 5 As shown, the embodiment of the present invention further provides a privacy-preserving DBSCAN clustering device 500 based on a secure multi-party computing environment, including: a data sharing module 510 , a clustering module 520 and a clustering result recovery module 530 .
[0086] The data sharing module 510 is used for each data holder to share all the data held by it to three independent and non-collusive servers through a three-party replication secret sharing scheme.
[0087] The clustering module 520 is used to calculate the distance between data based on the shared data held by the three servers to obtain a distance matrix; convert the distance matrix into a Boolean matrix and further calculate the single-step density reachable matrix; perform a power operation based on the single-step density reachable matrix and further calculate the density reachable matrix.
[0088] The clustering result recovery module 530 is used to obtain clustering results based on the density reachability matrix.
[0089] Based on the same inventive concept, an embodiment of the present invention also provides a privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, including a memory and one or more processors, the memory is used to store computer programs, and the processor is used to implement the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment when executing the computer program.
[0090] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment is implemented.
[0091] Based on the same inventive concept, an embodiment of the present invention further provides a computer product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment is implemented.
[0092] It should be noted that the privacy-preserving DBSCAN clustering apparatus based on a secure multi-party computing environment, the privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, the computer-readable storage medium and the computer product provided in the embodiments of the present invention all belong to the same inventive concept as the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment. The specific implementation process is detailed in the embodiment of the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment, which will not be repeated here.
[0093] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment, characterized in that: The following steps are involved: Each data holder shares all the data it holds on three independent and non-collusive servers through a three-party replication secret sharing scheme; Based on the shared data held by the three servers, the distance between the data is calculated to obtain a distance matrix; the distance matrix is converted into a Boolean matrix and then the one-step density reachability matrix is further calculated; based on the one-step density reachability matrix, the power operation is performed and then the density reachability matrix is further calculated; The clustering results are obtained based on the density reachability matrix.
2. The privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment according to claim 1, characterized in that: Each data holder shares all the data held by it on three independent and non-collusive servers through a three-party replication secret sharing scheme, including: Based on the three-party replicated secret sharing scheme, for multiple data holders, each data holder splits the secret data it holds into three secret shards, and sends the three secret shards to three independent and non-collusive servers respectively.
3. The privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment according to claim 1, characterized in that: The distance matrix is obtained by calculating the distances between the shared data held by the three servers, including: For n shared data, first initialize an n×n initial distance matrix and assign values to it, so that the element value of the i-th row and j-th column in the initial distance matrix [Dis[i,j]] = ([v i ]-[v j ]) 2 , where [v i ] and [v j ] are the i-th and j-th data respectively, 0≤i≤n-1, 0≤j≤n-1. After the assignment, the distance matrix [Dis] is obtained.
4. The privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment according to claim 3, characterized in that: The step of converting the distance matrix into a Boolean matrix and then further calculating the single-step density reachability matrix includes: Initialize an n×n initial Boolean matrix of the same size as the distance matrix [Dis] and assign values to it, so that the element value of the i-th row and j-th column in the initial Boolean matrix is Among them, MSB (-) represents the most significant bit calculation protocol, [Dis[i, j]] represents the element value of the i-th row and j-th column in the distance matrix, and ε represents the threshold of the distance between data. It represents XOR operation, and after the assignment is completed, the Boolean matrix [BDis] is obtained; For i=0, 1, ..., n-1, calculate the element value of the i-th row in the n×1 vector [SDis], [SDis] Calculate the n×1 vector [ZDis], the element value of the i-th row in [ZDis] [ZDis[i]] = MSB([SDis[i]]-MinPts), where MinPts represents the minimum number of neighborhood points; Expand [ZDis] into an n×n matrix [ZDis span ],[ZDis span Each column in ] is the same as [ZDis]; Initialize an n×n initial single-step density reachable matrix and assign values to it, so that the element value of the i-th row and j-th column in the initial single-step density reachable matrix [M[i, j]] = [ZDis span [i, j]]×[BDis[i, j]], where [ZDis span [i, j]] represents the matrix [ZDis span ] is the element value of the i-th row and j-th column in , and after completing the assignment, we get the single-step density reachable matrix [M].
5. The privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment according to claim 1 or 4, characterized in that: The further calculation of the density reachable matrix after performing the power operation based on the single-step density reachable matrix includes: Performing matrix multiplication of the single-step density reachable matrix [M] to the power of m yields the matrix Wherein m is a positive integer greater than or equal to 1; All servers initialize a shared random matrix [R] whose elements are not 0, and calculate [D[i,j]] = [M 2m [i,j]]×[R[i,j]],[M 2m [i,j]] represents the matrix [M 2m ] represents the element value of the i-th row and j-th column in the matrix [R], [R[i,j]] represents the element value of the i-th row and j-th column in the matrix [R], and [D[i,j]] represents the element value of the i-th row and j-th column in the density reachable matrix [D]. After completing the assignment, the density reachable matrix [D] is obtained.
6. The privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment according to claim 3, characterized in that: The clustering result obtained based on the density reachable matrix includes: Step (1), each server first recovers the density reachability matrix D of the plaintext and creates a set N = {0, 1, ..., n-1}; Step (2), select a value i from the set N. If there are less than MinPts non-zero elements in the i-th row D[i] in D, then mark i as noise and remove i from the set N. MinPts represents the minimum number of neighborhood points. Then reselect i. When i is non-noise, expand the cluster from point i. Step (3), when expanding the cluster from point i, includes: first creating a new i-th cluster C i Then, for each element j that satisfies D[i,j]≠0 in the i-th row and j-th column of D, add j to cluster C. i and remove j from N; Repeat steps (2) and (3) until the set N becomes an empty set, and output all clustering results.
7. A privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, characterized in that: include: Data sharing module, clustering module and clustering result recovery module; The data sharing module is used for each data holder to share all the data held by it to three independent and non-collusive servers through a three-party replication secret sharing scheme; The clustering module is used to calculate the distance between the data based on the shared data held by the three servers to obtain a distance matrix; convert the distance matrix into a Boolean matrix and then further calculate the single-step density reachable matrix; perform a power operation based on the single-step density reachable matrix and then further calculate the density reachable matrix; The clustering result recovery module is used to obtain all clustering results based on the density reachable matrix.
8. A privacy-preserving DBSCAN clustering device based on a secure multi-party computing environment, comprising a memory and one or more processors, wherein the memory is used to store a computer program, characterized in that: The processor is used to implement the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a computer, the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment described in any one of claims 1 to 6 is implemented.
10. A computer product comprising a computer program, characterized in that When the computer program is executed by a processor, the privacy-preserving DBSCAN clustering method based on a secure multi-party computing environment described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
DBSCAN algorithm calculation method and device for protecting data privacy
CN120449180A
Data batch processing method and equipment
CN121122603A
