A sensitive information protection method and device, electronic equipment and storage medium

By using adversarial training of autoencoders and generators, synthetic data is generated, which solves the problem of protecting sensitive information in data sharing and achieves effective data sharing and privacy protection.

CN119848934BActive Publication Date: 2025-12-19SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510010203.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-12-19
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

In the process of data sharing, how can we protect the privacy of sensitive data to the greatest extent possible and avoid information leakage while ensuring the validity and availability of the data?

Method used

By training the autoencoder and generator adversarially, synthetic data is generated, blurring sensitive information while retaining non-sensitive features, thus achieving effective data sharing.

Benefits of technology

The generated synthetic data retains the distribution characteristics of the original data while obscuring sensitive information, thus achieving effective data sharing and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848934B_ABST
    Figure CN119848934B_ABST
Patent Text Reader

Abstract

The application discloses a sensitive information protection method and device, electronic equipment and storage medium, and aims to solve the technical problem of how to protect the privacy of sensitive data to the greatest extent while ensuring data validity and availability. The method comprises the following steps: obtaining original sensitive data; performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features; training an autoencoder using the training samples to obtain a trained autoencoder; performing adversarial training on the training samples, the trained autoencoder and preset noise to obtain a trained generator; inputting the non-sensitive features and the preset noise into the trained generator to generate latent sensitive feature data; decoding the latent sensitive feature data to obtain decoded sensitive feature data; and splicing the decoded sensitive feature data and the non-sensitive features to obtain synthetic data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of sensitive information protection, and in particular to a sensitive information protection method and device, an electronic device and a storage medium. BACKGROUND

[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 data utilization, data holders often need to share data resources with other entities to promote production optimization, product quality improvement, and the healthy development of financial, medical, and Internet fields. However, data sharing is not easy, and it faces serious 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 situation in the financial field, patient 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 wasted data resources. Currently, there are three schemes for data sharing: direct complete sharing, partial sharing, and sensitive data protection sharing. Among them, direct complete sharing directly shares all data, which has serious security risks. Partial sharing selectively shares part of the data to reduce the risk of sensitive information leakage, but greatly reduces the effect of data in downstream applications. Sensitive data protection sharing refers to processing data to reduce data sensitivity without changing the original data meaning, thereby protecting personal privacy and information security. Developing effective sensitive data protection technology, i.e., sharing and utilizing data with high quality on the premise of ensuring sensitive data security, has important significance for breaking down the information barriers between upstream and downstream and promoting data-driven industrial upgrading. SUMMARY

[0003] The present application provides a sensitive information protection method, device, electronic device and storage medium, which solves the technical problem of how to protect the privacy of sensitive data to the greatest extent while ensuring the effectiveness and availability of data.

[0004] The present application provides a sensitive information protection method, comprising:

[0005] obtaining original sensitive data;

[0006] performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features;

[0007] training an autoencoder using the training samples to obtain a trained autoencoder;

[0008] performing adversarial training using the training samples, the trained autoencoder and a preset noise to obtain a trained generator;

[0009] inputting the non-sensitive feature and the preset noise into the trained generator to generate latent sensitive feature data;

[0010] decoding the latent sensitive feature data to obtain decoded sensitive feature data;

[0011] splicing the decoded sensitive feature data and the non-sensitive feature to obtain synthetic data.

[0012] Optionally, the step of performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features comprises:

[0013] converting the original sensitive data into array format data;

[0014] randomly selecting non-sensitive features from the array format data according to a preset specified number of sensitive features, and taking 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] normalizing the updated data set to obtain training samples.

[0017] Optionally, the step of training the autoencoder using the training samples to obtain a trained autoencoder comprises:

[0018] encoding and decoding the training samples using the autoencoder to generate reconstructed samples;

[0019] calculating a mean square error loss between the reconstructed samples and the training samples;

[0020] adjusting parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.

[0021] Optionally, the step of performing adversarial training using the training samples, the trained autoencoder, and a preset noise to obtain a trained generator comprises:

