Method and device for generating non-discrete data model based on local differential privacy
Through a non-discrete data generation model based on local differential privacy, the problem of low availability of data generated by generative adversarial networks in low dimensions or small data volume is solved. Differential privacy adding noise and batch training strategies are used to generate high-quality simulations. data, improving the overall availability of data and providing new methods of data protection.
Patent Information
- Application Number
- CN202310013510.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-01-05
AI Technical Summary
In the existing technology, the non-discrete data generated by the generative adversarial network model has low availability when the volume of training data is low or the training data is small, resulting in the generated data being unusable in practical applications.
A non-discrete data generation model based on local differential privacy is used to obtain multiple original data sets, perform noise processing according to the differential privacy noise strategy, and use the batch training strategy to input the noise data into the GRU-SeqGAN model to generate the same A number of simulation data of different categories are scrambled and summarized to obtain the final data result.
It effectively solves the problem of low availability of generated data, improves the overall availability of generated data, and provides new data protection ideas in machine learning technology, avoiding the direct intervention of gradient descent and parameter transfer within the model.
Smart Images

Figure CN116244739B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of academic early warning technology, and in particular to a method and device for generating a non-discrete data model based on local differential privacy. Background Art
[0002] Data security is a thorny issue in today's big data era, and technologies such as machine learning are frequently used in various data analysis tasks. In practical applications, when raw data is used for machine learning to complete data analysis and classification tasks, privacy issues are generally not considered carefully. With the safe use of data in various industries in recent years, how to obtain a good usable data set while ensuring the privacy of raw data has become the focus of industry research. Generative adversarial networks (GAN) provide new ideas for data security applications. In the field of GAN for generating data, the most representative derivative model suitable for non-discrete data is the SeqGAN (Sequence Generative Adversarial Nets) model, which combines LSTM (Long Short Term Memory) as a generator and CNN (Convolutional Neural Networks) as a discriminator. However, for low-dimensional or small training data, the complex gating unit of LSTM will lead to poor training effect of the generator, resulting in high similarity and overfitting of the generated data after the final game training, making the generated data almost unusable in practical applications. Summary of the invention
[0003] The present application provides a method for generating a non-discrete data model based on local differential privacy, which aims to solve the technical problem in the prior art that the generated result data has low availability when the generative adversarial network model is used for low-dimensional or small-volume training data.
[0004] This application provides a method for generating a non-discrete data model based on local differential privacy, including:
[0005] Obtain multiple original data sets, where the categories and proportions of the original data sets are different;
[0006] According to the categories of multiple original data sets, differential noise is performed according to the differential privacy noise adding strategy to obtain multiple noisy data;
[0007] A batch training strategy is used to input a plurality of the noise-added data into the GRU-SeqGAN to generate the same number of simulation data of different categories;
[0008] The simulation data is shuffled and summarized to obtain the final data results.
[0009] Preferably, the step of obtaining multiple original data sets includes:
[0010] Get real data;
[0011] Desensitizing and sorting the real data, and deleting the rows with vacancies, to obtain first original data;
[0012] The categories of the first original data are obtained, and the first original data are divided into a plurality of original data sets according to the categories.
[0013] Preferably, the step of performing differential noise addition according to the categories of the multiple original data sets and respectively using the differential privacy noise addition strategy to obtain multiple noised data includes:
[0014] Determine the privacy budget and sensitivity value;
[0015] The random noise is calculated based on the Laplace distribution, where the calculation formula is:
[0016] ;
[0017] Among them, f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, 2b represents the variance,
[0018] And the random noise needs to satisfy ε-differential privacy, expressed as:
[0019] ;
[0020] Among them, Δf represents the sensitivity value, and ε represents the privacy budget value;
[0021] Get the confusion value of Laplace noise;
[0022] Construct query functions of different categories to obtain original data sets of different categories, and in the acquisition process, add the obfuscation value to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is:
[0023] M(D)=f(D)+ f(x|μ,b);
[0024] in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise.
[0025] Preferably, the step of inputting a plurality of the noise-added data into the GRU-SeqGAN model using a batch training strategy to generate the same number of simulation data of different categories comprises:
[0026] Get the category information of each noisy data;
[0027] According to the category information, each noisy data is input into the GRU-SeqGAN model for training according to the preset quantity rule;
[0028] The noisy data after training is aggregated and randomly shuffled to obtain the same number of simulated data of different categories with labels.
[0029] Preferably, after the step of aggregating and randomly shuffling the trained noisy data to obtain the same number of simulated data of different categories with labels, the method further includes:
[0030] Input the sample data and the simulated data as training samples into the discriminator for pre-training to obtain the discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate the sample data, and the discriminator is used to determine whether the input training sample is from the simulated data or the sample data of the generator;
[0031] Based on Monte Carlo search, the discrimination probability is used as a reward, the generator is updated through policy gradient guidance, and the generator and the discriminator are made to compete with each other in a cyclic alternation. When the generator and the discriminator reach the Nash equilibrium point, the corresponding category data is generated.
[0032] The present application also provides a device for generating a non-discrete data model based on local differential privacy, comprising:
[0033] An acquisition module is used to acquire multiple original data sets, where the categories and proportions of the original data sets are different;
[0034] The differential noising module is used to perform differential noising according to the categories of multiple original data sets according to the differential privacy noising strategy to obtain multiple noisy data;
[0035] An input module, used for inputting a plurality of the noise-added data into the GRU-SeqGAN using a batch training strategy to generate the same number of simulation data of different categories;
[0036] The shuffle and aggregation module is used to shuffle and aggregate the simulation data to obtain the final data results.
[0037] Preferably, the acquisition module comprises:
[0038] A first acquisition unit, used to acquire real data;
[0039] A processing unit, configured to desensitize and sort the real data, and delete rows with vacancies, to obtain first original data;
[0040] The division unit is used to obtain the category of the first original data and divide the first original data into a plurality of original data sets according to the category.
[0041] Preferably, the differential noise adding module comprises:
[0042] A determination unit, used to determine a privacy budget value and a sensitivity value;
[0043] The calculation unit is used to calculate the random noise based on the Laplace distribution, wherein the calculation formula is:
[0044] ;
[0045] Among them, f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, 2b represents the variance,
[0046] And the random noise needs to satisfy ε-differential privacy, expressed as:
[0047] ;
[0048] Among them, Δf represents the sensitivity value, and ε represents the privacy budget value;
[0049] A second acquisition unit is used to obtain a Laplace noise-added aliasing value;
[0050] The construction unit is used to construct query functions of different categories to obtain original data sets of different categories, and in the acquisition process, the obfuscation value is added to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is:
[0051] M(D)=f(D)+ f(x|μ,b);
[0052] in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise.
[0053] Preferably, the input module comprises:
[0054] A third acquisition unit, used to acquire category information of each noise-added data;
[0055] A training unit, for inputting each noisy data into the GRU-SeqGAN model for training according to the category information and a preset quantity rule;
[0056] The summarization unit is used to summarize and randomly shuffle the noisy data after training to obtain the same number of simulated data of different categories with labels.
[0057] Preferably, the input module further comprises:
[0058] An input unit, used to input the sample data and the simulation data as training samples into the discriminator for pre-training to obtain a discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate sample data, and the discriminator is used to determine whether the input training sample is from the simulation data or the sample data of the generator;
[0059] The generation unit is used to use the discrimination probability as a reward based on Monte Carlo search, guide the generator to update through policy gradient, and make the generator and the discriminator compete with each other in a cyclic alternation. When the generator and the discriminator reach a Nash equilibrium point, the corresponding category data is generated.
[0060] The present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0061] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0062] The beneficial effects of this application are as follows: in response to the data privacy and security issues in the actual application of machine learning analysis technology, the differential privacy parallel combination property and differential privacy Laplace mechanism are used to complete the protection of non-discrete data, and the GRU-SeqGAN model is combined to complete the simulation data generation of non-discrete data; in response to the low availability of noise simulation data generated by the SeqGAN model in generating non-discrete short sequence data, a GRU-SeqGAN model optimized for the generator is proposed, which solves the category imbalance problem caused by the large difference in the number of sub-data sets after the data type classification of the original data, and also improves the overall availability of the generated data. Compared with the existing data privacy protection schemes known from the survey, this application is more topological, does not directly intervene in the gradient descent and parameter transfer inside the model, can effectively alleviate the experimental bugs caused by different application scenarios, and provides a new data protection idea in the process of applying machine learning technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 The figure is a schematic diagram of a method flow of an embodiment of the present application.
[0064] Figure 2This is a flow chart of a batch training strategy according to an embodiment of the present application.
[0065] Figure 3 Schematic diagram of the device structure of an embodiment of the present application.
[0066] Figure 4 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.
[0067] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0068] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0069] Definitions of Abbreviations and Key Terms:
[0070] GRU: Gated Recurrent Unit, gated recurrent unit
[0071] LSTM: Long Short Term Memory, long short-term memory network
[0072] GAN: Generative Adversarial Network, Generative Adversarial Network
[0073] LDP: Local Differential Privacy
[0074] SeqGAN: Sequence Generative Adversarial Nets, Sequence Adversarial Network
[0075] like Figure 1-Figure 4 As shown, the present application provides a method for generating a non-discrete data model based on local differential privacy, including:
[0076] S1. Obtain multiple original data sets, where the categories and proportions of the original data sets are different;
[0077] S2. According to the categories of multiple original data sets, differential noise is performed according to the differential privacy noise adding strategy to obtain multiple noisy data;
[0078] S3, using a batch training strategy to input a plurality of the noise-added data into the GRU-SeqGAN to generate the same number of simulation data of different categories;
[0079] S4. Shuffle and aggregate the simulation data to obtain the final data results.
[0080] As described in the above steps S1-S4, taking the academic early warning system as an example, the existing academic early warning systems all require a large amount of high-quality sample data to train the model. The essence of the systems is to complete the classification of various comprehensive data of students. The technologies used are generally common classification models, but such application scenarios have the following problems: 1) Student data is sensitive data, and directly inputting sensitive data into the model will retain certain data features in the model; 2) There is an imbalance in the data categories in the student group. For example, the proportion of poor students in a class is very low, which will cause an imbalance in the data categories; based on this, the present application adds noise that satisfies differential privacy to the original data set, so that attackers cannot trace the attack to the original data, and can resolve privacy risks from the root, ensuring privacy security in the training of the generated model without modifying or adjusting the model internally; then, the GRU-SeqGAN model is used to generate simulation data. Due to the uncoordinated proportions between student groups with different academic levels in the original data set, the categories of the original data set are not stable. Based on this, a batch training strategy is adopted, which can generate the same number of different categories of data respectively. Finally, after aggregation and shuffling, we obtain simulation data that can be highly available in downstream tasks; we solve the problem of category imbalance caused by the large difference in the number of sub-data sets after data type classification, and improve the overall availability of generated data. Compared with the existing data privacy protection schemes known from the survey, this application is more topological, does not directly intervene in the gradient descent and parameter transfer within the model, can effectively alleviate experimental bugs caused by different application scenarios, and provides a new data protection idea in the application of machine learning technology.
[0081] In one embodiment, the step S1 of acquiring multiple original data sets includes:
[0082] S11, obtain real data;
[0083] S12, desensitizing and sorting the real data, and deleting the rows with vacancies to obtain first original data;
[0084] S13: Obtain categories of the first original data, and divide the first original data into a plurality of original data sets according to the categories.
[0085] As described in the above steps S11-S13, the acquired real data is initially desensitized and sorted, redundant attributes such as ID, personal identity sensitive information in the data, etc. are removed, rows with missing values are deleted, and the data is divided into multiple original data sets according to categories. If there is no need to divide the data set categories, it can be used as a single data set.
[0086] In one embodiment, the step S2 of performing differential noise addition according to the differential privacy noise addition strategy according to the categories of the multiple original data sets to obtain multiple noised data includes:
[0087] S21. Determine the privacy budget value and sensitivity value;
[0088] S22. Calculate random noise based on Laplace distribution, where the calculation formula is:
[0089] ;
[0090] Where f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, 2b represents the variance,
[0091] And the random noise needs to satisfy ε-differential privacy, expressed as:
[0092] ;
[0093] Among them, Δf represents the sensitivity value, and ε represents the privacy budget value;
[0094] S23, obtaining the confusion value of Laplace noise;
[0095] S24, constructing query functions of different categories to obtain original data sets of different categories, and in the process of obtaining, adding the obfuscation value to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is:
[0096] M(D)=f(D)+ f(x|μ,b);
[0097] in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise.
[0098] As described in steps S21-S24 above, there are four main types of noise perturbations for differential privacy:
[0099] 1) Input perturbation: The original data D is perturbed. According to the Post-Processing property of ε-DP (differential privacy with a privacy budget of ε), no matter how the subsequent operations are performed, ε-DP is satisfied, and the data is protected at the source.
[0100] 2) Output perturbation: Add noise to the output data to make it satisfy ε-DP;
[0101] 3) Objective function perturbation: In order to ensure that the heaviest output is perturbed, in addition to adding noise directly to the output, this can also be achieved by modifying the objective function;
[0102] 4) Perturbation of the computational process: A common solution method in deep learning is the gradient descent method. The gradient contains relevant information about the data set. Adding noise to the gradient can perturb the input data and ensure that the final output is perturbed.
[0103] Differential privacy uses different noise-adding methods for different data types. For numerical data, Laplace or Gaussian mechanisms can be used to add random noise to the numerical results to achieve differential privacy. For non-numerical data, an exponential mechanism is generally used and a scoring function is introduced to obtain a score for each possible output, which is normalized and used as the probability value returned by the query.
[0104] Since the goal of this embodiment is to generate simulation data of non-discrete data, the output perturbation method and the Laplace noise addition method are selected. The principle of the Laplace noise addition method is to add Laplace noise to the random algorithm (such as the query of the original data) and make the result conform to the Laplace distribution as a whole. When facing the scene of dealing with complex problems, a single differential privacy protection algorithm often cannot solve the problem. Generally speaking, it is necessary to reasonably allocate privacy parameters and use multiple operations that meet differential privacy to protect the overall security, which can be algorithms or database queries, etc., which obey two theorems:
[0105] Theorem 1 (Serial Theorem): There are n operations A1, A2…An protected by differential privacy. When the combination operation A of these operations is applied to a certain dataset 𝐷, A satisfies εn-differential privacy protection, where εn is the sum of all privacy budgets from 1 to n.
[0106] Theorem 2 (Parallel property): There are n operations A1, A2…An that satisfy differential privacy protection, and each operation To satisfy this Differential privacy protection (where ),but The non-intersecting sub-datasets D1, D2…Dn divided by the dataset D are operated separately. The output obtained by the combined operation A composed of these operations satisfies ε-differential privacy protection.
[0107] The above theorem helps to process the noise addition of different categories of multi-category data sets to ensure that each category of data can obtain noise that does not cause too much impact on itself. Therefore, this embodiment performs differential noise addition on the divided multi-data sets according to the categories according to the differential privacy noise addition strategy, and defines the same ε value as the privacy budget. The n-category multi-data sets perform multiple operations that meet the differential privacy protection. Specifically, according to the differential privacy parallel theorem (Theorem 2), the combination of these n operations can meet the ε-differential privacy protection. It should be noted that if a single data set only performs one operation that meets the ε-differential privacy.
[0108] In one embodiment, the step S3 of inputting the plurality of noise-added data into the GRU-SeqGAN model using a batch training strategy to generate the same number of simulation data of different categories includes:
[0109] S31, obtaining category information of each noise-added data;
[0110] S32, according to the category information, and according to the preset quantity rule, each noise-added data is input into the GRU-SeqGAN model for training;
[0111] S33. Summarize and randomly shuffle the noisy data after training to obtain the same number of simulated data of different categories with labels.
[0112] As described in the above steps S31-S33, in the existing technology, recurrent neural networks have been widely used in NLP, such as in data synthesis models for discrete sequence data. Therefore, the SeqGAN network suitable for processing discrete data uses LSTM (LSTM, Long Short-Term Memory networks) as its generator and CNN (CNN, Convolutional Neural Networks) as the discriminator to achieve equilibrium in adversarial training. The original purpose of the proposal of the gated recurrent unit network (GRU, Gated Recurrent Unit networks) and the long short-term memory network was to solve the gradient disappearance problem of the recurrent neural network (RNN, Recurrent neural network). Both have internal mechanisms such as gate units (gate) for regulating information flow. Three gates and two memory states are introduced in LSTM, the input gate, the forget gate, and the output gate. The principle is that the previous network unit state Ct-1 is element-wise multiplied by the forget gate ft. Then multiply the current state Ct by the input gate it element by element, combine the current short memory Ct and the long-term memory Ct-1 together to form a new unit state Ct, use sigmoid as the activation function for the forget gate to filter the long-term memory Ct-1 features, and use the input gate control to update Ct, which represents the updated value of the unit state. The activation function is usually tanh, which is calculated by the current input xt and the hidden node ht-1. Finally, ht is calculated by the output gate ot and the unit state Ct as the complete input for the next time slice; as a serial operation, the network calculation speed of this method is relatively slow. When the input sequence length is short and the data set is small, the network's ability to effectively extract data features will deteriorate. However, GRU has made a lot of simplifications to the network structure based on LSTM. As a derivative network of LSTM, it has similar effects to LSTM. Since GRU uses the update gate zt as a replacement for the forget gate and input gate in LSTM, GRU determines how much previous memory there is, and the reset gate rt determines how to combine the new input with the filtered previous memory. The specific expression formula is as follows:
[0113] Update Gate: ;
[0114] Reset the gate: ;
[0115] Among them, W is a weight matrix, which is used to perform linear transformation on the matrix concatenated by xt and ht-1, and then multiply the two matrices and input them into sigmoid to obtain the value of rt.
[0116] When there are fewer sample data sets in a certain category, due to the large difference in the absolute values of different attribute data, it is necessary to normalize the training data. After the noise data is normalized, the original characteristics of the data will be further blurred. Due to the complex calculation of LSTM, it will cause overfitting, which will directly cause the model collapse of SeqGAN. This phenomenon will be more serious in the training of a small number of noisy data. Based on this, this embodiment uses GRU as the generator, so that its simplified gate structure can be used to effectively reduce this impact. Therefore, this embodiment uses GRU-SeqGAN based on GRU as the generation model, which can prevent it from overfitting; and the batch training strategy can be adopted to further prevent the SeqGAN model from collapsing. For the flowchart of the batch training strategy, please refer to Figure 2 First, the noisy data is preprocessed and classified according to the data characteristics to obtain class A data, class B data and class C data, and then it is input into the GRU-SeqGAN generation model for training respectively to obtain class A generated data, class B generated data and class C generated data. The above generated data are integrated and shuffled to obtain the same number of simulated data of different categories with labels.
[0117] In one embodiment, after the step S33 of aggregating and randomly shuffling the trained noisy data to obtain the same number of simulated data of different categories with labels, the following steps are included:
[0118] S331, inputting the sample data and the simulation data as training samples into the discriminator for pre-training to obtain the discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate the sample data, and the discriminator is used to determine whether the input training sample is from the simulation data or the sample data of the generator;
[0119] S332. Based on Monte Carlo search, the discrimination probability is used as a reward, and the generator is updated by guiding the policy gradient, and the generator and the discriminator are made to compete with each other in a cycle. When the generator and the discriminator reach a Nash equilibrium point, the corresponding category data is generated.
[0120] As described in the above steps S331 and S332, the GRU-SeqGAn model mainly includes a generator (G) and a discriminator (D). G is used to generate numerical sequence samples, and D is used to determine whether the input sample is from real data or sample data of G. The sample data is generated by G during the pre-training process, and the sample data is input into D for pre-training of the discriminator together with the simulation data. Monte Carlo search is used to take the discriminant probability returned by D as a reward, and the update of G is guided by the policy gradient. Finally, G and D compete with each other, and G and D are optimized alternately in a cycle until the Nash equilibrium point is reached, so that high-quality corresponding category data can be generated. Finally, the category data is shuffled and summarized to obtain the final result data.
[0121] The present application also provides a device for generating a non-discrete data model based on local differential privacy, comprising:
[0122] An acquisition module 1 is used to acquire multiple original data sets, wherein the original data sets have different categories and proportions;
[0123] The differential noising module 2 is used to perform differential noising according to the categories of multiple original data sets according to the differential privacy noising strategy to obtain multiple noisy data;
[0124] An input module 3 is used to input a plurality of the noise-added data into the GRU-SeqGAN using a batch training strategy to generate the same number of simulation data of different categories;
[0125] The scrambling and summarizing module 4 is used to scramble and summarize the simulation data to obtain the final data result.
[0126] In one embodiment, the acquisition module 1 includes:
[0127] A first acquisition unit, used to acquire real data;
[0128] A processing unit, configured to desensitize and sort the real data, and delete rows with vacancies, to obtain first original data;
[0129] The division unit is used to obtain the category of the first original data and divide the first original data into a plurality of original data sets according to the category.
[0130] In one embodiment, the differential noise adding module 2 includes:
[0131] A determination unit, used to determine a privacy budget value and a sensitivity value;
[0132] The calculation unit is used to calculate the random noise based on the Laplace distribution, wherein the calculation formula is:
[0133] ;
[0134] Among them, f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, 2b represents the variance,
[0135] And the random noise needs to satisfy ε-differential privacy, expressed as:
[0136] ;
[0137] Among them, Δf represents the sensitivity value, and ε represents the privacy budget value;
[0138] A second acquisition unit is used to obtain a Laplace noise-added aliasing value;
[0139] The construction unit is used to construct query functions of different categories to obtain original data sets of different categories, and in the acquisition process, the obfuscation value is added to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is:
[0140] M(D)=f(D)+ f(x|μ,b);
[0141] in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise.
[0142] In one embodiment, the input module 3 comprises:
[0143] A third acquisition unit, used to acquire category information of each noise-added data;
[0144] A training unit, for inputting each noisy data into the GRU-SeqGAN model for training according to the category information and a preset quantity rule;
[0145] The summarization unit is used to summarize and randomly shuffle the noisy data after training to obtain the same number of simulated data of different categories with labels.
[0146] In one embodiment, the input module 3 further includes:
[0147] An input unit, used to input the sample data and the simulation data as training samples into the discriminator for pre-training to obtain a discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate sample data, and the discriminator is used to determine whether the input training sample is from the simulation data or the sample data of the generator;
[0148] The generation unit is used to use the discrimination probability as a reward based on Monte Carlo search, guide the generator to update through policy gradient, and make the generator and the discriminator compete with each other in a cyclic alternation. When the generator and the discriminator reach a Nash equilibrium point, the corresponding category data is generated.
[0149] The above modules and units are used to execute the corresponding steps in the method of generating a non-discrete data model based on local differential privacy. The specific implementation method is described in the above method embodiment and will not be repeated here.
[0150] like Figure 4 As shown, the present application also provides a computer device, which may be a server, and its internal structure may be as shown in Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all data required for the process of the method of the non-discrete data generation model based on local differential privacy. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the method of the non-discrete data generation model based on local differential privacy is implemented.
[0151] Those skilled in the art will understand that Figure 4 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0152] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned methods for generating a non-discrete data model based on local differential privacy is implemented.
[0153] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0154] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0155] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for generating a non-discrete data model based on local differential privacy, applied to academic early warning, characterized in that: include: Obtain multiple original data sets, where the categories and proportions of the original data sets are different; According to the categories of multiple original data sets, differential noise is performed according to the differential privacy noise adding strategy to obtain multiple noisy data; A batch training strategy is used to input a plurality of the noise-added data into the GRU-SeqGAN to generate the same number of simulation data of different categories; The simulation data is shuffled and summarized to obtain the final data results; The step of obtaining multiple original data sets includes: Acquire real data, wherein the real data is personal identity sensitive information; Desensitizing and sorting the real data, and deleting the rows with vacancies, to obtain first original data; Acquire categories of the first original data, and divide the first original data into a plurality of original data sets according to the categories; The step of performing differential noise addition according to the categories of the multiple original data sets and respectively using the differential privacy noise addition strategy to obtain multiple noised data includes: Determine the privacy budget and sensitivity value; The random noise is calculated based on the Laplace distribution, where the calculation formula is: ; Among them, f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, And the random noise needs to satisfy ε-differential privacy, expressed as: ; Among them, Δf represents the sensitivity value, and ε represents the privacy budget value; Get the confusion value of Laplace noise; Construct query functions of different categories to obtain original data sets of different categories, and in the acquisition process, add the obfuscation value to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is: M(D)=f(D)+ f(x|μ,b); in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise; The step of inputting a plurality of the noise-added data into the GRU-SeqGAN model using a batch training strategy to generate the same number of simulation data of different categories includes: Get the category information of each noisy data; According to the category information, each noisy data is input into the GRU-SeqGAN model for training according to the preset quantity rule; Summarize and randomly shuffle the noisy data after training to obtain the same number of simulated data of different categories with labels; After the step of aggregating and randomly shuffling the trained noisy data to obtain the same number of simulated data of different categories with labels, the method further includes: Input the sample data and the simulated data as training samples into the discriminator for pre-training to obtain the discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate the sample data, and the discriminator is used to determine whether the input training sample is from the simulated data or the sample data of the generator; Based on Monte Carlo search, the discrimination probability is used as a reward, the generator is updated through policy gradient guidance, and the generator and the discriminator are made to compete with each other in a cyclic alternation. When the generator and the discriminator reach the Nash equilibrium point, the corresponding category data is generated.
2. A device for generating a non-discrete data model based on local differential privacy, applied to academic early warning, characterized in that: include: An acquisition module is used to acquire multiple original data sets, where the categories and proportions of the original data sets are different; The differential noising module is used to perform differential noising according to the categories of multiple original data sets according to the differential privacy noising strategy to obtain multiple noisy data; An input module, used for inputting a plurality of the noise-added data into the GRU-SeqGAN using a batch training strategy to generate the same number of simulation data of different categories; The shuffle and aggregation module is used to shuffle and aggregate the simulation data to obtain the final data results; The acquisition module comprises: A first acquisition unit is used to acquire real data, wherein the real data is personal identity sensitive information; A processing unit, configured to desensitize and sort the real data, and delete rows with vacancies, to obtain first original data; a division unit, configured to obtain a category of the first original data, and divide the first original data into a plurality of original data sets according to the category; The differential noise adding module comprises: A determination unit, used to determine a privacy budget value and a sensitivity value; The calculation unit is used to calculate the random noise based on the Laplace distribution, wherein the calculation formula is: ; Among them, f(x|μ, b) represents Laplace random noise, μ represents the mathematical expectation of Laplace distribution, b is the system parameter, And the random noise needs to satisfy ε-differential privacy, expressed as: ; Among them, Δf represents the sensitivity value, and ε represents the privacy budget value; A second acquisition unit is used to obtain a Laplace noise-added aliasing value; The construction unit is used to construct query functions of different categories to obtain original data sets of different categories, and in the acquisition process, the obfuscation value is added to the original data set to obtain noisy data, wherein the expression formula for adding the obfuscation value to the data set is: M(D)=f(D)+ f(x|μ,b); in, M (D) represents the noisy data, f(D) represents the query function, f(x|μ, b) represents Laplace random noise; The input module comprises: A third acquisition unit, used to acquire category information of each noise-added data; A training unit, for inputting each noisy data into the GRU-SeqGAN model for training according to the category information and a preset quantity rule; A summarizing unit is used to summarize and randomly shuffle the noise-added data after training to obtain the same number of simulated data of different categories with labels; The input module further includes: An input unit, used to input the sample data and the simulation data as training samples into the discriminator for pre-training to obtain a discrimination probability, wherein the GRU-SeqGAN model includes a generator and a discriminator, the generator is used to generate sample data, and the discriminator is used to determine whether the input training sample is from the simulation data or the sample data of the generator; The generation unit is used to use the discrimination probability as a reward based on Monte Carlo search, guide the generator to update through policy gradient, and make the generator and the discriminator compete with each other in a cyclic alternation. When the generator and the discriminator reach a Nash equilibrium point, the corresponding category data is generated.
Citation Information
Patent Citations
Deeply differential privacy protection method based on generative adversarial network
CN107368752A
WGAN-GP privacy protection system and method based on improved PATE
CN113553624A
