Method and apparatus for calculating DBSCAN algorithm for protecting data privacy
By processing the DBSCAN algorithm through secret sharing and unintentional transmission techniques, the efficiency and security issues of the traditional DBSCAN algorithm in big data scenarios are solved, achieving efficient and secure data clustering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2026-04-07
AI Technical Summary
Traditional DBSCAN algorithms are computationally inefficient and pose a risk of privacy breaches in big data scenarios. Existing privacy protection technologies increase computational overhead and reduce security.
The data is divided into first and second secret sharing forms using secret sharing technology, and sent to two computing servers respectively for DBSCAN clustering algorithm calculation. The clustering label results are determined through inadvertent transmission technology, and finally, the data is interacted and decrypted by multiple data holders.
This improves the computational efficiency and security of the DBSCAN algorithm, avoids data leakage, and ensures the accuracy of clustering results and privacy protection.
Smart Images

Figure CN120449180B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of privacy computing technology, and in particular to a DBSCAN algorithm calculation method and apparatus for protecting data privacy. Background Technology
[0002] In clustering algorithms, data size and data quality have a crucial impact on the effectiveness and accuracy of clustering results. Large-scale datasets 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, it is necessary for multiple data holders to share data for joint clustering.
[0003] Traditional plaintext clustering algorithms require collecting all data in plaintext before computation. However, directly sharing raw data often exposes sensitive information and may even lead to privacy breaches. For information security, privacy protection, and related legal considerations, data from multiple data holders is often not directly shared publicly. Instead, privacy-preserving technologies are used to cluster information distributed across different data sources without exposing specific data privacy information.
[0004] DBSCAN (Density-Based Spatial Clustering of Applications with Noise), as a density-based clustering algorithm, has shown unique advantages in handling non-convex and noisy data. However, its complex algorithm structure and low computational efficiency limit its application in big data scenarios. Furthermore, while related technologies such as homomorphic encryption and differential privacy can enhance the privacy protection of the DBSCAN algorithm to some extent, these methods often come with a significant increase in computational overhead and a certain degree of privacy leakage risk, thus reducing the computational efficiency and security of privacy-preserving DBSCAN algorithms, which urgently need to be addressed. Summary of the Invention
[0005] This application is based on the inventor's understanding and insights into the following issues:
[0006] Clustering algorithms are widely used unsupervised machine learning methods that categorize data in a dataset into multiple classes based on similarity, facilitating the observation of characteristics across different classes. The DBSCAN algorithm is a density-based spatial clustering algorithm that does not require pre-specifying the number of clusters. The algorithm first defines two key parameters: the neighborhood radius (Eps) and the minimum number of points (MinPts). Initially, the algorithm iterates through every data point in the dataset. For a given data point, if the number of data points within a neighborhood of radius Eps centered at that point is not less than MinPts, the point is marked as a core point; otherwise, it is marked as a noise point. Next, starting from any core point, all points within its neighborhood (including both core and non-core points) are grouped into the same class. Then, based on these newly added core points, the algorithm continues to expand outwards, adding points from their neighborhoods to the same class. This process is repeated until no further expansion is possible, thus completing the formation of a cluster. When all core points have been processed and no new points can be classified, the algorithm terminates. The final set of different clusters and noise points is the clustering result of the DBSCAN algorithm.
[0007] Traditional plaintext clustering algorithms require the entire dataset to be aggregated in plaintext before computation. With increasing emphasis on data privacy and confidentiality, plaintext transmission and aggregation are difficult to implement due to privacy regulations and legal requirements when the data to be clustered is scattered across different entities. Therefore, it is necessary to design clustering algorithms that protect data privacy. While privacy-preserving designs for the DBSCAN algorithm exist, these existing works suffer from efficiency and security issues. On the security front, some existing works leak distance information between different data points or their nearest neighbor relationships during computation, leading to varying degrees of leakage of information related to the original data. Other works employ three-party secure computation, relying on the assumption of honest multi-party security, which is less secure than two-party secure computation. On the efficiency front, some works typically use Paillier semi-homomorphic encryption systems based on the discrete logarithm problem, which are computationally inefficient, resulting in lengthy privacy computation protocols that urgently need improvement.
[0008] This application provides a DBSCAN algorithm calculation method and apparatus for protecting data privacy, in order to solve the problems that related technologies such as homomorphic encryption and differential privacy are often accompanied by a significant increase in computational overhead and a certain degree of privacy leakage risk, thereby reducing the computational efficiency and security of the privacy-preserving DBSCAN algorithm.
[0009] The first aspect of this application provides a DBSCAN algorithm calculation method for protecting data privacy, comprising the following steps: encrypting target data from multiple data holders to obtain data in a first secret sharing format and a second secret sharing format; sending the first secret sharing format data to a first computing server and the second secret sharing format data to a second computing server; after performing target DBSCAN clustering algorithm calculation using the first computing server and the second computing server, determining the first clustering label result of the first computing server and the second clustering label result of the second computing server, and returning the first clustering label result and the second clustering label result to the multiple data holders.
[0010] Optionally, in one embodiment of this application, encrypting the target data in multiple data holders to obtain data in a first secret sharing form and data in a second secret sharing form includes: using a target fixed-point number to represent all data in at least one data holder to encode all data into data in a target integer form; performing a target random split on the data in the target integer form to generate target random data, and using the target random data as the data in the first secret sharing form; calculating a target difference between the data in the target integer form and the target random data to determine the data in the second secret sharing form based on the target difference.
[0011] Optionally, in one embodiment of this application, after performing target DBSCAN clustering algorithm calculations using the first computing server and the second computing server, determining the first clustering label result of the first computing server and the second clustering label result of the second computing server includes: calculating the first proximity relation and the first data point distribution density of each data point in the first secret-shared data based on the target unintentional transmission technique; determining the first clustering label result of the target encrypted data using the first proximity relation and the first data point distribution density; calculating the second proximity relation and the second data point distribution density of each data point in the second secret-shared data based on the target unintentional transmission technique; and determining the second clustering label result of the target encrypted data using the second proximity relation and the second data point distribution density.
[0012] Optionally, in one embodiment of this application, returning the first clustering label result and the second clustering label result to the plurality of data holders includes: performing target interaction processing on the first clustering label result determined by the first computing server and the second clustering label result determined by the second computing server to determine the final clustering label result; and returning the final clustering label result to the plurality of data holders based on the first computing server or the second computing server.
[0013] Optionally, in one embodiment of this application, after returning the first clustering label result and the second clustering label result to the plurality of data holders, the method further includes: decrypting the first clustering label result and the second clustering label result to obtain the final plaintext clustering labels of the plurality of data holders.
[0014] A second aspect of this application provides a DBSCAN algorithm computing device for protecting data privacy, comprising: an encryption module for encrypting target data from multiple data holders to obtain data in a first secret sharing format and data in a second secret sharing format; a sending module for sending the first secret sharing format data to a first computing server and sending the second secret sharing format data to a second computing server; and a computing module for determining a first clustering label result of the first computing server and a second clustering label result of the second computing server after performing target DBSCAN clustering algorithm calculations using the first computing server and the second computing server, and returning the first clustering label result and the second clustering label result to the multiple data holders.
[0015] Optionally, in one embodiment of this application, the encryption module includes: an encoding unit, configured to use a target fixed-point number to represent all data in at least one data holder, so as to encode all data into data in the form of a target integer; a processing unit, configured to perform target random splitting processing on the data in the form of the target integer to generate target random data, and use the target random data as data in the first secret sharing form; and a first calculation unit, configured to calculate a target difference data between the data in the form of the target integer and the target random data, so as to determine the data in the second secret sharing form based on the target difference data.
[0016] Optionally, in one embodiment of this application, the calculation module includes: a second calculation unit, configured to calculate a first proximity relationship and a first data point distribution density for each data point in the first secret sharing data based on the target unintentional transmission technology; a first determination unit, configured to determine the first clustering label result in the target ciphertext form using the first proximity relationship and the first data point distribution density; a third calculation unit, configured to calculate a second proximity relationship and a second data point distribution density for each data point in the second secret sharing data based on the target unintentional transmission technology; and a second determination unit, configured to determine the second clustering label result in the target ciphertext form using the second proximity relationship and the second data point distribution density.
[0017] Optionally, in one embodiment of this application, the calculation module includes: a third determining unit, configured to perform target interaction processing on the first clustering label result determined by the first calculation server and the second clustering label result determined by the second calculation server to determine the final clustering label result; and a returning unit, configured to return the final clustering label result to the plurality of data holders based on the first calculation server or the second calculation server.
[0018] Optionally, in one embodiment of this application, the apparatus further includes: a decryption module, configured to decrypt the first clustering label result and the second clustering label result after returning the first clustering label result and the second clustering label result to the plurality of data holders, so as to obtain the final plaintext clustering labels of the plurality of data holders.
[0019] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the DBSCAN algorithm calculation method for protecting data privacy as described in the above embodiments.
[0020] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data privacy-preserving DBSCAN algorithm calculation method.
[0021] A fifth aspect of this application provides a computer program product, including a computer program that, when executed, is used to implement the DBSCAN algorithm calculation method for protecting data privacy as described above.
[0022] This application embodiment can encrypt target data from multiple data holders, send the obtained data in a first secret-sharing format to a first computing server, and send the data in a second secret-sharing format to a second computing server. After performing target DBSCAN clustering algorithm calculations using the first and second computing servers, the first and second clustering label results are determined, and these results are returned to the multiple data holders, effectively improving the computational efficiency and security of the privacy-preserving DBSCAN algorithm. Therefore, it solves the problem that related technologies such as homomorphic encryption and differential privacy often involve a significant increase in computational overhead and a certain degree of privacy leakage risk, thereby reducing the computational efficiency and security of the privacy-preserving DBSCAN algorithm.
[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0025] Figure 1 This is a flowchart illustrating a DBSCAN algorithm calculation method for protecting data privacy according to an embodiment of this application.
[0026] Figure 2 A visual diagram illustrating the results of clustering an S1 dataset according to a specific embodiment of this application;
[0027] Figure 3 This is a schematic diagram of the structure of a DBSCAN algorithm computing device for protecting data privacy according to an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0029] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0030] The following description, with reference to the accompanying drawings, illustrates a DBSCAN algorithm calculation method and apparatus for protecting data privacy, according to embodiments of this application. Addressing the issues raised in the background section regarding the significant increase in computational overhead and the risk of privacy leakage associated with related technologies such as homomorphic encryption and differential privacy, which reduce the computational efficiency and security of privacy-preserving DBSCAN algorithms, this application provides a DBSCAN algorithm calculation method for protecting data privacy. In this method, target data from multiple data holders is encrypted. The obtained data in a first secret-sharing format is sent to a first computing server, and data in a second secret-sharing format is sent to a second computing server. After performing target DBSCAN clustering algorithm calculations using the first and second computing servers, first and second clustering label results are determined. These results are then returned to the multiple data holders, effectively improving the computational efficiency and security of the privacy-preserving DBSCAN algorithm. This solves the problems associated with the significant increase in computational overhead and the risk of privacy leakage associated with related technologies such as homomorphic encryption and differential privacy, which reduce the computational efficiency and security of privacy-preserving DBSCAN algorithms.
[0031] Specifically, Figure 1 This is a flowchart illustrating a DBSCAN algorithm calculation method for protecting data privacy, provided in an embodiment of this application.
[0032] like Figure 1 As shown, the DBSCAN algorithm calculation method for protecting data privacy includes the following steps:
[0033] In step S101, the target data among multiple data holders is encrypted to obtain data in a first secret sharing form and data in a second secret sharing form.
[0034] In this embodiment of the application, the target data is the data to be used for privacy computation.
[0035] It is understood that the embodiments of this application can encrypt data from multiple data holders. For example, the embodiments of this application can convert data from any data holder into a fixed-point representation in the manner described in the following steps, and encode it into an integer. The encoded integer is then randomly split into data in a first secret sharing form and data in a second secret sharing form, which effectively improves data security.
[0036] Among them, in one embodiment of the present application, sending the data in the first secret sharing form to the first computing server and sending the data in the second secret sharing form to the second computing server includes: representing all the data in at least one data holder using a target fixed-point number to encode all the data into data in the target integer form; performing a target random splitting process on the data in the target integer form to generate target random data, and using the target random data as the data in the first secret sharing form; calculating the target difference data between the data in the target integer form and the target random data to determine the data in the second secret sharing form according to the target difference data.
[0037] In the actual execution process, the embodiment of the present application can represent all the data in any data holder using a target fixed-point number to encode all the data into data in the target integer form. For example, it can be through any data provider D i All its data First, represent it with a fixed-point number and encode it as an integer Among them, Is the fixed-point number representation encoding function, where t is the integer ring modulus represented by the fixed-point number. Then, after splitting it into data in the secret sharing form, it is sent to two computing servers P0 and P1 respectively. That is, for any x ij , data provider D i Randomly generate the first vector <x ij >0 = r ij , that is, obtain the data in the first secret sharing form; then, calculate the second vector <x ij >1 = x ij - r ij , that is, obtain the data in the second secret sharing form, thereby realizing the secure distributed processing and analysis of data while ensuring data privacy and avoiding the risk of privacy leakage.
[0038] In the embodiment of the present application, fixed-point numbers are used to represent decimals, and the secret sharing technology is adopted as one of the ways to store the ciphertext of intermediate results. For an integer 0 ≤ x < t, take The two computing servers P0 and P1 participating in the calculation respectively hold Denoted as the two parties holding the secret sharing <x> t When t is explicitly stated in the context, this superscript is omitted and it is directly written as t. <x>When t=2, this secret sharing is also called Boolean secret sharing; otherwise, it is arithmetic secret sharing. For simplicity, the value space is represented using... <x>∈S means x∈S. For a decimal... This application uses fixed-point number representation, which is encoded as an integer. Let the precision of the fixed-point number be φ, then the encoding is... It should be noted that when a fixed-point number undergoes one multiplication, its precision doubles to 2φ. The protocol adopts... <y> =F( <x>The abbreviation of ) indicates that the input of protocol F is a secret share, i.e., input P0. <x>0, P1 input <x>1. The output is also in the form of secret sharing, that is, P0 obtains it. <y>0, P1 obtained <y>1.
[0039] In step S102, data in the first secret sharing format is sent to the first computing server, and data in the second secret sharing format is sent to the second computing server.
[0040] It is understood that, in the embodiments of this application, data in the first secret sharing format can be sent to the first computing server, and data in the second secret sharing format can be sent to the second computing server. For example, the data obtained in the above steps can be sent to the second computing server. <x ij >0 is sent to the first computing server P0; <x ij >1 is sent to the second computing server P1, thereby enabling distributed secure computation of data, ensuring that no single party can obtain complete data, thus effectively protecting data privacy, and laying the foundation for subsequent secure multi-party computation.
[0041] The first computing server and the second computing server are two independent computing servers. All data holders can choose two of them as computing servers, or they can additionally request two other participants besides the data holders to provide computing services.
[0042] In step S103, after the target DBSCAN clustering algorithm is calculated using the first computing server and the second computing server, the first clustering label result of the first computing server and the second clustering label result of the second computing server are determined, and the first clustering label result and the second clustering label result are returned to multiple data holders.
[0043] In the privacy-preserving DBSCAN algorithm of this application, given the neighborhood radius ∈ and the minimum number of points m, the two computing servers P0 and P1 input a secretly shared vector dataset. Where, x i Both are d-dimensional vectors. The algorithm outputs the number of clusters k and the cluster label l. i ∈{-1}∪[k],i∈[n], where,l i =-1 indicates that the data point is a noise point; otherwise, l i =j indicates that it belongs to cluster j. The specific steps of the DBSCAN algorithm are as follows:
[0044] 1) Both parties invoke the element-wise multiplication protocol and sum the results to calculate the distance matrix. The calculation method is as follows:
[0045]
[0046] <D ii >←0, i∈[n]
[0047] in, <x i,k > Represents the secret sharing vector <x i The kth element of > <x j,k > Represents the secret sharing vector <x j For the k-th element, the addition (summation) and subtraction in this calculation step can be performed locally by both parties using their respective secret shared operands, without interaction. The only calculation in the above process that requires an interactive protocol is the element-wise multiplication protocol.
[0048] 2) Both parties invoke the positive number detection protocol to calculate:
[0049] <R b >←Positive( <d>-Fixed(∈ 2 ,φ 2 )),
[0050] in, <R b > represents the nearest neighbor decision Boolean matrix, ∈ represents the neighborhood radius, and φ represents the fixed-point precision. <d>This represents the distance matrix.
[0051] 3) Both parties invoke the Boolean secret sharing protocol to convert it into an arithmetic secret sharing protocol, and calculate:
[0052] <r>←B2A( <R b >),
[0053] in, <r>This represents the nearest neighbor determination arithmetic matrix.
[0054] 4) Both parties invoke the positive number detection protocol to calculate the Boolean secret sharing vector. <c>:
[0055]
[0056] in, <R ij > Represents a matrix <r>The element in the i-th row and j-th column, where m represents the minimum number of points.
[0057] 5) Both parties invoke logic and protocol to calculate the Boolean secret sharing matrix. <s>:
[0058]
[0059] in, Representation matrix <R b The element in the i-th row and j-th column of the array represents whether the i-th point and the j-th point are neighbors.
[0060] 6) Perform n rounds of iteration, that is, for i ← 0, 1, ..., n-1:
[0061] a) Call logic and protocol, calculate <t> ←<S i >∧ <c>,in, <t>Let i represent the nearest neighbor reachable update vector. i Yes ij The i-th row of >.
[0062] b) Call the Boolean vector outer product logical AND algorithm to calculate... <z>←OuterAnd( <t>, i >), where <z>This represents the updated value of the nearest neighbor reachability matrix.
[0063] c) Call logic or protocol, calculate <s>← <s>∨ <z>.
[0064] 7) Take <l i >←<-1>, i∈[n], where, <l i > represents all cluster labels.
[0065] 8) Perform n rounds of iteration, that is, for i ← 0, 1, ..., n-1:
[0066] a) Both parties invoke the element-wise multiplication protocol to update all... <l j >← <l j >+ ij >·(i- <l j >),j∈[n].
[0067] 9) Both parties disclose all labels. <l i >, i∈[n], that is, P0 will put all <l i >0 is sent to P1, and P1 sends all of them. <l i >1 is sent to P0, and both parties receive l. i =( <l i >0+ <l i >1) mod t, where, <l i >0 indicates the first cluster label result. <l i >1 indicates the result of the second clustering label. Both sides count all unique values other than -1 in all labels, and the number of these unique values is the final number of clusters k. Then, according to the unique values, all non--1 labels are recounted and assigned to k clusters. The DBSCAN algorithm ends.
[0068] It is understood that the first computing server and the second computing server in this embodiment can complete the DBSCAN clustering algorithm calculation through the above steps. After the DBSCAN clustering algorithm calculation, the first clustering label result of the first computing server P0 is determined. <l i >0 and the second clustering label result of the second computing server P1 <l i >1, and the first and second cluster label results are returned to multiple data holders in encrypted form, ensuring a high degree of privacy protection for the original data and intermediate calculation results throughout the calculation process, avoiding the risk of data leakage, while allowing each data holder to finally obtain accurate cluster analysis results, realizing secure data sharing and collaborative analysis.
[0069] Optionally, in one embodiment of this application, after performing target DBSCAN clustering algorithm calculations using a first computing server and a second computing server, determining the first clustering label result of the first computing server and the second clustering label result of the second computing server includes: calculating the first proximity relation and the first data point distribution density of each data point in the first secret sharing form of data based on the target unintentional transmission technology; determining the first clustering label result of the target ciphertext form using the first proximity relation and the first data point distribution density; calculating the second proximity relation and the second data point distribution density of each data point in the second secret sharing form of data based on the target unintentional transmission technology; and determining the second clustering label result of the target ciphertext form using the second proximity relation and the second data point distribution density.
[0070] In this application embodiment, COT (correlated oblivious transfer) is an important technology for constructing secure computation on a two-party computing server. A single correlated oblivious execution (or instance) transfer involves two parties: a sender and a receiver. The sender receives no input, while the receiver receives a Boolean value b. Upon completion, the sender obtains two pieces of information m0 and m1, each containing κ bits, where κ is a statistical security parameter, and the public relation f(m0,m1) = 0 holds true. The receiver obtains m... b The sender receives no information about b, and the receiver receives no information about m. 1-b Any information.
[0071] Furthermore, embodiments of this application can determine the nearest neighbor relationships and data point distribution density of data points through Boolean vector outer product logic AND calculation algorithms. That is, based on the correlation-based unintentional transmission technology, the nearest neighbor relationships and data point distribution density of each data point in the first secret sharing form of data and the nearest neighbor relationships and data point distribution density of each data point in the second secret sharing form of data are calculated respectively; thereby determining the first clustering label result and the second clustering label result of the target ciphertext form, which can ensure the distributed consistency of clustering results while protecting data privacy, and provide accurate and secure analysis results for all participants.
[0072] In this context, the Boolean vector outer product logic and the algorithm input are two secretly shared Boolean vectors. 2 ∈[2] n , 2 ∈[2] m (Where [k] represents the natural number set {0, 1, …, k}, the output secret sharing Boolean matrix <c>∈[2] n×m , such that c ij = a i ∧b j . The Boolean vector outer product logical AND algorithm needs to use a basic COT protocol (statistical security parameter κ) and a hash function H(s, t):[2] κ ×[2] κ →[2]. The Boolean vector outer product logical AND algorithm executes as follows:
[0073] For participant P0:
[0074] 1) Call (m+n) instances of COT as the sender to obtain (m+n) messages of length κ bits, denoted as and
[0075] 2) Randomly take R∈[2] n×m .
[0076] 3) Calculate 4 matrices , each element of which is calculated as
[0077]
[0078] Where R ij represents the element of the i-th row and the j-th column of the random matrix R, and <a i >0 represents the secret sharing Boolean vector The i-th element is the secret sharing fragment held by participant P0. j >0 indicates a secret sharing Boolean vector. The j-th element is the secret sharing fragment held by participant P0. Indicates to The result of executing the hash function, This represents the Boolean outer product value after masking and obfuscation.
[0079] 4) Combine all four matrices M k Send to P1 and output. <c>0 <- R, where, <c>0 denotes the output result secret share of the participant P0.
[0080] For participant P1:
[0081] 1) As a receiver, call instances of (m+n) COTs, input the Boolean value< / c> < / c> 1, 1. Obtain (m+n) messages of length κ, denoted as (s i ), i∈[n] and (t i ), i∈[m].
[0082] 2) P0 receives four matrices M k ,k∈[4].
[0083] 3) Calculate matrix M as follows:
[0084]
[0085] Wherein, H(s) i ,t j ) indicates that for s i ,t j The result of executing the hash function, This indicates the second of the four accepted matrices. i >1+ j >1. Take the element in the i-th row and j-th column.
[0086] 4) Output <c>1 <- M, where, <c>1 denotes the output result secret share of the participant P0.
[0087] The above protocol is denoted as <c> ←OuterAnd(< / c> < / c> < / c> , ), and representing a secret shared Boolean vector.
[0088] In addition, the embodiments of the present application can use the clustering algorithm security calculation technology between two-party computing servers based on correlation oblivious transfer to perform an interactive calculation protocol. The correlation oblivious transfer can be used to design various types of basic operators for security calculation of the two-party computing servers. The operator protocols are all in the form of secret sharing as the input and output of the algorithm. The basic operators used in the work of the present application include:
[0089] 1) Element-wise multiplication. · For a given two arithmetic element secret sharing computation multiplication, the result is in the form of an arithmetic secret sharing.
[0090] 2) Logical AND. 2 ∧ 2 For a given two Boolean secret share computation AND, the result is in the form of a Boolean secret share, and logical OR can be similarly defined.
[0091] 3) Boolean secret share conversion to arithmetic secret share. t = B2A( 2 ) converting the Boolean secret sharing into an arithmetic secret sharing, wherein t representing the converted arithmetic secret share result, which is in the form of an arithmetic secret share.
[0092] 4) positive number detection. 2 = Positive( t ) determining whether a given arithmetic secret share is a positive number, the result is a Boolean secret share.
[0093] Therefore, the embodiments of the present application further improve the speed of updating the nearest neighbor relationship in this application based on the Boolean vector outer product logic and algorithm of the passive transmission, improve the end-to-end execution efficiency of the algorithm interaction protocol, and are conducive to the further acceptance, deployment and promotion of the privacy protection algorithm in practice.
[0094] Optionally, in an embodiment of the present application, returning the first clustering label result and the second clustering label result to the plurality of data holders includes: performing target interaction processing on the first clustering label result determined by the first computing server and the second clustering label result determined by the second computing server to determine a final clustering label result; and returning the final clustering label result to the plurality of data holders based on the first computing server or the second computing server.
[0095] In some embodiments, the embodiments of the present application can perform target interaction processing on the first clustering label result determined by the first computing server and the second clustering label result determined by the second computing server, for example, both computing servers disclose all labels i >, i ∈ [n], that is, P0 sends all first clustering labels i >0 to P1, P1 sends all second clustering labels i >1 to P0, both parties obtain i = (<l i >0 + <l i >1) mod t to determine the final clustering label result, and any one of the computing servers can return the final clustering label result to the plurality of data holders, thereby ensuring data privacy and security.
[0096] It should be noted that, in addition to the final clustering label, the original data of any data provider in the computing process and the computing intermediate result are not leaked to other data providers or the two computing servers, thereby protecting the data privacy and confidentiality.
[0097] Optionally, in an embodiment of the present application, after returning the first clustering label result and the second clustering label result to the plurality of data holders, it further includes: performing decryption processing on the first clustering label result and the second clustering label result to obtain the final plaintext clustering label of the plurality of data holders.
[0098] In some embodiments, the embodiments of the present application can decrypt the first clustering label result and the second clustering label result by using the decryption key after the plurality of data holders receive the first clustering label result and the second clustering label result, so that the data holders can obtain the final plaintext clustering label, effectively protect the data privacy, and improve the calculation security.
[0099] For example, the working principle of the embodiments of the present application is described in detail below with a specific embodiment. First, a plurality of data holders hold part of the subsets of the data set S1, and two servers dedicated to privacy calculation are provided. The S1 data set is a commonly used data set for testing clustering algorithms, and the data contains 5000 2-dimensional vectors, forming 15 Gaussian distribution clusters, each cluster containing 300 to 350 data points. Before calculation, all data holders convert their data into fixed-point number representation secret sharing in the manner described above, and send them to the two calculation servers. The fixed-point number precision used is φ = 16, the modulus of the arithmetic secret sharing is t = 2 59 , the statistical security parameter of the COT protocol is κ = 128, the underlying COT protocol used is the BCG+19 protocol, and the hash function is constructed using the AES algorithm in CTR mode.
[0100] Then, after receiving the data in the form of secret sharing, the two servers perform the corresponding privacy protection DBSCAN algorithm and obtain the clustering label result (∈ = 0.125, m = 100). Since the clustering label result is disclosed to the two calculation servers, after any one of the calculation servers returns the clustering label result to all data holders, the process ends. The clustering label visualization result on the S1 data set is as follows Figure 2 As shown in the figure, different colored points represent different cluster clusters, and black points represent noise data points (cluster labels are -1).
[0101] Therefore, the embodiments of the present application can comprehensively utilize the data set provided by any multiple data providers to calculate the clustering result while protecting the original data from being leaked, which is conducive to the centralized use of the same type of data originally scattered in multiple parties for unsupervised machine learning data analysis, improves the data utilization value, and helps the development and promotion of privacy protection technology. Compared with the existing related work, in the calculation process, no distance information, neighbor relationship information or any intermediate calculation results between data points are leaked except the cluster labels, which greatly enhances the data confidentiality of the algorithm implementation and can provide higher security.
[0102] The DBSCAN algorithm calculation method for protecting data privacy according to the embodiments of the present application can encrypt the target data in multiple data holders, send the obtained data in the first secret sharing form to the first calculation server, and send the data in the second secret sharing form to the second calculation server. After the target DBSCAN clustering algorithm is calculated by using the first calculation server and the second calculation server, the first clustering label result and the second clustering label result are determined and returned to the multiple data holders, which effectively improves the calculation efficiency and security of the privacy protection DBSCAN algorithm. Therefore, the problems of significant increase in calculation overhead and certain degree of privacy leakage risk of homomorphic encryption, differential privacy and other technologies in related technologies are solved, thereby reducing the calculation efficiency and security of the privacy protection DBSCAN algorithm.
[0103] Next, the DBSCAN algorithm calculation device for protecting data privacy according to the embodiments of the present application is described with reference to the accompanying drawings.
[0104] Figure 3 is a block schematic diagram of the DBSCAN algorithm calculation device for protecting data privacy according to the embodiments of the present application.
[0105] As Figure 3 shown, the DBSCAN algorithm calculation device 10 for protecting data privacy includes an encryption module 100, a sending module 200 and a calculation module 300.
[0106] Specifically, the encryption module 100 is configured to encrypt the target data in the multiple data holders to obtain data in a first secret sharing form and data in a second secret sharing form.
[0107] The sending module 200 is configured to send the data in the first secret sharing form to the first calculation server and send the data in the second secret sharing form to the second calculation server.
[0108] The computing module 300 is configured to determine the first clustering label result of the first computing server and the second clustering label result of the second computing server after the target DBSCAN clustering algorithm computation is performed by the first computing server and the second computing server, and return the first clustering label result and the second clustering label result to the plurality of data holders.
[0109] Optionally, in an embodiment of the present application, the encryption module 200 comprises an encoding unit, a processing unit and a first computing unit.
[0110] The encoding unit is configured to represent all data in at least one data holder by using a target fixed-point number, so as to encode all data into data in the form of a target integer.
[0111] The processing unit is configured to perform target random splitting processing on the data in the form of the target integer, so as to generate target random data, and the target random data is data in the form of a first secret sharing.
[0112] The first computing unit is configured to calculate target difference value data between the data in the form of the target integer and the target random data, so as to determine data in the form of a second secret sharing according to the target difference value data.
[0113] Optionally, in an embodiment of the present application, the computing module 300 comprises a second computing unit, a first determining unit, a third computing unit and a second determining unit.
[0114] The second computing unit is configured to calculate, based on a target careless transmission technology, a first proximity relationship of each data point in the data in the form of the first secret sharing and a first data point distribution density.
[0115] The first determining unit is configured to determine a first clustering label result in the form of target ciphertext by using the first proximity relationship and the first data point distribution density.
[0116] The third computing unit is configured to calculate, based on the target careless transmission technology, a second proximity relationship of each data point in the data in the form of the second secret sharing and a second data point distribution density.
[0117] The second determining unit is configured to determine a second clustering label result in the form of target ciphertext by using the second proximity relationship and the second data point distribution density.
[0118] Optionally, in an embodiment of the present application, the computing module 300 comprises a third determining unit and a returning unit.
[0119] The third determination unit is configured to perform target interaction processing on the first clustering label result determined by the first computing server and the second clustering label result determined by the second computing server, to determine a final clustering label result.
[0120] The returning unit is configured to return the final clustering label result to the plurality of data holders based on the first computing server or the second computing server.
[0121] Optionally, in an embodiment of the present application, the device 10 of the embodiment of the present application further comprises a decryption module.
[0122] The decryption module is configured to perform decryption processing on the first clustering label result and the second clustering label result after the first clustering label result and the second clustering label result are returned to the plurality of data holders, to obtain final plaintext clustering labels of the plurality of data holders.
[0123] It should be noted that the above explanation of the embodiment of the DBSCAN algorithm calculation method for protecting data privacy is also applicable to the embodiment of the DBSCAN algorithm calculation device for protecting data privacy, which will not be described here.
[0124] The DBSCAN algorithm calculation device for protecting data privacy provided by the embodiment of the present application can perform encryption processing on target data in the plurality of data holders, send the obtained data in the first secret sharing form to the first computing server and send the data in the second secret sharing form to the second computing server, determine the first clustering label result and the second clustering label result after target DBSCAN clustering algorithm calculation is performed by using the first computing server and the second computing server, and return to the plurality of data holders, thereby effectively improving the calculation efficiency and security of the privacy protection DBSCAN algorithm. Therefore, the problems of significant increase in calculation overhead and certain degree of privacy disclosure risk caused by homomorphic encryption, differential privacy and other technologies in the related art are solved, thereby improving the calculation efficiency and security of the privacy protection DBSCAN algorithm.
[0125] Figure 4 The electronic device provided by the embodiment of the present application is shown in the structural schematic diagram. The electronic device can comprise:
[0126] The memory 401, the processor 402 and the computer program stored in the memory 401 and executable on the processor 402.
[0127] The processor 402 implements the DBSCAN algorithm calculation method for protecting data privacy provided in the above embodiments when executing the program.
[0128] Further, the electronic device further comprises:
[0129] Communication interface 403 is used for communication between memory 401 and processor 402.
[0130] The memory 401 is used to store computer programs that can run on the processor 402.
[0131] The memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0132] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0133] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0134] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0135] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the DBSCAN algorithm calculation method for protecting data privacy as described above.
[0136] This embodiment also provides a computer program product, including a computer program, which, when executed, is used to implement the DBSCAN algorithm calculation method for protecting data privacy as described above.
[0137] In the description of this specification, the references to "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0138] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0139] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0140] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0141] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0142] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0143] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0144] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application. < / z> < / s> < / s> < / z> < / t> < / z> < / t> < / c> < / t> < / s> < / r> < / c> < / r> < / r> < / d> < / d> < / y> < / y> < / x> < / x> < / x> < / y> < / x> < / x> < / x>
Claims
1. A DBSCAN algorithm calculation method that protects data privacy, characterized in that, Includes the following steps: Encrypting target data from multiple data holders to obtain data in a first secret sharing format and a second secret sharing format, wherein the encryption of target data from multiple data holders to obtain data in the first secret sharing format and the second secret sharing format includes: using a target fixed-point number to represent all data in at least one data holder to encode all data into data in a target integer format; performing a target random split on the data in the target integer format to generate target random data, and using the target random data as the data in the first secret sharing format; calculating a target difference between the data in the target integer format and the target random data to determine the data in the second secret sharing format based on the target difference data; The data in the first secret sharing format is sent to the first computing server, and the data in the second secret sharing format is sent to the second computing server; After performing target DBSCAN clustering algorithm calculations using the first computing server and the second computing server, the first clustering label result of the first computing server and the second clustering label result of the second computing server are determined, and the first clustering label result and the second clustering label result are returned to the plurality of data holders. The determination of the first clustering label result of the first computing server and the second clustering label result of the second computing server after performing target DBSCAN clustering algorithm calculations using the first computing server and the second computing server includes: calculating the first proximity relation and the first data point distribution density of each data point in the first secret-shared data based on the target unintentional transmission technology; determining the first clustering label result in the target encrypted form using the first proximity relation and the first data point distribution density; calculating the second proximity relation and the second data point distribution density of each data point in the second secret-shared data based on the target unintentional transmission technology; and determining the second clustering label result in the target encrypted form using the second proximity relation and the second data point distribution density.
2. The method according to claim 1, characterized in that, The step of returning the first clustering label result and the second clustering label result to the plurality of data holders includes: The first clustering label result determined by the first computing server and the second clustering label result determined by the second computing server are subjected to target interaction processing to determine the final clustering label result. Based on the first computing server or the second computing server, the final clustering label result is returned to the multiple data holders.
3. The method according to claim 1, characterized in that, After returning the first clustering label result and the second clustering label result to the plurality of data holders, the method further includes: The first clustering label result and the second clustering label result are decrypted to obtain the final plaintext clustering labels of the multiple data holders.
4. A DBSCAN algorithm computing device for protecting data privacy, characterized in that, include: An encryption module is used to encrypt target data from multiple data holders to obtain data in a first secret sharing format and a second secret sharing format. The encryption process includes: representing all data from at least one data holder using a target fixed-point number to encode all data into a target integer format; performing a target random split on the target integer format data to generate target random data, and using the target random data as the first secret sharing format data; calculating a target difference between the target integer format data and the target random data to determine the second secret sharing format data based on the target difference. The sending module is used to send the data in the first secret sharing form to the first computing server, and to send the data in the second secret sharing form to the second computing server; The calculation module is configured to, after performing target DBSCAN clustering algorithm calculations using the first and second calculation servers, determine the first clustering label result of the first calculation server and the second clustering label result of the second calculation server, and return the first clustering label result and the second clustering label result to the plurality of data holders. The step of determining the first clustering label result of the first calculation server and the second clustering label result of the second calculation server after performing target DBSCAN clustering algorithm calculations using the first and second calculation servers includes: calculating the first proximity relationship and the first data point distribution density of each data point in the first secret-shared data based on the target unintentional transmission technology; determining the first clustering label result in the target encrypted form using the first proximity relationship and the first data point distribution density; calculating the second proximity relationship and the second data point distribution density of each data point in the second secret-shared data based on the target unintentional transmission technology; and determining the second clustering label result in the target encrypted form using the second proximity relationship and the second data point distribution density.
5. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the data privacy-preserving DBSCAN algorithm calculation method as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the DBSCAN algorithm calculation method for protecting data privacy as described in any one of claims 1-3.
7. A computer program product, comprising a computer program, characterized in that, The computer program is executed by a processor to implement the DBSCAN algorithm calculation method for protecting data privacy as described in any one of claims 1-3.
Citation Information
Patent Citations
Multi-client data privacy processing method, system, device, medium and product
CN118410521A
Cloud-based multi-source government affair data privacy protection clustering method and system and related equipment
CN118734106A