Privacy-preserving density clustering method, electronic device, and storage medium

By using the privacy-preserving DBSCAN algorithm, encrypted data is divided into core objects and boundary objects, and the temporary cluster connections are determined and merged. This solves the security risks and low efficiency of existing clustering methods, and achieves efficient and secure clustering results.

CN117195017BActive Publication Date: 2026-05-29NAT UNIV OF DEFENSE TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NAT UNIV OF DEFENSE TECH
Filing Date
2023-09-07
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing privacy-preserving clustering methods such as K-means and DBSCAN have security vulnerabilities and unstable clustering results, making it difficult to improve clustering efficiency and quality without revealing data relationships.

Method used

The privacy-preserving DBSCAN algorithm is used to divide the encrypted data into core objects, boundary objects, and noise objects. Temporary clusters and their connections are determined through a cloud server, and temporary clusters are merged based on a depth-first traversal algorithm to obtain the clustering results.

Benefits of technology

It enhances privacy and security, improves clustering efficiency and quality, ensures that data relationships are not leaked, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195017B_ABST
    Figure CN117195017B_ABST
Patent Text Reader

Abstract

The application provides a privacy protection density clustering method, an electronic device and a storage medium. The method comprises the following steps: sending a plurality of ciphertext data to two cloud servers, so that each cloud server determines the object type of each received ciphertext data, the object type comprising a core object or a boundary object, and based on a privacy protection DBSCAN algorithm, each core object and a target boundary object in the neighborhood range of the core object are grouped into a temporary cluster, the target boundary object only belongs to one temporary cluster, the connection relationship between each temporary cluster and other temporary clusters is determined, and the connection relationship is fed back; according to the connection relationship fed back by the two cloud servers, the connected temporary clusters are merged, and a clustering result is obtained. The application can improve privacy security, and improve clustering efficiency and clustering quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a privacy-preserving density clustering method, electronic device, and storage medium. Background Technology

[0002] Currently, there is a wealth of research on privacy-preserving clustering schemes, with K-means being the most prevalent. However, K-means clustering has several limitations and drawbacks. Its computation is relatively simple, the clustering results are heavily influenced by the initial cluster centers, and it can only detect convex clusters, thus limiting its applicability. Furthermore, the number of clusters, k, must be predetermined based on specialized neighborhood knowledge; determining k's value is difficult if only a subset of the dataset is known. Additionally, K-means clustering does not incorporate the concept of noise, making the results highly sensitive to outliers because each input is assigned to a cluster, affecting the cluster's center position (the average of all data within that cluster).

[0003] Therefore, some researchers have turned to research on privacy-preserving clustering schemes based on DBSCAN. DBSCAN is a more flexible clustering algorithm capable of detecting clusters of arbitrary shapes. Furthermore, the number of clusters can be flexibly generated based on the characteristics of the dataset, without requiring manual determination. However, existing schemes reveal cluster sizes and data adjacency relationships, posing security risks. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a privacy-preserving density clustering method, electronic device and storage medium that can improve privacy security and increase clustering efficiency and quality.

[0005] The present invention includes a privacy-preserving density clustering method, comprising:

[0006] Multiple encrypted data are sent to two cloud servers, each of which determines the object type of each received encrypted data, including core objects or boundary objects. Based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster, with each target boundary object belonging to only one temporary cluster. The connection relationship between each temporary cluster and other temporary clusters is determined and the connection relationship is fed back.

[0007] Based on the connection relationship reported by the two cloud servers, the connected temporary clusters are merged to obtain the clustering result.

[0008] Optionally, the object type also includes noise objects, and the object type of the ciphertext data is determined as follows:

[0009] Detect the number of other ciphertext data contained within the neighborhood of each ciphertext data;

[0010] If the number reaches a preset threshold, the encrypted data is used as the core object; if the number does not reach the preset threshold and there is a core object in the neighborhood, the encrypted data is used as the boundary object.

