Sensitive information identification method, system and equipment based on identification model and medium
Through the method based on the identification model, entity identification and tag verification of sensitive information to be processed is solved, and the problem of inaccurate identification and positioning of personal information in the prior art is realized, and the accurate identification and positioning of sensitive information is achieved to ensure the security of user information.
Patent Information
- Application Number
- CN202411505381.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art cannot accurately and effectively identify and locate personal information in batch data or in multiple types of business data, resulting in incomplete information protection.
Using a method based on the identification model, the context relationship identification module and the sensitive information identification module are used to identify and verify the sensitive information to be processed, and the characteristics are converted as sensitive information to achieve accurate identification and positioning.
Accurate identification and positioning of sensitive information is achieved, ensuring the security of user information, and protecting personal privacy through desensitization.
Smart Images

Figure CN119397399A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of information protection, and in particular, relates to a sensitive information identification method, system, electronic device and storage medium based on an identification model. Background Art
[0002] At present, personal information protection is given attention by national departments at all levels. my country has formed a complete legal and regulatory system for personal information protection, and has also established a corresponding technical standard system.
[0003] The current technology is to manually mark the fields in the data according to specific rules, or to mark the fields according to the set data type, for the purpose of identifying sensitive personal information in passenger data in the business system. The current method of manually matching and identifying sensitive personal information with rules cannot accurately and effectively locate and identify personal information in batch data or multiple types of business data. Summary of the invention
[0004] To solve the above problems, the present disclosure provides a sensitive information identification method, system, electronic device and storage medium based on a recognition model, which adopts a contextual relationship identification module and a sensitive information identification module to identify and verify the determined sensitive information to be processed and each entity in the identified sensitive information to be processed, determine the entities with accurate labels, and at the same time use the features of the converted entities with accurate labels as sensitive information, which can accurately identify and locate sensitive information and desensitize user sensitive information, thereby ensuring the security of user information.
[0005] In order to solve the above technical problems, the first aspect of the present invention proposes a sensitive information identification method based on an identification model, the method comprising:
[0006] Obtaining user information, and determining sensitive information to be processed in the user information based on preset standards;
[0007] Labeling each entity in the sensitive information to be processed by an entity recognition algorithm;
[0008] Based on the label, position marking is performed on the characters of each entity in the sensitive information to be processed, and conversion is performed to obtain position sequence features, wherein the features in the position sequence features include position information of the characters in the entity and the label corresponding to the characters;
[0009] Inputting the position sequence features into a pre-trained contextual relationship recognition model to obtain the contextual relationship of each feature in the position sequence features;
[0010] Based on the contextual relationship and a pre-trained sensitive information identification model, it is determined whether each of the features corresponds to the label correctly, and the features with correct labels are used as sensitive information.
[0011] According to a preferred embodiment of the present invention, the training process of the contextual relationship recognition model and the sensitive information to be processed recognition module includes:
[0012] Acquire sample user information, and extract sample sensitive information to be processed from the sample user information as a sample set;
[0013] Adding sample labels to each entity of the sensitive information to be processed in the sample set;
[0014] Based on the sample label, the characters of each entity in the sample to be processed sensitive information are marked in sequence, and converted into sample position sequence features, wherein the features in the sample position sequence features include: position information of the characters in the entity and the sample label corresponding to the characters;
[0015] Inputting the sample position sequence features into a contextual relationship recognition model to obtain a sample contextual relationship of each feature in the sample position sequence relationship;
[0016] Inputting the sample context relationship into a sensitive information recognition model to obtain a predicted label;
[0017] The contextual relationship identification module and the sensitive information identification model are iterated according to the difference between the predicted label and the sample label until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, thereby obtaining a trained contextual relationship identification model and a sensitive information identification model.
[0018] According to a preferred embodiment of the present invention, the step of inputting the sample position sequence features into a contextual relationship recognition model to obtain the sample contextual relationship of each feature in the sample position sequence relationship includes:
[0019] Mapping the features in the sample position sequence features into word vectors respectively;
[0020] The word vectors are respectively input into the contextual relationship recognition model, and the scoring probability of the sample label corresponding to each word vector is output by learning the contextual information of the sample position sequence feature; the contextual relationship recognition model includes: a long short-term memory network model;
[0021] The scoring probability of the sample label corresponding to each of the word vectors is used as the sample context relationship.
[0022] According to a preferred embodiment of the present invention, the step of inputting the sample context relationship into a sensitive information recognition model to obtain a predicted label includes:
[0023] Inputting each of the scoring probabilities into the sensitive information identification model, and outputting the optimal position sequence of each of the word vectors by learning the sequential dependency between the sample labels of the word vectors corresponding to each of the scoring probabilities; the sensitive information identification model includes: a conditional random field model;
[0024] Whether the sample labels corresponding to the word vectors are accurate is determined according to the optimal position sequence, and a predicted label is obtained based on the determination result.
[0025] According to a preferred embodiment of the present invention, taking the features with correct labels as sensitive information to be processed includes:
[0026] When the labels of each feature in the position sequence feature are correct, it is determined that the label of the entity corresponding to the position sequence feature is correct, and each feature in the position sequence feature corresponding to the entity with the correct label is used as the sensitive information and stored.
[0027] In order to solve the above technical problems, the second aspect of the present invention proposes a sensitive information identification system based on an identification model, characterized in that the system includes:
[0028] An information acquisition module, used to acquire user information and determine sensitive information to be processed in the user information based on preset standards;
[0029] A labeling module, used to label each entity in the sensitive information to be processed by using an entity recognition algorithm;
[0030] A feature conversion module, used to mark the position of each character of the entity in the sensitive information to be processed based on the label, and convert it into a position sequence feature, wherein the feature in the position sequence feature includes the position information of the character in the entity and the label corresponding to the character;
[0031] The label recognition module is used to input the position sequence features into a pre-trained contextual relationship recognition model to obtain the contextual relationship of each feature in the position sequence features; based on the contextual relationship and the pre-trained sensitive information recognition model, determine whether each feature corresponds to the label correctly, and use the features with correct labels as sensitive information.
[0032] According to a preferred embodiment of the present invention, the system further comprises:
[0033] The model training module is used to obtain sample user information, extract sample sensitive information to be processed from the sample user information as a sample set; add sample labels to each entity of the sample sensitive information to be processed in the sample set; based on the sample labels, mark the positions of the characters of each entity in the sample sensitive information to be processed in sequence, and convert them to obtain sample position sequence features, wherein the features in the sample position sequence features include: the position information of the characters in the entities and the sample labels corresponding to the characters; input the sample position sequence features into a contextual relationship recognition model to obtain sample contextual relationships of each feature in the sample position sequence relationship; input the sample contextual relationship into a sensitive information recognition model to obtain a predicted label; iterate the contextual relationship recognition module and the sensitive information recognition model according to the difference between the predicted label and the sample label, until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, thereby obtaining a trained contextual relationship recognition model and a sensitive information recognition model.
[0034] According to a preferred embodiment of the present invention, the label identification module is specifically used to determine that the label of the entity corresponding to the position sequence feature is correct when the labels of each feature in the position sequence feature are correct, and use each feature in the position sequence feature corresponding to the entity with the correct label as the sensitive information;
[0035] The system also includes: a storage module, used for storing sensitive information.
[0036] In order to solve the above technical problem, the third aspect of the present invention provides an electronic device, comprising:
[0037] Processor; and
[0038] A memory storing computer executable instructions, wherein when the computer executable instructions are executed, the processor executes the method according to any one of the above embodiments.
[0039] In order to solve the above technical problems, the fourth aspect of the present invention proposes a computer storage medium, wherein the computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method described in any one of the above embodiments is implemented.
[0040] Compared with the prior art, the present disclosure has the following advantages: the present disclosure obtains user information, and identifies the sensitive information to be processed and labels in the user information through preset standards and entity recognition algorithms, converts the position annotations of each entity by characters through labels to obtain position sequence features, and recognizes the position sequence features based on a pre-built recognition model to determine whether the entity label is correct, and then determine whether the sensitive information to be processed and the entity recognition algorithm are correct, and finally uses the features with correct labels as sensitive information. On the one hand, it realizes accurate identification and positioning of sensitive information, and on the other hand, it finally uses the features obtained by entity conversion as sensitive information, realizes desensitization of user sensitive information, and ensures the security of user information.
[0041] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by implementing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A schematic diagram of a sensitive information identification method based on an identification model according to an embodiment of the present disclosure is shown;
[0044] Figure 2 A first flow chart of a sensitive information identification method based on an identification model according to an embodiment of the present disclosure is shown;
[0045] Figure 3 A second flow chart of a sensitive information identification method based on an identification model according to an embodiment of the present disclosure is shown;
[0046] Figure 4 A third flow chart of a sensitive information identification method based on an identification model according to an embodiment of the present disclosure is shown;
[0047] Figure 5 A block diagram of a sensitive information identification system based on an identification model according to an embodiment of the present disclosure is shown;
[0048] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0050] The same reference numerals in the drawings represent the same or similar elements, components or parts, and thus the repeated description of the same or similar elements, components or parts may be omitted below. It should also be understood that although the first, second, third and other attributives representing the numbers may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these attributives. In other words, these attributives are only used to distinguish one from another. For example, the first device may also be called the second device, but it does not deviate from the essential technical solution of the present invention. In addition, the terms "and / or" and "and / or" refer to all combinations including any one or more of the listed items.
[0051] See also Figure 1 , Figure 1 is a flow chart of a sensitive information identification method based on an identification model provided by the present invention, such as Figure 1 As shown, the method includes:
[0052] S11. Obtain user information, and determine sensitive information to be processed in the user information based on preset standards.
[0053] In this embodiment, user information can be any information of the user, such as the user's identity information, name information, travel information, software download information, address information, ID number information, bank card number information, etc. Some of this information is private information, and some of it can be made public. In the personal information protection law for consumers, different protection requirements are imposed on enterprises for different user information.
[0054] In this embodiment, the preset standard can be set based on the definition of privacy information in the law, or it can be set based on the information required by the enterprise to provide services to users; users can also customize the preset standards so that enterprises or organizations or individuals that obtain user information can know the degree to which users value their own information, so as to avoid accidental leakage or loss of sensitive information to users.
[0055] S12. Label each entity in the sensitive information to be processed through an entity recognition algorithm.
[0056] In this embodiment, entity recognition is performed on the sensitive information to be processed based on the entity recognition algorithm, and labels are added to the recognized entities. For example, a "name" label is added to the recognized name, a "payment information" label is added to the recognized bank card number, and a "contact information" label is added to the recognized mobile phone number.
[0057] In this embodiment, different entity recognition algorithms can be used for different entities, such as Trie tree, also known as dictionary tree or prefix tree, which is a data structure for storing and querying character strings. It uses the common prefix of the character string to reduce the query time, thereby minimizing unnecessary character string comparisons and improving query efficiency. For English names, there are only 413 valid pinyin syllables in the world. Trie tree can be used to verify whether a string of characters is a legal pinyin expression. When using Trie tree, 4 rules need to be set: a)-If the search on the Trie tree fails, then the current search path does not represent a legal pinyin expression; b)-When the search on the Trie tree reaches a leaf node, then return to the root node; c)-Whenever the search reaches a green node, open two search branches: continue along the tree; or return to the root node; d)-If we finally stop at the green node, it means that the search is successful and the candidate text is a legal pinyin; this is used to screen and determine whether the searched English name is.
[0058] In some special user information, the corresponding English words need to be blocked. For example, in the user information of airlines, first, the common codes of airlines are used. The first reason is that there will be no two-word codes as names, which may be surnames but not given names; the second reason is that the code of this airline will frequently appear in the message, involving the flight number information and frequent flyer number information of passengers. Therefore, these two situations are excluded; second, the high frequency words in the message, such as time, data, API, etc., all need to be blocked to avoid incorrect entity recognition.
[0059] In this embodiment, for Chinese names, the LLM (Large Language Model, which refers to a deep learning model trained with a large amount of text data that can generate natural language text or understand the meaning of language text) model can be used to complete the labeling process. Because personal names belong to a type of public data, the LLM model is trained with the approved personal name data set, and then the Chinese names are labeled offline.
[0060] In this embodiment, structured data can be identified by regular expressions. For example, an ID card is an 18-digit number, a mobile phone number, a landline phone number, and an email address all have their own fixed structures. Through regular expressions, entities with fixed structures can be screened out. Specifically, an ID card is 18 consecutive numbers that meet certain rules. The regular expression (?P <adcode>\d{6})(?:19|20)\d{9}[\dxX] to filter.
[0061] S13. Based on the label, the characters of each entity in the sensitive information to be processed are marked with a position mark, and converted into a position sequence feature. The features in the position sequence feature include the position information of the character in the entity and the label corresponding to the character.
[0062] In this embodiment, the position of the characters in each entity is marked, and the sensitive information to be processed is converted into a position sequence feature. The features in the position sequence feature are the position information of the character in the entity and the label of the entity corresponding to the character. The conversion is equivalent to desensitizing the sensitive information to be processed. The obtained position sequence feature does not contain the user's sensitive information. Finally, what is obtained is the number of characters in each entity in the sensitive information and its corresponding label.
[0063] In this embodiment, the feature is composed of the position information of the character in the entity and the label corresponding to the character, that is, the position of the character in the entity and the label of the entity corresponding to the character are combined to form a feature. For example, the entity "15060477435" is a mobile phone number, which can be converted into features: 1-mobile phone number, 2-mobile phone number, 3-mobile phone number, 4-mobile phone number, 5-mobile phone number, 6-mobile phone number, 7-mobile phone number, 8-mobile phone number, 9-mobile phone number, 10-mobile phone number and 11-mobile phone number. In this scheme, the numbers in the feature are the characters in the entity. The converted features can also be: start-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, middle-mobile number, end-mobile number. In this solution, since the sensitive information to be processed is converted into position sequence features, the converted features have a certain order, and the position information does not contain other information. As long as it is not disrupted, the start position and the end position can be directly marked.
[0064] In this embodiment, since the sensitive information to be processed is not all entities, there are also some conjunctions and prepositions. For example, a piece of sensitive information to be processed that is extracted can be "I am the placeholder random letter cZY, I am the placeholder random number 04063, I am the placeholder random special character @)#, I am the placeholder random Chinese character 妕守巍瞚恶, I am Zhang Chenze, the bank card number is 6226225308396413145, I am the placeholder random letter cZY, the mobile phone number is 15060477435, I am the placeholder random special character @)#, the ID card number is 420101199105051826, I am the placeholder random special character @)#, the guest card number is JL7589146, the international card number is JL708404567, the domestic card number is CZ601633712202, the ID card number is 420101199105051826, the email address is FgTicO@aol.com, the mobile phone number is 15060477435, the address is No. 2414, Tianyuan Community Residents Committee, Chezhan Sub-district, Hubin District, Sanmenxia City, Henan Province, and the fixed phone number is 0718 - 31463622". After extracting entities from this sensitive information to be processed, there are still many words that are not entities. In this step, in addition to marking the positions of the characters of each entity, all the characters in the sensitive information to be processed except for the characters of the entities can be replaced with preset characters to achieve the complete conversion of the sensitive information to be processed. Taking "the mobile phone number is 15060477435" as an example, the features obtained by converting through the above method can be: X, X, X, X, 1 - mobile phone number, 2 - mobile phone number, 3 - mobile phone number, 4 - mobile phone number, 5 - mobile phone number, 6 - mobile phone number, 7 - mobile phone number, 8 - mobile phone number, 9 - mobile phone number, 10 - mobile phone number, and 11 - mobile phone number, or, X, X, X, X, start - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, middle - mobile phone number, end - mobile phone number, where X is the preset character, and other preset characters can also be used. This solution does not make special restrictions on this; in this solution, the characters in the sensitive information to be processed except for the entities are respectively marked as preset characters, and the features in the position sequence features also include: the preset characters obtained by converting the characters in the sensitive information to be processed except for the entities.
[0065] S14. Input the position sequence features into a pre - trained context relationship recognition model to obtain the context relationships of each feature in the position sequence features.
[0066] In this embodiment, each feature in the position sequence features is input into the context relationship recognition model to obtain the context relationships of each feature, that is, the degree of association between the characters after each character in the entity is converted into a feature.
[0067] In this embodiment, the contextual relationship recognition model includes: a BERT model, BERT is a language representation model, BERT stands for Bidirectional Encoder Representations from Transformers. BERT aims to pre-train deep bidirectional representations by jointly adjusting the left and right contexts in all layers; an LSTM model, a long short-term memory network (LSTM, Long Short-Term Memory) is a time recurrent neural network, which is specially designed to solve the long-term dependency problem of general RNN (recurrent neural network). All RNNs have a chain form of a repeated neural network module.
[0068] In this embodiment, specifically, the LSTM model consists of the input vector x at the current unit time t. t , cell state C t , the hidden layer state h t , Forget gate t ,Memory Gate t , output gate O t The specific calculation process is as follows:
[0069] f t =σ(W f ·[h t-1 ,x t ]+b f )
[0070] i t =σ(W i ·[h t-1 ,x t ]+b i )
[0071] c t =tanh(W c ·[h t-1 ,x t ]+b c )
[0072] o t =σ(W o ·[h t-1 ,x t ]+b o )
[0073] C t =f t ×C t-1 +i t ×c t
[0074] h t =o t ×tanh(C t )
[0075] In the above formula, σ and tanh represent two activation functions, t represents the current time, t-1 represents the previous time, and x t represents the input vector, C t Identifies the control gate unit of the previous layer, and f t Multiply to determine whether the information should be retained or discarded; i t Represents the retained information, c t represents the update of the control gate unit, as the parameter of the next stage, h t Represents the output result of the hidden layer, that is, the prediction result of the current layer, W f , W i , W c , W o Represents the weight matrices of the hidden states of the forget gate, input gate, control gate, and output gate, respectively, b f 、b i 、b c 、b o Represents the bias matrix of the forget gate, input gate, control gate, and output gate.
[0076] S15. Based on the contextual relationship and the pre-trained sensitive information recognition model, determine whether the labels corresponding to each feature are correct, and use the features with correct labels as sensitive information.
[0077] In this embodiment, the obtained contextual relationship is input into the sensitive information recognition model. The sequential dependency relationship between labels learned by the sensitive information recognition model during training is used to determine whether the order of the position sequence features is optimal. The optimal sequence can also be output. The position feature sequence is judged based on the optimal sequence. When there is a difference between the two, it can be determined that the label corresponding to the feature with the difference is wrong. Otherwise, the label is correct and the feature with the correct label is used as sensitive information.
[0078] In this embodiment, the sensitive information to be processed or the entities in the information are not directly regarded as sensitive information. Instead, it is determined whether the label added to the entity is correct, and the features in the position sequence features obtained by converting the entity with the correct label are used as sensitive information. That is, the position information of the characters in the entity and the labels corresponding to the characters are finally used as sensitive information. This completes the dual identification of sensitive information and finally effectively desensitizes the sensitive information, providing good support for personal privacy protection.
[0079] In this embodiment, user information is obtained, and the sensitive information to be processed and labels in the user information are identified through preset standards and entity recognition algorithms. The labels are used to convert the positions of each entity into characters to obtain position sequence features. The position sequence features are identified based on a pre-built recognition model to determine whether the entity label is correct, and then to determine whether the sensitive information to be processed and the entity recognition algorithm are correct, and finally the features with correct labels are used as sensitive information.
[0080] This solution also includes: when the labels of each feature in the position sequence feature are correct, determining that the label of the entity corresponding to the position sequence feature is correct, treating each feature in the position sequence feature corresponding to the entity with the correct label as sensitive information, and storing it.
[0081] In this embodiment, each feature corresponding to the correctly labeled entity is regarded as sensitive information. This solution further verifies each entity obtained based on the preset standard and entity recognition algorithm and the label annotated with the entity through the recognition model. On the one hand, it realizes the accurate recognition and positioning of sensitive information. On the other hand, it finally regards the features obtained by the entity transformation as sensitive information, realizes the desensitization of user sensitive information, and ensures the security of user information.
[0082] See also Figure 2 , Figure 2 is a flow chart of a sensitive information identification method based on an identification model provided by the present invention, such as Figure 2 As shown, the method includes:
[0083] S21. Obtain sample user information, and extract sample sensitive information to be processed from the sample user information as a sample set.
[0084] In this embodiment, the sample user information may be information obtained from past historical data, and the sample sensitive information to be processed in the sample user information is determined as a sample set for the training model.
[0085] In this embodiment, reference may be made to Figure 1 The method for determining the sensitive information to be processed in the illustrated embodiment extracts the sample sensitive information to be processed from the sample user information. In addition, in the present solution, after determining the sample sensitive information to be processed based on preset standards, the staff can determine whether the screened sample sensitive information to be processed is sensitive information, verify the accuracy of the sample again, reduce interference data, and improve the accuracy of the model finally trained.
[0086] S22. Add sample labels to each entity of the sensitive information to be processed in the sample set.
[0087] In this embodiment, the sample labels in this step are consistent with the labels in the above embodiments, and can represent the types of entities. In addition, different entity types can be made into a table. When adding labels, the serial number or mark number in the table can be used instead of the entity type to add labels to the entities, so that the entity type of the entity is further hidden. Similarly, the labels in the above embodiments can also be replaced by the serial number or mark number in this solution.
[0088] In this embodiment, as above, reference can be made to Figure 1 In the illustrated embodiment, the entity labels of the entities in the sensitive information to be processed are determined. After the entities are automatically identified and labeled, feedback verification can be performed by an administrator, and the automatically labeled data can be manually verified and labeled.
[0089] S23. Based on the sample label, the characters of each entity in the sample sensitive information to be processed are marked in sequence, and converted into sample position sequence features. The features in the sample position sequence features include: the position information of the characters in the entity and the sample label corresponding to the characters.
[0090] In this embodiment, the solution of this step can be implemented by referring to the method of step S13 in the above embodiment, and this solution will not be described in detail here.
[0091] S24. Input the sample position sequence features into the contextual relationship recognition model to obtain the sample contextual relationship of each feature in the sample position sequence relationship.
[0092] In this embodiment, step S24 may refer to the description of step S14 in the above embodiment.
[0093] Specifically, Figure 3 As shown, step S24 specifically includes:
[0094] S31. Map the features in the sample position sequence features into word vectors respectively.
[0095] In this embodiment, the features in the sample position sequence features are mapped to word vectors, and the tag values can be used as words and enter the look-up layer, and mapped to word vectors using a bag-of-words model or a maximum word probability model.
[0096] S32. Input the word vectors into the contextual relationship recognition model respectively, and output the scoring probability of the sample label corresponding to each word vector by learning the contextual information of the sample position sequence features; the contextual relationship recognition model includes: a long short-term memory network model.
[0097] In this embodiment, the input word vector is processed by the LSTM model. The LSTM model can process and predict important events with very long intervals and delays in the time series. Therefore, in this scheme, the contextual relationship of each feature in the sample position sequence feature is learned through each word vector of the LSTM model, and then the score probability of the sample label corresponding to each word vector is output, that is, the scoring probability in this step.
[0098] S33. The scoring probability of the sample label corresponding to each word vector is used as the sample context relationship.
[0099] In this embodiment, the scoring probability of each word vector corresponding to the sample label finally outputted is used as the contextual relationship recognition result of the LSTM model for the sample position sequence feature.
[0100] S25. Input the sample context relationship into the sensitive information recognition model to obtain a predicted label.
[0101] In this embodiment, step S25 may refer to the description of step S15 in the above embodiment.
[0102] Specifically, combined with Figure 3 The embodiment shown, such as Figure 4 As shown, step S25 includes the following steps:
[0103] S41. Input each scoring probability into a sensitive information recognition model, and output the optimal position sequence of each word vector by learning the sequential dependency between sample labels of the word vectors corresponding to each scoring probability; the sensitive information recognition model includes: a conditional random field model.
[0104] Will be like Figure 3 The various scoring probabilities obtained in the illustrated embodiment are input into a sensitive recognition model obtained by a conditional random field model. The conditional random field (CRF) was proposed by Lafferty et al. in 2001. It combines the characteristics of the maximum entropy model and the hidden Markov model. It is an undirected graph model that is often used to label or analyze sequence data, such as natural language text or biological sequences. The CRF model optimizes the results based on the scoring probability of each word vector and the dependency order of the labels to obtain the optimal sequence of each feature in the sample sequence features.
[0105] S42. Determine whether the sample labels corresponding to each word vector are accurate according to the optimal position sequence, and obtain the predicted labels based on the determination results.
[0106] In this embodiment, whether the sample labels corresponding to each word vector are accurate is determined based on the obtained optimal position sequence, that is, whether the sample labels corresponding to each feature in the sample sequence features are accurate is determined. If the label is accurate, it means that the label is correct and the predicted label is the sample label in this solution. If the label is wrong, the predicted label is not the sample label in this solution.
[0107] S26. Iterate the contextual relationship recognition module and the sensitive information recognition model according to the difference between the predicted label and the sample label until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, thereby obtaining a trained contextual relationship recognition model and a sensitive information recognition model.
[0108] In this embodiment, through the scheme of the above embodiment, since this scheme is training the model, when the predicted label considers that the sample label is wrong, the model recognition result is wrong, and when the predicted label considers that the sample label is correct, the model recognition result is correct. Therefore, feedback training is performed through sample labels, and through continuous iterations, the context relationship recognition model and the sensitive information recognition model finally trained can effectively identify whether the added labels are accurate.
[0109] In this embodiment, based on the training model solution, such as Figure 3 He Ru Figure 4 The scheme shown can also be applied to Figure 1 In the scheme of step S14 and step S15 in the illustrated embodiment. Specifically, step S14 includes: mapping the features in the position sequence features into word vectors respectively; inputting the word vectors into the contextual relationship recognition model respectively, and outputting the scoring probability of the label corresponding to each word vector by learning the context information of the position sequence features; the contextual relationship recognition model includes: a long short-term memory network model; taking the scoring probability of the label corresponding to each word vector as the contextual relationship; step S15 includes: inputting each scoring probability into the sensitive information recognition model, and outputting the optimal position sequence of each word vector by learning the sequential dependency between the labels of the word vectors corresponding to each scoring probability; the sensitive information recognition model includes: a conditional random field model; judging whether the labels corresponding to each word vector are accurate according to the optimal position sequence, and obtaining the prediction result based on the judgment result.
[0110] See also Figure 5 , Figure 5 is a block diagram of a sensitive information identification system based on an identification model provided by the present invention, such as Figure 5 As shown, the system includes: an information acquisition module 11, a label marking module 12, a feature conversion module 13 and a label recognition module 14.
[0111] In this embodiment, the information acquisition module 11 is used to acquire user information and determine the sensitive information to be processed in the user information based on a preset standard;
[0112] In this embodiment, the label marking module 12 is used to label each entity in the sensitive information to be processed by using an entity recognition algorithm;
[0113] In this embodiment, the feature conversion module 13 is used to mark the position of the characters of each entity in the sensitive information to be processed based on the label, and convert it into a position sequence feature, where the features in the position sequence feature include the position information of the character in the entity and the label corresponding to the character;
[0114] In this embodiment, the label recognition module 14 is used to input the position sequence features into a pre-trained context relationship recognition model to obtain the context relationship of each feature in the position sequence features; based on the context relationship and the pre-trained sensitive information recognition model, it is determined whether the label corresponding to each feature is correct, and the features with correct labels are used as sensitive information.
[0115] In this embodiment, the system also includes: a model training module, which is used to obtain sample user information, extract sample sensitive information to be processed in the sample user information as a sample set; add sample labels to each entity of the sample sensitive information to be processed in the sample set; based on the sample labels, mark the positions of the characters of each entity in the sample sensitive information to be processed in turn, and convert them to obtain sample position sequence features, and the features in the sample position sequence features include: the position information of the characters in the entity and the sample labels corresponding to the characters; input the sample position sequence features into the context relationship recognition model to obtain the sample context relationship of each feature in the sample position sequence relationship; input the sample context relationship into the sensitive information recognition model to obtain the predicted label; iterate the context relationship recognition module and the sensitive information recognition model according to the difference between the predicted label and the sample label, until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, and obtain the trained context relationship recognition model and the sensitive information recognition model.
[0116] In this embodiment, the model training module is specifically used to map the features in the sample position sequence features into word vectors respectively; the word vectors are respectively input into the contextual relationship recognition model, and the scoring probability of the sample label corresponding to each word vector is output by learning the context information of the sample position sequence features; the contextual relationship recognition model includes: a long short-term memory network model; the scoring probability of the sample label corresponding to each word vector is used as the sample context relationship.
[0117] In this embodiment, the model training module is specifically used to input each scoring probability into the sensitive information recognition model, and output the optimal position sequence of each word vector by learning the sequential dependency between the sample labels of the word vectors corresponding to each scoring probability; the sensitive information recognition model includes: a conditional random field model; judging whether the sample labels corresponding to each word vector are accurate according to the optimal position sequence, and obtaining a predicted label based on the judgment result.
[0118] In this embodiment, the label recognition module 14 is specifically used to map the features in the position sequence features into word vectors respectively; input the word vectors into the context relationship recognition model respectively, and output the scoring probability of the label corresponding to each word vector by learning the context information of the position sequence features; the context relationship recognition model includes: a long short-term memory network model; and the scoring probability of the label corresponding to each word vector is used as the context relationship.
[0119] In this embodiment, the label recognition module 14 is specifically used to input each scoring probability into the sensitive information recognition model, and output the optimal position sequence of each word vector by learning the sequential dependency between the labels of the word vectors corresponding to each scoring probability; the sensitive information recognition model includes: a conditional random field model; judging whether the labels corresponding to each word vector are accurate according to the optimal position sequence, and obtaining a prediction result based on the judgment result.
[0120] In this embodiment, the label identification module 14 is specifically used to determine that the label of the entity corresponding to the position sequence feature is correct when the labels of each feature in the position sequence feature are correct, and use each feature in the position sequence feature corresponding to the entity with the correct label as sensitive information;
[0121] In this embodiment, the system further includes: a storage module, used to store sensitive information.
[0122] like Figure 6 As shown, an embodiment of the present invention provides an electronic device, including a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140;
[0123] Memory 1130, used for storing computer programs;
[0124] The processor 1110 is used to implement any of the above-mentioned sensitive information identification methods when executing the program stored in the memory 1130.
[0125] In the electronic device provided by the embodiment of the present invention, the processor 1110 obtains user information by executing the program stored in the memory 1130, and determines the sensitive information to be processed in the user information based on preset standards; labels each entity in the sensitive information to be processed by an entity recognition algorithm; based on the label, the characters of each entity in the sensitive information to be processed are positionally labeled and converted to obtain position sequence features, wherein the features in the position sequence features include the position information of the characters in the entity and the labels corresponding to the characters; the position sequence features are input into a pre-trained context relationship recognition model to obtain the context relationship of each feature in the position sequence features; based on the context relationship and the pre-trained sensitive information recognition model, it is determined whether the labels corresponding to each feature are correct, and the features with correct labels are used as sensitive information.
[0126] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0127] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0128] The memory 1130 may include a random access memory 1130 (RAM), or may include a non-volatile memory 1130 (non-volatile memory), such as at least one disk memory 1130. Optionally, the memory 1130 may also be at least one storage device located away from the processor 1110.
[0129] The above-mentioned processor 1110 can be a general-purpose processor 1110, including a central processing unit 1110 (CPU), a network processor 1110 (NP), etc.; it can also be a digital signal processor 1110 (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0130] An embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors 1110 to implement the sensitive information identification method of any of the above embodiments.
[0131] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk (SSD)), etc.
[0132] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.< / adcode>
Claims
1. A sensitive information identification method based on an identification model, characterized in that: The method comprises: Obtaining user information, and determining sensitive information to be processed in the user information based on preset standards; Labeling each entity in the sensitive information to be processed by an entity recognition algorithm; Based on the label, position marking is performed on the characters of each entity in the sensitive information to be processed, and conversion is performed to obtain position sequence features, wherein the features in the position sequence features include position information of the characters in the entity and the label corresponding to the characters; Inputting the position sequence features into a pre-trained contextual relationship recognition model to obtain the contextual relationship of each feature in the position sequence features; Based on the contextual relationship and a pre-trained sensitive information identification model, it is determined whether each of the features corresponds to the label correctly, and the features with correct labels are used as sensitive information.
2. The identification method according to claim 1, characterized in that: The training process of the contextual relationship recognition model and the sensitive information to be processed recognition module includes: Acquire sample user information, and extract sample sensitive information to be processed from the sample user information as a sample set; Adding sample labels to each entity of the sensitive information to be processed in the sample set; Based on the sample label, the characters of each entity in the sample to be processed sensitive information are marked in sequence, and converted into sample position sequence features, wherein the features in the sample position sequence features include: position information of the characters in the entity and the sample label corresponding to the characters; Inputting the sample position sequence features into a contextual relationship recognition model to obtain a sample contextual relationship of each feature in the sample position sequence relationship; Inputting the sample context relationship into a sensitive information recognition model to obtain a predicted label; The contextual relationship identification module and the sensitive information identification model are iterated according to the difference between the predicted label and the sample label until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, thereby obtaining a trained contextual relationship identification model and a sensitive information identification model.
3. The identification method according to claim 2, characterized in that: The step of inputting the sample position sequence features into a contextual relationship recognition model to obtain a sample contextual relationship of each feature in the sample position sequence relationship includes: Mapping the features in the sample position sequence features into word vectors respectively; The word vectors are respectively input into the contextual relationship recognition model, and the scoring probability of the sample label corresponding to each word vector is output by learning the contextual information of the sample position sequence feature; the contextual relationship recognition model includes: a long short-term memory network model; The scoring probability of the sample label corresponding to each of the word vectors is used as the sample context relationship.
4. The identification method according to claim 3, characterized in that: The step of inputting the sample context relationship into a sensitive information recognition model to obtain a predicted label includes: Inputting each of the scoring probabilities into the sensitive information identification model, and outputting the optimal position sequence of each of the word vectors by learning the sequential dependency between the sample labels of the word vectors corresponding to each of the scoring probabilities; the sensitive information identification model includes: a conditional random field model; Whether the sample labels corresponding to the word vectors are accurate is determined according to the optimal position sequence, and a predicted label is obtained based on the determination result.
5. The identification method according to any one of claims 1 to 4, characterized in that: The step of treating the features with correct labels as sensitive information to be processed includes: When the labels of each feature in the position sequence feature are correct, it is determined that the label of the entity corresponding to the position sequence feature is correct, and each feature in the position sequence feature corresponding to the entity with the correct label is used as the sensitive information and stored.
6. A sensitive information identification system based on an identification model, characterized in that: The system comprises: An information acquisition module, used to acquire user information and determine sensitive information to be processed in the user information based on preset standards; A labeling module, used to label each entity in the sensitive information to be processed by using an entity recognition algorithm; A feature conversion module, used to mark the position of each character of the entity in the sensitive information to be processed based on the label, and convert it into a position sequence feature, wherein the feature in the position sequence feature includes the position information of the character in the entity and the label corresponding to the character; The label recognition module is used to input the position sequence features into a pre-trained contextual relationship recognition model to obtain the contextual relationship of each feature in the position sequence features; based on the contextual relationship and the pre-trained sensitive information recognition model, determine whether each feature corresponds to the label correctly, and use the features with correct labels as sensitive information.
7. The system for identifying sensitive information to be processed according to claim 6, characterized in that: The system further comprises: The model training module is used to obtain sample user information, extract sample sensitive information to be processed from the sample user information as a sample set; add sample labels to each entity of the sample sensitive information to be processed in the sample set; based on the sample labels, mark the positions of the characters of each entity in the sample sensitive information to be processed in sequence, and convert them to obtain sample position sequence features, wherein the features in the sample position sequence features include: the position information of the characters in the entities and the sample labels corresponding to the characters; input the sample position sequence features into a contextual relationship recognition model to obtain sample contextual relationships of each feature in the sample position sequence relationship; input the sample contextual relationship into a sensitive information recognition model to obtain a predicted label; iterate the contextual relationship recognition module and the sensitive information recognition model according to the difference between the predicted label and the sample label, until the difference between the sample label and the predicted label of each entity in the sample sensitive information to be processed meets the preset standard, thereby obtaining a trained contextual relationship recognition model and a sensitive information recognition model.
8. The identification system according to any one of claims 6 or 7, characterized in that: A label identification module, specifically used to determine that the label of the entity corresponding to the position sequence feature is correct when the labels of each feature in the position sequence feature are correct, and use each feature in the position sequence feature corresponding to the entity with the correct label as the sensitive information; The system also includes: a storage module, used for storing sensitive information.
9. An electronic device, characterized in that: include: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1-5.
10. A computer storage medium, characterized in that: in, The computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method according to any one of claims 1 to 5 is implemented.