High-availability K-mode clustering privacy protection method based on personalized differential privacy

By introducing a highly available method of personalized differential privacy in K-modes clustering, considering attribute weights and data point density, eliminating outliers, and injecting noise using a personalized geometric mechanism, the clustering result quality and the existing technology are solved. The issue of privacy protection achieves more efficient clustering results availability and privacy protection.

CN119128959APending Publication Date: 2024-12-13HUNAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411024634.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing K-modes clustering algorithm based on differential privacy failed to effectively consider the attribute weight difference when processing high-dimensional data, resulting in a decrease in the quality of clustering results and the impact of outliers is not fully considered. Excessive noise affects the accuracy of clustering results. .

Method used

Adopt a highly available K-modes clustering privacy protection method based on personalized differential privacy, measure attribute weights by dividing entropy, calculate outliers of data point density, and inject noise using a personalized differential privacy geometry mechanism during the iteration process, and update the centroid .

Benefits of technology

It improves the accuracy and effectiveness of clustering results, ensures privacy protection during the clustering process, and improves the availability of clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128959A_ABST
    Figure CN119128959A_ABST
Patent Text Reader

Abstract

The invention discloses a high-availability K-mode clustering privacy protection method based on personalized differential privacy. The method comprises the steps that S1, a user uploads user data to a server side at a local side; s2, the server side receives the user data, and according to the difference of different attributes of the user data, attribute weights are measured through division entropy; s3, the server side calculates the density of each user data point according to the attribute weighted distance; s4, the server side calculates the distance between each user data point and the mass center according to the attribute weighting distance, and an initial cluster is obtained; s5, the server side updates the centroid by calculating the attribute value frequency, and disturbs the calculation result by adopting a personalized differential privacy geometric mechanism; and S6, the service request end requests a clustering result from the server end according to the self request. The method has the advantages of being simple in principle, easy to implement, wide in application range, capable of improving clustering precision and effectiveness and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of cluster analysis of big data, and in particular to a highly available K-modes clustering privacy protection method based on personalized differential privacy. Background Art

[0002] Cluster analysis plays a vital role in data mining. It can effectively mine valuable information from big data. K-modes clustering method is a classic algorithm in categorical data mining. It divides data into different clusters to form features with high similarity within clusters and low similarity between clusters, thereby realizing efficient mining of hidden value of data.

[0003] At present, the K-modes algorithm has been widely used in fields such as activity prediction, service recommendation, and behavior analysis. However, the K-modes clustering process often involves some sensitive information of users, including geographic location, identity information, and health data, which may cause the leakage of sensitive information of users during the clustering process. Specifically, an attacker can infer the personal sensitive information of a specific user by comparing and analyzing the differences between each user and the user at the center of the cluster during the clustering iteration process. At the same time, the attacker can also use the background knowledge of the user at the center of the cluster to infer specific clustering results and data distribution, thereby leaking user privacy. Therefore, in the clustering process, it is crucial to adopt effective privacy protection methods to ensure the privacy security of users.

[0004] In the existing technology, some practitioners have proposed differential privacy technology, which provides strong privacy protection for the K-modes clustering process by adding data noise. Differential privacy, as a privacy protection technology with strict mathematical definitions, has significant advantages over traditional privacy protection technologies. Differential privacy technology can quantify the degree of privacy protection of users, mainly by adding carefully calibrated noise or randomness before the data or query results are released to achieve privacy. This noise ensures the protection of individual data points, making it difficult for attackers to determine whether a specific single data point is contained in the data set, and the addition or deletion of any record will not affect the query results. Therefore, in clustering data privacy protection, differential privacy provides a strong privacy guarantee for the clustering process with its strong privacy protection capabilities.

[0005] At present, some scholars have proposed clustering privacy protection methods that meet the requirements of differential privacy. For example, a practitioner Nguyen first proposed the differential privacy-based K-modes clustering (DP-Modes-Lloyd) algorithm. The algorithm randomly selects the initial center and injects noise into the frequency of the attribute value during the iteration process to achieve privacy protection. However, the interference of noise on the centroid reduces the accuracy of the clustering results. To this end, Nguyen further proposed a frequency-based and sparse vector-based differential privacy K-modes algorithm to improve the quality of clustering results by optimizing the privacy budget allocation during the initialization process. At the same time, other practitioners Li et al. also considered the interference of noise on the center point. In the process of applying differential privacy noise to K-modes, the data set was evenly divided into K subsets, and then noise was added to it. The centroid of each subset after noise was calculated and used as the initial centroid to reduce the impact of noise on the clustering results. Although the current differential privacy K-modes algorithm has made some progress in privacy protection, these algorithms still face some challenges in ensuring the availability of clustering results.

