Data desensitization method and device, electronic device and storage medium

By performing word segmentation and filtering on desensitized text, and using preset independent sensitive data identification model and partial sensitive data identification model, desensitizing words in desensitized data, the problem of low data desensitization efficiency and accuracy in the prior art is solved, and an automated and efficient data desensitization process is realized.

CN115062338BActive Publication Date: 2025-03-14BEIJING MEDICAL CROSS THE CLOUD TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210693309.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2025-03-14
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

In the prior art, the efficiency and accuracy of data desensitization are low, mainly because the identification of sensitive data relies on manually sorted field information, black and white lists or rules, resulting in low identification efficiency and accuracy.

Method used

By obtaining the text to be desensitized, performing word segmentation and filtering processing, the data to be desensitized are obtained, and the words in the desensitized data are desensitized based on the preset independent sensitive data identification model and part of the sensitive data identification model are desensitized. The independent sensitive data identification model is established through logistic regression algorithm, and the partial sensitive data identification model is constructed through the identification results input by substitution and user.

Benefits of technology

An automated data desensitization process is realized, reducing labor costs and improving the efficiency and accuracy of data desensitization. By establishing multiple models, precise desensitization is carried out to different sensitive data types, which improves the overall desensitization effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115062338B_ABST
    Figure CN115062338B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data desensitization method and device, an electronic device, and a computer-readable storage medium, and belongs to the field of data processing technology. The method comprises: obtaining a text to be desensitized, and segmenting the text to be desensitized to obtain a plurality of words and the part of speech of the words, filtering the words according to the part of speech of the words, and obtaining the data to be desensitized; desensitizing the words in the data to be desensitized according to a preset independent sensitive data recognition model and a partial sensitive data recognition model. The present disclosure can improve the efficiency and accuracy of data desensitization.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Description of the case

[0002] This patent application is a divisional application of the patent application with application number 201911421361.2, application date December 31, 2019, and invention name “Data Desensitization Method and Device, Electronic Device and Storage Medium”. Technical Field

[0003] The present disclosure relates to the field of data processing technology, and in particular to a data desensitization method and device, an electronic device, and a computer-readable storage medium. Background Art

[0004] In various fields, with the advancement of informatization construction, the demand for data interconnection and interoperability is increasing day by day, but at the same time, data security issues are also more prominent. Data desensitization can deform certain sensitive information through desensitization rules to achieve reliable protection of sensitive privacy data. For example, in the medical field, medical data desensitization is to deform the data involving basic information of patients and sensitive information in the medical process through desensitization rules to achieve the purpose of protecting sensitive data. In related technologies, the identification of sensitive data relies on manually sorted field information, black and white lists or rules, and the efficiency and accuracy of identification are low, resulting in low efficiency and accuracy of data desensitization. Summary of the invention

[0005] The purpose of the present disclosure is to provide a data desensitization method and device, an electronic device and a computer-readable storage medium, thereby at least to a certain extent overcoming the problems of low efficiency and accuracy of data desensitization caused by the limitations and defects of the prior art.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to a first aspect of the present disclosure, a data desensitization method is provided, comprising:

[0008] Obtain the text to be desensitized, and segment the text to be desensitized to obtain multiple words and the parts of speech of the words, and filter the words according to the parts of speech of the words to obtain the data to be desensitized;

[0009] According to the preset independent sensitive data identification model and the partial sensitive data identification model, the words in the data to be desensitized are desensitized.

[0010] Optionally, desensitizing the words in the data to be desensitized by using a preset independent sensitive data identification model includes:

[0011] For each word in the data to be desensitized, convert the word and its attribute information into a corresponding attribute vector;

[0012] Processing the attribute vector through an independent sensitive data identification model to obtain an attribute value corresponding to the attribute vector;

[0013] Determine whether the word is independent sensitive data according to the attribute value, and desensitize the word when it is determined that the word is independent sensitive data.

[0014] Optionally, the independent sensitive data identification model is trained in the following manner:

[0015] Acquire an original data set marked with sensitive data, and build a sensitive word library based on the marked sensitive data in the original data set;

[0016] Classify the words in the sensitive word library according to preset rules to determine the sensitive data type to which each word in the sensitive word library belongs;

[0017] For each word of the independent sensitive data type, convert the word and the attribute information of the word into a corresponding attribute vector;

[0018] The independent sensitive data recognition model is established by a logistic regression algorithm according to the attribute vectors corresponding to the words of the independent sensitive data type and the preset attribute values.

[0019] Optionally, the partial sensitive data recognition model is trained in the following way:

[0020] For each word of some sensitive data types, determining the target sensitive data corresponding to the word in the original data set;

[0021] Obtain a similar word whose similarity to the word is greater than a similarity threshold, and replace the word in the target sensitive data with the similar word to obtain updated data;

[0022] When the updated data cannot be retrieved in the original data set, obtaining a sensitive data identification result input by the user for the updated data;

[0023] The updated data and the sensitive data identification result are added to the original data set, and the updated original data set is used as the partial sensitive data identification model.

[0024] Optionally, desensitizing the words in the data to be desensitized by using a preset partial sensitive data recognition model includes:

[0025] For each word in the data to be desensitized, searching for the word in the partial sensitive data identification model;

[0026] When the word is retrieved, determine whether the word is sensitive data;

[0027] When the word is sensitive data, the word is desensitized.

[0028] Optionally, desensitizing the words in the data to be desensitized according to a preset independent sensitive data identification model and a partial sensitive data identification model includes:

[0029] Determine the sensitive data type of each word in the data to be desensitized;

[0030] Desensitize words belonging to the independent sensitive data type through the preset independent sensitive data identification model;

[0031] Words belonging to some sensitive data types are desensitized through the preset partial sensitive data recognition model.

[0032] Optionally, after establishing the independent sensitive data identification model, the method further includes:

[0033] Acquire a training data set marked with sensitive data, and select a first target training word with a sensitive data type as an independent sensitive data type from the sensitive data in the training data set;

[0034] Identify the first target training word by using the independent sensitive data identification model to obtain a prediction value;

[0035] Selecting a predicted value whose difference with the attribute value corresponding to the independent sensitive data type is less than a difference threshold;

[0036] The independent sensitive data recognition model is updated according to the second target training words corresponding to the selected prediction values.

[0037] According to a second aspect of the present disclosure, a data desensitization device is provided, comprising:

[0038] A preprocessing module is used to obtain the text to be desensitized, and segment the text to be desensitized to obtain multiple words and the parts of speech of the words, and filter the words according to the parts of speech of the words to obtain the data to be desensitized;

[0039] The desensitization module is used to desensitize the words in the data to be desensitized according to a preset independent sensitive data identification model and a partial sensitive data identification model.

[0040] Optionally, the desensitization module includes: a first desensitization submodule, the first desensitization submodule includes:

[0041] A vector conversion unit, for converting each word in the data to be desensitized and the attribute information of the word into a corresponding attribute vector;

[0042] an attribute value determination unit, configured to process the attribute vector through an independent sensitive data identification model to obtain an attribute value corresponding to the attribute vector;

[0043] The independent sensitive data desensitization unit is used to determine whether the word is independent sensitive data according to the attribute value, and desensitize the word when it is determined that the word is independent sensitive data.

[0044] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0045] A sensitive word library construction module is used to obtain an original data set marked with sensitive data, and to construct a sensitive word library based on the marked sensitive data in the original data set;

[0046] A sensitive data type determination module, used to classify the words in the sensitive word library according to preset rules, and determine the sensitive data type to which each word in the sensitive word library belongs;

[0047] An attribute vector determination module, for converting each word and the attribute information of the word into a corresponding attribute vector for each word of the independent sensitive data type;

[0048] The independent sensitive data identification model establishment module is used to establish the independent sensitive data identification model through a logistic regression algorithm according to the attribute vector corresponding to the words of the independent sensitive data type and the preset attribute value.

[0049] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0050] A target sensitive data determination module, configured to determine, for each word of a partial sensitive data type, target sensitive data corresponding to the word in the original data set;

[0051] A similar word replacement module is used to obtain a similar word with a similarity greater than a similarity threshold to the word, and replace the word in the target sensitive data with the similar word to obtain updated data;

[0052] an identification result acquisition module, configured to acquire a sensitive data identification result input by a user for the updated data when the updated data cannot be retrieved from the original data set;

[0053] The partial sensitive data identification model establishment module is used to add the updated data and the sensitive data identification results to the original data set, and use the updated original data set as the partial sensitive data identification model.

[0054] Optionally, the desensitization module includes: a second desensitization submodule, and the second desensitization submodule includes:

[0055] A retrieval unit, configured to search for each word in the data to be desensitized in the partial sensitive data identification model;

[0056] A sensitive data determination unit, used to determine whether the word is sensitive data when the word is retrieved;

[0057] The sensitive data desensitization unit is used to desensitize the word when the word is sensitive data.

[0058] Optionally, the desensitizing module is specifically used to determine the sensitive data type of each word in the data to be desensitized; desensitize words belonging to independent sensitive data types through a preset independent sensitive data recognition model; and desensitize words belonging to partial sensitive data types through a preset partial sensitive data recognition model.

[0059] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0060] A model updating module is used to obtain a training data set marked with sensitive data, select a first target training word whose sensitive data type is an independent sensitive data type from the sensitive data in the training data set; identify the first target training word through the independent sensitive data recognition model to obtain a predicted value; select a predicted value whose difference with the attribute value corresponding to the independent sensitive data type is less than a difference threshold; and update the independent sensitive data recognition model according to a second target training word corresponding to the selected predicted value.

[0061] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned methods by executing the executable instructions.

[0062] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the methods described above is implemented.

[0063] The exemplary embodiments of the present disclosure have the following beneficial effects:

[0064] In the data desensitization method and device provided by the exemplary embodiments of the present disclosure, the words in the data to be desensitized are desensitized through an independent sensitive data recognition model and a partially sensitive data recognition model, and the data to be desensitized can be automatically desensitized, which can reduce labor costs and improve the efficiency of data desensitization. In addition, different models can be established for words of different sensitive data types, namely, an independent sensitive data recognition model and a partially sensitive data recognition model. Data desensitization is performed according to multiple different models, which can improve the accuracy of data desensitization. In addition, by performing word segmentation and filtering on the text to be desensitized to obtain the data to be desensitized, the complexity of the calculation can be reduced and the efficiency of data desensitization can be improved.

[0065] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0067] Figure 1 A schematic diagram of identifying and marking data in semi-structured data by using XML path language is shown;

[0068] Figure 2 A flow chart of a data desensitization method in an embodiment of the present disclosure is shown;

[0069] Figure 3 A flow chart showing a method for establishing an independent sensitive data identification model and a partial sensitive data identification model in an embodiment of the present disclosure is shown;

[0070] Figure 4 A schematic diagram of dependency relationship is shown;

[0071] Figure 5 A flow chart of a method for desensitizing words in data to be desensitized by using an independent sensitive data identification model in an embodiment of the present disclosure is shown;

[0072] Figure 6 A flow chart of a method for desensitizing words in data to be desensitized by using a partial sensitive data identification model in an embodiment of the present disclosure is shown;

[0073] Figure 7 A flow chart of a method for performing data desensitization using an independent sensitive data identification model and a partial sensitive data identification model in an embodiment of the present disclosure is shown;

[0074] Figure 8 A flow chart showing updating of an independent sensitive data identification model in an embodiment of the present disclosure is shown;

[0075] Fig. 9 A schematic diagram of the structure of a data desensitization device in an embodiment of the present disclosure is shown;

