Sensitive information protection method and device, electronic equipment and storage medium
By preprocessing the original sensitive data and adversarial training of the autoencoder and generator, synthetic data is generated, and the problem of sensitive information leakage during data sharing is solved, and the effective privacy protection of sensitive data is achieved.
Patent Information
- Application Number
- CN202510010203.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-03
AI Technical Summary
On the premise of ensuring data validity and availability, how to maximize the privacy of sensitive data and solve the problem of key information leakage during data sharing.
By preprocessing the original sensitive data, training samples and non-sensitive features are generated, and adversarial training is used to use the autoencoder and generator to generate synthetic data. While retaining the original data distribution characteristics, synthetic data blurs sensitive information.
It realizes the maximum protection of sensitive data privacy without changing the effectiveness and availability of data, providing an effective solution for data sharing.
Smart Images

Figure CN119848934A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sensitive information protection technology, and in particular to a sensitive information protection method, device, electronic device and storage medium. Background Art
[0002] The advent of the big data era has greatly promoted the interaction of data in various industries, making data sharing increasingly extensive and in-depth. In order to improve the utilization rate of data, data holders often need to share data resources with other entities to promote production optimization, product quality improvement, and the healthy development of multiple fields such as finance, medical care, and the Internet. However, data sharing is not easy, and it faces severe challenges such as key information leakage. Considering the sensitive information contained in the data, such as core technical parameters in the industrial field, personal privacy and asset status in the financial field, patient living habits and medical history in the medical field, and personal privacy and company reputation in the Internet field, data holders often refuse to share due to security concerns, resulting in a large amount of data resources being wasted. At present, there are roughly three data sharing schemes: direct full sharing, partial sharing, and sensitive data protection sharing. Among them, direct full sharing is to share all data directly, which has serious security risks. Partial sharing is to selectively share part of the data to reduce the risk of sensitive information leakage, but it will greatly reduce the effect of the data in downstream applications. Sensitive data protection sharing refers to processing the data to reduce the sensitivity of the data without changing the meaning of the original data, thereby protecting personal privacy and information security. The development of effective sensitive data protection technology, that is, sharing and utilizing data with high quality while ensuring the security of sensitive data, is of great significance for breaking through upstream and downstream information barriers and promoting data-driven industrial upgrading. Summary of the invention
[0003] The present invention provides a sensitive information protection method, device, electronic device and storage medium, which are used to solve the technical problem of how to protect the privacy of sensitive data to the greatest extent while ensuring the validity and availability of the data.
[0004] The present invention provides a sensitive information protection method, comprising:
[0005] Get original sensitive data;
[0006] Performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features;
[0007] Using the training sample to train the autoencoder to obtain a trained autoencoder;
[0008] Performing adversarial training using the training sample, the trained autoencoder and preset noise to obtain a trained generator;
[0009] Inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data;
[0010] Decoding the potentially sensitive feature data to obtain decoded sensitive feature data;
[0011] The decoded sensitive feature data and the non-sensitive feature data are concatenated to obtain synthesized data.
[0012] Optionally, the step of performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features includes:
[0013] Converting the original sensitive data into array format data;
[0014] According to a preset number of sensitive features, randomly select non-sensitive features from the array format data, and use the array format data other than the non-sensitive features as sensitive features;
[0015] Arranging the non-sensitive features and the sensitive features to obtain an updated data set;
[0016] The updated data set is normalized to obtain training samples.
[0017] Optionally, the step of using the training sample to train the autoencoder to obtain a trained autoencoder includes:
[0018] Encoding and decoding the training samples using the autoencoder to generate reconstructed samples;
[0019] Calculating a mean square error loss between the reconstructed sample and the training sample;
[0020] The parameters of the autoencoder are adjusted based on the mean square error loss to obtain a trained autoencoder.
[0021] Optionally, the step of using the training sample, the trained autoencoder and preset noise to perform adversarial training to obtain a trained generator includes:
[0022] Inputting a training sample into an encoder to generate a first latent representation of the training sample;
[0023] Inputting a preset noise into a generator, and combining it with the trained autoencoder to generate a fake sample and a second potential representation of the fake sample;
[0024] Classifying the false sample and the second potential representation by a discriminator to obtain a classification result;
[0025] Calculating the classification error between the training sample and the fake sample according to the classification result;
[0026] Taking the minimization of the classification error as the optimization goal, adjusting the parameters of the discriminator to obtain an optimized discriminator;
[0027] The parameters of the optimized discriminator are fixed, and the error probability maximization of the optimized discriminator is taken as the optimization goal, and the generator is trained to obtain the optimized generator;
[0028] Determine whether the iteration termination condition is met;
[0029] If not, return to the step of inputting the training sample into the encoder to generate a first potential representation of the training sample;
[0030] If so, output the optimized generator as a trained generator.
[0031] Optionally, the step of inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data includes:
[0032] Splicing the non-sensitive features and the preset noise to generate input data;
[0033] The input data is input into the trained generator to generate potential sensitive feature data.
[0034] The present invention also provides a sensitive information protection device, comprising:
[0035] The original sensitive data acquisition module is used to acquire the original sensitive data;
[0036] A training sample and non-sensitive feature generation module, used to perform data preprocessing on the original sensitive data to generate training samples and non-sensitive features;
[0037] An autoencoder training module, used for training the autoencoder using the training samples to obtain a trained autoencoder;
[0038] A generator training module, used to perform adversarial training using the training sample, the trained autoencoder and preset noise to obtain a trained generator;
[0039] A potential sensitive feature data generating module, used for inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data;
[0040] A decoding module, used for decoding the potential sensitive feature data to obtain decoded sensitive feature data;
[0041] The synthetic data generation module is used to splice the decoded sensitive feature data and the non-sensitive feature to obtain synthetic data.
[0042] Optionally, the training sample and non-sensitive feature generation module includes:
[0043] An array format data conversion submodule, used to convert the original sensitive data into array format data;
[0044] A feature distinguishing submodule, used to randomly select non-sensitive features from the array format data according to a preset number of sensitive features, and use the array format data other than the non-sensitive features as sensitive features;
[0045] an arrangement submodule, used for arranging the non-sensitive features and the sensitive features to obtain an updated data set;
[0046] The normalization submodule is used to normalize the update data set to obtain training samples.
[0047] Optionally, the autoencoder training module comprises:
[0048] A reconstructed sample generation submodule, used to encode and decode the training sample using the autoencoder to generate a reconstructed sample;
[0049] A mean square error loss calculation submodule, used to calculate the mean square error loss between the reconstructed sample and the training sample;
[0050] An adjustment submodule is used to adjust the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.
[0051] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0052] The memory is used to store program code and transmit the program code to the processor;
[0053] The processor is used to execute any of the above sensitive information protection methods according to the instructions in the program code.
[0054] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the sensitive information protection method as described in any one of the above items.
[0055] It can be seen from the above technical scheme that the present invention has the following advantages: the present invention provides a sensitive information protection method, and specifically discloses: obtaining original sensitive data; performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features; using training samples to train the autoencoder to obtain a trained autoencoder; using training samples, trained autoencoders and preset noises for adversarial training to obtain a trained generator; inputting non-sensitive features and preset noises into the trained generator to generate potential sensitive feature data; decoding the potential sensitive feature data to obtain decoded sensitive feature data; splicing decoded sensitive feature data and non-sensitive features to obtain synthetic data. After the data preprocessing is completed, the present invention pre-trains the autoencoder to optimize its reconstruction capability. Subsequently, adversarial training of the generator and the discriminator is performed, and by alternately updating the parameters of the two, the generator can generate high-quality synthetic data, and the discriminator can accurately distinguish between real and synthetic data. Finally, the trained generator is used in combination with random noise and non-sensitive feature data to generate synthetic data, which blurs sensitive information while retaining the distribution characteristics of the original data, thereby achieving effective data sharing and privacy protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0057] Figure 1 A flowchart of a sensitive information protection method provided by an embodiment of the present invention;
[0058] Figure 2 A flowchart of a sensitive information protection method provided by another embodiment of the present invention;
[0059] Figure 3 A schematic diagram of data preprocessing provided by an embodiment of the present invention;
[0060] Figure 4 A schematic diagram of autoencoder training provided in an embodiment of the present invention;
[0061] Figure 5 A schematic diagram of an adversarial training process provided by an embodiment of the present invention;
[0062] Figure 6 A schematic diagram of generating synthetic data provided by an embodiment of the present invention;
[0063] Figure 7 A structural block diagram of a sensitive information protection device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The embodiments of the present invention provide a sensitive information protection method, device, electronic device and storage medium, which are used to solve the technical problem of how to protect the privacy of sensitive data to the greatest extent while ensuring the validity and availability of the data.
[0065] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] See also Figure 1 , Figure 1 A flowchart of the steps of a sensitive information protection method provided by an embodiment of the present invention.
[0067] The present invention provides a sensitive information protection method, which may specifically include the following steps:
[0068] Step 101, obtaining original sensitive data;
[0069] In the embodiments of the present invention, the original sensitive data may be different data depending on the field, such as data containing core technical parameters in the industrial field, data containing personal privacy and asset status in the financial field, data containing patient living habits and medical records in the medical field, and data containing personal privacy and company reputation in the Internet field.
[0070] Step 102, preprocessing the original sensitive data to generate training samples and non-sensitive features;
[0071] In the embodiment of the present invention, after obtaining the original sensitive data, data preprocessing can be performed on it to generate training samples and non-sensitive features. The processed data is encapsulated into a custom class, and finally a data loading tool is used to work with the encapsulated data set to generate iterable batch data for model training.
[0072] Step 103, using the training sample to train the autoencoder to obtain a trained autoencoder;
[0073] Autoencoder: An autoencoder is an unsupervised learning algorithm used to learn efficient encodings of input data. It consists of an encoder that compresses the input data into a latent representation and a decoder that reconstructs the input data from the latent representation. The autoencoder is trained by minimizing the reconstruction error, i.e. making the output of the decoder as close to the original input as possible. This helps learn a low-dimensional representation of the data and capture the intrinsic structure of the data.
[0074] In the embodiment of the present invention, after the training samples are obtained, the training samples can be used to train the autoencoder to obtain a trained autoencoder.
[0075] Step 104, using the training sample, the trained autoencoder and the preset noise to perform adversarial training to obtain a trained generator;
[0076] Generator: It is the core component in Generative Adversarial Networks (GANs). Its goal is to create data samples that are as realistic as possible to deceive the discriminator. The working principle is: the generator starts with random noise and tries to convert it into data points that look like the real data set. For example, in image generation, the generator will try to create new images that are similar to the images in the training set. The training process is: as the training progresses, the generator gradually learns the real distribution of the data and can produce more realistic and diverse outputs.
[0077] After completing the training of the autoencoder, the training samples, the trained autoencoder and the preset noise can be used for adversarial training to obtain the trained generator.
[0078] Step 105, inputting the non-sensitive features and the preset noise into the trained generator to generate potential sensitive feature data;
[0079] After extracting non-sensitive features from the original sensitive data, the non-sensitive features and preset noise can be input into the trained generator to generate potential sensitive feature data.
[0080] Step 106, decoding the potential sensitive feature data to obtain decoded sensitive feature data;
[0081] Step 107, concatenate and decode the sensitive feature data and the non-sensitive features to obtain synthetic data.
[0082] After obtaining the potential sensitive features, the decoder can be used to decode them to obtain decoded sensitive feature data, and then the sensitive decoded feature data and non-sensitive features are spliced to obtain synthetic data. This synthetic data not only retains the original non-sensitive features, but also contains the sensitive features generated by the generator, thereby effectively simulating the original sensitive data and protecting sensitive information. The entire generation process ensures that the synthetic data blurs the sensitive information while retaining the distribution characteristics of the original data, providing an effective solution for data sharing and privacy protection.
[0083] After data preprocessing, the present invention pre-trains the autoencoder to optimize its reconstruction capability. Subsequently, adversarial training of the generator and the discriminator is performed. By alternately updating the parameters of the two, the generator can generate high-quality synthetic data, while the discriminator can accurately distinguish between real and synthetic data. Finally, the trained generator is used to generate synthetic data in combination with random noise and non-sensitive feature data. These data blur sensitive information while retaining the distribution characteristics of the original data, thereby achieving effective data sharing and privacy protection.
[0084] See also Figure 2 , Figure 2 A flowchart of a sensitive information protection method provided by another embodiment of the present invention. Specifically, the following steps may be included:
[0085] Step 201, obtaining original sensitive data;
[0086] Step 202, converting the original sensitive data into array format data;
[0087] Step 203, randomly selecting non-sensitive features from the array format data according to the preset number of sensitive features, and using the array format data other than the non-sensitive features as sensitive features;
[0088] Step 204, arranging the non-sensitive features and the sensitive features to obtain an updated data set;
[0089] Step 205, normalizing the updated data set to obtain training samples;
[0090] In the embodiment of the present invention, Figure 3 As shown in the figure, data preprocessing includes two steps: feature selection and arrangement, and data processing.
[0091] The process of feature selection and arrangement is as follows: In the data set processing stage, the original sensitive data (including training set and test set data) is first read and converted into array format. Then, according to the specified number of sensitive features, non-sensitive features are randomly selected, and sensitive feature columns and non-sensitive feature columns are distinguished from the column name list. Then, the data set is rearranged, and the selected sensitive feature columns are moved to the far right to ensure the correct order of sensitive features and non-sensitive features, and the updated data set is obtained.
[0092] The data processing process includes: normalizing the update dataset, encapsulating the processed data into a custom class, and finally using the data loading tool to work with the encapsulated update dataset to generate iterable batch data for subsequent model training.
[0093] Step 206, using the training sample to train the autoencoder to obtain a trained autoencoder;
[0094] In the embodiment of the present invention, after the training samples are obtained, the training samples can be used to train the autoencoder to obtain a trained autoencoder.
[0095] In one example, step 206 may include the following sub-steps:
[0096] S61, using an autoencoder to encode and decode the training sample to generate a reconstructed sample;
[0097] S62, calculating the mean square error loss between the reconstructed sample and the training sample;
[0098] S63, adjusting the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.
[0099] In the specific implementation, Figure 4 As shown, the pre-training of the autoencoder is performed through multiple training cycles, in each cycle, the data loader provides training samples in batches. For each batch, the real training samples are transmitted to the specified device and the gradient of the autoencoder optimizer is reset. The autoencoder is then used to encode and decode the training samples of the current batch to generate reconstructed samples. The reconstruction ability of the autoencoder is evaluated by calculating the mean squared error loss (MSE) between the reconstructed samples and the training samples, and backpropagation is performed to update the parameters of the autoencoder. Within the predetermined sampling interval, the current training progress and loss value are printed out. After pre-training is completed, the state of the autoencoder and the optimizer state are saved to the specified path.
[0100]
[0101] in, Represents the reconstructed data of the i-th sample; represents the original data of the i-th sample, n represents the total number of data samples; s represents the original data set.
[0102] Mean Squared Error Loss: is a loss function that measures the difference between the model's predicted value and the true value. It calculates the average of the squares of the difference between the predicted value and the true value. MSE amplifies the prediction error by squaring the error, making larger errors contribute more to the function loss.
[0103] Step 207, using the training sample, the trained autoencoder and the preset noise to perform adversarial training to obtain a trained generator;
[0104] After completing the training of the autoencoder, the training samples, the trained autoencoder and the preset noise can be used for adversarial training to obtain the trained generator.
[0105] In one example, step 207 may include the following sub-steps:
[0106] S71, inputting the training sample into the encoder to generate a first potential representation of the training sample;
[0107] S72, inputting the preset noise into the generator, combining it with the trained autoencoder to generate a fake sample and a second potential representation of the fake sample;
[0108] S73, classifying the false sample and the second potential representation through a discriminator to obtain a classification result;
[0109] S74, calculating the classification error between the training sample and the fake sample according to the classification result;
[0110] S75, taking the minimum classification error as the optimization goal, adjusting the parameters of the discriminator to obtain an optimized discriminator;
[0111] S76, fixing the parameters of the optimized discriminator, taking maximizing the error probability of the optimized discriminator as the optimization goal, training the generator, and obtaining an optimized generator;
[0112] S77, determining whether an iteration termination condition is met;
[0113] S78, if not, return to the step of inputting the training sample into the encoder to generate a first potential representation of the training sample;
[0114] S79: If yes, output the optimized generator as the trained generator.
[0115] In the specific implementation, Figure 5 As shown in Figure 2, during the adversarial training process, the model first trains the discriminator. For each training batch, the training samples ( Figure 5The original data in the autoencoder) is input into the encoder to generate the first potential representation of the training sample, and then the preset noise is input into the generator, which is combined with the trained autoencoder to generate fake samples and the second potential representation of the fake samples. The training samples, fake samples and corresponding potential representations are input into the discriminator, which generates the classification results of the fake samples and compares them with the types of the training samples to obtain the classification error (Binary Cross-Entropy, BCE); then the parameters of the discriminator are optimized by minimizing the classification error to obtain the optimized discriminator.
[0116] Classification error (BinaryCross-Entropy, BCE), also known as binary cross entropy loss, is a loss function used for binary classification problems. It measures the difference between the probability distribution predicted by the model and the true label distribution. BCE is based on the concept of cross entropy in information theory and evaluates the difference by calculating the approximate value of the KL divergence (Kullback-Leibler Divergence) between the probability distribution predicted by the model and the true distribution. When the probability predicted by the model is close to the true label, the BCE loss value is small; conversely, when the predicted probability is far from the true label, the loss value is large.
[0117] After the optimization of the discriminator is completed, the parameters of the discriminator are fixed, and the generator tries to generate fake samples that can deceive the discriminator, that is, to maximize the probability that the discriminator misjudges the fake samples as real samples. At the same time, the encoder is also trained to optimize the potential representation so that it can better assist the generator in generating high-quality fake samples. During the training process, the reconstruction error and the maximum mean difference (MMD) loss can also be calculated to further guide the optimization of the model. Through continuous iteration of this process, the performance of the generator and the discriminator gradually improves, and finally the generator is able to generate high-quality synthetic data similar to the distribution of real data.
[0118] Maximum Mean Discrepancy (MMD): is a nonparametric statistic that measures the difference between two probability distributions. MMD evaluates the difference in the distributions of two sample sets by calculating the mean difference in the reproducing kernel Hilbert space. The smaller the MMD value, the more similar the two distributions are.
[0119]
[0120] in, Represents the data that needs to be distinguished, and y represents the assumed label x i Represents the true label of the i-th data that needs to be distinguished, y i represents the hypothesized label of the i-th sample.
[0121]
[0122] Among them, x i is the i-th original data, y i is the i-th synthetic data, n is the number of original data samples, and m is the number of synthetic data samples.
[0123] Step 208, inputting the non-sensitive features and the preset noise into the trained generator to generate potential sensitive feature data;
[0124] After extracting non-sensitive features from the original sensitive data, the non-sensitive features and preset noise can be input into the trained generator to generate potential sensitive feature data.
[0125] In one example, step 208 may include the following sub-steps:
[0126] S81, concatenate non-sensitive features and preset noise to generate input data;
[0127] S82, input the input data into the trained generator to generate potential sensitive feature data.
[0128] In the specific implementation, Figure 6 As shown, first load the trained generator model and the weights of the autoencoder decoder from the specified path. After loading, set the two models to evaluation mode, which is to avoid unnecessary gradient calculations and model parameter updates when generating data, thereby speeding up the generation and ensuring the stability of the generation process. Next, extract non-sensitive features from the dataset, which will be retained when generating synthetic data. At the same time, generate random noise vectors with the same number of samples as the dataset, which serve as the latent space input of the generator to provide diversity for the generator, enabling it to generate different but reasonable synthetic data samples. Subsequently, the random noise vectors are concatenated with the non-sensitive features to form complete input data, and the concatenated input data is input into the generator model. The generator model uses these input data to generate potential sensitive feature data (corresponding to the sensitive part of the original sensitive data), which represents the sensitive part of the synthetic data in the latent space.
[0129] Step 209, decoding the potential sensitive feature data to obtain decoded sensitive feature data;
[0130] Step 210, concatenate and decode sensitive feature data and non-sensitive features to obtain synthetic data.
[0131] like Figure 6As shown in the figure, after obtaining the potential sensitive features, the decoder can be used to decode them to obtain decoded sensitive feature data, and then the sensitive decoded feature data and the non-sensitive part of the data (non-sensitive features) are spliced to obtain safe and effective synthetic data. This synthetic data not only retains the original non-sensitive features, but also contains the sensitive features generated by the generator, thereby achieving effective simulation of the original sensitive data and protecting sensitive information. The entire generation process ensures that the synthetic data blurs the sensitive information while retaining the distribution characteristics of the original data, providing an effective solution for data sharing and privacy protection.
[0132] After data preprocessing, the present invention pre-trains the autoencoder to optimize its reconstruction capability. Subsequently, adversarial training of the generator and the discriminator is performed. By alternately updating the parameters of the two, the generator can generate high-quality synthetic data, while the discriminator can accurately distinguish between real and synthetic data. Finally, the trained generator is used to generate synthetic data in combination with random noise and non-sensitive feature data. These data blur sensitive information while retaining the distribution characteristics of the original data, thereby achieving effective data sharing and privacy protection.
[0133] See also Figure 7 , Figure 7 A structural block diagram of a sensitive information protection device provided in an embodiment of the present invention.
[0134] An embodiment of the present invention provides a sensitive information protection device, including:
[0135] The original sensitive data acquisition module 701 is used to acquire the original sensitive data;
[0136] The training sample and non-sensitive feature generation module 702 is used to perform data preprocessing on the original sensitive data to generate training samples and non-sensitive features;
[0137] An autoencoder training module 703 is used to train the autoencoder using training samples to obtain a trained autoencoder;
[0138] A generator training module 704 is used to perform adversarial training using training samples, a trained autoencoder and preset noise to obtain a trained generator;
[0139] Potentially sensitive feature data generating module 705, used to input non-sensitive features and preset noise into the trained generator to generate potentially sensitive feature data;
[0140] A decoding module 706, used to decode the potential sensitive feature data to obtain decoded sensitive feature data;
[0141] The synthetic data generation module 707 is used to splice and decode sensitive feature data and non-sensitive features to obtain synthetic data.
[0142] In the embodiment of the present invention, the training sample and non-sensitive feature generation module 702 includes:
[0143] An array format data conversion submodule, used to convert original sensitive data into array format data;
[0144] A feature distinguishing submodule, used to randomly select non-sensitive features from the array format data according to a preset number of sensitive features, and use the array format data other than the non-sensitive features as sensitive features;
[0145] The arrangement submodule is used to arrange non-sensitive features and sensitive features to obtain an updated data set;
[0146] The normalization submodule is used to normalize the update data set to obtain training samples.
[0147] In this embodiment of the present invention, the autoencoder training module 703 includes:
[0148] A reconstruction sample generation submodule is used to encode and decode the training samples using an autoencoder to generate a reconstructed sample;
[0149] The mean square error loss calculation submodule is used to calculate the mean square error loss between the reconstructed sample and the training sample;
[0150] The adjustment submodule is used to adjust the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.
[0151] In this embodiment of the present invention, the generator training module 704 includes:
[0152] A first latent representation generating submodule, configured to input a training sample into an encoder to generate a first latent representation of the training sample;
[0153] A fake sample and second potential representation generation submodule, used to input a preset noise into the generator, and generate a fake sample and a second potential representation of the fake sample in combination with the trained autoencoder;
[0154] A classification submodule, used for classifying the false samples and the second potential representation through a discriminator to obtain a classification result;
[0155] A classification error calculation submodule is used to calculate the classification error between the training sample and the fake sample according to the classification result;
[0156] The discriminator optimization submodule is used to adjust the parameters of the discriminator with the minimum classification error as the optimization goal to obtain the optimized discriminator;
[0157] The generator training submodule is used to fix the parameters of the optimized discriminator, take the maximum error probability of the optimized discriminator as the optimization goal, train the generator, and obtain the optimized generator;
[0158] A judgment submodule is used to judge whether the iteration termination condition is met;
[0159] A return submodule, for returning to the step of inputting the training sample into the encoder to generate a first potential representation of the training sample if no;
[0160] The trained generator output submodule is used to output the optimized generator as a trained generator if so.
[0161] In the embodiment of the present invention, the potentially sensitive feature data generating module 705 includes:
[0162] The splicing submodule is used to splice non-sensitive features and preset noise to generate input data;
[0163] The potential sensitive feature data generation submodule is used to input the input data into the trained generator to generate potential sensitive feature data.
[0164] An embodiment of the present invention further provides an electronic device, the device comprising a processor and a memory:
[0165] The memory is used to store the program code and transmit the program code to the processor;
[0166] The processor is used to execute the sensitive information protection method of the embodiment of the present invention according to the instructions in the program code.
[0167] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the sensitive information protection method of the embodiment of the present invention.
[0168] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0169] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0170] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0171] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0174] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0175] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0176] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A sensitive information protection method, characterized in that: include: Get original sensitive data; Performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features; Using the training sample to train the autoencoder to obtain a trained autoencoder; Performing adversarial training using the training sample, the trained autoencoder and preset noise to obtain a trained generator; Inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data; Decoding the potentially sensitive feature data to obtain decoded sensitive feature data; The decoded sensitive feature data and the non-sensitive feature data are concatenated to obtain synthesized data.
2. The method according to claim 1, characterized in that: The step of preprocessing the original sensitive data to generate training samples and non-sensitive features includes: Converting the original sensitive data into array format data; According to a preset number of sensitive features, randomly select non-sensitive features from the array format data, and use the array format data other than the non-sensitive features as sensitive features; Arranging the non-sensitive features and the sensitive features to obtain an updated data set; The updated data set is normalized to obtain training samples.
3. The method according to claim 1, characterized in that The step of using the training sample to train the autoencoder to obtain a trained autoencoder comprises: Encoding and decoding the training samples using the autoencoder to generate reconstructed samples; Calculating a mean square error loss between the reconstructed sample and the training sample; The parameters of the autoencoder are adjusted based on the mean square error loss to obtain a trained autoencoder.
4. The method according to claim 1, characterized in that: The step of using the training sample, the trained autoencoder and the preset noise to perform adversarial training to obtain a trained generator includes: Inputting a training sample into an encoder to generate a first latent representation of the training sample; Inputting a preset noise into a generator, and combining it with the trained autoencoder to generate a fake sample and a second potential representation of the fake sample; Classifying the false sample and the second potential representation by a discriminator to obtain a classification result; Calculating the classification error between the training sample and the fake sample according to the classification result; Taking the minimization of the classification error as the optimization goal, adjusting the parameters of the discriminator to obtain an optimized discriminator; The parameters of the optimized discriminator are fixed, and the error probability maximization of the optimized discriminator is taken as the optimization goal, and the generator is trained to obtain the optimized generator; Determine whether the iteration termination condition is met; If not, return to the step of inputting the training sample into the encoder to generate a first potential representation of the training sample; If so, output the optimized generator as a trained generator.
5. The method according to claim 1, characterized in that The step of inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data comprises: Splicing the non-sensitive features and the preset noise to generate input data; The input data is input into the trained generator to generate potential sensitive feature data.
6. A sensitive information protection device, characterized in that: include: The original sensitive data acquisition module is used to acquire the original sensitive data; A training sample and non-sensitive feature generation module, used to perform data preprocessing on the original sensitive data to generate training samples and non-sensitive features; An autoencoder training module, used for training the autoencoder using the training samples to obtain a trained autoencoder; A generator training module, used to perform adversarial training using the training sample, the trained autoencoder and preset noise to obtain a trained generator; A potential sensitive feature data generating module, used for inputting the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data; A decoding module, used for decoding the potential sensitive feature data to obtain decoded sensitive feature data; The synthetic data generation module is used to splice the decoded sensitive feature data and the non-sensitive feature to obtain synthetic data.
7. The device according to claim 6, characterized in that The training sample and non-sensitive feature generation module includes: An array format data conversion submodule, used to convert the original sensitive data into array format data; A feature distinguishing submodule, used for randomly selecting non-sensitive features from the array format data according to a preset number of sensitive features, and using the array format data other than the non-sensitive features as sensitive features; an arrangement submodule, used for arranging the non-sensitive features and the sensitive features to obtain an updated data set; The normalization submodule is used to normalize the update data set to obtain training samples.
8. The device according to claim 6, characterized in that The autoencoder training module comprises: A reconstructed sample generation submodule, used to encode and decode the training sample using the autoencoder to generate a reconstructed sample; A mean square error loss calculation submodule, used to calculate the mean square error loss between the reconstructed sample and the training sample; An adjustment submodule is used to adjust the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.
9. An electronic device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the sensitive information protection method described in any one of claims 1-5 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program code, and the program code is used to execute the sensitive information protection method described in any one of claims 1-5.
Citation Information
Patent Citations
Construction method and device of user classification system for protecting user privacy
CN111400754A
Training method and device of data generation system based on differential privacy
CN111523668A
Privacy protection data generation method based on generative adversarial network
CN115936107A
Method for training text graph model and generating target image through model
CN118887686A
Learning device, data generation device, learning method, and learning program
JP2024131078A