[0006] The existing K-modes algorithm based on differential privacy still has some technical deficiencies: (1) There are deficiencies in processing high-dimensional data. The differences in attribute weights are not effectively considered, which may cause some attributes to dominate the clustering process, thereby reducing the quality of the clustering results.

[0007] (2) The impact of outliers on differential privacy clustering results is not fully considered, which causes the clustering results to deviate from the actual data distribution and affects the accuracy of the clustering results.

[0008] (3) Excessive noise introduced during the clustering process will cause centroid shift, significantly affecting the quality of the clustering results. Summary of the invention

[0009] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, the present invention provides a highly available K-modes clustering privacy protection method based on personalized differential privacy, which has a simple principle, is easy to implement, has a wide range of applications, and can improve clustering accuracy and effectiveness.

[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is: A highly available K-modes clustering privacy protection method based on personalized differential privacy, comprising: Step S1: The user uploads the user data to the server at the local end; Step S2: The server receives the user data and uses partition entropy to measure the attribute weight according to the differences of different attributes of the user data; Step S3: The server calculates the density of each user data point based on the attribute weighted distance; Step S4: The server calculates the distance between each user data point and the centroid according to the attribute weighted distance, and then divides it into the cluster with the closest distance, thereby obtaining the initial cluster; Step S5: The server updates the centroid by calculating the attribute value frequency and perturbs its calculation result using a personalized differential privacy geometry mechanism; Step S6: The service request end requests the clustering result from the server end according to its own request, and performs data query and analysis.

[0011] As a further improvement of the method of the present invention: the process of step S2 includes: Step S201: Given a user data set , attribute set , for any subset , dataset Equivalence relation Divide into , , The partition entropy is expressed as:

[0012] in, Represents any data point In the equivalence class The probability of , Represents the number of equivalence classes divided; Step S202: For any attribute ,use To express the importance of attributes based on partition entropy, it is expressed as follows:

[0013] Step S203: Use To measure the importance of attributes, list the attributes The weight formula is as follows:

[0014] in Representative Set The base number, Representative attributes The number of attributes The attribute of is given greater weight, and we get:

[0015] Step S204: According to the measurement method of the normalized attribute weight, the distance calculation function between data points based on the attribute weight is defined as follows:

[0016]

[0017] As a further improvement of the method of the present invention: the process of step S3 includes: Step S301: Calculate density:

[0018] Step S302: sorting by density value, selecting the top 85% of data points with larger density values, and removing the others as outliers; Step S303: Randomly select a user data set according to the attribute set Data points as the initial centroid.

[0019] As a further improvement of the method of the present invention: the process of step S5 includes: Step S501: performing a sampling operation on the attribute value; Step S502: setting a smaller sampling probability; Step S503: querying and disturbing the sampled attribute value data set; Step S504: After calculating the frequency of the attribute value after the disturbance, select the attribute with the largest attribute value frequency to update the centroid, and finally complete the clustering.

[0020] As a further improvement of the method of the present invention: in step S501, the recording sensitivity of the attribute value is first calculated, and the recording sensitivity The calculation formula is as follows:

[0021] in, Indicates that the dataset contains attribute values , Indicates that it does not contain an attribute value , represents an arbitrary query function; then the corresponding sampling probability of each attribute value is calculated based on the record sensitivity.

[0022] As a further improvement of the method of the present invention: in step S502, a balance parameter is introduced to adjust the sampling probability The specific representation is as follows:

[0023] in, represents an equilibrium constant.

[0024] As a further improvement of the method of the present invention: in step S503, the summation function of the given attribute value frequency is , the summation function after disturbance is , then the specific formula for perturbation using personalized geometric mechanism is as follows: .

[0025] As a further improvement of the method of the present invention: the balance parameter is set to a recorded sensitivity value higher than 80% to obtain a clustering result.

[0026] As a further improvement of the method of the present invention: in the step S504, after calculating the frequency of the attribute value after the disturbance, the attribute with the largest attribute value frequency is selected to update the centroid, and then steps S4 and S5 are executed in a loop. If the maximum number of iterations is reached or the centroids are the same during two iterations, the iteration is stopped and clustering is completed.

[0027] Compared with the prior art, the advantages of the present invention are: 1. The high-availability K-modes clustering privacy protection method based on personalized differential privacy of the present invention has a simple principle, is easy to implement, has a wide range of applications, and can improve clustering accuracy and effectiveness. The method of the present invention is an efficient K-modes clustering privacy protection method (High Availability K-modes Clustering, HAKC) based on personalized differential privacy, which improves the availability of privacy-preserving clustering results while ensuring the privacy of user data in the clustering process.

[0028] 2. The highly available K-modes clustering privacy protection method based on personalized differential privacy of the present invention introduces partition entropy to measure attribute weights according to the differences between different attributes, and removes outliers from user data according to the density of data points to reduce the impact of outliers and redundant attributes on clustering results, thereby improving the availability of clustering results.

[0029] 3. The highly available K-modes clustering privacy protection method based on personalized differential privacy of the present invention adopts personalized differential privacy geometry mechanism to inject noise in the iterative process, thus realizing the privacy protection of the K-modes clustering process. This method further improves the availability of clustering results on the basis of ensuring the privacy of the clustering process. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of the system model architecture of the present invention in a specific application example.

[0031] Figure 2It is a schematic diagram of the process of the method of the present invention in a specific application example.

[0032] Figure 3 It is a schematic diagram of the denoising process of the personalized sampling geometry mechanism in a specific application example of the method of the present invention.

[0033] Figure 4 Schematic diagram of comparison of F-meansure values ​​of different data sets in specific application examples of the method of the present invention; wherein a) is a Soybean data set; b) is a Breast Cancer data set; c) is a Chess data set; and d) is a Mushroom data set.