[0076] Fig.10 A schematic diagram of the structure of a computer system for implementing an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0077] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0078] It should be noted that, in the present disclosure, the terms "including", "configured with", and "set in" are used to express an open-ended inclusion, and mean that in addition to the listed elements / components / etc., there may be additional elements / components / etc.; the terms "first", "second", etc. are only used as labels and are not limitations on the quantity or order of their objects.

[0079] Sensitive data refers to data related to the security and privacy of users, including: ID number, telephone number, address, bank card number, etc. Sensitive data related to the medical field includes allergic drugs, history of infectious diseases, eating habits, genetic information, etc. The leakage of sensitive data not only has a serious impact on the core secrets of the enterprise itself, the competitiveness of the same industry and the market reputation, but also causes varying degrees of harm to the privacy and personal information security of users. Therefore, in the case of customer security data or some commercial sensitive data, the real data can be transformed. For example, personal sensitive information such as ID number, mobile phone number, card number, customer number, etc. can be desensitized.

[0080] The existing sensitive data identification methods mainly include the following three methods:

[0081] 1) Manually review the original data and specify the data columns where sensitive data is located, or specify special data nodes in semi-structured data. Figure 1 , Figure 1A schematic diagram of identifying and marking data in semi-structured data by XML (Extensible Markup Language) Path Language is shown. XML Path Language is a language used to determine the location of a certain part in an XML document. It can be seen that the ID card number can be identified by XML Path Language.

[0082] 2) Manually provide the complete set of data that needs to be desensitized (white list) and the exception list (black list), and scan all the data to find matching white list data.

[0083] 3) Customize rules (e.g., regular expressions) based on the data features that need to be desensitized, and search for sensitive data through rule configuration. Regular expressions are a logical formula for string operations, which use pre-defined specific characters and combinations of these specific characters to form a "regular string". This "regular string" is used to express a filtering logic for strings.

[0084] It can be seen that the various sensitive data identification methods mentioned in the existing solutions all identify sensitive data manually, and require a lot of manual labeling of the data itself, resulting in low identification efficiency and accuracy. Accordingly, the efficiency and accuracy of data desensitization are low.

[0085] In order to solve the above problems, the embodiments of the present disclosure provide a data desensitization method and device, an electronic device and a computer-readable storage medium, which can improve the efficiency and accuracy of data desensitization.

[0086] The following first introduces the data desensitization method provided by the embodiment of the present disclosure.

[0087] The types of data include:

[0088] 1. Structured data: relational database data, Excel, CSV (comma separated values) and other tabular data.

[0089] 2. Semi-structured data: data stored in JSON (JS Object Notation), XML, Html (Hypertext Markup Language), etc.

[0090] 3. Unstructured data: plain text, text scans, medical imaging data, etc.

[0091] The data types supported by various sensitive data identification methods can be found in Table 1:

[0092] Table 1

[0093]

[0094] The * in Table 1 indicates that the manually specified semi-structured data has certain restrictions on the data format and specification. For unstructured data, sensitive information cannot be accurately marked with row and column numbers, and is usually mixed with non-sensitive information. It is almost impossible to manually label such a large amount of information. Although the rule matching method can partially realize the sensitive data identification of unstructured data, it requires a lot of induction and abstraction of the existing sensitive data and then translate it into rule language, which places high demands on data processors.

[0095] Among them, medical sensitive data is not limited to data of a certain type. Therefore, sensitive data identification in the medical field includes structured data, semi-structured data, and data stored in text form in unstructured data.

[0096] See also Figure 2 , Figure 2 A flow chart of a data desensitization method in an embodiment of the present disclosure is shown, which may include the following steps:

[0097] Step S210, obtaining the text to be desensitized, and segmenting the text to be desensitized to obtain multiple words and the parts of speech of the words, filtering the words according to the parts of speech of the words, and obtaining the data to be desensitized.

[0098] Step S220: desensitize the words in the data to be desensitized according to the preset independent sensitive data identification model and the partial sensitive data identification model.

[0099] By using an independent sensitive data identification model and a partially sensitive data identification model to desensitize the words in the data to be desensitized, the data to be desensitized can be automatically desensitized, which can reduce labor costs and improve the efficiency of data desensitization. In addition, different models can be established for words of different sensitive data types, namely, independent sensitive data identification models and partially sensitive data identification models. Data desensitization can be performed according to multiple different models to improve the accuracy of data desensitization. In addition, by performing word segmentation and filtering on the text to be desensitized to obtain the data to be desensitized, the complexity of calculation can be reduced and the efficiency of data desensitization can be improved.

[0100] The following is a more detailed introduction to the data desensitization method of the present disclosure embodiment:

[0101] In the disclosed embodiment, since the independent sensitive data identification model and the partial sensitive data identification model used in data desensitization are pre-established, the method for establishing the independent sensitive data identification model and the partial sensitive data identification model is first introduced below.

[0102] See also Figure 3 , Figure 3A flowchart showing a method for establishing an independent sensitive data identification model and a partial sensitive data identification model in an embodiment of the present disclosure may include the following steps:

[0103] Step S310, obtaining an original data set marked with sensitive data, and constructing a sensitive word library according to the marked sensitive data in the original data set.

[0104] In the embodiments of the present disclosure, the original data set may be a data set that is marked with sensitive data in a traditional manner. For example, sensitive data in the original data set may be marked in red or in other ways to obtain sensitive data. Text data may be divided into long texts, sentences, words, etc. according to the granularity of the information contained. Among them, words are the smallest units that represent semantics. The marked sensitive data may be long texts, sentences, words, etc.

[0105] In an exemplary embodiment of the present disclosure, the sensitive data marked in the original data set can be segmented to obtain multiple words. Since non-sensitive words may exist in the obtained multiple words, the multiple words can be filtered and the set of filtered words can be used as a sensitive word library.