[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 to generate a fake sample and a second latent representation of the fake sample in combination with the trained autoencoder;

[0024] classifying the fake sample and the second latent representation by a discriminator to obtain a classification result;

[0025] calculating a classification error between the training sample and the fake sample according to the classification result;

[0026] adjusting parameters of the discriminator to obtain an optimized discriminator, taking the classification error as an optimization target;

[0027] fixing the parameters of the optimized discriminator, training the generator to obtain an optimized generator, taking the error probability of the optimized discriminator as an optimization target;

[0028] determining whether an iteration termination condition is met;

[0029] if not, returning to the step of inputting the training sample into the encoder to generate the first latent representation of the training sample;

[0030] if yes, outputting 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 latent sensitive feature data comprises:

[0032] splicing the non-sensitive feature and the preset noise to generate input data;

[0033] inputting the input data into the trained generator to generate latent sensitive feature data.

[0034] The application further provides a sensitive information protection device, comprising:

[0035] an original sensitive data acquisition module configured to acquire original sensitive data;

[0036] a training sample and non-sensitive feature generation module configured to perform data preprocessing on the original sensitive data to generate a training sample and a non-sensitive feature;

[0037] a self-encoder training module configured to train a self-encoder using the training sample to obtain a trained self-encoder;

[0038] a generator training module configured to perform adversarial training using the training sample, the trained self-encoder and a preset noise to obtain a trained generator;

[0039] a latent sensitive feature data generation module configured to input the non-sensitive feature and the preset noise into the trained generator to generate latent sensitive feature data;

[0040] a decoding module configured to decode the latent sensitive feature data to obtain decoded sensitive feature data;

[0041] a synthetic data generation module configured 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 comprises:

[0043] An array format data conversion submodule is configured to convert the original sensitive data into array format data.

[0044] A feature distinguishing submodule is configured to randomly select non-sensitive features from the array format data according to a preset specified number of sensitive features, and take the array format data other than the non-sensitive features as sensitive features.

[0045] An arrangement submodule is configured to arrange the non-sensitive features and the sensitive features to obtain an updated data set.

[0046] A normalization submodule is configured to normalize the updated data set to obtain training samples.

[0047] Optionally, the autoencoder training module comprises:

[0048] A reconstructed sample generation submodule is configured to encode and decode the training samples by using the autoencoder to generate reconstructed samples.

[0049] A mean square error loss calculation submodule is configured to calculate a mean square error loss between the reconstructed samples and the training samples.

[0050] An adjustment submodule is configured to adjust parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.

[0051] The present application also provides an electronic device, which comprises a processor and a memory:

[0052] The memory is configured to store program code and transmit the program code to the processor.

[0053] The processor is configured to execute the sensitive information protection method according to the instructions in the program code.

[0054] The present application also provides a computer readable storage medium for storing program code, which is used to execute the sensitive information protection method.

[0055] From the above technical scheme can be seen, the present application has the following advantages: the present application provides a sensitive information protection method, and specifically discloses: obtaining original sensitive data;Original sensitive data is preprocessed, and training sample and non-sensitive feature are generated;Training sample is used to train the autoencoder, and the trained autoencoder is obtained;Adversarial training is carried out by using training sample, trained autoencoder and preset noise, and trained generator is obtained;The non-sensitive feature and the preset noise are input into the trained generator, and the latent sensitive feature data is generated;Decoding sensitive feature data is obtained;Splicing decoding sensitive feature data and non-sensitive feature, obtaining synthetic data. The present application pretrains the autoencoder after data preprocessing to optimize its reconstruction ability. Subsequently, the generator and the discriminator are trained in an adversarial manner, and the parameters of the two are alternately updated, so that the generator can generate high-quality synthetic data, and the discriminator can accurately distinguish between real and synthetic data. Finally, using the trained generator, combined with random noise and non-sensitive feature data, synthetic data is generated, which retains the distribution characteristics of the original data while blurring the sensitive information, thereby realizing effective sharing and privacy protection of data. BRIEF DESCRIPTION OF DRAWINGS

[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0057] Figure 1 A step flow chart of a sensitive information protection method provided by an embodiment of the present application is provided.

[0058] Figure 2 A step flow chart of a sensitive information protection method provided by another embodiment of the present application is provided.

[0059] Figure 3 A data preprocessing schematic diagram provided by an embodiment of the present application is provided.

[0060] Figure 4 A self-encoder training schematic diagram provided by an embodiment of the present application is provided.

[0061] Figure 5 An adversarial training process schematic diagram provided by an embodiment of the present application is provided.

[0062] Figure 6 A synthetic data generation schematic diagram provided by an embodiment of the present application is provided.

[0063] Figure 7 A structural block diagram of a sensitive information protection device provided by an embodiment of the present application is provided. DETAILED DESCRIPTION

[0064] The embodiment of the present application provides a sensitive information protection method and device, electronic equipment and a storage medium, which are used for solving the technical problem of how to protect the privacy of sensitive data to the greatest extent under the premise of ensuring data validity and availability.

[0065] In order to make the technical scheme of the present application clearer and easier to understand, the technical scheme in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the embodiments described below are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0066] Please refer to Figure 1 , Figure 1 A sensitive information protection method provided by the embodiment of the present application is shown in the flowchart.