[0011] Otherwise, the encrypted data is treated as noise.

[0012] Optionally, the temporary cluster is composed as follows:

[0013] Each core object is traversed one by one to determine the boundary objects within the neighborhood of each core object;

[0014] The unmarked boundary objects within the neighborhood of the core object are taken as target boundary objects within the neighborhood of the core object, and the target boundary objects are marked.

[0015] The core object and the target boundary objects within its neighborhood are grouped into a temporary cluster.

[0016] Optionally, the connection relationship is determined in the following manner:

[0017] Determine whether there are other core objects within the neighborhood of each core object;

[0018] If so, then the connection between the temporary cluster to which the core object belongs and the temporary cluster to which the other core objects belong is determined to be connected;

[0019] If not, then the connection between the temporary cluster to which the core object belongs and the temporary clusters to which the other core objects belong is determined to be unconnected.

[0020] Optionally, the step of merging connected temporary clusters based on the connectivity relationships returned by the two cloud servers to obtain clustering results includes:

[0021] Based on the connection relationship reported by the two cloud servers, construct an adjacency matrix;

[0022] Based on the adjacency matrix, and using a depth-first traversal algorithm, connected temporary clusters are merged to obtain the clustering result.

[0023] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described privacy-preserving density clustering method when executing the program.

[0024] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described privacy-preserving density clustering method.

[0025] The beneficial effects of this invention are that multiple encrypted data are sent to two cloud servers, each cloud server determines each received encrypted data as a core object or a boundary object, and based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster. The connection relationship between each temporary cluster and other temporary clusters is determined and fed back. According to the connection relationship fed back by the two cloud servers, the connected temporary clusters are merged to obtain the clustering result, which effectively improves privacy and security, and also improves clustering efficiency and clustering quality. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figures 1a to 1c This is a schematic diagram illustrating the clustering effect of the DBSCAN clustering algorithm in the existing technology.

[0028] Figure 2 This is a flowchart illustrating the privacy-preserving clustering method provided in an embodiment of this application.

[0029] Figures 3a to 3e This is a schematic diagram of a scenario for the privacy-preserving clustering method provided in the embodiments of this application.

[0030] Figure 4a and Figure 4b This is a schematic diagram of another scenario for the privacy-preserving clustering method provided in the embodiments of this application.

[0031] Figure 5 This is a schematic diagram of the adjacency matrix in the privacy-preserving clustering method provided in the embodiments of this application.

[0032] Figure 6 This is a schematic diagram illustrating the clustering effect of the privacy-preserving clustering method provided in the embodiments of this application.

[0033] Figure 7 This is a schematic diagram of the privacy-preserving clustering system provided in an embodiment of this application.

[0034] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0035] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0036] DBSCAN is a density-based clustering algorithm that groups data points that cluster together in dense regions into the same cluster, while data in sparse regions is labeled as noise. The algorithm requires two important parameters: ε, also known as eps, which determines the maximum distance between two points to be considered adjacent; and minPts, which determines the minimum number of points in the neighborhood required to form a cluster.

[0037] DBSCAN constructs a circle around each data point with radius ∈, dividing the data points into core points, boundary points, and noise points. A point is considered a noise point if its circle contains no points. A data point is considered a core point if its circle contains at least minPts points; otherwise, it is a boundary point. Expanding on these definitions, DBSCAN also includes the following concepts:

[0038] Suppose the sample set is D = (x1, x2, ..., x...). m ):

[0039] (1) Density direct access: If x i Located at x j Within the -neighborhood of x, and x j If it is the core object, then it is called x. i By x j Density directly applies, but the reverse is not necessarily true.

[0040] (2) Density is attainable: for x i and x j If there exists a sample sequence p1, p2, ..., p t Satisfying p1 = x i ,p T =x j , and p t+1 By p t If the density is directly reached, then it is called x. j By x i Density can be achieved.