[0106] Optionally, part-of-speech tagging can be performed on each of the multiple words to obtain the part-of-speech of each word. For example, the word can be tagged with the part-of-speech by a language analysis tool. Among them, the part-of-speech of Chinese can be divided into 12 categories:

[0107] 1) Noun: A word that represents the name of a person or thing.

[0108] 2) Verb: expresses the action, behavior, development and change of people and things.

[0109] 3) Adjectives: Indicates attribute information such as shape, nature, color, and state of things.

[0110] 4) Adverbs: modify and limit verbs, indicating time, frequency, scope, degree, tone, etc.

[0111] 5) Pronouns: words and phrases that replace indeterminate people or things; such as you, I, he, who, etc.

[0112] 6) Prepositions: Together with other words, they form prepositional phrases.

[0113] 7) Quantifier: A word that indicates a unit of thing or action.

[0114] 8) Conjunction: A word that connects words and sentences.

[0115] 9) Auxiliary words: words added to words or sentences to play an auxiliary role, such as: de, di, de, etc.

[0116] 10) Numerals: words that represent numbers.

[0117] 11) Interjections: words that express emotions, exclamations, calls, and responses.

[0118] 12) Onomatopoeia: words that represent sounds.

[0119] Among them, nouns are the words that contain the most sensitive information. Therefore, nouns can be subdivided into special nouns, names of people, places, names of institutions, etc.; through relevant rules, sensitive information such as telephone numbers, ID card numbers, addresses, etc. in nouns can be analyzed in more detail. Adjectives, adverbs, pronouns, prepositions, interjections, onomatopeia, etc. usually do not contain sensitive information. Therefore, multiple words can be filtered according to their parts of speech. Specifically, words with parts of speech such as adjectives, adverbs, pronouns, prepositions, interjections, onomatopeia, etc. that cannot contain sensitive information can be filtered out from multiple words, thereby obtaining a sensitive word library. Of course, the present disclosure can also be filtered by other methods, which are not limited to this.

[0120] Step S320: Classify the words in the sensitive word library according to preset rules to determine the sensitive data type to which each word in the sensitive word library belongs.

[0121] Among them, words can include: non-sensitive words (i.e. words that are not related to sensitive data) and sensitive words. Sensitive words include: words of independent sensitive data type and words of partial sensitive data type. Words of independent sensitive data type refer to words that are sensitive data without the need for modification of other words, such as telephone numbers, ID card numbers, home addresses, etc. Words of partial sensitive data type refer to words that need to be combined with other words to form a compound word or short sentence to be sensitive data.

[0122] In the disclosed embodiment, the preset rules may include multiple rules. For example, the rule for the ID card number may identify 18 consecutive digits with the 7th to 10th digits in the range of 1900 to 2019 as an independent sensitive data type. The rule for the address may be that if the address is determined to be a specific home address, it is identified as an independent sensitive data type. For some words of the partially sensitive data type, they can be directly identified based on a pre-established database, and if a match is found, it is determined to be a partially sensitive data type.

[0123] It should be noted that some words in the sensitive word library may not be recognizable according to the preset rules. Here, an interface can also be provided for the user to manually identify the unrecognizable words in an interactive form, thereby determining the sensitive data type to which each word belongs.

[0124] In the disclosed embodiment, for words of independent sensitive data types, desensitization can be performed directly based on the words. However, for words of partial sensitive data types, desensitization cannot be performed through independent words, and can be performed based on the relationship between the word and the context words. Therefore, in order to improve the accuracy of data desensitization, multiple different models can be established based on words of different sensitive data types, and data desensitization can be performed through multiple different models. The following steps S330 to 340 are the process of establishing an independent sensitive data recognition model based on words of independent sensitive data types, and steps S350 to S380 are the process of establishing a partial sensitive data recognition model based on words of partial sensitive data types.

[0125] Step S330: for each word of the independent sensitive data type, convert the word and the attribute information of the word into a corresponding attribute vector.

[0126] In the disclosed embodiment, the attribute information of a word includes: word frequency, part of speech, context words, dependency relationship between context words, etc. The word frequency is the frequency of occurrence of the word, the part of speech refers to the aforementioned noun, adjective, etc., and the context words refer to other words in the same sentence as the word, which may be adjacent words or not. The dependency relationship is the syntactic structure of the sentence or the dependency relationship between words in the sentence. The dependency relationship between words can be seen in Table 2.

[0127] Table 2

[0128] Dependency Type example Subject-Predicate Relationship I gave her a bouquet of flowers (I <– gave) Verb-object relationship I gave her a bouquet of flowers (send–>flowers) Guest-guest relationship I gave her a bouquet of flowers (send–>her) Preposed Object He reads all kinds of books (books <– reading) Conjunction He invited me to dinner (invite–>me) Central-South Relations Red Apple (Red <– Apple) Structure Very beautiful (very <– beautiful) Verb-complement structure Finished the homework (done–>finished) Parallel Relationship Mountains and sea (Mountains–>sea) Prepositional relationship In the trade zone (inside –>) Left Additional Relation Mountains and sea (and <– sea) Right Additional Relation Children (children–>people) Independent structure The two sentences are structurally independent of each other Core Relationships Refers to the core of the sentence

[0129] Among them, the dependency relationship between words and context words can be determined by language analysis tools. For example, if a sentence is: Wang** was 12 weeks pregnant and came to our hospital for ultrasound examination, which showed intrauterine pregnancy, the dependency relationship between each word and context words obtained by language analysis tools can be found in Figure 4 .

[0130] It should be noted that non-numerical attribute information such as part of speech and dependency relationships can be quantified by numerical values, and then converted into attribute vectors based on the quantization results. For example, the subject-predicate relationship can be represented as 1, the verb-object relationship can be represented as 2, the intermezzo-object relationship can be represented as 3, and so on. For the words themselves, they can be converted into corresponding word vectors through word2vec. It can be seen that the final attribute vector is a vector composed of multiple vectors, and for different words, the corresponding attribute vectors are different.

