Desensitization method, desensitization device, electronic device and storage medium

By segmenting the original data and combining sensitive information detection models, regular expressions and sensitive word dictionaries, the problems of low accuracy and high cost in the existing technology are solved, and different types of sensitivity are achieved Efficient identification and desensitization of information.

CN114626097BActive Publication Date: 2025-01-03CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210283373.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-01-03
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

The existing desensitization methods are not very accurate to text information and require a large amount of high-quality labeled data. The cost is high, making it difficult to effectively process different types of sensitive information.

Method used

The original data is segmented through the preset desensitization category label, combined with the pre-trained sensitive information detection model, regular expression and sensitive word dictionary, different types of sensitive information are detected and desensitized, and a variety of methods are combined Process for improved accuracy.

Benefits of technology

It realizes accurate identification and desensitization of different types of sensitive information, improves the accuracy and efficiency of desensitization, reduces the cost of use, and meets personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114626097B_ABST
    Figure CN114626097B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a desensitization method, a desensitization device, an electronic device and a storage medium, which belongs to the field of artificial intelligence technology. The method includes: obtaining the original data to be desensitized; segmenting the original data according to the preset desensitization category label to obtain the to-be-desensitized word segment corresponding to the desensitization category label, the to-be-desensitized word segment includes the first word segment, the second word segment and the third word segment, performing the first sensitive detection and the first desensitization process on the first word segment through the sensitive information detection model to obtain the first desensitized data; performing the second sensitive detection and the second desensitization process on the second word segment through the regular expression to obtain the second desensitized data; performing the third sensitive detection and the third desensitization process on the third word segment through the sensitive word dictionary to obtain the third desensitized data; combining the first desensitized data, the second desensitized data and the third desensitized data to obtain the target data. The embodiment of the present application can improve the accuracy of desensitization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a desensitization method, a desensitization device, an electronic device and a storage medium. Background Art

[0002] Some data may involve sensitive information such as user privacy, business secrets, or sensitive information that does not meet industry requirements, so it is necessary to desensitize the relevant sensitive information. At present, the common desensitization method is mainly to perform part-of-speech tagging on text information, and then desensitize the sensitive entity words obtained by tagging. This method often requires a large amount of labeled data, and the cost of obtaining a large amount of high-quality labeled data is high, and the accuracy of desensitization is not high. Therefore, how to improve the accuracy of desensitization has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a desensitization method, a desensitization device, an electronic device and a storage medium, aiming to improve the accuracy of desensitization.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a desensitization method, the method comprising:

[0005] Obtain the original data to be desensitized;

[0006] The original data is segmented according to the preset desensitization category label to obtain a to-be-desensitized word segment corresponding to each of the desensitization category labels, wherein the to-be-desensitized word segment includes a first word segment, a second word segment, and a third word segment, and the first word segment, the second word segment, and the third word segment have different sensitive categories;

[0007] Performing a first sensitive detection on the first word segment by using a pre-trained sensitive information detection model to obtain first sensitive data, and performing a first desensitization process on the first sensitive data to obtain first desensitized data;

[0008] Performing a second sensitivity detection on the second word segment by using a preset regular expression to obtain second sensitive data, and performing a second desensitization process on the second sensitive data to obtain second desensitized data;

[0009] Performing a third sensitive detection on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and performing a third desensitization process on the third sensitive data to obtain third desensitized data;

[0010] The first desensitized data, the second desensitized data, and the third desensitized data are combined and processed to obtain target data.

[0011] In some embodiments, the step of segmenting the original data according to the preset desensitization category label to obtain the to-be-desensitized word segment corresponding to each desensitization category label includes:

[0012] The classification probability of the original data is calculated by using a preset function and the desensitized category label to obtain a classification probability value of each desensitized category label;

[0013] The original data is segmented according to the classification probability value to obtain the word segment to be desensitized.

[0014] In some embodiments, the step of performing a first sensitivity detection on the first word segment using a pre-trained sensitive information detection model to obtain first sensitive data, and performing a first desensitization process on the first sensitive data to obtain first desensitized data includes:

[0015] Inputting the first word segment into the sensitive information detection model, wherein the sensitive information detection model includes a convolutional layer, a fully connected layer, and a decoding layer;

[0016] Extracting entity features of the first word segment through the convolution layer to obtain candidate word segment features;

[0017] The candidate word segment features are screened and processed by using the part-of-speech category tags preset in the fully connected layer to obtain the target word segment features to be desensitized;

[0018] Decoding the target word segment feature through the decoding layer to obtain the first sensitive data;

[0019] Perform a first desensitizing process on the first sensitive data to obtain first desensitized data.

[0020] In some embodiments, the step of performing a second sensitivity detection on the second word segment using a preset regular expression to obtain second sensitive data, and performing a second desensitization process on the second sensitive data to obtain second desensitized data includes:

[0021] The second word segment is encoded by a preset encoder to obtain a target character string to be desensitized;

[0022] Performing sensitivity detection on the target character string using the regular expression to obtain the second sensitive data;

[0023] Perform a second desensitizing process on the second sensitive data to obtain second desensitized data.