[0041] (3) Density connection: For x i and x j If a core point x exists k , making x i and x j All are composed of x k If the density is achievable, then x is called x.i and x j Density connected.

[0042] The following details the process of the DBSCAN clustering algorithm:

[0043] 1. Initialize the core point set Initialize the number of clusters k = 0, initialize the set of unvisited points Γ = D, and perform cluster partitioning.

[0044] 2. Traverse all points i = 1, 2, ..., m, and find all core points as follows:

[0045] (a) Calculate the distance and find the sample x i The set of all points N in the ∈-neighborhood ∈ (x i );

[0046] (b) If the set contains the number of data points that satisfies |N ∈ (xi)|≥minPts, x i Add the core set: Ω=Ω∪{x j}

[0047] 3. If The algorithm ends if the condition is met; otherwise, proceed to step 4.

[0048] 4. In Ω, randomly select a core point o and initialize the current cluster containing the core point set Ω. c ={o}, cluster index k = k + 1, the current cluster contains the set of points C. k ={o}, update the unvisited sample set Γ = Γ - {o}.

[0049] 5. If Then cluster C k After clustering is complete, update the cluster set C = {C1, C2, ..., C}. k}, update the core point set Ω = Ω - C k .

[0050] 6. From Ω cur Take a core point o′ from the data, and find all ∈-neighborhood subsets N by using the neighborhood distance ∈. ∈ (o′), let Δ=N ∈ (o′)∩Γ, update the current cluster containment point set C. k =C k ∪Δ, update the set of unvisited points Γ=Γ-Δ, update Ω cur =Ω cur ∪(Δ∩Ω)-o′, proceed to step 5.

[0051] 7. The output result is: Cluster partition C = {C1, C2, ..., C} k}

[0052] DBSCAN can be applied to datasets of any dimension. The worst-case time complexity of the plaintext algorithm is O(n^2). 2 ), where n is the number of data points. After setting ∈ and minPts, there is no need to specify the value of k. Running the algorithm will automatically divide the data into clusters. Noise points have little impact on the clustering results and will not be assigned to any cluster in the end.

[0053] However, the algorithm's partitioning results are unstable when detecting boundary data points of adjacent clusters. If core points x1 and x2 belong to different clusters C1 and C2 respectively, and both of their neighborhoods contain boundary point x3, then according to the DBSCAN partitioning standard, x3 can be partitioned into either C1 or C2. The partitioning result mainly depends on the order in which x3 is processed during the algorithm's execution.

[0054] The following is a specific example. Suppose that a two-dimensional dataset contains two clusters, each containing about 250 data points, and some data points in the middle of the spherical cluster are adjacent to each other. Figure 1a To test the correct partitioning results of the dataset, Figure 1b As a result of the first run of plaintext DBSCAN, some data in set 2 was reassigned to set 1. Figure 1c After shuffling the data order in the dataset, running plaintext DBSCAN results show that the partitioning has changed, with some data from the right set being moved to the left cluster. Figure 1b and Figure 1c The data partitioning in the middle produces a certain degree of error.

[0055] Based on this, embodiments of the present invention provide a privacy-preserving clustering method based on DBSCAN, which can be applied to the user end.

[0056] like Figure 2 As shown, the method includes steps 101 to 102, as detailed below:

[0057] Step 101: Send multiple encrypted data to two cloud servers, so that each cloud server determines the object type of each encrypted data received. The object type includes core objects or boundary objects. Based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster. Each target boundary object belongs to only one temporary cluster. The connection relationship between each temporary cluster and other temporary clusters is determined and the connection relationship is fed back.

[0058] The user end is an organization that holds all the plaintext data. This user end can be a single organization or different organizations each holding non-shared data (i.e., encrypted data). For example, user ends could be different medical institutions that want to collaborate on clustering medical diagnosis or symptom information for data mining and analysis without disclosing patient information. The user end simply sends the secretly shared (encrypted) data to two cloud servers. The cloud servers receive the encrypted data from the user end, execute a series of security protocols, and finally distribute the results.