[0034] Figure 5 It is a schematic diagram of the algorithm of the personalized geometric mechanism K-modes clustering process of the method of the present invention in a specific application example. DETAILED DESCRIPTION

[0035] The present invention provides a high availability K-modes clustering privacy protection method (High Availability K-modes Clustering, HAKC) based on personalized differential privacy, which improves the availability of privacy protection clustering results under the premise of ensuring the privacy of user data in the clustering process. Firstly, the method of the present invention introduces partition entropy to measure attribute weights according to the differences of different attributes, and removes outliers from user data according to the density of data points to reduce the influence of outliers and redundant attributes on clustering results, so as to improve the availability of clustering results; secondly, the present invention adopts personalized differential privacy geometry mechanism to inject noise in the iterative process, thereby realizing the privacy protection of the K-modes clustering process and improving the availability of clustering results.

[0036] like Figure 1 FIG. 1 is a schematic diagram of a system model architecture of the present invention in a specific application example. The system on which the present invention is based includes: Local terminal: The terminal controlled by the user, which mainly stores the user's data and uploads the user data to the server; Server side: a platform for providing clustering operations, mainly completing clustering analysis tasks on user data; Data request side: mainly completes the task of data query and analysis, obtains clustering results from the server side for data analysis; Among them, the user uploads the user data locally to the server; the server performs K-modes clustering operation on the user data; the data requester obtains the clustering results through the server and performs data query and analysis.

[0037] In order to better explain the present invention, the technical terms involved in the present invention are defined and explained below: Differential privacy: For two given data sets and , the two data sets have only one record that is different. If the algorithm satisfy - Differential privacy, It’s an algorithm The set of all output values Any subset of , then:

[0038] Established, of which represents the privacy budget, when The smaller it is, the more noise is injected, which means that the data availability is reduced, but a higher level of privacy protection can be achieved.

[0039] Sensitivity: For any query function: ,in represents a dataset, Represents the return result of the query function. For any given adjacent data set and ,function The recording sensitivity can be defined as:

[0040] Laplace mechanism: For any given function: , then the mechanism satisfy:

