Data desensitization method, data desensitization device, equipment and storage medium
By extracting key information of user data and performing discrete processing, combining conditional random sampling and generator technology, desensitization data that cannot be reverse cracked is generated, which solves the problem of insufficient data desensitization security in the existing technology and improves data protection Effect.
Patent Information
- Application Number
- CN202111229481.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-10-21
AI Technical Summary
The existing structured data desensitization method has a one-to-one mapping relationship between the desensitization data and the original data, which makes the desensitized data easily reversely cracked, which leads to the leakage of privacy information in the original data and poor data security.
By obtaining user data, using pre-trained key information identification model to extract key information, and performing data discretization or normalization processing, conditional random sampling is performed based on conditional loss function, and then input the pre-trained generator after generating splicing vectors. Perform desensitization processing to generate desensitization data that cannot be easily reverse cracked.
It improves the security of desensitized data, prevents private information leakage, ensures that desensitized data is not easily reverse cracked, and enhances the protection effect of data.
Smart Images

Figure CN113886885B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a data desensitization method, a data desensitization device, a computer device and a storage medium. Background Art
[0002] In the era of big data, the frequency of attacks on data is increasing, and the methods of attack are becoming more and more diverse. Data desensitization technology is an effective way to solve data security problems and risks. Data desensitization refers to the deformation of key information or personal information according to preset rules or transformations, so that personal identity cannot be identified or key information is hidden. At present, common structured data desensitization methods include desensitization methods based on anonymization technology or disruption technology.
[0003] However, in structured data desensitization methods based on anonymization technology or disruption technology, there is a problem that the desensitized data and the original data are mapped one-to-one, which makes the desensitized data easy to be reverse-engineered and the original data easily restored, which in turn leads to the leakage of privacy information in the original data and poor data security. Summary of the invention
[0004] The present application provides a data desensitization method, a data desensitization device, a computer device and a storage medium, aiming to solve the problem that the existing desensitization methods are easily reverse cracked, resulting in easy leakage of private information.
[0005] To achieve the above objectives, the present application provides a data desensitization method, the method comprising:
[0006] Acquire user data, and perform information recognition on the user data based on a pre-trained key information recognition model to obtain key information;
[0007] Preprocessing the key information to obtain discrete variables corresponding to the key information, wherein the preprocessing includes data discretization processing or data normalization processing;
[0008] Based on the conditional loss function, conditional random sampling is performed on the discrete variable to obtain a conditional embedding vector and a latent vector, and the conditional embedding vector is concatenated with the latent vector to obtain a concatenated vector;
[0009] The concatenated vector is input into a pre-trained generator for desensitization processing to obtain desensitized data.
[0010] To achieve the above objectives, the present application also provides a data desensitization device, the data desensitization device comprising:
[0011] A key information extraction module is used to obtain user data and perform information recognition on the user data based on a pre-trained key information recognition model to obtain key information;
[0012] An information processing module, used for preprocessing the key information to obtain discrete variables corresponding to the key information, wherein the preprocessing includes data discretization processing or data normalization processing;
[0013] A vector concatenation module, configured to perform conditional random sampling processing on the discrete variable based on a conditional loss function to obtain a conditional embedding vector and a latent vector, and concatenate the conditional embedding vector with the latent vector to obtain a concatenated vector;
[0014] The data desensitization module is used to input the concatenated vector into a pre-trained generator for desensitization processing to obtain desensitized data.
[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement any one of the data desensitization methods provided in the embodiments of the present application when executing the computer program.
[0016] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor enables the processor to implement any one of the data desensitization methods provided in the embodiments of the present application.
[0017] The data desensitization method, data desensitization device, equipment and storage medium disclosed in the embodiments of the present application generate a splicing vector by extracting key information of user data and discrete variables of the key information, and use a pre-trained generator to desensitize the splicing vector to obtain desensitized data, thereby making it impossible to easily reverse-crack the desensitized data, thereby ensuring that the privacy data is not leaked and improving the security of the desensitized data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 This is a scenario diagram of a data desensitization method provided in an embodiment of the present application;
[0020] Figure 2It is a flowchart of a data desensitization method provided in an embodiment of the present application;
[0021] Figure 3 is a schematic block diagram of a data desensitization device provided in one embodiment of the present application;
[0022] Figure 4 It is a schematic block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.
[0025] The term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0026] Data desensitization technology is a data processing technology that can reduce and remove the sensitivity of data by processing data. The use of data desensitization technology can reduce the risk and harm of data leakage and effectively protect the privacy of user data. In the Internet or medical field, users can store, view and share personal medical health data through personal digital space, but personal medical data will face the risk of leakage of user medical sensitive information in the process of online medical consultation, online drug purchase, outpatient appointment, etc. In the medical industry, user data has extremely high authenticity and sensitivity. Once the user's personal sensitive information is leaked, it may cause potential life threats to the user himself. With the help of data desensitization, the information in the personal digital space can be used for business-related analysis and processing, while avoiding the leakage of user data.
[0027] At present, common structured data desensitization methods include those based on anonymization technology or perturbation technology. Common anonymization technologies include k-anonymity, l-diversity, and t-closeness. They generalize the quasi-identifier of a single record so that the data cannot be distinguished in the entire data set, thereby achieving the desensitization effect. Perturbation technology adds noise to the record, such as adding additive or multiplicative noise to continuous values, to achieve the desensitization effect.
[0028] However, in structured data desensitization methods based on anonymization technology or disruption technology, there is a problem that the desensitized data and the original data are mapped one-to-one, resulting in the risk of the desensitized data being reversed. In addition, the desensitized data is often very different from the original data and loses its research value.
[0029] To solve the above problems, the present application provides a data desensitization method, which can be applied in servers, and specifically applied in multiple fields such as finance and medical care. By continuously iteratively updating the generator parameters, a pre-trained generator is obtained, sensitive information of user data is extracted, and the pre-trained generator is used to desensitize the sensitive information to obtain desensitized data. In this way, the desensitized data cannot be easily reverse-engineered, thereby ensuring that the privacy data is not leaked and improving the security of the desensitized data.
[0030] The server may be, for example, a separate server or a server cluster. However, for ease of understanding, the following embodiments will introduce in detail the data desensitization method applied to the server.
[0031] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0032] like Figure 1 As shown, the data desensitization method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. The application environment includes a terminal device 110 and a server 120, wherein the terminal device 110 can communicate with the server 120 through a network. Specifically, the server 120 obtains the user data sent by the terminal device 110, and the server 120 generates desensitized data after extracting key information, processing information and desensitizing the user data, and sends the desensitized data to the terminal device 110 to achieve data desensitization. Among them, the server 120 can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal device 110 can be a smart phone, a tablet computer, a laptop, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and this application is not limited here.
[0033] See also Figure 2 , Figure 2 This is a schematic flow chart of a data desensitization method provided in an embodiment of the present application. The data desensitization method can be applied in a server, thereby making it impossible to easily reverse-crack the desensitized data, thereby ensuring that the private data is not leaked and improving the security of the desensitized data.
[0034] like Figure 2 As shown, the data desensitization method includes steps S101 to S104.
[0035] S101, acquiring user data, and performing information recognition on the user data based on a pre-trained key information recognition model to obtain key information.
[0036] Among them, the user data is data containing key information, which may specifically include medical data such as medical record data, financial data such as bank account data, etc. The key information recognition model may be a pre-trained BERT-CRF model based on the attention mechanism, which is used to extract key information from user data. The key information is information that the user needs to desensitize, which is generally the user's private information. For example, the key information may be height and weight information in medical record data, or account balance information and investment information in bank account data. It should be noted that all sensitive information or private information can be used as key information.
[0037] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0038] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0039] In some embodiments, the user data is segmented to obtain multiple segmented words; features are extracted for each segmented word to obtain embedded features for each segmented word; word meanings are predicted based on the embedded features of each segmented word to obtain the meanings corresponding to each segmented word; and the multiple segmented words are screened based on the meanings corresponding to each segmented word to obtain key information. In this way, key information can be accurately extracted, improving the accuracy and security of desensitized data generation.
[0040] The embedding features include word embedding features, position embedding features and segmentation embedding features. The word embedding feature is a vector representation of each word segment, the position embedding is a vector representation of each word segment position, and the segmentation embedding feature is used to distinguish between two different sentences.
[0041] Specifically, the user data may be segmented based on a segmentation algorithm to obtain multiple segmented words. The segmentation algorithm may be a forward maximum matching method, a reverse maximum matching method, a segmentation algorithm based on a hidden Markov model, a segmentation algorithm based on a conditional random field, or the like.
[0042] Exemplarily, user data such as medical record data including a medical record text such as "the patient has symptoms such as frequent urination, hunger, anxiety, tremor, and suspected diabetes" can be segmented based on a hidden Markov model word segmentation algorithm to obtain multiple corresponding word segments such as frequent urination, hunger, anxiety, tremor, etc.
[0043] Specifically, feature extraction can be performed on each of the segmented words to obtain the embedded features of each segmented word, and based on the word meaning prediction model, the word meaning of each segmented word can be predicted according to the embedded features of each segmented word to obtain the word meaning prediction result corresponding to each segmented word, and the multiple segmented words can be screened based on the word meaning prediction result corresponding to each segmented word to obtain key information. In this way, text features can be mined to the greatest extent, richer word representations can be extracted, and the shortcomings of traditional word vectors such as Word2vec, Glove, etc. that cannot dynamically represent contextual information and cannot solve the polysemy of a word can be eliminated. In this way, the similarity between each segmented word and the preset standard sensitive segmented word can be quickly obtained, and the corresponding key information can be quickly obtained.
[0044] Among them, the word meaning prediction model is used to predict the similarity between each segmentation and a preset standard sensitive segmentation. The word meaning prediction model is obtained by training a semantic matching model with a standard sensitive segmentation database. The semantic prediction model may include an LSTM matching model, an MV-DSSM model, an ESIM model and other models. The word meaning prediction result is the similarity between each segmentation and a standard sensitive segmentation in the standard sensitive segmentation database.
[0045] For example, if the segmented words include segmented words such as account balance of account information and segmented words such as stock trend information, feature extraction can be performed on each segmented word to obtain word embedding features, position embedding features and segmentation embedding features of each segmented word. Based on the LSTM matching model, word meaning prediction is performed on each segmented word according to the word embedding features, position embedding features and segmentation embedding features to obtain the word meaning prediction result corresponding to each segmented word, and based on the word meaning prediction result corresponding to each segmented word, the segmented words corresponding to the stock trend information are filtered out to obtain key information.
[0046] S102: preprocess the key information to obtain discrete variables corresponding to the key information, wherein the preprocessing includes data discretization processing or data normalization processing.
[0047] Since key information is generally continuous data, it is necessary to perform representation conversion between continuous data and discrete data, that is, data preprocessing operation, which is a key step in the input and output of neural networks.
[0048] Exemplarily, when the key information is information such as height and weight, the key information is continuous data; when the key information is information such as the number of invested enterprises, the key information is discrete data.
[0049] The discrete variable refers to a variable whose values can be listed one by one in a certain order, usually with integer values, such as the number of employees, the number of factories, the number of machines, etc. Specifically, the data normalization processing can include maximum and minimum normalization processing and normalization processing based on a Gaussian mixture model; the data discretization processing can include K-bins discretization processing and regression tree discretization processing.
[0050] In some embodiments, the key information is subjected to maximum and minimum normalization processing to obtain a discrete variable corresponding to the key information; or, the key information is normalized through a Gaussian mixture model to obtain a discrete variable corresponding to the key information; or, the key information is discretized by K-bins to obtain a discrete variable corresponding to the key information; or, the key information is discretized by regression tree to obtain a discrete variable corresponding to the key information.
[0051] Specifically, if the key information is continuous data, it can be mapped to the range of [0, 1] through the maximum and minimum linear transformation, so that the continuous value can be represented by the tanh activation function to obtain the discrete variable corresponding to the key information.
[0052] Specifically, if the key information is continuous data, the key information can be fitted through a Gaussian mixture model, and the Gaussian components are sampled according to the probability of the Gaussian components of the key information in the mixture model, and the sampled Gaussian components are used to normalize the key information in the record. Then, the key information can be composed of the normalized representation and the unique hot encoding of the Gaussian components, thereby obtaining the discrete variable corresponding to the key information.
[0053] Specifically, if the key information is continuous data, the key information can be discretized by K-bins to obtain the discrete variables corresponding to the key information. The discretization can also be called binning, that is, the key information is divided into intervals according to certain rules, and each interval is represented by a unique hot encoding, so that the key information is fitted with a piecewise function containing four intervals to obtain the discrete variables corresponding to the key information.
[0054] Specifically, if the key information is continuous data, the CART regression tree can be used to discretize the key information to obtain discrete variables corresponding to the key information. Among them, the CART regression tree can predict continuous data, and its leaf node represents a predicted value. The key information can be converted into discrete values by representing a series of leaf nodes of the regression tree or regression tree set of the key information through unique hot encoding.
[0055] It should be noted that if the key information is discrete data, there is no need to perform data discretization or data normalization.
[0056] S103. Based on the conditional loss function, conditional random sampling is performed on the discrete variable to obtain a conditional embedding vector and a latent vector, and the conditional embedding vector is concatenated with the latent vector to obtain a concatenated vector.
[0057] Among them, the conditional loss function is a conditional loss function based on a generative adversarial network, and the data item of the loss function based on the generative adversarial network is generated based on conditional probability. Its original intention is to enable data to be generated according to conditions, so that the distribution of the same type of data to be desensitized and the generated desensitized data is as consistent as possible. However, because the conditions sampled each time may be different variables, it is difficult to fully train the data based on the conditional variables. It can be observed that the values of the corresponding variables in the generated data are inconsistent with the values of its conditional variables. The training process can be constrained by predicting the conditional variables so that the values of the conditional variables are consistent with the values of the corresponding variables in the generated data, which can further optimize the effect of data generation.
[0058] Specifically, the conditional embedding vector can randomly and equally likely select a discrete variable that meets the preset conditions from multiple discrete variables corresponding to the key information, the latent vector can be obtained from the white noise sampling corresponding to the key information, and the splicing vector is obtained by splicing the conditional embedding vector and the latent vector, which is used as the input of the generator. By adding the latent vector, the one-to-one mapping relationship between the desensitized data and the original data is changed, so that the desensitized data is not easily reverse cracked to obtain the private information.
[0059] Specifically, the distributed representation of the discrete variable can be obtained by constructing the probability mass distribution function of each value under the discrete variable, and the distributed representation of the discrete variable can be subjected to conditional random sampling to obtain the conditional embedding vector and latent vector.
[0060] Exemplarily, white noise corresponding to a discrete variable can be converted by a deep neural network to generate a latent vector from a distributed representation of the discrete variable.
[0061] In some embodiments, the conditional embedding vector is transformed to obtain a one-hot encoding; the one-hot encoding is concatenated with the latent vector to obtain a concatenated vector. The one-hot encoding is One-Hot encoding, also known as effective encoding, and the method is to use an N-bit state register to encode N states, each state has its own independent register bit, and at any time, only one of them is valid. Converting the conditional embedding vector into a one-hot encoding can solve the problem that the discriminator is not good at processing attribute data, and at the same time, it also plays a role in expanding vector features to a certain extent.
[0062] Specifically, the conditional embedding vector can be transformed through a deep neural network to obtain a one-hot encoding, and then the one-hot encoding is concatenated with the latent vector to obtain a concatenated vector. In this way, a concatenated vector that meets the input requirements of the generator can be obtained.
[0063] S104: Input the concatenated vector into a pre-trained generator for desensitization processing to obtain desensitized data.
[0064] The pre-trained generator is generated based on adversarial generative network training, and the desensitized data is the data after desensitizing key information in the desensitized data.
[0065] In some embodiments, a splicing vector corresponding to the training data is obtained, and the splicing vector is input into the first generator for desensitization processing to obtain desensitized data; a preset discriminator is trained based on the desensitized data and the training data to obtain a pre-trained discriminator; according to a preset learning rate and the parameters of the pre-trained discriminator, the parameters of the first generator are iteratively updated multiple times to obtain a second generator, and the second generator is used as a pre-trained generator. In this way, the parameters of the first generator can be iteratively updated multiple times through the pre-trained discriminator and the desensitized data, so that very realistic desensitized data can be generated. The reason why we need to train a pre-trained discriminator first and then train the generator is because we need to have a good discriminator first, so that we can distinguish between the data to be desensitized and the generated desensitized data, and then we can update the parameters of the generator more accurately.
[0066] Wherein, the training data is a data set to be desensitized for training the parameters of the generator, the first generator is a preset untrained generator, and the second generator is generated by the first generator after multiple iterations. Wherein, the parameters of the first generator and the second generator are different. The prior probability of the discrete variable can be obtained by the distributed representation of the discrete variable, and the parameters can be sampled from the prior probability as the parameters of the first generator. Specifically, the generator and the discriminator can be trained by the stochastic gradient Hamiltonian Monte Carlo method to obtain a pre-trained generator and a pre-trained discriminator.
[0067] Specifically, a preset discriminator is trained based on the desensitized data and the training data to obtain a pre-trained discriminator by splicing the conditional embedding vector with the desensitized data and the training data, respectively, to obtain first spliced data and second spliced data, and calculating the similarity between the first spliced data and the second spliced data, and optimizing the loss function according to the similarity between the first spliced data and the second spliced data, and gradient clipping the discriminator through the loss function to obtain the pre-trained discriminator.
[0068] Exemplarily, the discriminator parameters can be trained through the first generator and preset discriminator parameters to discriminate the desensitized data as false as possible, thereby adjusting the discriminator parameters and further improving the discriminator's ability to discriminate the data to be desensitized.
[0069] Exemplarily, the posterior probability of the second generator can be calculated by the prior probability of the first generator and the pre-trained discriminator parameters, so that the desensitized data will cause the discriminator to misjudge it as the data to be desensitized as much as possible, thereby adjusting the generator parameters to generate real desensitized data.
[0070] In some embodiments, after obtaining the second generator, the second generator is subjected to noise enhancement processing based on the loss function of statistical information to obtain a pre-trained generator, wherein the parameters of the first generator, the generator after parameter update, and the pre-trained generator are different. In this way, the generation quality and desensitization degree of the desensitized data can be controlled.
[0071] The loss function based on statistical information may include a mean-based loss function, a variance-based loss function, and the like.
[0072] Specifically, Gaussian noise can be added to the parameters of the second generator, thereby realizing polynomial fitting of the sine curve, wherein the Gaussian noise is an error that conforms to the Gaussian normal distribution, and the specific value of the Gaussian noise can be obtained through experiments.
[0073] For example, an error term can be introduced into the parameters of the second generator, so as to correct the parameters of the second generator and obtain a pre-trained generator. Due to the existence of the error term, the generated desensitized data is somewhat different from the original data, but the difference is not large, which can avoid the desensitized data often being too different from the original data and losing the research value, and also ensure that the data will not be easily reversed.
[0074] In some embodiments, after obtaining the desensitized data, the discrete variables of the desensitized data are randomly sampled to obtain target discrete variables; based on the logistic regression model, the target discrete variables are predicted according to the remaining discrete variables of the desensitized data to obtain the prediction results of the target discrete variables; the parameters of the pre-trained generator are adjusted based on the prediction results of the target discrete variables. Thus, the parameters of the generator can be adjusted by predicting the discrete variables, thereby achieving a better desensitization effect. Here, a better desensitization effect means that the desensitized data can be prevented from being reverse cracked while maintaining its association with the original data.
[0075] Among them, the target discrete variable is randomly sampled from multiple discrete variables of the desensitized data. At the same time, in order to associate the desensitized data with the original data, it can be generally considered that the target discrete variable does not change, and the difference between the desensitized data and the original data is small, so the research value will not be lost. Therefore, the consistency of the target discrete variable needs to be guaranteed. The logistic regression model is used to predict discrete variables.
[0076] Specifically, the cross entropy loss function can be used to determine whether the prediction result of the generated target discrete variable is consistent with the target discrete variable, thereby determining the generation quality of the desensitized data. If the prediction result of the target discrete variable is consistent with the target discrete variable, there is no need to adjust the parameters of the pre-trained generator; if the prediction result of the target discrete variable is inconsistent with the target discrete variable, the difference between the prediction result of the target discrete variable and the target discrete variable is determined, and the parameters of the pre-trained generator are adjusted according to the difference. In this way, the accuracy of the target discrete variable can be determined to avoid the generated desensitized data from making the original data too different. Since most of the discrete variables of the desensitized data and the original data are the same, removing one of the discrete variables can accurately predict the discrete variable based on the remaining discrete variables.
[0077] Exemplarily, if the target discrete variable of the desensitized data is shoe size 43, based on the logistic regression model, the target discrete variable can be predicted by the other discrete variables of the desensitized data, such as height and weight, to obtain the prediction result for the shoe size, and determine whether the generated shoe size prediction result is consistent with the shoe size of the desensitized data. For example, if the generated shoe size prediction result is shoe size 40, the difference is determined to be 1, and the parameters of the pre-trained generator are continuously iterated and updated according to the difference; if the generated shoe size prediction result is shoe size 43, there is no need to adjust the parameters of the pre-trained generator.
[0078] In some embodiments, the server may also send a prompt message to the terminal device to remind the user that the desensitized data has been generated.
[0079] The prompt information may include an application (APP) or Email, text message, or chat tool, such as WeChat, QQ, etc.
[0080] Exemplarily, when the desensitized data has been generated, the server will send a prompt message that the desensitized data has been generated to the terminal device to remind the user.
[0081] See also Figure 3 , Figure 3 It is a schematic block diagram of a data desensitization device provided in one embodiment of the present application. The data desensitization device can be configured in a server to execute the aforementioned data desensitization method.
[0082] like Figure 3 As shown, the data desensitization device 200 includes: a key information extraction module 201, an information processing module 202, a vector splicing module 203 and a data desensitization module 204.
[0083] The key information extraction module 201 is used to obtain user data and perform information recognition on the user data based on a pre-trained key information recognition model to obtain key information;
[0084] An information processing module 202 is used to pre-process the key information to obtain discrete variables corresponding to the key information, wherein the pre-processing includes data discretization processing or data normalization processing;
[0085] A vector concatenation module 203 is used to perform conditional random sampling processing on the discrete variable based on a conditional loss function to obtain a conditional embedding vector and a latent vector, and concatenate the conditional embedding vector with the latent vector to obtain a concatenated vector;
[0086] A data desensitization module 204 is used to input the concatenated vector into a pre-trained generator for desensitization processing to obtain desensitized data;
[0087] The key information extraction module 201 is also used to perform word segmentation processing on the user data to obtain multiple word segmentations; perform feature extraction on each word segmentation to obtain embedded features of each word segmentation; perform word meaning prediction based on the embedded features of each word segmentation to obtain the word meaning corresponding to each word segmentation; and filter the multiple word segmentations based on the word meaning corresponding to each word segmentation to obtain key information.
[0088] The information processing module 202 is also used to perform maximum and minimum normalization processing on the key information to obtain discrete variables corresponding to the key information; or, perform normalization processing on the key information through a Gaussian mixture model to obtain discrete variables corresponding to the key information; or, perform K-bins discretization processing on the key information to obtain discrete variables corresponding to the key information; or, perform regression tree discretization processing on the key information to obtain discrete variables corresponding to the key information.
[0089] The vector concatenation module 203 is further used to transform the conditional embedding vector to obtain a one-hot encoding; and concatenate the one-hot encoding with the latent vector to obtain a concatenated vector.
[0090] The generator training module 205 is used to obtain the splicing vector corresponding to the training data, and input the splicing vector into the first generator for desensitization processing to obtain the desensitized data; based on the desensitized data and the training data, the preset discriminator is trained to obtain a pre-trained discriminator; according to the preset learning rate and the parameters of the pre-trained discriminator, the parameters of the first generator are iteratively updated multiple times to obtain the second generator, and the second generator is used as the pre-trained generator.
[0091] The generator training module 205 is also used to perform noise addition processing on the second generator based on the loss function of statistical information to obtain a pre-trained generator, wherein the parameters of the first generator, the second generator and the pre-trained generator are different.
[0092] The generator training module 205 is also used to perform random sampling processing on the discrete variables of the desensitized data to obtain target discrete variables; based on the logistic regression model, predict the target discrete variables according to the remaining discrete variables of the desensitized data to obtain the prediction results of the target discrete variables; adjust the parameters of the pre-trained generator based on the prediction results of the target discrete variables.
[0093] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0094] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer terminal devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.
[0095] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 4 Runs on the computer device shown.
[0096] See also Figure 4 , Figure 4 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0097] like Figure 4 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a volatile storage medium, a non-volatile storage medium and an internal memory.
[0098] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can cause the processor to execute any data desensitization method.
[0099] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0100] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any data desensitization method.
[0101] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0102] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0103] Among them, in some embodiments, the processor is used to run a computer program stored in the memory to implement the following steps: obtain user data, and based on a pre-trained key information identification model, perform information identification on the user data to obtain key information; pre-process the key information to obtain discrete variables corresponding to the key information, and the pre-processing includes data discretization processing or data normalization processing; based on the conditional loss function, perform conditional random sampling processing on the discrete variables to obtain a conditional embedding vector and a latent vector, and splice the conditional embedding vector with the latent vector to obtain a spliced vector; input the spliced vector into a pre-trained generator for desensitization processing to obtain desensitized data.
[0104] In some embodiments, the processor is also used to: perform word segmentation processing on the user data to obtain multiple word segmentations; perform feature extraction on each of the word segmentations to obtain embedded features of each of the word segmentations; perform word meaning prediction based on the embedded features of each of the word segmentations to obtain the word meaning corresponding to each of the word segmentations; and filter the multiple word segmentations based on the word meaning corresponding to each of the word segmentations to obtain key information.
[0105] In some embodiments, the processor is also used to: perform maximum and minimum normalization processing on the key information to obtain discrete variables corresponding to the key information; or, perform normalization processing on the key information through a Gaussian mixture model to obtain discrete variables corresponding to the key information; or, perform K-bins discretization processing on the key information to obtain discrete variables corresponding to the key information; or, perform regression tree discretization processing on the key information to obtain discrete variables corresponding to the key information.
[0106] In some embodiments, the processor is further used to: transform the conditional embedding vector to obtain a one-hot encoding; and concatenate the one-hot encoding with the latent vector to obtain a concatenated vector.
[0107] In some embodiments, the processor is also used to: obtain a splicing vector corresponding to the training data, and input the splicing vector into the first generator for desensitization processing to obtain desensitized data; train a preset discriminator based on the desensitized data and the training data to obtain a pre-trained discriminator; according to a preset learning rate and the parameters of the pre-trained discriminator, iteratively update the parameters of the first generator multiple times to obtain a second generator, and use the second generator as the pre-trained generator.
[0108] In some embodiments, the processor is also used to: perform noise addition processing on the second generator based on a loss function of statistical information to obtain a pre-trained generator, wherein the parameters of the first generator, the second generator and the pre-trained generator are different.
[0109] In some embodiments, the processor is also used to: perform random sampling processing on the discrete variables of the desensitized data to obtain a target discrete variable; based on a logistic regression model, predict the target discrete variable according to the remaining discrete variables of the desensitized data to obtain a prediction result of the target discrete variable; and adjust the parameters of the pre-trained generator based on the prediction result of the target discrete variable.
[0110] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed, any one of the data desensitization methods provided in the embodiments of the present application is implemented.
[0111] The computer-readable storage medium may be an internal storage unit of the computer device described in the above embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.
[0112] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0113] The present invention refers to a new application model of computer technologies such as storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. of the blockchain language model. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0114] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data desensitization method, characterized in that: The method comprises: Acquire user data, and perform information recognition on the user data based on a pre-trained key information recognition model to obtain key information; Preprocessing the key information to obtain discrete variables corresponding to the key information, wherein the preprocessing includes data discretization processing or data normalization processing; Based on the conditional loss function, conditional random sampling is performed on the discrete variable to obtain a conditional embedding vector and a latent vector, and the conditional embedding vector is concatenated with the latent vector to obtain a concatenated vector; Inputting the concatenated vector into a pre-trained generator for desensitization processing to obtain desensitized data; After obtaining the desensitized data, the method further includes: Performing random sampling processing on the discrete variables of the desensitized data to obtain target discrete variables; Based on the logistic regression model, the target discrete variable is predicted according to the remaining discrete variables of the desensitized data to obtain the prediction result of the target discrete variable; The parameters of the pre-trained generator are adjusted based on the prediction results of the target discrete variable.
2. The method according to claim 1, characterized in that The information recognition is performed on the user data based on the pre-trained key information recognition model to obtain key information, including: Performing word segmentation processing on the user data to obtain multiple word segments; Perform feature extraction on each of the word segments to obtain an embedded feature of each of the word segments; Predicting the meaning of each word according to the embedded features of each word segment to obtain the meaning of each word segment; The multiple participles are screened according to the meaning corresponding to each participle to obtain key information.
3. The method according to claim 1, characterized in that The preprocessing of the key information to obtain discrete variables corresponding to the key information includes: Performing maximum and minimum normalization processing on the key information to obtain a discrete variable corresponding to the key information; or, Normalizing the key information through a Gaussian mixture model to obtain a discrete variable corresponding to the key information; or, Perform K-bins discretization processing on the key information to obtain discrete variables corresponding to the key information; or, The key information is discretized using a regression tree to obtain discrete variables corresponding to the key information.
4. The method according to claim 1, characterized in that: The step of concatenating the conditional embedding vector with the latent vector to obtain a concatenated vector includes: Transforming the conditional embedding vector to obtain a one-hot encoding; The one-hot encoding is concatenated with the latent vector to obtain a concatenated vector.
5. The method according to claim 1, characterized in that The method further comprises: Obtaining a splicing vector corresponding to the training data, and inputting the splicing vector into the first generator for desensitization processing to obtain desensitized data; Training a preset discriminator based on the desensitized data and the training data to obtain a pre-trained discriminator; According to the preset learning rate and the parameters of the pre-trained discriminator, the parameters of the first generator are iteratively updated multiple times to obtain a second generator, and the second generator is used as the pre-trained generator.
6. The method according to claim 5, characterized in that After obtaining the second generator, the method further includes: Based on the loss function of statistical information, the second generator is denoised to obtain a pre-trained generator, wherein the parameters of the first generator, the second generator and the pre-trained generator are different.
7. A data desensitization device, characterized in that: include: A key information extraction module is used to obtain user data and perform information recognition on the user data based on a pre-trained key information recognition model to obtain key information; An information processing module, used for preprocessing the key information to obtain discrete variables corresponding to the key information, wherein the preprocessing includes data discretization processing or data normalization processing; A vector concatenation module, configured to perform conditional random sampling processing on the discrete variable based on a conditional loss function to obtain a conditional embedding vector and a latent vector, and concatenate the conditional embedding vector with the latent vector to obtain a concatenated vector; A data desensitization module, used for inputting the concatenated vector into a pre-trained generator for desensitization processing to obtain desensitized data; After obtaining the desensitized data, the method further includes: Performing random sampling processing on the discrete variables of the desensitized data to obtain target discrete variables; Based on the logistic regression model, the target discrete variable is predicted according to the remaining discrete variables of the desensitized data to obtain the prediction result of the target discrete variable; The parameters of the pre-trained generator are adjusted based on the prediction results of the target discrete variable.
8. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement, when executing the computer program: The data desensitization method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the data desensitization method according to any one of claims 1 to 6.