Data processing method, device and electronic device based on privacy protection
By adding noise to the data based on the chi-square value, the problem of reduced data availability caused by privacy protection is solved, and high-value data protection in scientific research is achieved.
Patent Information
- Application Number
- CN202210385699.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-04-13
AI Technical Summary
When existing technologies protect data privacy, the availability of data is significantly reduced, making it impossible to maintain high value in scientific research.
By obtaining the original data and determining the value range of the noise data based on its chi-square value, perform noise processing to ensure that the chi-square value of the noise data is smaller than the chi-square value of the original data, maximizing the difference between the original data and the noise data. and post-processing to maintain the statistical significance of the data.
While ensuring data privacy protection, it also improves the usability and practicality of data processed with privacy protection, ensuring the value of data in scientific research.
Smart Images

Figure CN114741726B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a data processing method, device and electronic equipment based on privacy protection. Background Art
[0002] With the development of science and technology, people are paying more and more attention to data research. For example, researchers use data on data publishing platforms for scientific research purposes to study the influence relationship between variables. In the above data publishing scenarios, there may be problems with data privacy leakage.
[0003] Data is usually processed for privacy protection to reduce the possibility of data privacy leakage. However, the current way of processing data for privacy protection will greatly reduce the value of data for scientific research, that is, the usability of privacy-protected data is low. Summary of the invention
[0004] In view of this, the present application provides a data processing method, device and electronic device based on privacy protection, so as to improve the availability of privacy-protected data.
[0005] It should be noted that the data acquisition and processing processes in this application are all carried out with the knowledge and consent of the data owner.
[0006] In a first aspect, the present application provides a data processing method based on privacy protection, the method comprising:
[0007] Obtaining original data; wherein the values of the original data include only two types: a first value and a second value, and the original data include original data of the case group and original data of the control group;
[0008] Determine the chi-square value of the original data;
[0009] According to the chi-square value of the original data, the value range of the chi-square value of the noise data is determined; wherein the value of the noise data includes only the first value and the second value, the noise data includes the noise data of the case group and the noise data of the control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the size relationship between the chi-square value of the original data and the critical value is the same as the size relationship between the chi-square value of the noise data and the critical value; the chi-square value of the noise data is smaller than the chi-square value of the original data;
[0010] Determine the value range of the first noise frequency according to the value range of the chi-square value of the original data and the chi-square value of the noise data; wherein the first noise frequency is the number of noise data of the case group that takes the first value;
[0011] Determining a value of the first noise frequency according to a value range of the first noise frequency and a difference between the original data and the noise data;
[0012] Based on the value of the first noise frequency, the original data of the case group and the original data of the control group are noised to obtain noise data of the case group and noise data of the control group.
[0013] In a possible implementation, determining the chi-square value of the original data specifically includes:
[0014] The chi-square value of the original data is determined according to the first original frequency, the second original frequency, the first number and the second number; wherein the first original frequency is the number of the original data of the case group whose value is the first value, the second original frequency is the number of the original data of the case group whose value is the second value, the first number is the sum of the first original frequency and the number of the original data of the control group whose value is the first value, and the second number is the sum of the second original frequency b and the number of the original data of the control group whose value is the second value.
[0015] In a possible implementation, the critical value is obtained by querying a chi-square distribution critical value table.
[0016] In a possible implementation, determining the value of the first noise frequency according to the value range of the first noise frequency and the difference between the original data and the noise data specifically includes:
[0017] The value of the first noise frequency is determined within the value range of the first noise frequency to maximize the difference between the original data and the noise data.
[0018] In a possible implementation manner, the difference between the original data and the noise data specifically includes an expected estimation error between the original data and the noise data.
[0019] In a possible implementation, after performing noise processing on the original data of the case group and the original data of the control group based on the value of the first noise frequency to obtain the noise data of the case group and the noise data of the control group, the method further includes:
[0020] The noise data of the case group and the noise data of the control group are post-processed, and the post-processing includes at least one of the following: rounding the data or rounding the data according to accuracy requirements.
[0021] In a possible implementation, the method further includes:
[0022] Obtaining identity data, wherein the identity data is used to identify the identity of an individual;
[0023] The identity data is subjected to fuzzy processing, wherein the fuzzy processing includes: de-identifying the identity data, or generalizing the identity data, wherein the generalization processing is to replace different characters in a plurality of identity data with preset characters.
[0024] In a second aspect, the present application provides a data processing device based on privacy protection, the device comprising:
[0025] A data acquisition unit, used for acquiring original data, wherein the values of the original data include only two types: a first value and a second value, and the original data include original data of the case group and original data of the control group;
[0026] A first determining unit, used to determine the chi-square value of the original data;
[0027] A second determining unit is used to determine a value range of a chi-square value of noise data according to the chi-square value of the original data; wherein the value of the noise data includes only a first value and a second value, the noise data includes noise data of the case group and noise data of the control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the size relationship between the chi-square value of the original data and the critical value is the same as the size relationship between the chi-square value of the noise data and the critical value; the chi-square value of the noise data is smaller than the chi-square value of the original data;
[0028] A third determining unit is used to determine a value range of a first noise frequency according to a value range of a chi-square value of the original data and a chi-square value of the noise data, wherein the first noise frequency is the number of noise data of the case group that have a first value;
[0029] a fourth determining unit, configured to determine a value of the first noise frequency according to a value range of the first noise frequency and a difference between the original data and the noise data;
[0030] The noise processing unit is used to perform noise processing on the original data of the case group and the original data of the control group based on the value of the first noise frequency, so as to obtain noise data of the case group and noise data of the control group.
[0031] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a code, and the processor is used to call the code stored in the memory to execute any of the above methods.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A flowchart of a data processing method based on privacy protection provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of the structure of a data processing device based on privacy protection provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] To facilitate understanding of the technical solution provided in the embodiments of the present application, a data processing method, device, and electronic device based on privacy protection provided in the embodiments of the present application are described below in conjunction with the accompanying drawings.
[0037] Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Based on the embodiments in the present application, other embodiments obtained by those skilled in the art without making creative contributions are all within the scope of protection of the present application.
[0038] In the claims and specification and drawings of this application, the terms "includes" and "has" and any variations thereof are intended to cover non-exclusive inclusions.
[0039] In data publishing platforms such as medical data and demographic data for scientific research purposes, survey data are usually published or data query interfaces are provided, allowing researchers to conduct statistical difference analysis through queried statistical data or downloaded raw data, for example, to study the influence relationship between categorical variables or quantitative variables. However, in such data publishing scenarios, there are some data privacy issues. For example, attackers can combine statistical data and related background knowledge to conduct differential attacks to determine whether an individual exists in the database; or conduct inference attacks and attribute attacks through raw data combined with other databases; even some databases that only publish query interfaces for statistical data are still subject to crawler attacks, resulting in the crawling of users' raw data.
[0040] In this data release scenario, researchers want to obtain data, while data providers need to consider the degree of privacy protection of the data. At this time, cryptography cannot play its advantages, and permission access control limits the threshold for obtaining research data. In contrast, differential privacy uses appropriate perturbations of data to protect data privacy. Within a certain privacy tolerance range, it adds noise that satisfies the Laplace distribution to the original data, which is more suitable for data protection in the release scenario.
[0041] Data is usually processed for privacy protection to reduce the possibility of data privacy leakage. However, the current way of processing data for privacy protection will greatly reduce the value of data for scientific research, that is, the usability of privacy-protected data is low.
[0042] Based on this, in the embodiment of the present application provided by the applicant, the original data is first obtained, and the values of the original data only include a first value and a second value. The original data includes the original data of the case group and the original data of the control group, that is, the original data is binary data; after determining the chi-square value of the original data, the value range of the chi-square value of the noise data is determined according to the chi-square value of the original data; wherein the values of the noise data only include a first value and a second value, and the noise data includes the noise data of the case group and the noise data of the control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the original data The size relationship between the chi-square value and the critical value of the data is the same as the size relationship between the chi-square value and the critical value of the noise data; the chi-square value of the noise data is smaller than the chi-square value of the original data; then, according to the value ranges of the chi-square values of the original data and the chi-square values of the noise data, the value range of the first noise frequency is determined, and the first noise frequency is the number of noise data of the case group that takes the first value; then, according to the value range of the first noise frequency and the difference between the original data and the noise data, the value of the first noise frequency is determined; finally, based on the value of the first noise frequency, the original data of the case group and the original data of the control group are denoised, respectively, to obtain the noise data of the case group and the noise data of the control group.
[0043] The technical solution of the embodiment of the present application is adopted to add noise to the original data (binary data) to obtain noise data to achieve privacy protection, and the problem of data practicality is considered in the process of privacy protection processing. Specifically, by determining the value range of the chi-square value of the noise data, the statistical significance of the noise data and the original data is kept consistent; the difference between the original data and the noise data is used to characterize the degree of privacy protection, and the degree of privacy protection is considered when determining the value of the first noise frequency, so that the noise data finally obtained can have both privacy protection effect and high data practicality.
[0044] It should be noted that in the embodiments of the present application, the processes of acquiring and processing data are all carried out with the knowledge and consent of the data owner.
[0045] The present application provides a data processing method based on privacy protection.
[0046] See also Figure 1 , Figure 1A flowchart of a data processing method based on privacy protection provided in an embodiment of the present application.
[0047] It should be noted that the processes of acquiring and processing data in the embodiments of the present application are all carried out with the knowledge and consent of the data owner.
[0048] like Figure 1 As shown, the data processing method based on privacy protection in the embodiment of the present application includes S101-S106.
[0049] S101. Obtaining original data, where the values of the original data include only a first value and a second value, and the original data include original data of a case group and original data of a control group.
[0050] The original data is binary data, and the values of the original data only include two types.
[0051] For example, a binary classification data set refers to a data set in which both variables have two possible values. For example, the chi-square test studies the impact of variable A on variable B. Variable A takes the value of 0 or 1, and variable B takes the value of yes or no. The sample set containing variables A and B is a binary classification data set.
[0052] For the case group and the control group, for example, to study whether age has an effect (or significant effect) on the risk of a certain disease, the case group and the control group represent the diseased group and the normal group respectively. The individuals corresponding to the case group data are diseased individuals, and the individuals corresponding to the control group data are normal individuals.
[0053] S102. Determine the chi-square value of the original data.
[0054] The chi-square value is a statistic in nonparametric tests and is mainly used in nonparametric statistical analysis. It is a major test indicator in the chi-square test.
[0055] The chi-square test is a widely used hypothesis test method for count data. It belongs to the category of non-parametric tests. It mainly compares the correlation analysis of two or more sample rates (composition ratios) and two categorical variables. Its fundamental idea is to compare the degree of fit or goodness of fit between theoretical frequency and actual frequency. The chi-square test is usually for categorical variables.
[0056] S103. Determine a value range of the chi-square value of the noise data according to the chi-square value of the original data, where the noise signal is obtained by adding noise to the original data.
[0057] The values of the noise data include only the first value and the second value, and the noise data include the noise data of the case group and the noise data of the control group.
[0058] The noise signal is obtained by adding noise to the original data, that is, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group.
[0059] Noise is added to the original data to apply disturbance and achieve privacy protection for the original data.
[0060] The relationship between the chi-square value and the critical value of the original data is the same as the relationship between the chi-square value and the critical value of the noise data; the chi-square value of the noise data is smaller than the chi-square value of the original data.
[0061] The relationship between the chi-square value and the critical value of the original data is the same as the relationship between the chi-square value and the critical value of the noise data. It is used to reduce the reduction in data utility caused by adding noise by ensuring that the chi-square test statistic of the noise data is still within the statistical significance range of the original data.
[0062] The chi-square value of the noise data does not exceed the original chi-square value to avoid excessive noise disturbance.
[0063] By constraining the relationship between the chi-square value of the noise data and the original chi-square value, the reduction in data utility caused by noise addition can be reduced.
[0064] S104. Determine a value range of a first noise frequency according to the value range of the chi-square value of the original data and the chi-square value of the noise data. The first noise frequency is the number of noise data of the case group that have a first value.
[0065] By performing statistical analysis on the original data, the number of first values in the original data of the case group can be obtained; after the original data is disturbed by noise, the number will change and become the first noise frequency mentioned above.
[0066] S105: Determine a value of the first noise frequency according to a value range of the first noise frequency and a difference between the original data and the noise data.
[0067] The difference between the original data and the noisy data is used to measure the degree of privacy protection for the original data.
[0068] The greater the difference between the original data and the noisy data, the greater the disturbance of the noise to the original data and the higher the degree of data privacy protection.
[0069] S106. Based on the value of the first noise frequency, perform noise processing on the original data of the case group and the original data of the control group respectively to obtain noise data of the case group and noise data of the control group.
[0070] The original data of the case group and the original data of the control group are subjected to noise processing respectively to obtain noise data of the case group and noise data of the control group, that is, the original data are subjected to noise processing to obtain noise data.
[0071] After the original data is subjected to noise processing, the value of the first noise frequency will change. When the value of the first noise frequency is determined, the method of adding noise to the original data (for example, the number of noise additions) can be determined, so that noise addition is performed based on the obtained noise addition method to obtain noise data, so that the noise data is statistically analyzed (the number of noise data in the statistical case group whose value is the first value) to obtain the value of the above-mentioned first noise frequency.
[0072] The technical solution of the embodiment of the present application is adopted to add noise to the original data (binary data) to obtain noise data to achieve privacy protection, and the problem of data practicality is considered in the process of privacy protection processing. Specifically, by determining the value range of the chi-square value of the noise data, the statistical significance of the noise data and the original data is kept consistent; the difference between the original data and the noise data is used to characterize the degree of privacy protection, and the degree of privacy protection is considered when determining the value of the first noise frequency, so that the noise data finally obtained can have both privacy protection effect and high data practicality.
[0073] The following is an explanation in conjunction with a specific implementation method.
[0074] The embodiment of the present application also provides another method for protecting data privacy.
[0075] The data privacy protection method in the embodiment of the present application includes S201-S203.
[0076] It should be noted that the processes of acquiring and processing data in the embodiments of the present application are all carried out with the knowledge and consent of the data owner.
[0077] S201. Acquire data, and divide the data into identity metadata and classification data.
[0078] Identity metadata may include one or more types, and classification data may include one or more types.
[0079] There are only two possible values for categorical data.
[0080] Data that requires privacy protection is usually divided into two categories: identity metadata and classified data.
[0081] Identity metadata is used to identify an individual. For example, an individual's identity metadata can include multiple types, such as the individual's name, ID number, address, education, gender, age, telephone number, etc. Generally, individual identity metadata mainly refers to data that can uniquely or comprehensively infer an individual's privacy.
[0082] Categorical data is data used in statistical research. For example, the categorical data of an individual may include: the individual's income, medical conditions, etc.
[0083] Categorical data only include two cases, for example, an individual's income includes "high" and "low"; illness status includes "illness" and "not ill".
[0084] Identity metadata and classification data can have a certain causal relationship, for example, age and disease conditions can have a certain causal relationship.
[0085] Categorical data can be used for statistical research; identity metadata, although usually not within the scope of data research, may be subject to inference attacks.
[0086] An inference attack refers to an attacker identifying or inferring an individual's identity by jointly querying multiple databases and combining a large amount of background knowledge.
[0087] In order to more clearly illustrate the data privacy protection method of the embodiment of the present application, the specific application scenario of the embodiment of the present application is described below.
[0088] It can be understood that this application scenario is only used to illustrate the data privacy protection method of the embodiment of the present application, and the data privacy protection method of the embodiment of the present application can also be used in any other scenario.
[0089] Data that needs to be kept private is used to study whether age has a significant impact on the risk of a certain disease.
[0090] The data obtained can be obtained through chi-square test.
[0091] The acquired data specifically include data of the case group and data of the control group, wherein the data of the case group are data of individuals with the disease, and the data of the control group are data of individuals without the disease.
[0092] The acquired data were divided into two categories: identity metadata and classification data, and the above division was performed on the data of both the case group and the control group.
[0093] Specifically, the distribution table of the acquired data may be divided into a part including identity metadata and a part including classification data.
[0094] For example, categories of identity metadata may include: name, gender, birthday, zip code, and categories of categorical data may include age.
[0095] It is understandable that the above-mentioned categories of identity metadata and categories of classification data are examples, and other categories may also be included.
[0096] "Age" is classified data in the embodiment of the present application, so "age" includes two cases "0" and "1". Specifically, a fixed age value can be set. When the age of the individual is greater than or equal to the value, the classified data "age" takes "1"; when the age of the individual is less than the value, the classified data "age" takes "0".
[0097] S202: Perform anonymity protection processing on the identity metadata.
[0098] The identity metadata may include one or more types of identity metadata.
[0099] The method of anonymity protection processing can be the same for each type of identity metadata.
[0100] When there are multiple types of identity metadata, the anonymity protection processing methods for each type of identity metadata may be the same or different.
[0101] The following is an example of a method for performing anonymity protection processing provided in an embodiment of the present application. In some possible situations, other methods may also be used to perform anonymity protection processing on identity metadata.
[0102] In one possible implementation, the identity metadata is de-identified.
[0103] For example, for individual names, a de-identification method is used to hide the individual's real name, and the name is uniformly abstracted into a self-incrementing ID number.
[0104] For example, an individual's name includes: first name, second name and third name. The first name, second name and third name are all composed of a real last name and a real first name.
[0105] The individual names are de-identified and uniformly abstracted into self-incrementing ID numbers. The "first name" is processed as "1", the "second name" is processed as "2", and the "third name" is processed as "3".
[0106] That is, the identity metadata includes the first name, the second name, and the third name, and the identity metadata is de-identified to obtain IDs 1, 2, and 3.
[0107] In a possible implementation manner, data generalization processing is performed on the identity metadata.
[0108] For example, for attributes such as birthday, zip code, and residential address, data generalization is used.
[0109] Specifically, the same digits or characters are retained, and any special characters are used to replace the different characters, thereby increasing the difficulty of data being inferred and attacked.
[0110] Please refer to Table 1 and Table 2. Table 1 shows the data of the case group's identity metadata before anonymization protection processing, and Table 2 shows the data of the control group's identity metadata before anonymization protection processing.
[0111] Table 1 Data table of case group
[0112]
[0113] Table 2 Data of the control group
[0114]
[0115]
[0116] As shown in Tables 1 and 2, the data in the case group are divided into identity metadata and categorical data; identity metadata includes: name, birthday and zip code, etc., and categorical data includes age, etc. The data in the control group are the same as above.
[0117] Please refer to Table 3 and Table 4. Table 3 shows the data of the case group's identity metadata after anonymization protection processing, and Table 4 shows the data of the control group's identity metadata after anonymization protection processing.
[0118] Table 3 Data table of case group
[0119]
[0120] Table 4 Data of the control group
[0121]
[0122] The identity metadata of the type "ID" is obtained by processing the identity metadata of the type "name".
[0123] In one possible implementation, portions of each identity metadata are discarded.
[0124] For example, each identity metadata consists of three parts: A, B, and C. By discarding part C, the anonymity protection of the data can be achieved.
[0125] In some possible implementations, multiple anonymous protection processing methods can be used in combination to process data.
[0126] As shown in Tables 1 to 4, for identity metadata such as "birthday", the original data includes the specific year, month and date; the month and date in the original data are discarded, only the year is retained, and the special character "X" is used to replace the last digit of the year (which can be regarded as a difference character), and the data in Table 2 is obtained.
[0127] S203: Perform differential privacy protection processing on the binary data.
[0128] The values of binary data include 0 and 1, such as "age" in Table 1-4.
[0129] In a possible implementation, the privacy protection of binary data is achieved by adding noise to the binary data.
[0130] For example, in order to protect the “age” data, it is necessary to add noise to the “age” data in the case group and the control group.
[0131] When there are multiple categories of binary data, the binary data of each category can be denoised.
[0132] The following specifically describes the noise addition to the binary classification data, including S301-S307.
[0133] S301. Obtain binary data of the case group and binary data of the control group.
[0134] Here, the binary data of the case group and the binary data of the control group can be regarded as the original data, that is, the data before processing.
[0135] The original data include the original data of the case group and the original data of the control group.
[0136] The binary data may have two values, namely, a first value and a second value. For example, as shown in Table 1, the first value and the second value are 0 and 1, respectively.
[0137] Please refer to Table 5, which is a contingency table of binary data before noise addition. Specifically, Table 5 is a frequency table of the chi-square test.
[0138] Table 5 Binary data contingency table before noise addition
[0139] age Case Group Control group total 0 a c m 1 b d n total N / 2 N / 2 N
[0140] Binary data can be regarded as independent variables. The frequency of an independent variable refers to the number of times the independent variable actually occurs. For example, the frequency of age "0" in the case group is a, and the frequency of age "1" in the control group is d.
[0141] After adding noise to the data, we get the noisy binary data contingency table. Since the data is noised, the frequency of the independent variable will change, as shown in Table 6.
[0142] Refer to Table 5 and Table 6. For the case group with age "0", the frequency of the independent variable before noise addition is a, and the frequency of the independent variable after noise addition becomes a'.
[0143] The total count after adding noise is assumed to remain unchanged, that is, the statistical data m, n, and N in Table 5 are guaranteed to remain unchanged. When a changes to a', b, c, and d will also change accordingly.
[0144] Determine a as the tracking target, first determine the range of the chi-square value after adding noise (recorded as the perturbable range of the chi-square value), then select the appropriate a' based on the perturbable range of the chi-square value, and then add noise so that the number of independent variables that are 0 is a' (the number of cases with an age of "0" in the case group is a'), thus achieving the final required noise addition result.
[0145] Table 6 Contingency table of binary classification data after noise addition
[0146] age Case Group Control group total 0 a’ c'=m-a' m 1 b'=N / 2-a' d'=N / 2-c' n total N / 2 N / 2 N
[0147] S302: Determine the original chi-square value.
[0148] The chi-square value is a statistic in nonparametric tests and is mainly used in nonparametric statistical analysis. It is a major test indicator in the chi-square test.
[0149] The original chi-square value is calculated using the following formula (1):
[0150]
[0151] The meaning of each parameter in the above formula is shown in Table 5.
[0152] S303: Determine the value range of the chi-square value of the noise data.
[0153] The noise data are the data after noise disturbance, including the noise data of the case group and the noise data of the control group.
[0154] The noise data is the data obtained by adding noise to the original data: the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group.
[0155] After obtaining the original chi-square value, determine the range of the chi-square value of the noise data.
[0156] The range of chi-square values of noise data can be regarded as the perturbable range of chi-square values.
[0157] In the embodiment of the present application, the reduction in data utility caused by adding noise is reduced by ensuring that the chi-square test statistic of the noise data is still within the statistical significance range of the original data.
[0158] For example, the original data (binary data) is denoised to obtain noise data. When the original data is statistically analyzed and it is found that the independent variable has a significant effect on the dependent variable (that is, the original chi-square value is greater than the critical chi-square value), the noise data obtained after denoising can still be statistically analyzed to obtain the significant effect of the independent variable on the dependent variable (that is, the chi-square value of the noise data is still greater than the critical chi-square value).
[0159] In addition, the chi-square value of the noise data does not exceed the original chi-square value to avoid excessive noise disturbance.
[0160] Based on this, the chi-square value of the noise data needs to satisfy the following constrained inequality:
[0161]
[0162] χ 2 is the original chi-square value, is the chi-square value of the noise data, is the critical chi-square value.
[0163] For a 2*2 contingency table, the degree of freedom v is 1. Given a significance level α, the critical chi-square value can be determined as 3.84 by looking up the chi-square value table based on the degree of freedom v and the significance level α.
[0164] S304: Determine the value range of a'
[0165] a' is the number of cases with age "0" in the noise-added case group, which is also the frequency of the independent variable after noise addition.
[0166] The value range of a' is determined based on the original chi-square value obtained above and the value range of the chi-square value of the noise data.
[0167] That is, the value range of a' is determined according to the above formula (1) and formula (2).
[0168] After calculation, we can get the value range of a':
[0169] a'∈(a1,a2)∪(a3,a4)
[0170] Among them, ∪ is the union operator, and (a1,a2)∪(a3,a4) is the union of (a1,a2) and (a3,a4).
[0171]
[0172]
[0173]
[0174]
[0175] C1=m 2 -nmx 2 / N
[0176] C2=m 2 -nmx α,v 2 / N
[0177] S304: Determine the value of a'
[0178] After determining the value range of a', the appropriate value of a' is determined by balancing data utility and privacy protection.
[0179] The relationship between the chi-square value of the noisy data and the original chi-square value can characterize the impact on the utility of the data after adding noise.
[0180] In the embodiment of the present application, the chi-square value is used to measure the utility of data.
[0181] The relationship between the chi-square value of isomorphic constrained noise data and the original chi-square value can reduce the reduction in data utility caused by adding noise.
[0182] The expected estimation error (EEE) obtained based on the original data and noisy data can measure the degree of privacy protection for the original data.
[0183] The expected estimation error is the expected estimation error of the data before and after noise addition, which is obtained according to the following formula:
[0184]
[0185] Y is the noise added to the original data, P(Y i ) represents the probability that the ith noise is added to the ith record in the database, D is the original database, |D| is the size of the database, D' is the perturbed database after adding noise, |D i -D′ i | represents the difference of elements in corresponding tuples.
[0186] EEE is used to measure the error between D and D', and can intuitively show the degree of disturbance caused by noise. The larger the EEE, the greater the noise disturbance, and the higher the degree of data privacy protection.
[0187] The following is an explanation of balancing data utility and privacy protection.
[0188] By adding noise to the data, data privacy protection can be achieved. By ensuring that the chi-square value after adding noise is within the original statistical significance range, the utility loss of the data after adding noise is reduced. For example, if the chi-square value of the data before adding noise is less than the critical value of the chi-square value, the chi-square value of the data after adding noise is also less than the critical value of the chi-square value.
[0189] The expected estimation error (EEE) is obtained by multiplying the absolute value of the difference before and after data noise addition by the noise probability. Therefore, the larger the expected estimation error, the greater the disturbance of noise to the data and the higher the degree of data privacy protection.
[0190] In summary, when the chi-square value of the noise data is within the original statistical significance range and the expected estimation error is maximized, it can be considered that data utility and privacy protection have reached a balance.
[0191] Specifically, when the number of noise additions changes, the number of noise additions that determines that the chi-square value of the noise data is within the original statistical significance range and the expected estimation error is the largest is the number of noise additions finally selected.
[0192] The larger the gap between a' and a, the greater the disturbance of the noise added to the data; the larger the expected estimation error, the higher the degree of privacy protection for the data. Therefore, the value farthest from a is selected as a'.
[0193] At the same time, since the chi-square value is a quadratic function, when the a' value is closer to the boundary value, the chi-square value after noise is closer to the original chi-square value, that is, the statistical significance of the chi-square value does not change much (almost not). Therefore, when the frequency a of the original data is farther from (a1, a2), a' is determined to be a1+1; when the frequency a of the original data is farther from (a3, a4), a' is determined to be a4-1.
[0194] At present, the noise addition process for data is usually to add Laplace noise to the data, but the randomly added noise will lead to a large loss of data utility. The embodiment of the present application calculates the noise equilibrium point, determines the reasonable amount of noise addition, and reduces the loss of data utility.
[0195] S305: Generate noise based on the value of a'
[0196] After determining the amount of noise addition, a corresponding amount of Laplace or discrete Laplace noise is generated so that the statistical frequency after noise addition is a*.
[0197] The probability distribution density of noise is related to the differential privacy budget. In one possible implementation, the privacy budget is determined to be zero so that the perturbation range of the noise is larger and a better perturbation effect is obtained.
[0198] The size of the privacy budget may also be determined as other values, and the embodiment of the present application does not specifically limit the size of the privacy budget.
[0199] Since the size of the privacy budget usually does not affect the final noise amount and the unified meaning of the final data, it can be adjusted according to actual needs.
[0200] At present, Laplace noise is added to data to achieve differential privacy protection. Usually, the noise is added randomly, resulting in a large loss of data utility. The technical solution in the embodiment of the present application determines the noise equilibrium point and finds a reasonable amount of noise to increase, thereby improving data utility.
[0201] S306 , based on the generated noise, respectively perform noise processing on the binary classification data of the case group and the binary classification data of the control group.
[0202] After obtaining the generated noise, the binary data of the case group and the binary data of the control group are subjected to noise processing to obtain noise data (noise data of the case group and noise data of the control group).
[0203] After generating noise, the categorical data is noised separately for the case group and the control group.
[0204] S307, post-processing the binary classification data after adding noise
[0205] Post-processing can be performed according to actual needs. For example, some data may be limited to a certain range, while the range of noise generation is arbitrary, so post-processing can be performed on the binary classification data after adding noise.
[0206] Post-processing may include performing modulo remainder operations, rounding operations, data rounding, etc. on the binary data after adding noise.
[0207] Rounding is a precision counting method that ensures that the difference between the retained part and the actual value does not exceed half of the last digit.
[0208] For example, the value range of the original binary classification data is (m, n), and the modulo remainder operation is performed on the noisy binary classification data, and the modulo (nm) of the noisy data is taken to make the range of the noisy binary classification data also (m, n).
[0209] If there is a need to round the binary classification data after adding noise, the binary classification data after adding noise can be rounded.
[0210] If there is a need for data accuracy, the binary classification data after noise addition can be rounded to meet the accuracy requirement.
[0211] In some possible situations, the post-processing operation performed after noise addition may also include other operations, which are not specifically limited in the embodiments of the present application.
[0212] In some possible cases, no post-processing operation may be performed after the binary classification data is denoised.
[0213] After the above processing, anonymous identity metadata and noisy binary classification data are obtained.
[0214] In some possible implementations, the two can be released in combination to improve the privacy of data while maintaining the statistical significance of the protected data, thus balancing data utility and privacy protection.
[0215] In specific statistical analysis data publishing scenarios, there are potential risks of differential attacks, inference attacks, and other attacks. The technical solution of the embodiment of the present application focuses on a large amount of individual identity data and binary classification data sets involved in the chi-square test in differential analysis research, and proposes a data processing method to maintain the statistical analysis significance of the data set and protect privacy.
[0216] The technical solution of the embodiment of the present application is mainly aimed at data protection for chi-square test. For example, when an open platform releases data suitable for chi-square test, it adopts the technical solution of the embodiment of the present application to protect the data before releasing it, which can protect the original information of individual identity for generalized fuzzy processing to a certain extent, and can also use chi-square value constraints to ensure that important sample data maintains its statistical significance after reasonable disturbance, thus achieving a balance between data privacy protection and data availability.
[0217] An embodiment of the present application also provides a data processing device based on privacy protection.
[0218] See also Figure 2 , Figure 2 A schematic diagram of the structure of a data processing device based on privacy protection provided in an embodiment of the present application.
[0219] like Figure 2 As shown, the data processing device 200 based on privacy protection in the embodiment of the present application includes the following units:
[0220] The data acquisition unit 201 is used to acquire original data, wherein the values of the original data only include a first value and a second value, and the original data includes the original data of the case group and the original data of the control group.
[0221] The first determining unit 202 is used to determine the chi-square value of the original data.
[0222] The second determination unit 203 is used to determine the value range of the chi-square value of the noise data according to the chi-square value of the original data; wherein the value range of the noise data only includes the first value and the second value, the noise data includes the noise data of the case group and the noise data of the control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the size relationship between the chi-square value of the original data and the critical value is the same as the size relationship between the chi-square value of the noise data and the critical value; the chi-square value of the noise data is smaller than the chi-square value of the original data.
[0223] The third determining unit 204 is used to determine the value range of the first noise frequency according to the value range of the chi-square value of the original data and the chi-square value of the noise data, wherein the first noise frequency is the number of noise data of the case group that takes the first value.
[0224] The fourth determining unit 205 is used to determine the value of the first noise frequency according to the value range of the first noise frequency and the difference between the original data and the noise data.
[0225] The noise processing unit 206 is used to perform noise processing on the original data of the case group and the original data of the control group based on the value of the first noise frequency, so as to obtain noise data of the case group and noise data of the control group.
[0226] The units included in the above-mentioned privacy protection-based data processing device 200 can achieve the same technical effects as the privacy protection-based data processing method in the above embodiments, and will not be described again here to avoid repetition.
[0227] An embodiment of the present application also provides an electronic device.
[0228] See also Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0229] like Figure 3 As shown, the electronic device 300 of an embodiment of the present application includes a processor 301 and a memory 302, wherein the memory 302 stores codes, and the processor 301 is used to call the codes stored in the memory 302 to execute any of the above-mentioned data processing methods based on privacy protection.
[0230] The units included in the above-mentioned electronic device 300 can achieve the same technical effect as the data processing method based on privacy protection in the above embodiment. To avoid repetition, they will not be described here.
[0231] In an embodiment of the present application, a computer-readable storage medium is also provided, and the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the above-mentioned data processing method based on privacy protection, and can achieve the same technical effect. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is such as a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0232] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method based on privacy protection, characterized in that: The method comprises: Obtaining original data; wherein the values of the original data include only a first value and a second value, and the original data include original data of the case group and original data of the control group; Determining a chi-square value of the original data; According to the chi-square value of the original data, the value range of the chi-square value of the noise data is determined; wherein the value of the noise data includes only the first value and the second value, the noise data includes the noise data of the case group and the noise data of the control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the size relationship between the chi-square value of the original data and the critical value is the same as the size relationship between the chi-square value of the noise data and the critical value; the chi-square value of the noise data is smaller than the chi-square value of the original data; Determine a value range of a first noise frequency according to the value range of the chi-square value of the original data and the chi-square value of the noise data; wherein the first noise frequency is the number of noise data of the case group that have the first value; Determining a value of the first noise frequency according to a value range of the first noise frequency and a difference between the original data and the noise data; Based on the value of the first noise frequency, the original data of the case group and the original data of the control group are noised to obtain noise data of the case group and noise data of the control group.
2. The method according to claim 1, characterized in that Determining the chi-square value of the original data specifically includes: The chi-square value of the original data is determined according to the first original frequency, the second original frequency, the first number and the second number; wherein the first original frequency is the number of the original data of the case group whose value is the first value, the second original frequency is the number of the original data of the case group whose value is the second value, the first number is the sum of the first original frequency and the number of the original data of the control group whose value is the first value, and the second number is the sum of the second original frequency and the number of the original data of the control group whose value is the second value.
3. The method according to any one of claims 1 or 2, characterized in that: The critical value is obtained by querying the chi-square distribution critical value table.
4. The method according to claim 1, characterized in that: The determining the value of the first noise frequency according to the value range of the first noise frequency and the difference between the original data and the noise data specifically includes: The value of the first noise frequency is determined within a value range of the first noise frequency so as to maximize the difference between the original data and the noise data.
5. The method according to claim 1, characterized in that The difference between the original data and the noise data specifically includes an expected estimation error between the original data and the noise data.
6. The method according to claim 1, characterized in that After performing noise processing on the original data of the case group and the original data of the control group based on the value of the first noise frequency to obtain the noise data of the case group and the noise data of the control group, the method further includes: The noise data of the case group and the noise data of the control group are post-processed, and the post-processing includes at least one of the following: rounding the data or rounding the data according to accuracy requirements.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining identity data, wherein the identity data is used to identify the identity of an individual; The identity data is subjected to fuzzy processing, wherein the fuzzy processing includes: de-identifying the identity data, or generalizing the identity data, wherein the generalization processing is to replace different characters in a plurality of the identity data with preset characters.
8. A data processing device based on privacy protection, characterized in that: The device comprises: A data acquisition unit, used for acquiring original data, wherein the values of the original data include only two types: a first value and a second value, and the original data include original data of a case group and original data of a control group; A first determining unit, configured to determine a chi-square value of the original data; a second determination unit, configured to determine a value range of a chi-square value of noise data according to the chi-square value of the original data; wherein the values of the noise data include only the first value and the second value, the noise data include noise data of a case group and noise data of a control group, the noise data of the case group is obtained by adding noise to the original data of the case group, and the noise data of the control group is obtained by adding noise to the original data of the control group; the size relationship between the chi-square value of the original data and the critical value is the same as the size relationship between the chi-square value of the noise data and the critical value; the chi-square value of the noise data is smaller than the chi-square value of the original data; A third determining unit is used to determine a value range of a first noise frequency according to a value range of the chi-square value of the original data and the chi-square value of the noise data, wherein the first noise frequency is the number of noise data of the case group that have the first value; a fourth determining unit, configured to determine a value of the first noise frequency according to a value range of the first noise frequency and a difference between the original data and the noise data; A noise processing unit is used to perform noise processing on the original data of the case group and the original data of the control group based on the value of the first noise frequency, so as to obtain noise data of the case group and noise data of the control group.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores codes, and the processor is used to call the codes stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Gray level image textural feature extracting method based on orientation selectivity
CN104732238A
Data transmission safely method based on disturbance compression sensing in wireless sensor network
CN109195164A
Image processing method and device, electronic equipment and computer readable storage medium
CN112907430A
Method and structure for privacy preserving data mining
US20050125279A1
Computer-implemented privacy engineering system and method
WO2017187207A1