[0024] In some embodiments, the step of performing a third sensitivity detection on the third word segment using a preset sensitive word dictionary to obtain third sensitive data, and performing a third desensitization process on the third sensitive data to obtain third desensitized data includes:

[0025] Traversing the sensitive word dictionary, calculating the similarity between the third word segment and each reference word segment in the sensitive word dictionary to obtain word segment similarity;

[0026] Screening the reference word segment according to the word segment similarity to obtain the third sensitive data;

[0027] Perform a third desensitizing process on the third sensitive data to obtain third desensitized data.

[0028] In some embodiments, the step of screening the reference word segments according to the word segment similarity to obtain the third sensitive data includes:

[0029] Comparing the word segment similarity with a preset similarity threshold;

[0030] A reference word segment whose word segment similarity is greater than or equal to the similarity threshold is selected as the third sensitive data.

[0031] In some embodiments, the first desensitized data, the second desensitized data, and the third desensitized data are spliced ​​according to a preset splicing order to obtain initial data;

[0032] The initial data is filtered to obtain the target data.

[0033] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a desensitization device, the device comprising:

[0034] The original data acquisition module is used to obtain the original data to be desensitized;

[0035] a segmentation module, configured to segment the original data according to a preset desensitization category label to obtain a to-be-desensitized word segment corresponding to each of the desensitization category labels, wherein the to-be-desensitized word segment includes a first word segment, a second word segment, and a third word segment, and the first word segment, the second word segment, and the third word segment have different sensitive categories;

[0036] a first sensitive information detection module, configured to perform a first sensitive information detection on the first word segment using a pre-trained sensitive information detection model to obtain first sensitive data, and perform a first desensitization process on the first sensitive data to obtain first desensitized data;

[0037] A second sensitivity detection module, used for performing a second sensitivity detection on the second word segment through a preset regular expression to obtain second sensitive data, and performing a second desensitization process on the second sensitive data to obtain second desensitized data;

[0038] A third sensitive detection module, used for performing a third sensitive detection on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and performing a third desensitization process on the third sensitive data to obtain third desensitized data;

[0039] A combination module is used to combine the first desensitized data, the second desensitized data and the third desensitized data to obtain target data.

[0040] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program, when executed by the processor, implements the method described in the first aspect above.

[0041] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the first aspect above.

[0042] The desensitization method, desensitization device, electronic device and storage medium proposed in the present application obtain the original data to be desensitized, segment the original data according to the preset desensitization category labels, and obtain the to-be-desensitized word segments corresponding to each desensitization category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment and a third word segment, and the sensitive categories of the first word segment, the second word segment and the third word segment are different. This method can classify and segment the sensitive information in the original data according to the preset desensitization category labels, so that different types of sensitive information can be detected and desensitized in a variety of ways, making the desensitization process more targeted. Furthermore, a first sensitive detection is performed on the first word segment through a pre-trained sensitive information detection model to obtain first sensitive data, and a first desensitization processing is performed on the first sensitive data to obtain first desensitized data; a second sensitive detection is performed on the second word segment through a preset regular expression to obtain second sensitive data, and a second desensitization processing is performed on the second sensitive data to obtain second desensitized data; a third sensitive detection is performed on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and a third desensitization processing is performed on the third sensitive data to obtain third desensitized data. This method uses a sensitive information detection model, a regular expression and a sensitive word dictionary to detect different types of sensitive information, which effectively improves the comprehensiveness of detection; at the same time, the sensitive information detection model, regular expression and sensitive word dictionary can be pre-set according to actual conditions, can be directly used in different desensitization scenarios, and can be continuously expanded and improved according to different desensitization needs, which can not only reduce the cost of use, but also meet personalized needs. Finally, the first desensitized data, the second desensitized data and the third desensitized data are combined and processed to obtain the target data. This method uses multiple methods to detect different types of sensitive information, achieves accurate identification of sensitive fields, and improves the accuracy and efficiency of desensitization. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of the desensitization method provided in the embodiment of the present application;

[0044] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.

[0045] Figure 3 yes Figure 1 Flow chart of step S103 in FIG.

[0046] Figure 4 yes Figure 1 Flow chart of step S104 in FIG.

[0047] Figure 5 yes Figure 1 Flow chart of step S105 in FIG.

[0048] Figure 6 yes Figure 5 Flow chart of step S502 in FIG.

[0049] Figure 7 yes Figure 1 Flow chart of step S106 in FIG.

[0050] Figure 8 It is a schematic diagram of the structure of the desensitization device provided in an embodiment of the present application;

[0051] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0055] First, some nouns involved in this application are analyzed:

[0056] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science. AI attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a 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.

[0057] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages ​​(such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text comprehension. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0058] Information Extraction (NER): A text processing technology that extracts specified types of entity, relationship, event and other factual information from natural language text and forms structured data output. Information extraction is a technology that extracts specific information from text data. Text data is composed of some specific units, such as sentences, paragraphs, and chapters. Text information is composed of some small specific units, such as characters, words, phrases, sentences, paragraphs, or a combination of these specific units. Extracting noun phrases, names, place names, etc. from text data are all text information extraction. Of course, the information extracted by text information extraction technology can be various types of information.