[0059] Specifically, the data holder (i.e., the user) first uses additive secret sharing to divide the data into two parts and sends them to two separate cloud servers. This additive secret sharing method allows any number of data holders to contribute clustering data to the system. Furthermore, this application supports any data partitioning method, such as horizontal partitioning, vertical partitioning, and hybrid partitioning. Horizontal partitioning refers to different user clients holding complete but distinct data; vertical partitioning refers to different user clients holding different parameters of the same data record; and hybrid partitioning is a combination of the two methods mentioned above.

[0060] The cloud server determines each received encrypted data item as either a core object or a boundary object.

[0061] The cloud server initializes based on the acquired secret shared data (i.e., ciphertext data). For each ciphertext data, a sharedElem object is constructed. sharedElem includes: cluId, where cluId∈[1,n] is the initial cluster center, and its value is determined by the data's order in the array; for example, the cluId of the first ciphertext data is 1, and the cluId of the last ciphertext data is n; isMark, isMark∈[0,1] indicates whether the ciphertext data has been assigned to a cluster, 0 indicating no cluster assignment and 1 indicating assignment; data, which stores the secret shared value corresponding to the ciphertext data, and is a vector of size m; isCore, isCore∈[0,1] identifies whether the ciphertext data is a core object, mainly used for calculation during clustering. Specifically, the algorithm for the sharedElem data structure is as follows:

[0062]

[0063] After constructing the `sharedElem` objects, we obtain a `sharedList` array of length `n`. During the initialization phase, it is necessary to calculate the distance between objects and determine whether each object is a core object.

[0064] Specifically, the object type of the encrypted data also includes noise objects, and the object type of the encrypted data is determined as follows:

[0065] Detect the number of other ciphertext data contained within the neighborhood of each ciphertext data;

[0066] If the number reaches a preset threshold, the encrypted data will be used as the core object.

[0067] If the number of objects does not reach the preset threshold and there is a core object within the neighborhood, then the encrypted data is used as the boundary object.

[0068] Otherwise, the encrypted data is treated as noise.

[0069] The neighborhood of the ciphertext data refers to the range centered on the ciphertext data with radius ∈. The preset threshold is minPts.

[0070] First, an array `cnt` is constructed to store the number of other elements within the neighborhood of each element (i.e., the ciphertext data). Then, the Euclidean distance between elements is calculated using DIST, removing the square root for easier calculation. The distances `d[j],j∈[n]` of the `i`-th element to all other elements are securely compared with `∈` to determine if they are adjacent (i.e., connected). The results are stored in a two-dimensional array `u[i][j],i,j∈[n]`. Finally, the value of `u[i]` is accumulated, and the number of elements within the neighborhood of element `i` is counted and stored in `cnt`. Finally, the size relationship between the `cnt` array storing the number of neighborhood elements and an array of length `n` containing the value `minPts` is compared in parallel, and the `isCore` property of `sharedList` is updated. The specific process is as follows:

[0071]

[0072] It should be noted that the ∈ value here is different from that in the plaintext DBSCAN algorithm. The square root is discarded when calculating the Euclidean distance, so the ∈ value is the square of the original value. For the sake of simplicity, detailed explanation is omitted here.

[0073] The cloud server uses the privacy-preserving DBSCAN algorithm to form a temporary cluster for each core object and its neighboring target boundary objects, with each target boundary object belonging to only one temporary cluster; it then determines the connection relationship between each temporary cluster and other temporary clusters and sends the connection relationship to the user terminal.

[0074] It should be noted that each core object corresponds to a temporary cluster, and each boundary object resides in a temporary cluster.

[0075] In some embodiments, the temporary cluster is composed as follows:

[0076] Each core object is traversed one by one to determine the boundary objects within the neighborhood of each core object;