[0041] Satisfies differential privacy. The Laplace mechanism is a common differential privacy noise mechanism. Ghost et al. further extended the Laplace mechanism and proposed a geometric mechanism, which is defined as follows:

[0042] in, , the noise injected by the geometric mechanism Generated by the bilateral geometric distribution.

[0043] Sequential Compositionality: Assuming the existence of Differential privacy algorithms, each of which satisfies - Differential privacy, - Differential Privacy, ..., - Differential privacy, The algorithm is applied to the dataset , then the algorithm satisfies -Differential privacy.

[0044] Parallel Combinability: Assuming a dataset exist Disjoint subsets , , ..., .also, , , ..., for satisfy , , , ..., Differential privacy algorithm. , , ..., satisfy -Differential privacy.

[0045] Partition entropy: It is a measure of the purity of a dataset during clustering or classification. Specifically, it reflects the degree of confusion among different categories or clusters in a dataset. In clustering algorithms, partition entropy is used to evaluate the distribution of data points in different clusters. A lower partition entropy indicates that the data points are more purely distributed in each cluster, that is, most data points are correctly assigned to their clusters. On the contrary, a higher partition entropy indicates that the data points are more chaotically distributed in different clusters, indicating that the clustering effect is poor.

[0046] like Figure 2 As shown, the highly available K-modes clustering privacy protection method based on personalized differential privacy of the present invention includes the following process: Step S1: The user uploads the user data to the server at the local end; Among them, user data Mainly includes Dimensional data type .

[0047] Step S2: The server receives the user data and uses partition entropy to measure the attribute weight according to the differences of different attributes of the user data; Step S3: The server calculates the density of each user data point based on the attribute weighted distance; Step S4: The server calculates the distance between each user data point and the centroid based on the attribute weighted distance, and then divides it into the cluster with the closest distance to obtain the initial cluster. ; Step S5: The server updates the centroid by calculating the attribute value frequency and perturbs the calculation result using a personalized differential privacy geometry mechanism to achieve the effect of privacy protection and improve the availability of clustering results. Step S6: The service request end requests the clustering result from the server end according to its own request, and performs data query and analysis.

[0048] In a specific application example, the process of step S2 includes: Given a user dataset , attribute set , for any subset , dataset Equivalence relation Divide into , , The partition entropy can be expressed as:

[0049] in, Represents any data point In the equivalence class The probability of , Represents the number of equivalence classes divided; For any attribute ,use To express the importance of attributes based on partition entropy, it can be expressed as follows:

[0050] Next, use To measure the importance of attributes, you can list the attributes The weight formula is as follows:

[0051] in Representative Set The base number, Representative attributes In order to distinguish the weights of different attributes, the entropy variable is further normalized and the attribute Giving greater weight to the attribute, we can get:

[0052] According to the measurement method of normalized attribute weights, the distance calculation function between data points based on attribute weights is further defined as follows:

[0053]

[0054] In a specific application example, in step S3, the density calculation formula is as follows:

[0055] Then sort by density value, select the top 85% of data points with larger density values, and remove the others as outliers. Then randomly select the user data set according to the attribute set. Data points as the initial centroid.

[0056] In a specific application example, the process of step S5 includes: Step S501: performing a sampling operation on the attribute value; First calculate the record sensitivity of the attribute value, record sensitivity The calculation formula is as follows:

[0057] in, Indicates that the dataset contains attribute values , Indicates that it does not contain an attribute value , Represents an arbitrary query function. Then the corresponding sampling probability of each attribute value is calculated according to the record sensitivity.

[0058] Step S502: setting a smaller sampling probability; Since there is a trade-off between sampling error and noise error, a balance parameter needs to be introduced for adjustment. Through analysis, it is found that whether certain specific attribute values ​​are sampled has a greater impact on the availability of clustering results. Therefore, for attribute values ​​with higher record sensitivity, a smaller sampling probability is set. In other words, associating the sampling probability with the sensitivity of the record inversely can effectively reduce the probability of noise error. In order to more accurately describe this relationship between record sensitivity and sampling probability, the sampling probability is given The specific representation is as follows:

[0059] in, represents an equilibrium constant.

[0060] Step S503: query and disturb the sampled attribute value data set.

[0061] The summation function for the frequency of a given attribute value is , the summation function after disturbance is , then the specific formula for perturbation using personalized geometric mechanism is as follows:

[0062] In the personalized sampling geometry mechanism, the difference is measured by recording the sensitivity instead of using the concept of sensitivity directly. Set as a placeholder for sensitivity. The selection of the balance parameter is done through a specific formula, but since the values ​​of the balance parameters come from different databases, it takes a lot of time to calculate the optimal balance parameter value. Therefore, through experimental analysis, it is found that setting the balance parameter to a recorded sensitivity value higher than 80% can obtain better clustering results. The specific perturbation operation is as follows Figure 3 shown.

[0063] Step S504: After calculating the frequency of the attribute value after the disturbance, select the attribute with the largest attribute value frequency to update the centroid, and then repeat steps S4 and S5. If the maximum number of iterations is reached or the centroids in two iterations are the same, the iteration is stopped and clustering is completed. The specific clustering process is as follows: Figure 5 As shown in Algorithm 1.

[0064] In a specific application example, the principle of privacy analysis in the method of the present invention is as follows: Lemma 1: This method satisfies the definition of differential privacy.

[0065] Proof: Assume that there is only one data point with different records and ,in , , Indicates the number of attribute values. is the original frequency statistics function, To inject noise into the output function. is the set of all possible output results, take any output as .

[0066] First, calculate the output probability: (1)

[0067] It can be seen that the noise probability distribution function just obeys Distribution, then we have: (2) (3) By comparing formula (2) and formula (3), we can get: (4)

[0068]

[0069] According to the basic mathematical inequality: (5) In an iteration process , substituting into formula (5) we can get: (6)

[0070] Since the data attribute values ​​are different, adding or deleting a single attribute value will change its frequency statistics by at most 1. The global sensitivity of the function is , substituting it into formula (6) we get: (7) From this we can see that according to the definition of differential privacy, the algorithm satisfies - Differential privacy requirements. At the same time, the size of the privacy budget obtained for each attribute value in each clustering iteration depends on the dataset The property set Size and number of iterations , so according to the sequence combination theorem of differential privacy, it is shown that this method satisfies -Differential privacy.

[0071] Lemma 2: The personalized geometry mechanism satisfies -Differential privacy.

[0072] Proof: Assume that any two adjacent data sets and ,in Indicates that the data set does not contain data points , Indicates that the data point contains the data point , Represents the sampling operation on the data set. Represents any query function that satisfies the personalized sampling geometry mechanism Any possible output of this function is , so we can get: (8) Due to the introduction of sampling operation, Written as: (9) Sampling a dataset based on whether it contains a data point It is divided into two categories, so we can get: (10) From the proof of Theorem 1, we can conclude that: (11) Then, combining formula (10) and formula (11), we can get:

[0073]

[0074]

[0075]

[0076]

[0077] (12) For the case where the recording sensitivity is greater than the balance parameter , , we can get: (13) For the case where the recording sensitivity is less than the equilibrium parameter , , we can get: (14) Therefore, based on the above analysis, we can conclude that: .

[0078] Experimental results analysis: The experiment used 4 data sets selected from the UCI machine learning library, as shown in Table 1. The present invention selects the categorical attributes in each data set and deletes invalid records therein. For data columns with missing values, the present invention replaces them with the average value of the attribute column.

[0079] Table 1 Dataset description

[0080] Soybean: This dataset consists of 47 soybean disease cases from four populations, each case is characterized by 35 multi-valued categorical variables, and each population represents a soybean disease.

[0081] Breast Cancer: This dataset contains 699 records and each record contains 9 attributes. This dataset has missing values ​​in attribute 6.

[0082] Chess: This dataset contains 3196 instances, each of which uses 36 features to describe a chess endgame board, divided into two categories: loss and win.

[0083] Mushroom: This dataset contains 8124 records and consists of 22 categorical attributes, the two categories are edible (4208 objects) and poisonous (3916 objects). This dataset contains missing values ​​in attribute 11.

[0084] The hardware environment of the experiment is: Intel(R) Core(TM) i5-7300HQ CPU@2.50GHz, 8.00GB memory. The software environment is: Microsoft Windows10, using PyCharm development platform and Python programming language.