[0059] Deep Learning (DL): is a new research direction in the field of Machine Learning (ML). The concept of deep learning originates from the study of artificial neural networks. A multilayer perceptron with multiple hidden layers is a deep learning structure. Deep learning discovers the distributed feature representation of data by combining low-level features to form more abstract high-level representation attribute categories or features. The motivation for studying deep learning is to establish a neural network that simulates the human brain for analysis and learning. It imitates the mechanism of the human brain to interpret data, such as images, sounds, and text. Deep learning is a general term for a class of pattern analysis methods. In terms of specific research content, it mainly involves three types of methods:

[0060] (1) A neural network system based on convolution operations, namely a convolutional neural network (CNN).

[0061] (2) Autoencoder neural networks based on multi-layer neurons, including autoencoders and sparse coding, which has received widespread attention in recent years.

[0062] (3) Pre-training is performed in the form of a multi-layer autoencoder neural network, and then the deep belief network (DBN) is used to further optimize the neural network weights by combining the identification information.

[0063] BERT (Bidirectional Encoder Representations from Transformers): It is a language representation model. BERT uses Transformer Encoder block for connection and is a typical bidirectional encoding model.

[0064] Hidden Markov Model (MEMM): It is used to calculate the conditional probability distribution of each hidden state sequence Y for a given observation sequence X. It establishes a joint probability for the transition probability and the performance probability. The statistics are the conditional probability, not the co-occurrence probability. Since MEMM only performs local normalization, it is easy to fall into the local optimum.

[0065] Conditional random field algorithm (CRF): is a mathematical algorithm; it combines the characteristics of maximum entropy model and hidden Markov model, and is an undirected graph model. In recent years, it has achieved good results in sequence labeling tasks such as word segmentation, part-of-speech tagging and named entity recognition. Conditional random field is a typical discriminant model, and its joint probability can be written as a combination of several potential functions, among which the most commonly used is linear chain conditional random field. If x = (x1, x2, ... xn) represents the observed input data sequence, y = (y1, y2, ... yn) represents a state sequence, given an input sequence, the linear chain CRF model defines the joint conditional probability of the state sequence as p(y|x) = exp{} (2-14); Z(x) = {} (2-15); where: Z is the probability normalization factor conditional on the observed sequence x; fj(yi-1, yi, x, i) is an arbitrary feature function.

[0066] Decoder: Convert the previously generated fixed vector into an output sequence; the input sequence can be text, voice, image, or video; the output sequence can be text or image.

[0067] Regular Expression (RE): Regular expression is also called regular expression. Regular expressions are usually used to retrieve and replace texts that conform to a certain pattern (rule). Regular expression is a logical formula for operating on strings (including common characters (for example, letters from a to z) and special characters (called "meta-characters")), that is, using some pre-defined specific characters and the combination of these specific characters to form a "regular string", which is used to express a filtering logic for the string. Regular expression is a text pattern that describes one or more strings to be matched when searching for text.

[0068] Some data may involve sensitive information such as user privacy, business secrets, or sensitive information that does not meet industry requirements, so it is necessary to desensitize the relevant sensitive information. At present, the common desensitization method is mainly to perform part-of-speech tagging on text information, and then desensitize the sensitive entity words obtained by tagging. This method often requires a large amount of labeled data, and the cost of obtaining a large amount of high-quality labeled data is high, and the accuracy of desensitization is not high. Therefore, how to improve the accuracy of desensitization has become a technical problem that needs to be solved urgently.

[0069] Based on this, the embodiments of the present application provide a desensitization method, a desensitization device, an electronic device and a storage medium, aiming to improve the accuracy of desensitization.

[0070] The desensitization method, desensitization device, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated by the following embodiments. First, the desensitization method in the embodiments of the present application is described.

[0071] 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.

[0072] 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.

[0073] The desensitization method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The desensitization method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, Domain name services, security services, CDN, and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms; the software can be an application that implements the desensitization method, etc., but is not limited to the above forms.

[0074] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0075] Figure 1 is an optional flow chart of the desensitization method provided in the embodiment of the present application, Figure 1 The method may include but is not limited to steps S101 to S106.

[0076] Step S101, obtaining the original data to be desensitized;

[0077] Step S102, segmenting the original data according to the preset desensitization category label to obtain the to-be-desensitized word segments corresponding to each desensitization category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment, and a third word segment, and the first word segment, the second word segment, and the third word segment have different sensitive categories;

[0078] Step S103, performing a first sensitivity detection on the first word segment using a pre-trained sensitive information detection model to obtain first sensitive data, and performing a first desensitization process on the first sensitive data to obtain first desensitized data;

[0079] Step S104, performing a second sensitivity detection on the second word segment using a preset regular expression to obtain second sensitive data, and performing a second desensitization process on the second sensitive data to obtain second desensitized data;

[0080] Step S105, performing a third sensitivity detection on the third word segment using a preset sensitive word dictionary to obtain third sensitive data, and performing a third desensitization process on the third sensitive data to obtain third desensitized data;