[0077] The unmarked boundary objects within the neighborhood of the core object are taken as target boundary objects within the neighborhood of the core object, and the target boundary objects are marked.

[0078] The core object and the target boundary objects within its neighborhood are grouped into a temporary cluster.

[0079] Furthermore, the connection relationship is determined in the following manner:

[0080] Determine whether there are other core objects within the neighborhood of each core object;

[0081] If so, then the connection between the temporary cluster to which the core object belongs and the temporary cluster to which the other core objects belong is determined to be connected;

[0082] If not, then the connection between the temporary cluster to which the core object belongs and the temporary clusters to which the other core objects belong is determined to be unconnected.

[0083] During the traversal, the connectivity between temporary clusters is recorded. Simultaneously, the core object modifies the cluId of all unmarked boundary objects within its neighborhood to match its own. The connectivity information is stored in the info data structure, where id1 and id2 record the cluId information in sharedElem, and isConn records the connectivity between temporary clusters, with a value of 0 or 1. The specific algorithm is as follows:

[0084]

[0085] During initialization, each element (i.e., ciphertext data) is initialized with an index {1, 2, ..., n}. During clustering, for core objects, the cluIds of all unlabeled boundary objects within their neighborhood are modified, and the state of those boundary objects is changed to labeled. For all boundary objects, the attributes of other points cannot be modified, and once labeled, they cannot be labeled by other core objects; noise remains unaffected. After this process, the dataset is divided into several temporary clusters, with all data objects within the same temporary cluster having the same cluId.

[0086] To simplify the explanation, the input array is abbreviated as x, and the results of the concatenation are recorded in a plist array as the output, with each element having an info type structure. The specific algorithm is as follows:

[0087]

[0088] Throughout the algorithm's execution, various operations are used to implement logical AND and logical OR operations, and auxiliary flags are calculated to control whether content is modified. First, flag m1 is obtained to assist subsequent calculations. If x[i] is a core object and x[j] is a non-core object and they are adjacent (i.e., connected), then m1 is 1; otherwise, it is 0. If x[j] is not marked when m1 is 1, then m2 is 1. Here, m2 is used to control whether x[j]'s cluId is modified. If the condition is not met, x[j]'s cluId remains unchanged; otherwise, it is modified to match x[i]'s cluId. conn reflects whether x[i] and x[j] are connected. If both x[i] and x[j] are core objects and u ij If `conn` is 1, then `conn` equals 1; otherwise, it's 0. Then, new `info` type data is added to the `plist`. It's worth noting that new `info` information is recorded regardless of whether the data is adjacent, so the final length of the `plist` is `n(n-1)`. Finally, the `isMark` flag of `x[j]` is updated. If `x[j]` has already been partitioned (`isMark=1`) or was partitioned during this iteration (`m1=1`), then the `isMark` flag of `x[j]` is 1; otherwise, it's 0. The calculation method in the algorithm reflects a logical OR relationship.

[0089] This embodiment introduces the concept of temporary clusters based on the DBSCAN algorithm. A core object and its unmarked boundary objects within its range form an independent temporary cluster, with all data objects within the temporary cluster maintaining the same cluster identifier. During traversal, for a core object, the cluster identifiers of its unmarked boundary objects within its range are modified to match those of the current core object. For other core objects within the range of the core object, their adjacency relationships (i.e., connection relationships) are recorded.

[0090] Suppose we have a dataset {p1,...,p10} containing 10 data objects. Let minPts be 2. Circle the neighborhood of all data objects. The dataset visualization is as follows: Figure 3a As shown, the dataset {p1,...,p10} is numbered {1,2,...,10}, where dashed boxes represent boundary objects ∈ neighborhoods, and solid boxes represent core objects ∈ neighborhoods. Noise points are not processed during clustering; for simplicity, the example dataset has no noise points.