[0067] The sensitive information protection method provided by the present application can specifically include the following steps:

[0068] Step 101, obtaining original sensitive data;

[0069] In the embodiment of the present application, the original sensitive data can be different data according to different fields, such as data containing core technical parameters in the industrial field, data containing personal privacy and asset conditions in the financial field, data containing patient living habits and medical history in the medical field, and data containing personal privacy and company reputation in the Internet field.

[0070] Step 102, performing data preprocessing on the original sensitive data to generate training samples and non-sensitive features;

[0071] In the embodiment of the present application, after obtaining the original sensitive data, the original sensitive data can be preprocessed to generate training samples and non-sensitive features. The processed data is encapsulated into a custom class, and finally the data loading tool is used to work with the encapsulated data set to generate an iterable batch data for model training.

[0072] Step 103, training the autoencoder by using the training samples to obtain a trained autoencoder;

[0073] Autoencoder: An autoencoder is an unsupervised learning algorithm that learns an efficient encoding of input data. It consists of an encoder and a decoder, where the encoder compresses the input data into a latent representation, and the decoder 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 as possible to the original input. This helps to learn a low-dimensional representation of the data that captures the intrinsic structure of the data.

[0074] In the embodiments of the present application, after obtaining the training samples, the training samples can be used to train the autoencoder to obtain a trained autoencoder.

[0075] Step 104, using the training samples, the trained autoencoder and the preset noise to perform adversarial training to obtain a trained generator;

[0076] Generator: The generator is a core component in generative adversarial networks (GANs), whose goal is to create data samples that are as realistic as possible to deceive the discriminator. The working principle is as follows: the generator starts from random noise and tries to convert it into data points that look like real data sets. For example, in image generation, the generator tries to create new images similar to the images in the training set. The training process is as follows: as the training progresses, the generator gradually learns the true 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 to perform adversarial training to obtain a trained generator.

[0078] Step 105, inputting the non-sensitive features and the preset noise into the trained generator to generate latent sensitive feature data;

[0079] After extracting the non-sensitive features from the original sensitive data, the non-sensitive features and the preset noise can be input into the trained generator to generate latent sensitive feature data.

[0080] Step 106, decoding the latent sensitive feature data to obtain decoded sensitive feature data;

[0081] Step 107, concatenating the decoded sensitive feature data and the non-sensitive features to obtain synthetic data.

[0082] After obtaining the potential sensitive features, a decoder can be used to decode them to obtain decoded sensitive feature data, and then the sensitive decoded feature data and the 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 achieving effective simulation of the original sensitive data and the purpose of protecting sensitive information. The entire generation process ensures that the synthetic data retains the distribution characteristics of the original data while blurring the sensitive information, providing an effective solution for data sharing and privacy protection.

[0083] The present application pre-trains the autoencoder after data preprocessing to optimize its reconstruction ability. Then, the generator and the discriminator are trained in an adversarial manner, and 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, using the trained generator, combined with random noise and non-sensitive feature data, synthetic data is generated, which retains the distribution characteristics of the original data while blurring the sensitive information, thereby achieving effective sharing and privacy protection of data.

[0084] Please refer to Figure 2 , Figure 2 A step flow chart of a sensitive information protection method provided by another embodiment of the present application. Specifically, it can include the following steps:

[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 a pre-set specified number of sensitive features, and taking 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 application, as shown in Figure 3 , data preprocessing includes two links of feature selection and arrangement and data processing.

[0091] The process of feature selection and arrangement is as follows: in the data set processing stage, first, the original sensitive data (including training set and test set data) are 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 rightmost side to ensure the correct order of sensitive features and non-sensitive features, and an updated data set is obtained.

[0092] The data processing process includes: normalizing the updated data set, encapsulating the processed data into a custom class, and finally using the data loading tool to work with the encapsulated updated data set to generate an iterable batch data for subsequent model training.

[0093] Step 206, training the autoencoder with the training samples to obtain a trained autoencoder;

[0094] In the embodiment of the application, after obtaining the training samples, the training samples can be used to train the autoencoder to obtain a trained autoencoder.

[0095] In one example, step 206 can include the following sub-steps:

[0096] S61, encoding and decoding the training samples using the autoencoder to generate reconstructed samples;

[0097] S62, calculating the mean square error loss between the reconstructed samples and the training samples;

[0098] S63, adjusting the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.

[0099] In a specific implementation, as shown in Figure 4 Pre-training of the autoencoder is performed through multiple training cycles, and in each cycle, the data loader provides training samples in batches. For each batch, the real training samples are transmitted to the designated device, and the gradient of the autoencoder optimizer is reset. Then the current batch of training samples is encoded and decoded using the autoencoder to generate reconstructed samples. By calculating the mean square error loss (MSE) between the reconstructed samples and the training samples, the reconstruction ability of the autoencoder is evaluated, and back propagation is performed to update the parameters of the autoencoder. At predetermined sampling intervals, the current training progress and loss value are printed. After pre-training is completed, the state of the autoencoder and the optimizer state are saved to the specified path.

[0100]

[0101] wherein, 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: A loss function that measures the difference between the predicted values of a model and the true values. It calculates the average of the squares of the differences between the predicted values and the true values. MSE amplifies prediction errors by squaring them, 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 sample, the trained autoencoder and the preset noise can be used to perform adversarial training to obtain a trained generator.

[0105] In one example, step 207 can include the following sub-steps:

[0106] S71, inputting the training sample into the encoder to generate a first latent representation of the training sample;

[0107] S72, inputting the preset noise into the generator to generate a fake sample and a second latent representation of the fake sample in combination with the trained autoencoder;

[0108] S73, classifying the fake sample and the second latent representation by the 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, adjusting the parameters of the discriminator to obtain an optimized discriminator, with the minimum classification error as the optimization target;

[0111] S76, fixing the parameters of the optimized discriminator, training the generator to obtain an optimized generator, with the maximum error probability of the optimized discriminator as the optimization target;

[0112] S77, determining whether an iteration termination condition is met;

[0113] S78, if not, returning to the step of inputting the training sample into the encoder to generate the first latent representation of the training sample;

[0114] S79, if yes, outputting the optimized generator as the trained generator.

[0115] In a specific implementation, as shown in FIG. 7, in the adversarial training process, the model first performs training of the discriminator. For each training batch, the training sample (x) is input into the encoder to generate the first latent representation (z) of the training sample, and the preset noise (z') is input into the generator to generate the fake sample (x') and the second latent representation (z') of the fake sample. Figure 5 Figure 5 ​The original data in the input encoder, generate the first latent representation of the training sample, and then input the preset noise into the generator, combine the trained autoencoder to generate the fake sample and the second latent representation of the fake sample. The training sample, the fake sample and the corresponding latent representation are input into the discriminator, the discriminator generates the classification result of the fake sample, and compares it with the type of the training sample 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] The classification error (Binary Cross-Entropy, BCE) is a loss function 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 cross-entropy concept in information theory, which evaluates the difference by calculating the approximation of the KL divergence (Kullback-Leibler Divergence) between the predicted probability distribution and the true distribution. When the predicted probability is close to the true label, the BCE loss value is small; on the contrary, 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, 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 latent representation so that it can better assist the generator to generate high-quality fake samples. In 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 can generate high-quality synthetic data similar to the real data distribution.

[0118] Maximum Mean Discrepancy (MMD): It is a non-parametric statistical quantity that measures the difference between two probability distributions. MMD calculates the mean difference between two sample sets in the reproducing kernel Hilbert space to evaluate the difference between their distributions. The smaller the MMD value, the more similar the two distributions.

[0119]

[0120] where, represents the data to be distinguished, y represents the assumed label x i represents the true label of the i-th data to be distinguished, y i represents the assumed label of the i-th sample.

[0121]

[0122] wherein x i is the ith original data, y i is the ith 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 latent sensitive feature data;

[0124] After extracting the non-sensitive features from the original sensitive data, the non-sensitive features and the preset noise can be inputted into the trained generator to generate latent sensitive feature data.

[0125] In one example, step 208 can include the following sub-steps:

[0126] S81, splicing the non-sensitive features and the preset noise to generate input data;

[0127] S82, inputting the input data into the trained generator to generate latent sensitive feature data.

[0128] In a specific implementation, as shown in Figure 6 , first, the trained generator model and the weights of the autoencoder decoder are loaded from the specified path. After loading, the two models are set to evaluation mode, which is to avoid unnecessary gradient calculation and model parameter update when generating data, so as to speed up the generation and ensure the stability of the generation process. Next, the non-sensitive features are extracted from the data set, which will be retained when generating synthetic data. At the same time, random noise vectors with the same number of samples as the data set are generated, which are used as the input of the generator in the latent space to provide diversity for the generator, so that it can generate different but reasonable synthetic data samples. Subsequently, the random noise vectors are spliced with the non-sensitive features to form complete input data, and the spliced input data is input into the generator model. The generator model generates latent sensitive feature data (corresponding to the sensitive part in the original sensitive data) using these input data, which represents the sensitive part of the synthetic data in the latent space.

[0129] Step 209, decoding the latent sensitive feature data to obtain decoded sensitive feature data;

[0130] Step 210, splicing the decoded sensitive feature data and the non-sensitive features to obtain synthetic data.

[0131] As shown in Figure 6As shown, after obtaining the potential sensitive feature, the decoder can be used to decode it to obtain the decoded sensitive feature data, and then the sensitive decoded feature data and the data non-sensitive part (non-sensitive feature) are spliced to obtain safe and effective synthetic data. This synthetic data not only retains the original non-sensitive feature, but also contains the sensitive feature generated by the generator, thereby achieving effective simulation of the original sensitive data and the purpose of protecting sensitive information. The entire generation process ensures that the synthetic data retains the distribution characteristics of the original data while blurring the sensitive information, providing an effective solution for data sharing and privacy protection.

[0132] The present application pre-trains the autoencoder after data preprocessing to optimize its reconstruction ability. Then, the generator and the discriminator are trained in an adversarial manner, and 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, using the trained generator, combined with random noise and non-sensitive feature data, synthetic data is generated, which retains the distribution characteristics of the original data while blurring the sensitive information, thereby achieving effective sharing and privacy protection of data.

[0133] Please refer to Figure 7 , Figure 7 The structure block diagram of a sensitive information protection device provided by an embodiment of the present application.

[0134] The sensitive information protection device provided by an embodiment of the present application comprises:

[0135] The original sensitive data acquisition module 701 is configured to acquire original sensitive data.

[0136] The training sample and non-sensitive feature generation module 702 is configured to perform data preprocessing on the original sensitive data to generate a training sample and a non-sensitive feature.

[0137] The autoencoder training module 703 is configured to train an autoencoder using the training sample to obtain a trained autoencoder.

[0138] The generator training module 704 is configured to perform adversarial training using the training sample, the trained autoencoder and a preset noise to obtain a trained generator.

[0139] The potential sensitive feature data generation module 705 is configured to input the non-sensitive feature and the preset noise into the trained generator to generate potential sensitive feature data.

[0140] The decoding module 706 is configured to decode the potential sensitive feature data to obtain decoded sensitive feature data.

[0141] The synthetic data generation module 707 is configured to splice the decoded sensitive feature data and the non-sensitive feature to obtain synthetic data.

[0142] In the embodiment of the present application, the training sample and non-sensitive feature generation module 702 comprises:

[0143] The array format data conversion submodule is configured to convert the original sensitive data into array format data.

[0144] The feature distinguishing submodule is configured to randomly select non-sensitive features from the array format data according to a preset specified number of sensitive features, and take the array format data other than the non-sensitive features as sensitive features.

[0145] The arrangement submodule is configured to arrange the non-sensitive features and the sensitive features to obtain an updated data set.

[0146] The normalization submodule is configured to normalize the updated data set to obtain the training sample.

[0147] In the embodiment of the present application, the autoencoder training module 703 comprises:

[0148] The reconstructed sample generation submodule is configured to encode and decode the training sample by using the autoencoder to generate a reconstructed sample.

[0149] The mean square error loss calculation submodule is configured to calculate a mean square error loss between the reconstructed sample and the training sample.

[0150] The adjustment submodule is configured to adjust parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder.

[0151] In the embodiment of the present application, the generator training module 704 comprises:

[0152] The first latent representation generation submodule is configured to input the training sample into the encoder to generate a first latent representation of the training sample.

[0153] The fake sample and second latent representation generation submodule is configured to input a preset noise into the generator to generate a fake sample and a second latent representation of the fake sample in combination with the trained autoencoder.

[0154] The classification submodule is configured to classify the fake sample and the second latent representation by using the discriminator to obtain a classification result.

[0155] The classification error calculation submodule is configured to calculate a classification error between the training sample and the fake sample according to the classification result.

[0156] The discriminator optimization submodule is configured to adjust parameters of the discriminator with the minimum classification error as an optimization target to obtain an optimized discriminator.

[0157] The generator training submodule is configured to fix the parameters of the discriminator, take maximizing the error probability of the discriminator as an optimization target, train the generator, and obtain an optimized generator.

[0158] The judging submodule is configured to judge whether an iteration termination condition is met.

[0159] The returning submodule is configured to return to the step of inputting the training sample into the encoder to generate the first latent representation of the training sample if the answer is no.

[0160] The trained generator output submodule is configured to output the optimized generator as a trained generator if the answer is yes.

[0161] In the embodiment of the present application, the latent sensitive feature data generation module 705 comprises:

[0162] The splicing submodule is configured to splice the non-sensitive feature and the preset noise to generate input data.

[0163] The latent sensitive feature data generation submodule is configured to input the input data into the trained generator to generate latent sensitive feature data.

[0164] The embodiment of the present application further provides an electronic device, which comprises a processor and a memory:

[0165] The memory is configured to store program code and transmit the program code to the processor.

[0166] The processor is configured to execute the sensitive information protection method according to the instructions in the program code.

[0167] The embodiment of the present application further provides a computer readable storage medium, which is configured to store program code, and the program code is configured to execute the sensitive information protection method.

[0168] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be described here.

[0169] Each embodiment in the specification adopts a progressive manner for description, and each embodiment focuses on the difference from other embodiments, and the same and similar parts between each embodiment can be referred to.

[0170] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, apparatus, or computer program product. Accordingly, embodiments of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, and the like) embodying computer program instructions.

[0171] Embodiments of the present application are described herein with reference to the drawings, which are as follows: Figure 1 Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable data terminal to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart or flow diagrams block or blocks.

[0172] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart or flow diagram block or blocks. Figure 1 Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart or flow diagrams block or blocks.

[0173] The computer program instructions can also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart or flow diagrams block or blocks. Figure 1 Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart or flow diagrams block or blocks.

[0174] While preferred embodiments of the present application have been described, additional variations and modifications can be made to these embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to cover all such modifications and variations as fall within the scope of the present application.

[0175] ​​​Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be used to distinguish one entity or action from another entity or action, without necessarily requiring or implying that there is any such actual relationship or order between these entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof are intended to cover non-exclusive inclusions, so that a process, method, article, or terminal device including a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article, or terminal device. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article, or terminal device including the element.

[0176] The above description and the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for protecting sensitive information, characterized by, The method comprises the following steps: obtaining original sensitive data; data preprocessing on the original sensitive data to generate training samples and non-sensitive features; training an autoencoder using the training samples to obtain a trained autoencoder; performing adversarial training on the training samples, the trained autoencoder and a preset noise to obtain a trained generator; inputting the non-sensitive features and the preset noise into the trained generator to generate latent sensitive feature data; decoding the latent sensitive feature data to obtain decoded sensitive feature data; splicing the decoded sensitive feature data and the non-sensitive features to obtain synthetic data; wherein the step of training an autoencoder using the training samples to obtain a trained autoencoder comprises: encoding and decoding the training samples using the autoencoder to generate reconstructed samples; calculating the mean square error loss between the reconstructed samples and the training samples; adjusting the parameters of the autoencoder based on the mean square error loss to obtain a trained autoencoder; wherein the step of performing adversarial training on the training samples, the trained autoencoder and a preset noise to obtain a trained generator comprises: inputting the training samples into an encoder to generate a first latent representation of the training samples; inputting a preset noise into a generator to generate a fake sample and a second latent representation of the fake sample in combination with the trained autoencoder; classifying the fake sample and the second latent 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; adjusting the parameters of the discriminator to obtain an optimized discriminator with the minimum classification error as the optimization target; training the generator with the error probability of the optimized discriminator maximized as the optimization target to obtain an optimized generator; determining whether an iteration termination condition is met; if not, returning to the step of inputting the training samples into the encoder to generate the first latent representation of the training samples; if yes, outputting the optimized generator as the trained generator; wherein the step of inputting the non-sensitive features and the preset noise into the trained generator to generate latent sensitive feature data comprises: splicing the non-sensitive features and the preset noise to generate input data; inputting the input data into the trained generator to generate latent sensitive feature data.

2. The method of claim 1, wherein, The step of data preprocessing on the original sensitive data to generate training samples and non-sensitive features comprises: converting the original sensitive data into array format data; randomly selecting non-sensitive features from the array format data according to a preset specified number of sensitive features, and taking 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; normalizing the updated data set to obtain training samples.

3. A sensitive information protection apparatus characterized by comprising: The method comprises the following steps: an original sensitive data acquisition module for acquiring original sensitive data; a training sample and non-sensitive feature generation module for data preprocessing on the original sensitive data to generate training samples and non-sensitive features; The self-encoder training module is configured to train a self-encoder by using the training sample, to obtain a trained self-encoder. The generator training module is configured to perform adversarial training by using the training sample, the trained self-encoder, and preset noise, to obtain a trained generator. The latent sensitive feature data generation module is configured to input the non-sensitive feature and the preset noise into the trained generator, to generate latent sensitive feature data. The decoding module is configured to decode the latent sensitive feature data, to obtain decoded sensitive feature data. The synthetic data generation module is configured to splice the decoded sensitive feature data and the non-sensitive feature, to obtain synthetic data. The self-encoder training module comprises: The reconstruction sample generation submodule is configured to encode and decode the training sample by using the self-encoder, to generate a reconstruction sample. The mean square error loss calculation submodule is configured to calculate a mean square error loss between the reconstruction sample and the training sample. The adjustment submodule is configured to adjust parameters of the self-encoder based on the mean square error loss, to obtain a trained self-encoder. The generator training module comprises: The first latent representation generation submodule is configured to input the training sample into the encoder, to generate a first latent representation of the training sample. The false sample and second latent representation generation submodule is configured to input the preset noise into the generator, to generate a false sample and a second latent representation of the false sample in combination with the trained self-encoder. The classification submodule is configured to classify the false sample and the second latent representation by using the discriminator, to obtain a classification result. The classification error calculation submodule is configured to calculate a classification error between the training sample and the false sample according to the classification result. The discriminator optimization submodule is configured to adjust parameters of the discriminator, to obtain an optimized discriminator, with the minimum classification error as an optimization target. The generator training submodule is configured to train the generator with the maximum error probability of the optimized discriminator as an optimization target, to obtain an optimized generator, with the parameters of the optimized discriminator fixed. The judgment submodule is configured to judge whether an iteration termination condition is met. The return submodule is configured to return to the step of inputting the training sample into the encoder to generate the first latent representation of the training sample if the iteration termination condition is not met. The trained generator output submodule is configured to output the optimized generator as the trained generator if the iteration termination condition is met. The latent sensitive feature data generation module comprises: The splicing submodule is configured to splice the non-sensitive feature and the preset noise, to generate input data. The latent sensitive feature data generation submodule is configured to input the input data into the trained generator, to generate latent sensitive feature data.

4. The apparatus of claim 3, wherein, The training sample and non-sensitive feature generation module comprises: The array format data conversion submodule is configured to convert the original sensitive data into array format data. The feature distinguishing submodule is configured to randomly select non-sensitive features from the array format data according to a preset specified sensitive feature number, and to use the array format data other than the non-sensitive features as sensitive features. The arrangement submodule is configured to arrange the non-sensitive features and the sensitive features, to obtain an updated data set. The normalization submodule is configured to normalize the updated data set, to obtain a training sample.

5. An electronic device, comprising: The device comprises a processor and a memory: The memory is configured to store program code and transmit the program code to the processor; The processor is configured to execute the sensitive information protection method according to the instructions in the program code.

6. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store program code, and the program code is configured to execute the sensitive information protection method according to any one of claims 1-2.

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