[0081] Step S106, combining and processing the first desensitized data, the second desensitized data, and the third desensitized data to obtain target data.

[0082] In steps S101 to S106 shown in the embodiment of the present application, the original data is segmented and processed by preset desensitizing category labels to obtain the to-be-desensitized word segments corresponding to each desensitizing category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment and a third word segment, and the sensitive categories of the first word segment, the second word segment and the third word segment are different. The sensitive information in the original data can be classified and segmented according to the preset desensitizing category labels, so that different types of sensitive information can be detected and desensitized in a variety of ways, making the desensitization process more targeted. A first sensitive detection is performed on the first word segment through a pre-trained sensitive information detection model to obtain first sensitive data, and a first desensitization process is performed on the first sensitive data to obtain first desensitized data; a second sensitive detection is performed on the second word segment through a preset regular expression to obtain second sensitive data, and a second desensitization process is performed on the second sensitive data to obtain second desensitized data; a third sensitive detection is performed on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and a third desensitization process is performed on the third sensitive data to obtain third desensitized data. The sensitive information detection model, regular expression and sensitive word dictionary are used to detect different types of sensitive information, which effectively improves the comprehensiveness of the detection; at the same time, the sensitive information detection model, regular expression and sensitive word dictionary can be pre-set according to actual conditions, and can be directly used in different desensitization scenarios, and can be continuously expanded and improved according to different desensitization needs, which can not only reduce the cost of use, but also meet personalized needs. The method realizes accurate identification of sensitive information and improves the accuracy and efficiency of desensitization.

[0083] In step S101 of some embodiments, a web crawler can be written to crawl data in a targeted manner after setting up the data source to obtain the original data to be desensitized. The original data can also be obtained by other means, not limited to this. It should be noted that the original data is mainly text data, which contains sensitive information involving user privacy such as names, locations, ID numbers, etc.

[0084] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S202:

[0085] Step S201, calculating the classification probability of the original data using a preset function and the desensitized category label to obtain a classification probability value for each desensitized category label;

[0086] Step S202, segmenting the original data according to the classification probability values ​​to obtain the word segments to be desensitized.

[0087] In step S201 of some embodiments, the preset desensitizing category labels include a clear part-of-speech class (names, places, times, etc.), a clear rule class (ID number, mobile phone number, insurance policy number, etc.), and a special case class (banned words, special names, special place names, etc.); the preset function can be a softmax function, etc. For example, a probability distribution is created for the desensitized data on different desensitizing category labels through the softmax function to obtain the classification probability values ​​of the text segments on the desensitized data belonging to different desensitizing categories.

[0088] In step S202 of some embodiments, different text segments are classified into desensitizing category labels with the largest classification probability values ​​according to the classification probability values, and the to-be-desensitized segments corresponding to each desensitizing category label are obtained.

[0089] Before step S103 in some embodiments, the method further includes pre-training a sensitive information detection model, which is mainly constructed using a statistical method (e.g., hidden Markov model, conditional random field algorithm, etc.) or a deep learning method (e.g., Lattice LSTM, LR-CNN, etc.). The named entity extraction algorithm (NER algorithm) of the above sensitive information detection model can identify entities with specific meanings in the target text, such as names of people, places, institutions, dates, proper nouns, etc. In the desensitization task of the embodiment of the present application, the above sensitive information detection model can perform desensitization processing on such words identified by named entities according to its own needs.

[0090] See also Figure 3 In some embodiments, step S103 may include but is not limited to steps S301 to S305:

[0091] Step S301, inputting the first word segment into a sensitive information detection model, wherein the sensitive information detection model includes a convolutional layer, a fully connected layer, and a decoding layer;

[0092] Step S302, extracting entity features of the first word segment through a convolutional layer to obtain candidate word segment features;

[0093] Step S303, screening the candidate word segment features by using the part-of-speech category tags preset in the fully connected layer to obtain the target word segment features to be desensitized;

[0094] Step S304, decoding the target word segment feature through a decoding layer to obtain first sensitive data;

[0095] Step S305: perform a first desensitizing process on the first sensitive data to obtain first desensitized data.

[0096] In step S301 of some embodiments, the first word segment is input into a sensitive information detection model, wherein the sensitive information model can be constructed based on a hidden Markov model, a conditional random field algorithm, etc. The sensitive information detection model includes a convolutional layer, a fully connected layer, and a decoding layer.

[0097] In step S302 of some embodiments, entity features of the first word segment are extracted through a convolutional layer to capture entity features in the first word segment and obtain candidate word segment features.

[0098] In step S303 of some embodiments, a probability distribution is created for the candidate word segment features using the part-of-speech category tags preset in the fully connected layer, the part-of-speech category to which each candidate word segment feature belongs is obtained through the probability distribution, and the candidate word segment features contained in the part-of-speech category involving sensitive information are extracted to obtain the target word segment features to be desensitized.

[0099] In step S304 of some embodiments, the target word segment feature is decoded by a decoding layer to implement mapping of the target word segment feature from the vector space to the semantic space, thereby obtaining the target word segment feature in text form (ie, the first sensitive data).