[0091] Then, the data is traversed according to the numbers {1,2,...,10}, with the initial cluster identifier for each data object being its index in the diagram. First, p1 is processed. Within its range ∈, there are boundary objects p6 and p4, and a core object p2. For the boundary objects, their numbers are modified to match those of p1; for the core objects, their adjacency relationships are recorded; objects outside the range ∈ (e.g., p3 and p9) are left unprocessed. After traversing all data objects in p1, the result is as follows: Figure 3b As shown.

[0092] The processing of other core objects (p2, p3, p8) is the same as that of p1 (see details). Figure 3c , Figure 3d and Figure 3e As you can see, the cluIds of already processed core and boundary objects are not affected; only adjacency relationships are recorded between core objects. When processing core object p8, there are no other core objects within its range, so no adjacency relationships are recorded.

[0093] The clustering process in this embodiment has a complexity of O(n^2). 2 Furthermore, it does not result in any loss of accuracy or leakage of any encrypted information, making it more secure and efficient.

[0094] The above processing stabilizes the boundary object partitioning results, ensuring consistency with the temporary cluster to which the nearest core object belongs. Simultaneously, it reduces the computational complexity of the clustering algorithm, eliminating the need to process the cluster identifiers of boundary objects; simply recording adjacency relationships allows for final reconstruction.

[0095] Step 102: Based on the connection relationship reported by the two cloud servers, merge the connected temporary clusters to obtain the clustering result.

[0096] The connection relationship includes being connected or not connected. The step of merging the connected temporary clusters based on the connection relationships returned by the two cloud servers to obtain the clustering result includes:

[0097] The temporary clusters that are connected according to the connection relationship returned by the two cloud servers are merged to obtain the clustering result.

[0098] Specifically, merging the temporary clusters where the two cloud servers report a connection relationship to obtain the clustering result includes:

[0099] Based on the connection relationship reported by the two cloud servers, construct an adjacency matrix;

[0100] Based on the adjacency matrix, and using a depth-first traversal algorithm, temporary clusters that are connected are merged to obtain the clustering result.

[0101] After clustering by the cloud servers, the connectivity of all temporary clusters is recorded in a plist. Multiple cloud servers each send their respective shares to the user client. After restoring the results on the user client, the restoration algorithm is run locally to obtain the final clustering result. The algorithm for restoring the results is as follows:

[0102]

[0103]

[0104] The depth-first traversal algorithm is as follows:

[0105]

[0106] First, construct an n×n zero-adjacency matrix to store connectivity relationships. Reconstruct the association information based on the plist information; if adjacent elements are found, the corresponding value in the adjacency matrix will be greater than 0. Then, initialize a `visited` array to mark whether each data element has been assigned to its final cluster. If it has, processing stops. Here, `mark` represents the final cluster number, incrementing from 1. Next, begin iterating. If element `i` has been assigned, exit the current loop and start the next iteration. If not, update `mark` by 1 and begin constructing a new cluster, performing a depth-first search (DFS) starting from element `i` to find all elements connected to `i` and add them to the new cluster. During DFS, recursively record the mapping relationship and merge connected clusters. Finally, update the final cluster number `resCId` of all elements according to the `resmap` mapping relationship. This step ensures that the `cluId` of data objects in all temporary clusters belonging to the same cluster is consistent.

[0107] The purpose of applying the depth-first search algorithm here is to merge adjacent temporary clusters into a single entity, thereby obtaining the final clustering result. During the traversal, if a cluster is found to be connected, a mapping relationship is established between the data's cluId and the final result's mark.

[0108] The above process is run independently by the user, and the algorithm's maximum complexity is O(n^2). 2 However, the complexity of the depth-first traversal algorithm can be reduced to O(n) through some improvement methods, and the overhead of executing the above algorithm is small for the user.