[0131] Step S340: establishing an independent sensitive data recognition model through a logistic regression algorithm according to the attribute vectors corresponding to the words of the independent sensitive data type and the preset attribute values.

[0132] It should be noted that the attribute values ​​corresponding to the independent sensitive data type and the partial sensitive data type can be pre-set values, for example, 1 and 0 respectively. Of course, other values ​​can also be used, which are not limited here. In this way, for each word belonging to the independent sensitive data type in the sensitive word library, the attribute vector and attribute value corresponding to the word can be obtained. Here, the attribute values ​​of different words are the same, so that the corresponding relationship between each attribute vector and attribute value can be established, and based on the corresponding relationship, an independent sensitive data recognition model can be established through a logistic regression algorithm.

[0133] In the disclosed embodiment, the data set A (i.e., the correspondence between each attribute vector and the attribute value) can be randomly divided into k packages by k-fold cross validation, and one of the packages is used as a test set each time, and the remaining k-1 packages are used as training sets for training. That is, k-1 packages are taken for logistic regression operation. Among them, the logistic regression operation can be logistic regression or other regression methods. Logistic regression is a generalized linear regression analysis model, which is commonly used in data mining, automatic disease diagnosis, economic forecasting and other fields. For example, explore the risk factors that cause the disease, and predict the probability of the disease based on the risk factors.

[0134] Logistic regression and multiple linear regression analysis have a lot in common. Their model forms are basically the same, both have w′x+b, where w and b are parameters to be determined. The difference is that their dependent variables are different. Multiple linear regression directly uses w'x+b as the dependent variable, that is, y=w′x+b, while logistic regression uses the function L to correspond w′x+b to a hidden state p, p=L(w′x+b), and then determines the value of the dependent variable based on the size of p and 1-p. If L is a logistic function, it is logistic regression, and if L is a polynomial function, it is polynomial regression.

[0135] Step S350: for each word in the partial sensitive data type, determine the target sensitive data corresponding to the word in the original data set.

[0136] In the disclosed embodiment, since words of some sensitive data types need to be combined with other words to form a compound word or a short sentence to be sensitive data, for each word of the partially sensitive data type, the target sensitive data corresponding to the word in the original data set can be determined, and the partial sensitive data recognition model can be determined based on the dependency relationship between the word and other words in the target sensitive data. Among them, the target sensitive data corresponding to the word refers to the sentence or paragraph in which the word is located, etc., and the dependency relationship between the word and other words can be analyzed based on the target sensitive data, and the partial sensitive data recognition model can be determined based on the dependency relationship.

[0137] Step S360, obtaining similar words whose similarity to the word is greater than a similarity threshold, and replacing the word in the target sensitive data with the similar words to obtain updated data.

[0138] Generally speaking, data documents in various fields (such as the medical field, etc.) are rigorous text data. Although the storage formats are diverse, there are relevant standards for reference for most data documents. Therefore, the format and content order of most document data are convergent. In other words, when the writing standards are determined, although the data is written in free text, the data dependency structure describing the same classification content is similar. If similar or similar words are applied in the same dependency structure, the information described by this phrase can be similar.

[0139] Based on this principle, the words in the target sensitive data can be replaced with synonyms to obtain updated data. Currently, many related tools can be used to analyze the relevance of words. For example, word2vec can vectorize words, so that the relationship between words can be quantitatively measured and the connection between words can be mined. By sorting out all data marked as sensitive data, analyzing the dependency structure S and the words W that it constitutes, keeping the dependency structure S unchanged, and constantly replacing the words W' that are closely related to W in the sensitive data, updated data can be obtained. Usually, the probability that the updated data is sensitive data is high.

[0140] Step S370, when the updated data cannot be retrieved in the original data set, the sensitive data identification result input by the user for the updated data is obtained.

[0141] Specifically, the updated data can be retrieved from the original data set. If the updated data is retrieved, it can be directly determined whether the updated data is sensitive data based on the sensitive data tagging result. If the updated data is not retrieved, an interface can be provided to the user to manually identify, that is, manually tag, and obtain sensitive data identification results.

[0142] Step S380, adding the updated data and the sensitive data identification results to the original data set, and using the updated original data set as a partial sensitive data identification model.

[0143] In the disclosed embodiment, the sensitive data identification results include: sensitive data and non-sensitive data. Regardless of whether the updated data is sensitive data or not, the updated data and the corresponding sensitive data identification results can be added to the original data set, so that the data in the original data set is expanded to obtain a partial sensitive data identification model. It can be seen that the partial sensitive data identification model is a data set marked with sensitive data. The more data in the partial sensitive data identification model, the more accurate and rapid the identification of sensitive data can be.

[0144] So far, an independent sensitive data identification model and a partial sensitive data identification model have been established. The following is a specific method for data desensitization based on the independent sensitive data identification model and the partial sensitive data identification model.

[0145] In step S210, the text to be desensitized is obtained, and the text to be desensitized is segmented to obtain multiple words and the parts of speech of the words, and the words are filtered according to the parts of speech of the words to obtain the data to be desensitized.

[0146] In the disclosed embodiment, the text to be desensitized is a text with a desensitization requirement, and the text to be desensitized usually contains sensitive data. The text to be desensitized can be a word document, a txt document, etc. Since the processing process of this step is the same as step S310, it will not be described in detail here. By segmenting and filtering the text to be desensitized, the data to be desensitized can be obtained, which can reduce the complexity of the calculation and improve the desensitization efficiency.

[0147] In step S220, the words in the data to be desensitized are desensitized according to the preset independent sensitive data identification model and the partial sensitive data identification model.