[0100] In step S305 of some embodiments, a preset mask symbol is obtained, wherein the mask symbol may be a character blank, a preset pixel value, a punctuation mark, etc. Performing the first desensitization processing on the first sensitive data by means of the mask symbol mainly involves performing mask processing on the first sensitive data, replacing all or part of the actual content of the first sensitive data with the mask symbol, so that the field position of the first sensitive data is blank, or a punctuation mark, or is covered by a certain pixel value, thereby obtaining the first desensitized data.

[0101] For example, the first word segment is "Li Hua is going to visit clients at the First Financial Center on February 12"; the sensitive information detection model can detect and extract entity features such as name, time, and location, and obtain the target word segment features: Li Hua (person), February 12 (time), First Financial Center (location). Therefore, the mask symbol is used to perform mask desensitization processing on this field, and the first desensitized data is "Li** is going to visit clients at ***** on * month ** day".

[0102] The above steps S301 to S304 can more conveniently detect and desensitize sensitive words with clear parts of speech (for example, names, places, times, etc.) through the pre-built sensitive information detection model, thereby improving the accuracy and efficiency of desensitization.

[0103] See also Figure 4In some embodiments, step S104 may include but is not limited to steps S401 to S403:

[0104] Step S401, encoding the second word segment by a preset encoder to obtain a target character string to be desensitized;

[0105] Step S402, performing sensitivity detection on the target string using a regular expression to obtain second sensitive data;

[0106] Step S403: perform a second desensitizing process on the second sensitive data to obtain second desensitized data.

[0107] In step S401 of some embodiments, the preset encoder may be a BERT encoder or other encoders, without limitation. Taking the BERT encoder as an example, the second word segment is encoded by the BERT encoder, and the second word segment is converted from a text form to a vector form to obtain a target string to be desensitized.

[0108] In step S402 of some embodiments, the preset regular expressions are regular expressions of various types. Since regular expressions are often used to match strings, different types of regular expressions can be written according to actual needs to match different types of target strings, such as email addresses, mobile phone numbers, ID card numbers, and insurance policy numbers, etc. Then, the target string is subjected to sensitivity detection through the regular expression to obtain the second sensitive data.

[0109] For example, the regular expression for a mailbox could be

[0110] (\w)((\w)*)([-+.]\w+)*(@\w+([-.]\w+)*\.\w+([-.]\w+)*);

[0111] The regular expression for a mobile phone number can be

[0112] (13[0-9]|14[5|7]|15[0-9]|18[0-9])\d{8};

[0113] The regular expression for the ID number can be

[0114] (^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$).

[0115] In step S403 of some embodiments, a preset mask symbol is obtained, wherein the mask symbol may be a character blank, a preset pixel value, a punctuation mark, etc. Performing a second desensitization process on the second sensitive data through the mask symbol mainly involves masking the second sensitive data, replacing all or part of the actual content of the second sensitive data with the mask symbol, so that the field position of the second sensitive data is blank, or a punctuation mark, or is covered by a certain pixel value, thereby obtaining the second desensitized data.

[0116] For example, the second segment is that the email address of customer Li Hua is 123456789@qq.com, the mobile phone number is 13012342224, and the ID number is 400102198001011230. After the above steps S401 to S403, the second anonymized data obtained is that the email address of customer Li Hua is 1*******@qq.com, the mobile phone number is 1*********24, and the ID number is 4001**********1230.

[0117] The above steps S401 to S403 can conveniently detect and desensitize sensitive information with clear rules such as character strings (for example, ID card number, mobile phone number, insurance policy number, etc.) by pre-constructing various types of regular expressions, thereby improving the accuracy and efficiency of desensitization.

[0118] See also Figure 5 In some embodiments, step S105 may also include but is not limited to steps S501 to S503:

[0119] Step S501, traversing the sensitive word dictionary, calculating the similarity between the third word segment and each reference word segment in the sensitive word dictionary, and obtaining the word segment similarity;

[0120] Step S502, screening the reference word segments according to the word segment similarity to obtain third sensitive data;

[0121] Step S503: perform a third desensitizing process on the third sensitive data to obtain third desensitized data.

[0122] In step S501 of some embodiments, the sensitive word dictionary is a set of a series of reference word segments, and the reference word segments are separated by a separator "" so that each reference word segment can be calculated similarity with the third word segment respectively. Specifically, the third word segment and the reference word segment can be converted into vector form, and the cosine similarity algorithm is used to calculate the similarity between the three word segments in vector form and the reference word segment, thereby obtaining the word segment similarity.

[0123] In step S502 of some embodiments, when the reference words are screened according to word segment similarity, the word segment similarity is compared with a preset similarity threshold, and based on the relationship between the word segment similarity and the similarity threshold, a reference word segment that meets the requirements is selected as the third sensitive data.

[0124] In step S503 of some embodiments, a preset mask symbol is obtained, wherein the mask symbol may be a character blank, a preset pixel value, a punctuation mark, etc. The second desensitization processing of the third sensitive data by the mask symbol mainly involves masking the third sensitive data, replacing all or part of the actual content of the third sensitive data with the mask symbol, so that the field position of the third sensitive data is blank, or a punctuation mark, or is covered by a certain pixel value, thereby obtaining the third desensitized data.