[0109] For example, based on the dataset {p1,...,p10} above, construct an adjacency matrix, such as... Figure 5 As shown in the diagram, only the core objects have adjacency relationships (the darker areas). Based on this adjacency matrix, a depth-first traversal algorithm can be used to merge temporary clusters. After merging, the final clustering result is obtained, as shown in the diagram. Figure 6 As shown, the dataset contains two clusters, namely cluster 1 and cluster 2.

[0110] The complexity of this embodiment is O(n^2). 2 This is consistent with the plaintext scheme. By restricting temporary clusters to contain only undivided boundary objects, the problem of boundary objects being repeatedly partitioned into different temporary clusters is avoided.

[0111] It should be noted that the plaintext DBSCAN algorithm randomly selects an undivided core object, continuously finds other density-reachable core objects, and incorporates all adjacent boundary objects into the current cluster set until no new core objects can be added. If the ciphertext scheme is designed directly using this approach, the complexity would reach O(n!), resulting in excessive computational overhead and making it unsuitable for practical applications. Therefore, this application introduces the concept of temporary clusters, reducing the iteration depth to two times, significantly lowering the complexity of the ciphertext scheme. Recording association relationships essentially records the density reachability relationships between core objects; density-unreachable core objects and boundary objects have a value of 0 in the adjacency matrix. Finally, the user terminal runs a depth-first traversal algorithm on the plaintext based on the association relationships to merge adjacent temporary clusters to obtain the final clustering result. Independent user terminals holding their own data are unaware of each other's plaintext data, only knowing the cluster division, thus achieving the goal of protecting data security.

[0112] In summary, the embodiments of this application send multiple encrypted data to two cloud servers. Each cloud server determines each received encrypted data as a core object or a boundary object. Based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster. The connection relationship between each temporary cluster and other temporary clusters is determined and fed back. According to the connection relationship fed back by the two cloud servers, the connected temporary clusters are merged to obtain the clustering result, which effectively improves privacy and security, and also improves clustering efficiency and clustering quality.

[0113] Accordingly, this application also provides a DBSCAN-based privacy-preserving clustering system, which can implement the DBSCAN-based privacy-preserving clustering method in the above embodiments.

[0114] like Figure 7 As shown, the privacy-preserving clustering system based on DBSCAN provided in this application embodiment includes a user terminal 100 and two cloud servers 200.

[0115] The user terminal 100 is used to send multiple encrypted data to the two cloud servers;

[0116] The cloud server 200 is used to determine whether each received encrypted data is a core object or a boundary object; based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster, and each target boundary object belongs to only one temporary cluster; the connection relationship between each temporary cluster and other temporary clusters is determined, and the connection relationship is sent to the user terminal;

[0117] The user terminal 100 is also used to merge the connected temporary clusters according to the connection relationship sent by the multiple cloud servers to obtain a clustering result.

[0118] The system may include multiple user terminals 100 and two cloud servers 200. After receiving the encrypted data sent by the user terminals 100, the cloud servers 200 execute a series of security protocols and finally distribute the results (i.e., the association relationships). User terminals 100 can be a single organization holding all the plaintext data, or they can be different organizations holding different, non-shared data. For example, user terminals 100 could be different medical institutions that want to collaborate on clustering medical diagnosis or symptom information for data mining and analysis without disclosing patient information. User terminals 100 can secretly share the data and send it to the two cloud servers 200. After obtaining the association relationships, each user terminal 100 executes a simple algorithm to reconstruct the clustering results.

[0119] Optionally, the cloud server 200 is further configured to traverse each core object one by one, determine the boundary objects within the neighborhood of the core object; take the unmarked boundary objects within the neighborhood of the core object as target boundary objects within the neighborhood of the core object, and mark the target boundary objects; and form a temporary cluster by combining the core object and the target boundary objects within its neighborhood.

[0120] Optionally, the cloud server 200 is further configured to detect the number of other encrypted data contained in the neighborhood of each encrypted data; if the number reaches a preset threshold, the encrypted data is regarded as the core object; if the number does not reach the preset threshold and there is a core object in the neighborhood, the encrypted data is regarded as the boundary object; otherwise, the encrypted data is regarded as a noise object.