[0148] Specifically, since the data recognition model includes: an independent sensitive data recognition model and a partially sensitive data recognition model, desensitization can be performed in parallel, that is, desensitization is performed by the independent sensitive data recognition model and the partially sensitive data recognition model respectively. In an exemplary embodiment of the present disclosure, each word can also be first identified by the independent sensitive data recognition model. If the word belongs to the independent sensitive data type, the word can be desensitized. After that, each remaining word is identified by the partially sensitive data recognition model. In this way, repeated calculations can be avoided and recognition efficiency can be improved.

[0149] Among them, the method of desensitizing words in the desensitized data by using an independent sensitive data identification model can be found in Figure 5 , including the following steps:

[0150] Step S510: for each word in the data to be desensitized, convert the word and its attribute information into a corresponding attribute vector.

[0151] Since the processing process of this step is the same as step S330, it will not be described in detail here.

[0152] Step S520: Process the attribute vector through an independent sensitive data identification model to obtain an attribute value corresponding to the attribute vector.

[0153] Specifically, after establishing the independent sensitive data identification model, the parameter values ​​in the independent sensitive data identification model are obtained. Then, the attribute vector is processed by the independent sensitive data identification model, that is, the attribute vector is substituted into the independent sensitive data identification model to obtain the attribute value corresponding to the attribute vector.

[0154] Step S530, determining whether the word is independent sensitive data according to the attribute value, and desensitizing the word when it is determined that the word is independent sensitive data.

[0155] In the embodiment of the present disclosure, if the obtained attribute value is close to the attribute value corresponding to the independent sensitive data type, it can be considered that the word belongs to the independent sensitive data type and the word is desensitized. For example, when the attribute values ​​of the independent sensitive data type and the partial sensitive data type are 1 and 0 respectively, if the attribute value is close to 1, such as 0.95, then the word can be considered to be an independent sensitive data type.

[0156] After that, the judgment can be continued through the partial sensitive data recognition model. For the method of desensitizing the words in the desensitized data through the partial sensitive data recognition model, please refer to Figure 6 , including the following steps:

[0157] Step S610: for each word in the data to be desensitized, search for the word in the partial sensitive data identification model.

[0158] Specifically, the combined word or short sentence consisting of the word and its context words can be searched in the partial sensitive data identification model. If found, it can be directly determined whether it is sensitive data. If not found, it can be manually identified through the interface provided to the user.

[0159] Step S620: When the word is retrieved, determine whether the word is sensitive data.

[0160] When the word is retrieved, some sensitive data identification models contain a tag result corresponding to the word, and whether the word is sensitive data can be directly determined based on the tag result.

[0161] Step S630: when the word is sensitive data, desensitize the word.

[0162] After identifying sensitive data, the sensitive data can be desensitized. Desensitization methods include: digital summary, character masking (for example, a telephone number can be replaced with 1*****), partial desensitization (only the key part is desensitized, for example, the address after desensitization is XXXXXXX, Beijing), etc. Among them, the digital summary is to use a one-way hash function to "summarize" the plaintext to be encrypted into a string of ciphertext of fixed length (128 bits), and different plaintext summaries into ciphertexts will always have different results, while the same plaintext must have the same summary.

[0163] In addition, when the word is not sensitive data, no processing is required, that is, the processing flow of the word ends.

[0164] In an exemplary embodiment of the present disclosure, the method of data desensitization can also be found in Figure 7 , including the following steps:

[0165] Step S710, determining the sensitive data type of each word in the data to be desensitized.

[0166] In the disclosed embodiment, the sensitive data type of each word in the data to be desensitized can be determined by the attributes of the word. For example, it is pre-defined which data needs to be fully desensitized, and this part of the data is independent sensitive data. It is pre-defined which data needs to be combined with other data to be desensitized, and this part of the data is partially sensitive data. Afterwards, the corresponding model is selected for desensitization according to the sensitive data type of the word.

[0167] Step S720: desensitize the words belonging to the independent sensitive data type through a preset independent sensitive data identification model.

[0168] Step S730: Desensitize the words belonging to the partially sensitive data type through a preset partially sensitive data recognition model.

[0169] It should be noted that the specific desensitization methods of step S720 and step S730 have been described in detail in the previous text and will not be repeated here.

[0170] In an exemplary embodiment of the present disclosure, a new data set may be obtained to update the independent sensitive data identification model to improve the accuracy of the independent sensitive data identification model. Figure 8 , including the following steps:

[0171] Step S810, obtaining a training data set marked with sensitive data, and selecting a first target training word with a sensitive data type as an independent sensitive data type from the sensitive data in the training data set.

[0172] In the disclosed embodiment, the training data set is similar to the aforementioned original data set, and both are data sets marked with sensitive data. Similarly, the sensitive data in the training data set can be segmented, and the sensitive word library corresponding to the training data set can be obtained by filtering. Since the independent sensitive data identification model is a model for independent sensitive data types, after classifying the words in the sensitive word library corresponding to the training data set, the first target training words whose sensitive data type is the independent sensitive data type can be selected. That is, the independent sensitive data identification model is updated by the first target training words.

[0173] Step S820: Identify the first target training word through an independent sensitive data identification model to obtain a predicted value.

[0174] In the disclosed embodiment, the method for the independent sensitive data recognition model to recognize the first target training words may specifically be: converting the first target training words into corresponding attribute vectors according to the aforementioned method, and substituting the attribute vectors into the independent sensitive data recognition model, so as to obtain a predicted value. Usually, there is a deviation between the predicted value and the actual value. The smaller the deviation, the higher the accuracy of the independent sensitive data recognition model; the larger the deviation, the lower the accuracy of the independent sensitive data recognition model. Therefore, the process of the independent sensitive data recognition model recognizing the first target training words can verify the accuracy of the independent sensitive data recognition model.

[0175] Step S830, selecting a prediction value whose difference with the attribute value corresponding to the independent sensitive data type is less than a difference threshold; and updating the independent sensitive data recognition model according to the second target training words corresponding to the selected prediction value.