[0085] The experiment adopts a comprehensive consideration of accuracy (Accuracy, ) and recall )’s external evaluation index F-measure ( ) is used as the evaluation index of clustering quality, and the K-modes clustering result without privacy protection is used as the true value. It is defined as follows:

[0086]

[0087]

[0088] in represents the number of clusters, Indicates the number of correctly clustered data in the cluster obtained by using the privacy protection algorithm. Indicates the size of the dataset, represents the clustering clusters obtained without privacy protection, It's balance and The coefficient of is set to 1. The larger the value, the better the quality of the clustering results.

[0089] In order to illustrate the usability of the clustering results of this method under privacy protection, the HAKC method, DP-modes-Lloyd algorithm and K-modes algorithm without privacy protection were run on four data sets. The DP-modes-Lloyd algorithm is a K-modes clustering algorithm with differential privacy protection. The HAKC method was compared with the DP-modes-Lloyd algorithm and the K-modes algorithm. Each clustering algorithm was run 100 times on four data sets. The value result is Figure 4 shown.

[0090] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0091] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A highly available K-modes clustering privacy protection method based on personalized differential privacy, characterized in that: include: Step S1: The user uploads the user data to the server at the local end; Step S2: The server receives the user data and uses partition entropy to measure the attribute weight according to the differences of different attributes of the user data; Step S3: The server calculates the density of each user data point based on the attribute weighted distance; Step S4: The server calculates the distance between each user data point and the centroid according to the attribute weighted distance, and then divides it into the cluster with the closest distance, thereby obtaining the initial cluster; Step S5: The server updates the centroid by calculating the attribute value frequency and perturbs its calculation result using a personalized differential privacy geometry mechanism; Step S6: The service request end requests the clustering result from the server end according to its own request, and performs data query and analysis.

2. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 1, characterized in that: The process of step S2 includes: Step S201: Given a user data set , attribute set , for any subset , dataset Equivalence relation Divide into , , The partition entropy is expressed as: in, Represents any data point In the equivalence class The probability of , Represents the number of equivalence classes divided; Step S202: For any attribute ,use To express the importance of attributes based on partition entropy, it is expressed as follows: Step S203: Use To measure the importance of attributes, list the attributes The weight formula is as follows: in Representative Set The base number, Representative attributes The number of attributes The attribute of is given greater weight, and we get: Step S204: According to the measurement method of the normalized attribute weight, the distance calculation function between data points based on the attribute weight is defined as follows: 。 3. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 1, characterized in that: The process of step S3 includes: Step S301: Calculate density: Step S302: sorting by density value, selecting the top 85% of data points with larger density values, and removing the others as outliers; Step S303: Randomly select a user data set according to the attribute set Data points as the initial centroid.

4. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to any one of claims 1 to 3, characterized in that: The process of step S5 includes: Step S501: performing a sampling operation on the attribute value; Step S502: setting a smaller sampling probability; Step S503: querying and disturbing the sampled attribute value data set; Step S504: After calculating the frequency of the attribute value after the disturbance, select the attribute with the largest attribute value frequency to update the centroid, and finally complete the clustering.

5. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 4, characterized in that: In step S501, the recording sensitivity of the attribute value is first calculated, and the recording sensitivity The calculation formula is as follows: in, Indicates that the dataset contains attribute values , Indicates that it does not contain an attribute value , represents an arbitrary query function; then the corresponding sampling probability of each attribute value is calculated based on the record sensitivity.

6. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 4, characterized in that: In step S502, a balance parameter is introduced to adjust the sampling probability. The specific representation is as follows: in, represents an equilibrium constant.

7. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 4, characterized in that: In step S503, the summation function of the given attribute value frequency is , the summation function after disturbance is , then the specific formula for perturbation using personalized geometric mechanism is as follows: 。 8. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 7, characterized in that: The balance parameter was set to a recorded sensitivity value above 80% to obtain clustering results.

9. The highly available K-modes clustering privacy protection method based on personalized differential privacy according to claim 4, characterized in that: In step S504, after calculating the frequency of the attribute value after disturbance, the attribute with the largest attribute value frequency is selected to update the centroid, and then steps S4 and S5 are executed repeatedly. If the maximum number of iterations is reached or the centroids in two iterations are the same, the iteration is stopped and clustering is completed.