[0125] For example, the reference word segment included in the sensitive word dictionary is "piracy"; the third word segment is "I recently bought a batch of pirated books, and the quality is too poor"; the similarity is calculated based on the phrases and characters in the reference word segment and the third word segment, among which the reference word segment "piracy" and the "pirated books" in the third word segment are more similar. Therefore, the mask symbol is used to perform mask desensitization processing on this field, and the third desensitized data is "I recently bought a batch of ** books, and the quality is too poor".

[0126] In the above steps S501 to S503, by pre-building a sensitive word dictionary, it is relatively convenient to detect and desensitize specific sensitive words (eg, banned words, special names, special place names, etc.), thereby improving the accuracy and efficiency of desensitization.

[0127] See also Figure 6 In some embodiments, step S502 further includes but is not limited to steps S601 to S602:

[0128] Step S601, comparing the word segment similarity with a preset similarity threshold;

[0129] Step S602: Select a reference word segment whose word segment similarity is greater than or equal to a similarity threshold as the third sensitive data.

[0130] In step S601 and step S602 of some embodiments, the preset similarity threshold can be set according to actual needs. For example, the similarity threshold can be 0.8. Then, by comparing the similarity of the word segment with the similarity threshold, if the similarity of the word segment is greater than or equal to 0.8, it indicates that the current third word segment is similar to the reference word segment and is more likely to be a sensitive word segment. Therefore, the reference word segment whose similarity is greater than or equal to the similarity threshold is selected as the third sensitive data. In this way, words with a high possibility of being sensitive words can be desensitized, while words with a low possibility of being sensitive words can be detected. It can be determined whether these words need to be desensitized through secondary screening, which can improve the accuracy and efficiency of desensitization.

[0131] See also Figure 7 In some embodiments, step S106 may also include but is not limited to steps S701 to S702:

[0132] Step S701, splicing the first desensitized data, the second desensitized data and the third desensitized data according to a preset splicing order to obtain initial data;

[0133] Step S702, filtering the initial data to obtain target data.

[0134] In step S701 of some embodiments, the preset splicing order may be the time sequence of obtaining the first desensitized data, the second desensitized data, and the third desensitized data, etc. For example, on the database platform, according to the time sequence of obtaining the first desensitized data, the second desensitized data, and the third desensitized data, a plurality of first desensitized data, second desensitized data, and third desensitized data are annotated, so that each first desensitized data, second desensitized data, and third desensitized data is labeled with a sequence label, and the sequence label may be an Arabic sequence (1, 2, 3, ...) or an English letter sequence (A, B, C, ...); and then, the plurality of first desensitized data, second desensitized data, and third desensitized data with sequence labels are spliced ​​in the sequence label order by the CONCAT() function to obtain the initial data, which is the data detected and desensitized by the above-mentioned sensitive information detection model, regular expression, and sensitive word dictionary.

[0135] In step S702 of some embodiments, in order to further improve the accuracy of desensitization, after obtaining the initial data, the initial data can also be subjected to data cleaning, manual review and other operations according to actual needs, so as to filter or correct abnormal data or non-standard data in the initial data, thereby obtaining the target data, which is the final desensitized data.

[0136] It should be noted that in order to further improve the desensitization effect, the sensitive information detection model, regular expressions and sensitive word dictionary can be pre-set according to actual conditions, and can be directly used in different desensitization scenarios. The sensitive information detection model, regular expressions and sensitive word dictionary can also be continuously expanded and improved according to different desensitization needs, which can not only reduce the cost of use but also meet personalized needs.

[0137] The desensitization method of the embodiment of the present application obtains the original data to be desensitized, and segments the original data according to preset desensitization category labels to obtain the to-be-desensitized word segments corresponding to each desensitization category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment, and a third word segment, and the sensitive categories of the first word segment, the second word segment, and the third word segment are different. This method can classify and segment the sensitive information in the original data according to the preset desensitization category labels, so that different types of sensitive information can be detected and desensitized in a variety of ways, making the desensitization process more targeted. Furthermore, a first sensitive detection is performed on the first word segment through a pre-trained sensitive information detection model to obtain first sensitive data, and a first desensitization processing is performed on the first sensitive data to obtain first desensitized data; a second sensitive detection is performed on the second word segment through a preset regular expression to obtain second sensitive data, and a second desensitization processing is performed on the second sensitive data to obtain second desensitized data; a third sensitive detection is performed on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and a third desensitization processing is performed on the third sensitive data to obtain third desensitized data. This method uses a sensitive information detection model, a regular expression and a sensitive word dictionary to detect different types of sensitive information, effectively improving the comprehensiveness of detection; at the same time, the sensitive information detection model, regular expression and sensitive word dictionary can be pre-set according to actual conditions, can be directly used in different desensitization scenarios, and can be continuously expanded and improved according to different desensitization needs, which can not only reduce the cost of use, but also meet personalized needs. Finally, the first desensitized data, the second desensitized data and the third desensitized data are combined and processed to obtain the target data. This method uses multiple methods to detect different types of sensitive information, achieves accurate identification of sensitive fields, and improves the accuracy and efficiency of desensitization.