[0176] It can be understood that the first target training words are marked words, and the attribute value corresponding to the first target training words is also the attribute value corresponding to the independent sensitive data type. Compare the predicted value and the actual attribute value. If the difference is less than the difference threshold, it means that the independent sensitive data recognition model has a high accuracy rate in recognizing the first target training words, that is, the first target training words can be recognized by the independent sensitive data recognition model. Accordingly, the first target training words can be updated to improve the independent sensitive data recognition model and improve the accuracy of the independent sensitive data recognition model. Otherwise, it means that the first target training words are not suitable for recognition by the independent sensitive data recognition model. Among them, the difference between the predicted value and the attribute value refers to the absolute value of the difference, and the difference threshold can be a value set according to experience, for example, it can be 0.1, 0.05, etc., which is not limited here.

[0177] In the disclosed embodiment, the words in the first target training words whose corresponding predicted values ​​and corresponding attribute values ​​of the independent sensitive data type have a difference less than a difference threshold can be used as the second target training words, and the independent sensitive data recognition model can be updated through the second target training words. The specific method may be: converting the second target training words into corresponding attribute vectors according to the aforementioned method, and adjusting the parameter values ​​in the independent sensitive data recognition model according to the attribute vector and the attribute value, so as to further optimize the independent sensitive data recognition model and improve the accuracy of the independent sensitive data recognition model. Of course, the more second target training words there are, the higher the accuracy of the updated independent sensitive data recognition model. It should be noted that, afterwards, the independent sensitive data recognition model can be continuously updated by continuously acquiring new training data sets. With the accumulation of data sets, the accuracy of the independent sensitive data recognition model can be continuously improved.

[0178] In the data desensitization method of the disclosed embodiment, an independent sensitive data identification model and a partial sensitive data identification model are respectively established based on the original data set marked with sensitive data. The independent sensitive data identification model and the partial sensitive data identification model can automatically perform data desensitization on the data to be desensitized, which can reduce labor costs and improve the efficiency and accuracy of desensitization. In addition, the independent sensitive data identification model and the partial sensitive data identification model can also be updated through the accumulation of data to improve the accuracy of data desensitization performed by the independent sensitive data identification model and the partial sensitive data identification model. In addition, the independent sensitive data identification model itself has vectorized the words, so there is no need to worry that the independent sensitive data identification model will leak private data.

[0179] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0180] Furthermore, in this example implementation, a data desensitization device 900 is also provided. Fig. 9 , Fig. 9 A schematic diagram of the structure of a data desensitization device in an embodiment of the present disclosure is shown, including:

[0181] The preprocessing module 910 is used to obtain the text to be desensitized, and segment the text to be desensitized to obtain multiple words and the parts of speech of the words, and filter the words according to the parts of speech of the words to obtain the data to be desensitized;

[0182] The desensitization module 920 is used to desensitize words in the data to be desensitized according to a preset independent sensitive data identification model and a partial sensitive data identification model.

[0183] Optionally, the desensitization module includes: a first desensitization submodule, the first desensitization submodule includes:

[0184] A vector conversion unit, for converting each word in the data to be desensitized and the attribute information of the word into a corresponding attribute vector;

[0185] An attribute value determination unit, used to process the attribute vector through an independent sensitive data identification model to obtain an attribute value corresponding to the attribute vector;

[0186] The independent sensitive data desensitization unit is used to determine whether the word is independent sensitive data according to the attribute value, and desensitize the word when it is determined that the word is independent sensitive data.

[0187] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0188] A sensitive word library construction module is used to obtain the original data set marked with sensitive data and construct a sensitive word library based on the marked sensitive data in the original data set;

[0189] A sensitive data type determination module is used to classify the words in the sensitive word library according to preset rules and determine the sensitive data type to which each word in the sensitive word library belongs;

[0190] An attribute vector determination module, for converting each word and the attribute information of the word into a corresponding attribute vector for each word of the independent sensitive data type;

[0191] The independent sensitive data identification model establishment module is used to establish an independent sensitive data identification model through a logistic regression algorithm according to the attribute vectors corresponding to the words of the independent sensitive data type and the pre-set attribute values.

[0192] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0193] A target sensitive data determination module is used to determine, for each word of some sensitive data types, the target sensitive data corresponding to the word in the original data set;

[0194] A similar word replacement module is used to obtain similar words with a similarity greater than a similarity threshold to the word, and replace the word in the target sensitive data with a similar word to obtain updated data;

[0195] The recognition result acquisition module is used to obtain the sensitive data recognition result input by the user for the updated data when the updated data cannot be retrieved in the original data set;

[0196] The partial sensitive data identification model establishment module is used to add the updated data and sensitive data identification results to the original data set, and use the updated original data set as the partial sensitive data identification model.

[0197] Optionally, the desensitization module includes: a second desensitization submodule, and the second desensitization submodule includes:

[0198] A retrieval unit, used to search for each word in the data to be desensitized in the partial sensitive data recognition model;

[0199] A sensitive data determination unit, used to determine whether the word is sensitive data when the word is retrieved;

[0200] The sensitive data desensitization unit is used to desensitize the word when the word is sensitive data.

[0201] Optionally, a desensitizing module is specifically used to determine the sensitive data type of each word in the data to be desensitized; desensitize words belonging to independent sensitive data types through a preset independent sensitive data recognition model; and desensitize words belonging to partial sensitive data types through a preset partial sensitive data recognition model.

[0202] Optionally, the data desensitization device of the embodiment of the present disclosure further includes:

[0203] A model updating module is used to obtain a training data set marked with sensitive data, select a first target training word whose sensitive data type is an independent sensitive data type from the sensitive data in the training data set; identify the first target training word through an independent sensitive data identification model to obtain a predicted value; select a predicted value whose difference with the attribute value corresponding to the independent sensitive data type is less than a difference threshold; and update the independent sensitive data identification model according to a second target training word corresponding to the selected predicted value.