[0121] Optionally, the cloud server 200 is further configured to determine whether there are other core objects within the neighborhood of each core object; if so, the connection between the temporary cluster to which the core object belongs and the temporary cluster to which the other core objects belong is determined to be connected; if not, the connection between the temporary cluster to which the core object belongs and the temporary cluster to which the other core objects belong is determined to be unconnected.

[0122] Optionally, the user terminal 100 is further configured to construct an adjacency matrix based on the connection relationship sent by the two cloud servers; and based on the adjacency matrix, merge the connected temporary clusters using a depth-first traversal algorithm to obtain the clustering result.

[0123] In summary, the embodiments of this application send multiple encrypted data to two cloud servers through the user terminal. Each cloud server determines each received encrypted data as a core object or a boundary object. Based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster. The connection relationship between each temporary cluster and other temporary clusters is determined and sent to the user terminal. The user terminal merges the connected temporary clusters according to the connection relationship sent by multiple cloud servers to obtain the clustering result, which effectively improves privacy and security, as well as clustering efficiency and quality.

[0124] This invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in any of the privacy-preserving density clustering methods provided in this invention.

[0125] Figure 8 This embodiment illustrates a specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0126] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0127] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0128] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0129] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0130] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0131] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0132] This invention provides a non-transitory computer-readable storage medium storing multiple instructions that can be loaded by a processor to execute steps in any of the privacy-preserving density clustering methods provided in this invention.

[0133] The non-transitory computer-readable medium of this embodiment includes both permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0134] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in the details for the sake of brevity.

[0135] Additionally, to simplify the description and discussion, and to avoid obscuring the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) are set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the invention may be practiced without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0136] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0137] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A privacy-preserving density clustering method, characterized in that, include: Multiple encrypted data are sent to two cloud servers, each of which determines the object type of each received encrypted data. The object type includes core objects or boundary objects. Based on the privacy-preserving DBSCAN algorithm, each core object and its neighboring target boundary objects are grouped into a temporary cluster. Each target boundary object belongs to only one temporary cluster. The temporary clusters are grouped as follows: Each core object is traversed one by one to determine the boundary objects within the neighborhood of each core object; The unmarked boundary objects within the neighborhood of the core object are taken as target boundary objects within the neighborhood of the core object, and the target boundary objects are marked. The core object and the target boundary objects within its neighborhood are grouped into a temporary cluster; Determine the connection relationship between each temporary cluster and other temporary clusters, and feed back the connection relationship; Based on the connectivity relationships reported by the two cloud servers, the connected temporary clusters are merged to obtain clustering results, including: Based on the connection relationship reported by the two cloud servers, construct an adjacency matrix; Based on the adjacency matrix, and using a depth-first traversal algorithm, connected temporary clusters are merged to obtain the clustering result.

2. The privacy-preserving density clustering method as described in claim 1, characterized in that, The object type also includes noise objects, and the object type of the ciphertext data is determined as follows: Detect the number of other ciphertext data contained within the neighborhood of each ciphertext data; If the number reaches a preset threshold, the encrypted data will be used as the core object. If the number of objects does not reach the preset threshold and there is a core object within the neighborhood, then the encrypted data is used as the boundary object. Otherwise, the encrypted data is treated as noise.

3. The privacy-preserving density clustering method as described in claim 1, characterized in that, The connection relationship is determined in the following manner: Determine whether there are other core objects within the neighborhood of each core object; If so, then the connection between the temporary cluster to which the core object belongs and the temporary cluster to which the other core objects belong is determined to be connected; If not, then the connection between the temporary cluster to which the core object belongs and the temporary clusters to which the other core objects belong is determined to be unconnected.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the privacy-preserving density clustering method as described in any one of claims 1-3.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the privacy-preserving density clustering method as described in any one of claims 1-3.