[0138] See also Figure 8 The present application also provides a desensitization device, which can implement the above desensitization method. The device includes:

[0139] The original data acquisition module 801 is used to acquire the original data to be desensitized;

[0140] The segmentation module 802 is used to segment the original data according to the preset desensitization category label to obtain the to-be-desensitized word segments corresponding to each desensitization category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment and a third word segment, and the first word segment, the second word segment and the third word segment have different sensitive categories;

[0141] A first sensitive detection module 803 is used to perform a first sensitive detection on the first word segment using a pre-trained sensitive information detection model to obtain first sensitive data, and perform a first desensitization process on the first sensitive data to obtain first desensitized data;

[0142] A second sensitivity detection module 804 is used to perform a second sensitivity detection on the second word segment through a preset regular expression to obtain second sensitive data, and perform a second desensitization process on the second sensitive data to obtain second desensitized data;

[0143] A third sensitive detection module 805 is used to perform a third sensitive detection on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and perform a third desensitization process on the third sensitive data to obtain third desensitized data;

[0144] The combination module 806 is used to combine the first desensitized data, the second desensitized data and the third desensitized data to obtain target data.

[0145] In some embodiments, the segmentation module 802 includes:

[0146] A classification probability calculation unit is used to calculate the classification probability of the original data through a preset function and a desensitized category label to obtain a classification probability value of each desensitized category label;

[0147] The segmentation processing unit is used to segment the original data according to the classification probability value to obtain the word segment to be desensitized.

[0148] In some embodiments, the first sensitive detection module 803 includes:

[0149] An input unit, used to input the first word segment into a sensitive information detection model, wherein the sensitive information detection model includes a convolutional layer, a fully connected layer, and a decoding layer;

[0150] An entity feature extraction unit, configured to extract entity features from the first word segment through a convolutional layer to obtain candidate word segment features;

[0151] A feature screening unit is used to screen the candidate word segment features through the part-of-speech category tags preset in the fully connected layer to obtain the target word segment features to be desensitized;

[0152] A decoding unit, used for decoding the target word segment feature through a decoding layer to obtain first sensitive data;

[0153] The first desensitizing unit is used to perform a first desensitizing process on the first sensitive data to obtain first desensitized data.

[0154] In some embodiments, the second sensitive detection module 804 includes:

[0155] An encoding unit, used for encoding the second word segment through a preset encoder to obtain a target character string to be desensitized;

[0156] A sensitivity detection unit, used to perform sensitivity detection on a target string through a regular expression to obtain second sensitive data;

[0157] The second desensitizing unit is used to perform a second desensitizing process on the second sensitive data to obtain second desensitized data.

[0158] In some embodiments, the third sensitive detection module 805 includes:

[0159] A similarity calculation unit is used to traverse the sensitive word dictionary, perform similarity calculation on the third word segment and each reference word segment in the sensitive word dictionary, and obtain word segment similarity;

[0160] A word segment screening unit, used to compare the word segment similarity with a preset similarity threshold, and select a reference word segment whose word segment similarity is greater than or equal to the similarity threshold as the third sensitive data;

[0161] The third desensitizing unit is used to perform a third desensitizing process on the third sensitive data to obtain third desensitized data.

[0162] In some embodiments, the combining module 806 includes:

[0163] A splicing unit, used for splicing the first desensitized data, the second desensitized data and the third desensitized data according to a preset splicing order to obtain initial data;

[0164] The filtering unit is used to filter the initial data to obtain target data.

[0165] The specific implementation of the desensitization device is basically the same as the specific implementation example of the above-mentioned desensitization method, and will not be repeated here.

[0166] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the above-mentioned desensitization method is realized when the program is executed by the processor. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.

[0167] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0168] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0169] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the desensitization method of the embodiment of this application;

[0170] Input / output interface 903, used to implement information input and output;

[0171] The communication interface 904 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0172] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0173] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0174] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned desensitization method.

[0175] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0176] The desensitization method, desensitization device, electronic device and storage medium provided in the embodiments of the present application obtain original data to be desensitized, segment the original data according to preset desensitization category labels, and obtain the to-be-desensitized word segments corresponding to each desensitization category label, wherein the to-be-desensitized word segments include a first word segment, a second word segment and a third word segment, and the sensitive categories of the first word segment, the second word segment and the third word segment are different. This method can classify and segment the sensitive information in the original data according to the preset desensitization category labels, so that different types of sensitive information can be detected and desensitized in a variety of ways, making the desensitization process more targeted. Furthermore, a first sensitive detection is performed on the first word segment through a pre-trained sensitive information detection model to obtain first sensitive data, and a first desensitization processing is performed on the first sensitive data to obtain first desensitized data; a second sensitive detection is performed on the second word segment through a preset regular expression to obtain second sensitive data, and a second desensitization processing is performed on the second sensitive data to obtain second desensitized data; a third sensitive detection is performed on the third word segment through a preset sensitive word dictionary to obtain third sensitive data, and a third desensitization processing is performed on the third sensitive data to obtain third desensitized data. This method uses a sensitive information detection model, a regular expression and a sensitive word dictionary to detect different types of sensitive information, effectively improving the comprehensiveness of detection; at the same time, the sensitive information detection model, regular expression and sensitive word dictionary can be pre-set according to actual conditions, can be directly used in different desensitization scenarios, and can be continuously expanded and improved according to different desensitization needs, which can not only reduce the cost of use, but also meet personalized needs. Finally, the first desensitized data, the second desensitized data and the third desensitized data are combined and processed to obtain the target data. This method uses multiple methods to detect different types of sensitive information, achieves accurate identification of sensitive fields, and improves the accuracy and efficiency of desensitization.