[0204] The specific details of each module / unit in the above device have been described in detail in the embodiment of the method part, so they will not be repeated here.

[0205] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0206] In an exemplary embodiment of the present disclosure, an electronic device is further provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute any of the methods described in the exemplary implementation.

[0207] Fig.10 The structure diagram of the computer system of the electronic device used to implement the embodiment of the present disclosure is shown. It should be noted that: Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0208] like Fig.10 As shown, the computer system 1000 includes a central processing unit 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage part 1008 to the random access memory 1003. Various programs and data required for system operation are also stored in the random access memory 1003. The central processing unit 1001, the read-only memory 1002 and the random access memory 1003 are connected to each other through a bus 1004. An input / output interface 1005 is also connected to the bus 1004.

[0209] The following components are connected to the input / output interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a local area network (LAN) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0210] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by the central processing unit 1001, various functions defined in the device of the present application are executed.

[0211] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned methods is implemented.

[0212] It should be noted that the computer-readable storage medium shown in the present disclosure may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency, etc., or any suitable combination of the above.

[0213] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0214] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data desensitization method, characterized in that: The method comprises: Obtain the text to be desensitized, and segment the text to be desensitized to obtain multiple words and the parts of speech of the words, and filter the words according to the parts of speech of the words to obtain the data to be desensitized; Desensitizing the words in the data to be desensitized according to a preset independent sensitive data identification model and a partial sensitive data identification model; The training method of the independent sensitive data identification model includes: obtaining an original data set marked with sensitive data, and constructing a sensitive word library according to the sensitive data marked in the original data set; classifying the words in the sensitive word library according to preset rules, and determining the sensitive data type to which each word in the sensitive word library belongs; for each word of the independent sensitive data type, converting the word and the attribute information of the word into a corresponding attribute vector; according to the attribute vector corresponding to the word of the independent sensitive data type and the preset attribute value, establishing the independent sensitive data identification model through a logistic regression algorithm, wherein the word of the independent sensitive data type refers to a word that is sensitive data without being modified by other words; The partially sensitive data recognition model is obtained by obtaining updated data through the target sensitive data corresponding to each word of the partially sensitive data type in the original data set and similar words of the word, and adding the updated data and the corresponding sensitive data recognition results to the original data set to expand the original data set. The partially sensitive data recognition model is a data set marked with sensitive data, wherein the words of the partially sensitive data type refer to words that need to be combined with other words to form combined words or short sentences to form sensitive data.

2. The method according to claim 1, characterized in that Desensitizing the words in the data to be desensitized by using a preset independent sensitive data identification model, including: For each word in the data to be desensitized, convert the word and its attribute information into a corresponding attribute vector; Processing the attribute vector through an independent sensitive data identification model to obtain an attribute value corresponding to the attribute vector; Determine whether the word is independent sensitive data according to the attribute value, and desensitize the word when it is determined that the word is independent sensitive data.

3. The method according to claim 1, characterized in that Desensitizing the words in the data to be desensitized by using a preset partial sensitive data recognition model, including: For each word in the data to be desensitized, searching for the word in the partial sensitive data identification model; When the word is retrieved, determine whether the word is sensitive data; When the word is sensitive data, the word is desensitized.

4. The method according to claim 1, characterized in that: Desensitizing the words in the data to be desensitized according to the preset independent sensitive data identification model and the partial sensitive data identification model, including: Determine the sensitive data type of each word in the data to be desensitized; Desensitize words belonging to the independent sensitive data type through the preset independent sensitive data identification model; Words belonging to some sensitive data types are desensitized through the preset partial sensitive data recognition model.

5. The method according to claim 1, characterized in that After establishing the independent sensitive data identification model, the method further includes: Acquire a training data set marked with sensitive data, and select a first target training word with a sensitive data type as an independent sensitive data type from the sensitive data in the training data set; Identify the first target training word by using the independent sensitive data identification model to obtain a prediction value; Selecting a predicted value whose difference with the attribute value corresponding to the independent sensitive data type is less than a difference threshold; The independent sensitive data recognition model is updated according to the second target training words corresponding to the selected prediction values.

6. A data desensitization device, characterized in that: The device comprises: A preprocessing module is used to obtain the text to be desensitized, and segment the text to be desensitized to obtain multiple words and the parts of speech of the words, and filter the words according to the parts of speech of the words to obtain the data to be desensitized; A desensitization module, used for desensitizing words in the data to be desensitized according to a preset independent sensitive data identification model and a partial sensitive data identification model; The training method of the independent sensitive data identification model includes: obtaining an original data set marked with sensitive data, and constructing a sensitive word library according to the sensitive data marked in the original data set; classifying the words in the sensitive word library according to preset rules, and determining the sensitive data type to which each word in the sensitive word library belongs; for each word of the independent sensitive data type, converting the word and the attribute information of the word into a corresponding attribute vector; according to the attribute vector corresponding to the word of the independent sensitive data type and the preset attribute value, establishing the independent sensitive data identification model through a logistic regression algorithm, wherein the word of the independent sensitive data type refers to a word that is sensitive data without being modified by other words; The partially sensitive data recognition model is obtained by obtaining updated data through the target sensitive data corresponding to each word of the partially sensitive data type in the original data set and similar words of the word, and adding the updated data and the corresponding sensitive data recognition results to the original data set to expand the original data set. The partially sensitive data recognition model is a data set marked with sensitive data, wherein the words of the partially sensitive data type refer to words that need to be combined with other words to form combined words or short sentences to form sensitive data.

7. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the method according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Sensitive information desensitization method and system for data sharing

    CN107480549A

  • Sensitive information identification method, system and device and storage medium

    CN109657243A

  • Data anonymization methods and apparatus, electronic devices and storage media

    CN111143884B