A k-anonymity privacy protection method based on information quantity and improved k-means
By constructing an information loss function and an improved 2-means clustering algorithm, the contradiction between privacy and data availability in the K-anonymity algorithm is resolved, achieving reduced information loss and improved data availability while ensuring privacy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUIZHOU UNIV
- Filing Date
- 2023-05-05
- Publication Date
- 2026-06-30
AI Technical Summary
Existing K-anonymity algorithms ignore data availability when dealing with user privacy and security, resulting in reduced statistical analysis effectiveness, and fail to effectively consider the impact of quasi-identifier attributes on sensitive attributes.
A novel K-anonymity algorithm is designed to reduce information loss by constructing an information loss function based on information content theory, setting attribute weights, selecting initial centroids through a greedy approach and an improved 2-means clustering algorithm, and combining the mean center method for clustering.
It improves data privacy and security, while reducing information loss and enhancing data usability and statistical analysis effectiveness.
Smart Images

Figure SMS_1 
Figure SMS_2 
Figure SMS_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security and involves information theory and k-means clustering technology. Background Technology
[0002] With the development of big data, user privacy and security have received increasing attention. K-anonymity is an effective privacy protection algorithm with low computational complexity, capable of protecting user privacy through data anonymization. However, this algorithm currently suffers from the problem of focusing solely on improving user privacy while neglecting data usability. Furthermore, ignoring the impact of quasi-identifier attributes on sensitive attributes reduces the usability of the processed data for statistical analysis. Therefore, this invention proposes a novel K-anonymity algorithm that can address privacy and security issues in the context of big data while simultaneously improving data usability. Summary of the Invention
[0003] The purpose of this invention is to provide a secure K-anonymity algorithm that improves data availability. Specifically, this invention constructs a new information loss function based on information theory and, considering the differences in the influence of different quasi-identification attributes on sensitive attributes, assigns weights to each attribute when designing the information loss function. Furthermore, to reduce information loss, this invention improves K-anonymity in two ways. First, based on a greedy approach and 2-means clustering, it minimizes information loss while ensuring privacy. Second, this invention improves the 2-means clustering algorithm by designing a mean center method to select the initial centroids. Based on the constructed information loss function and the improved k-means clustering, the K-anonymity algorithm of this scheme is designed, thereby reducing information loss. This invention employs the following technical methods:
[0004] Step 1: Classify the attributes of data table DT into three categories: identifier attribute La, quasi-identifier attribute QLa, and sensitive attribute S. Delete attribute La directly.
[0005] Step 2: Select two initial cluster centroids, O1 and O2, using the mean center method proposed in this invention;
[0006] Step 3: Using O1 and O2 as centroids, cluster the data in the data table using a distance-based 2-means algorithm;
[0007] Step 4: Use the mean of each subclass as the new centroid and re-cluster until a certain number of iterations are reached or the clustering no longer changes;
[0008] Step 5: Calculate the information loss of the sub-table and the original table using the information loss function proposed in this invention. If the sum of the information losses of the two sub-tables after partitioning is less than the information loss of the original table, continue to partition using the 2-means algorithm; otherwise, end the partitioning process.
[0009] Step 6: Generalize each of the resulting sub-tables to obtain the anonymized data table DT'. Attached Figure Description
[0010] Figure 1 The paper describes a comparison of the 2-means clustering algorithm of this invention with other methods in terms of clustering performance.
[0011] Figure 2 The effectiveness of the K-anonymity algorithm of this invention in reducing information loss is described.
[0012] Figure 3 The K-anonymity algorithm of this invention is compared with other schemes in terms of reducing information loss. Detailed Implementation
[0013] The technical methods described in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. It should be noted that the following description is only a part of the embodiments of the present invention, and not all embodiments.
[0014] This invention provides a secure K-anonymity algorithm that improves data availability, with the following specific steps:
[0015] Step 1: Categorize the attributes of data table DT
[0016] This invention categorizes attributes into identifying attributes La, quasi-identifying attributes QLa, and sensitive attributes S. Attributes that uniquely identify a user, such as their mobile phone number and ID card number, are considered identifying attributes and are directly deleted. Sensitive attributes are left unprocessed. For other attributes such as user gender and address, to prevent adversaries from inferring sensitive user information, they are considered quasi-identifying attributes and are generalized.
[0017] Step 2: Select two initial cluster centroids, O1 and O2, using the mean center method proposed in this invention;
[0018] First, calculate the mean of all tuples in the table to obtain the mean center O. Then, calculate the tuple in the table that is farthest from O and denote it as an initial centroid O1. Finally, calculate the tuple in the table that is farthest from O1 and denote it as another initial centroid O2.
[0019] For numerical quasi-identifier attributes, the mean of the t-th numerical attribute in the data table can be expressed as:
[0020]
[0021] Where s i This identifies the value of the t-th numeric attribute in the i-th tuple, where n is the number of tuples in the table.
[0022] For categorical quasi-identifier attributes, this invention combines the properties of mean and minimizing the sum of squares of all values to design a method for representing the mean of categorical quasi-identifier attributes. Specifically, the mean of the τ-th categorical attribute in the data table can be expressed as:
[0023]
[0024] mean(C τ ) = s
[0025] Step 3: Using O1 and O2 as centroids, cluster the data in the data table using a distance-based 2-means algorithm.
[0026] For a certain numeric quasi-identifier attribute, let R be a finite numerical field, and in the t-th numeric quasi-identifier attribute, any value s i ,s j The distance between ∈R is:
[0027]
[0028] Where s max This represents the maximum value of the total range of this attribute, s min This represents the minimum value in the total range of this attribute. For example, assuming the age range is [0, 100], then s max For 100, s min If the value is 0, then the distance between age 5 and age 9 is 0.05.
[0029] For a certain categorical quasi-identifier attribute, let T R For a classification tree on R, assuming the attribute weights are calculated in the order of numeric attributes first, followed by categorical attributes, and there are m numeric attributes, then in the τth categorical quasi-identifier attribute, any value s i ,s j The distance between ∈R is:
[0030]
[0031] Where leaf(^(s) i ,s j )) indicates that in the classification tree, s i and s j The number of leaf nodes under the root of the tree whose least common ancestor is leaf(T) R ) represents the total number of leaf nodes in the classification tree T. For example, for the attribute "gender", if s i Represents male, sj If representing a woman, then leaf(^(s) i ,s j ))=2,leaf(T R =2, and the distance between the values is 1.
[0032] The distance between each data tuple is equal to the sum of the distances between each quasi-identifier attribute in the tuple.
[0033] Step 4: Use the mean of each subclass as the new centroid and re-cluster until a certain number of iterations are reached or the clustering no longer changes.
[0034] In this process, the present invention calculates the mean of the data in the data table as the updated centroid. The updated centroid is:
[0035] O'={mean(N1),mean(N2),...,mean(N m ),mean(C1),mean(C2),...,mean(C n )}
[0036] Step 5: Calculate the information loss of the sub-table and the original table using the information loss function proposed in this invention. If the sum of the information losses of the two sub-tables after partitioning is less than the information loss of the original table, continue partitioning using the 2-means algorithm; otherwise, end the partitioning process.
[0037] For a numeric quasi-identifier attribute, the information loss of the t-th numeric quasi-identifier attribute value in a generalized data table is:
[0038]
[0039] Where s tmax s represents the maximum value of the t-th numeric attribute in the generalization table. tmin This represents the minimum value of the t-th numeric attribute in the generalization table, |s tmax -s tmin +1| represents the number of possible values for the t-th numeric attribute in the generalization table, |R t | represents the number of values contained in the total value range of the t-th numeric attribute, |R t |≥1, for example, assuming the total range of age is [0, 99], then |R t |=100. n is the number of records in the generalized data table. x=0,1,2,...... symbolizes the step size of the numerical attribute value. If the step size of the attribute value is 1, such as the age attribute, then x=0. If the step size is 0.1, then x=1.
[0040] For a categorical quasi-identifier attribute, assuming the attribute weight calculation results are arranged in the order of numerical attributes first, followed by categorical attributes, and there are m numerical attributes, then the information loss of the τth categorical quasi-identifier attribute of a generalized data table is:
[0041]
[0042] Where leaf(T) τ ) represents the number of leaf nodes under the generalized value of the τ-th categorical attribute in the generalization table, leaf(T) τR The total number of leaf nodes in the classification tree containing the τth categorical attribute, leaf(T) τR )≥1. If the total number of leaf nodes in the tree containing the gender attribute is 2, then leaf(T) τR ) = 2, where n is the number of records in the data table.
[0043] The information loss of a certain generalized table after generalization is:
[0044]
[0045] Where γ t γ τ+m Representing attribute weights, assuming the attribute weight calculation results are arranged in the order of numeric attributes first, followed by categorical attributes, then:
[0046]
[0047] The total information loss after anonymization is equal to the sum of the information losses of each generalization table.
[0048] Step 6: Generalize each of the resulting sub-tables to obtain the anonymized data table DT'.
[0049] For numeric quasi-identifiers, the original data value is replaced by the minimum value range in the equivalence set; for categorical quasi-identifiers, they are generalized to a minimum value that is larger than the original quasi-identifier value.
Claims
1. A K-anonymity privacy protection method based on information content and improved k-means, the specific steps of which are as follows: Step 1: Classify the attributes of the data table DT into three categories: identifying attributes La, quasi-identifying attributes QLa, and sensitive attributes S. Attributes that can uniquely identify a user, such as mobile phone number and ID card number, are considered identifying attributes and are directly deleted. Sensitive attributes are not processed. For user gender, address, and other attributes, in order to prevent adversaries from inferring sensitive user information from them, they are considered quasi-identifying attributes and are generalized. Step 2: Select two initial cluster centroids using the mean center method. and Specifically, the mean of all tuples in the table is calculated to obtain the mean center. Then, calculate the distance from the table. The furthest tuple is denoted as an initial centroid. Finally, calculate the distance in the table. The furthest tuple is denoted as another initial centroid. ; Step 3: With and Using the centroid as the data center, the data in the data table is clustered using a distance-based 2-means algorithm; Step 4: Use the mean of each subclass as the new centroid and re-cluster until a certain number of iterations are reached or the clustering no longer changes; Step 5: Calculate the information loss of the sub-table and the original table using the information loss function. If the sum of the information losses of the two sub-tables after partitioning is less than the information loss of the original table, continue partitioning using the 2-means algorithm; otherwise, end the partitioning process. Specifically, for numerical quasi-identifier attributes, the information loss of a certain generalized data table... The information loss of each numerical quasi-identifier attribute value is: ,in This indicates the first term in the generalization table. The maximum value under a numerical attribute This indicates the first term in the generalization table. The minimum value under a numerical attribute. This indicates the first term in the generalization table. The number of possible values for a numeric attribute. Indicates the first The total number of values contained in the total value range of a numeric attribute. , This represents the number of records in the generalized data table. The step size for numeric attribute values. If the step size for an attribute value is 1, this includes age attributes. If the step size is 0.1, then For categorical quasi-identifier attributes, the attribute weight calculation results are arranged in the order of numeric attributes first, followed by categorical attributes, and there are m numeric attributes. Then, for a generalized data table, the first... The information loss of each categorical quasi-identifier attribute is: ,in This indicates the first term in the generalization table. The number of leaf nodes under the generalized values of each categorical attribute. Indicates the first The total number of leaf nodes in the classification tree for each categorical attribute. If the total number of leaf nodes in the tree containing the gender attribute is 2, then... , Let be the number of records in the data table. Then, the information loss of a generalized table after generalization is: ,in , The attribute weights are calculated and arranged in the order of numerical attributes first, followed by categorical attributes. Therefore: The total information loss after anonymization is equal to the sum of the information losses of each generalization table; Step 6: Generalize each of the resulting sub-tables to obtain the anonymized data table DT'.