[0177] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0178] It can be understood by those skilled in the art that Figure 1-7 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.

[0179] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0180] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0181] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0182] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0183] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0184] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or software functional unit.

[0186] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0187] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A desensitization method, characterized in that: The method comprises: Obtain the original data to be desensitized; The original data is segmented according to the preset desensitization category label to obtain a to-be-desensitized word segment corresponding to each of the desensitization category labels, wherein the to-be-desensitized word segment includes a first word segment whose sensitive category is a clear part of speech class, a second word segment whose sensitive category is a clear rule class, and a third word segment whose sensitive category is a special case class; The entity feature of the first word segment is extracted through the convolution layer of the preset sensitive information detection model to obtain the candidate word segment feature; the candidate word segment feature is screened and processed through the part-of-speech category label preset in the fully connected layer of the sensitive information detection model to obtain the target word segment feature to be desensitized; the target word segment feature is decoded and processed through the decoding layer of the sensitive information detection model to obtain the first sensitive data; the first desensitization process is performed on the first sensitive data to obtain the first desensitized data; The second word segment is encoded by a preset encoder to obtain a target string to be desensitized; the target string is subjected to sensitivity detection by a preset regular expression to obtain second sensitive data; the second sensitive data is subjected to a second desensitization process to obtain second desensitized data; Traversing a preset sensitive word dictionary, calculating similarity between the third word segment and each reference word segment in the sensitive word dictionary to obtain word segment similarity; screening the reference word segment according to the word segment similarity to obtain third sensitive data; performing third desensitization processing on the third sensitive data to obtain third desensitized data; The first desensitized data, the second desensitized data, and the third desensitized data are combined and processed to obtain target data.

2. The desensitization method according to claim 1, characterized in that: The step of segmenting the original data according to the preset desensitization category labels to obtain the to-be-desensitized word segments corresponding to each desensitization category label includes: The classification probability of the original data is calculated by using a preset function and the desensitized category label to obtain a classification probability value of each desensitized category label; The original data is segmented according to the classification probability value to obtain the word segment to be desensitized.

3. The desensitization method according to claim 1, characterized in that: The step of screening the reference word segments according to the word segment similarity to obtain the third sensitive data includes: Comparing the word segment similarity with a preset similarity threshold; A reference word segment whose word segment similarity is greater than or equal to the similarity threshold is selected as the third sensitive data.

4. The desensitization method according to any one of claims 1 to 3, characterized in that: The step of combining and processing the first desensitized data, the second desensitized data, and the third desensitized data to obtain target data includes: splicing the first desensitized data, the second desensitized data, and the third desensitized data according to a preset splicing order to obtain initial data; The initial data is filtered to obtain the target data.

5. A desensitization device, characterized in that: The device comprises: The original data acquisition module is used to obtain the original data to be desensitized; A segmentation module, configured to segment the original data according to a preset desensitization category label to obtain a to-be-desensitized word segment corresponding to each desensitization category label, wherein the to-be-desensitized word segment includes a first word segment whose sensitive category is a clear part-of-speech class, a second word segment whose sensitive category is a clear rule class, and a third word segment whose sensitive category is a special case class; A first sensitive detection module is used to extract entity features of the first word segment through a convolutional layer of a preset sensitive information detection model to obtain candidate word segment features; screen the candidate word segment features through part-of-speech category tags preset in a fully connected layer of the sensitive information detection model to obtain target word segment features to be desensitized; decode the target word segment features through a decoding layer of the sensitive information detection model to obtain first sensitive data; perform a first desensitization process on the first sensitive data to obtain first desensitized data; A second sensitivity detection module is used to encode the second word segment through a preset encoder to obtain a target string to be desensitized; perform sensitivity detection on the target string through a preset regular expression to obtain second sensitive data; perform a second desensitization process on the second sensitive data to obtain second desensitized data; A third sensitive detection module is used to traverse a preset sensitive word dictionary, calculate the similarity between the third word segment and each reference word segment in the sensitive word dictionary, and obtain the word segment similarity; filter the reference word segment according to the word segment similarity to obtain third sensitive data; perform third desensitization processing on the third sensitive data to obtain third desensitized data; A combination module is used to combine the first desensitized data, the second desensitized data and the third desensitized data to obtain target data.

6. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the desensitization method as described in any one of claims 1 to 4 are realized.

7. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the desensitization method described in any one of claims 1 to 4.