Sensitive information identification method, sensitive information identification device, equipment and medium

By combining the target text information with a word segmentation processing and text recognition model, and combining the semantic characteristics of sensitive category label information, the problem of difficult to identify diversified sensitive text information in the prior art is solved, and sensitive information recognition with high accuracy is achieved.

CN119577143APending Publication Date: 2025-03-07BEIJING ZHONGKE JINDEZHU INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411618774.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

It is difficult for the prior art to accurately identify diverse sensitive text information, especially sensitive information in the form of obscure metaphors, puns, etc.

Method used

By performing word segmentation processing on the target text information, extracting word segmentation information, and inputting it into the text recognition model, combining the label semantic characteristics of category label information of different sensitive categories, determine whether word segmentation information is sensitive word segmentation information.

Benefits of technology

It improves the granularity and accuracy of sensitive identification of text information, and can effectively identify obvious sensitive content and hidden or mutated forms of sensitive information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577143A_ABST
    Figure CN119577143A_ABST
Patent Text Reader

Abstract

The invention provides a sensitive information identification method, a sensitive information identification device, equipment and a medium, and belongs to the technical field of computers. The method comprises the steps of performing word segmentation processing on target text information to obtain word segmentation information corresponding to the target text information; inputting the word segmentation information into a text recognition model to obtain word segmentation semantic features corresponding to the word segmentation information; determining whether the word segmentation information is sensitive word segmentation information or not according to the semantic features of the word segmentation and the tag semantic features corresponding to the category tag information of different sensitive categories, and obtaining a sensitive recognition result of the word segmentation information; and identifying whether the target text information is sensitive information or not according to a sensitive identification result of the word segmentation information. According to the embodiment of the invention, the sensitive recognition fine granularity of the text information can be improved, and when the sensitive recognition is performed on the target text information, the label semantic features of the category label information corresponding to different sensitive categories are fused, so that the sensitive recognition accuracy of the text information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a sensitive information identification method, a sensitive information identification device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Sensitive information identification refers to identifying whether the information contains sensitive words. Sensitive information identification has a far-reaching impact on the network environment, user psychology and social order.

[0003] In traditional sensitive information identification methods, it is impossible to accurately identify sensitive information due to the various forms of expression of sensitive texts. Summary of the invention

[0004] The present application provides a sensitive information identification method, an identification device, an electronic device, and a computer-readable storage medium, which can improve the identification effect of sensitive information.

[0005] In a first aspect, the present application provides a sensitive information identification method, which includes: performing word segmentation processing on target text information to obtain word segmentation information corresponding to the target text information; inputting the word segmentation information into a text recognition model to obtain word segmentation semantic features corresponding to the word segmentation information; determining whether the word segmentation information is sensitive word segmentation information based on the word segmentation semantic features and label semantic features corresponding to category label information of different sensitive categories, and obtaining a sensitive identification result of the word segmentation information; and identifying whether the target text information is sensitive information based on the sensitive identification result of the word segmentation information.

[0006] In the second aspect, the present application provides a sensitive information identification device, which includes: a text segmentation module, which is used to perform segmentation processing on the target text information to obtain segmentation information corresponding to the target text information; a feature extraction module, which is used to input the segmentation information into a text recognition model to obtain segmentation semantic features corresponding to the segmentation information; a segmentation recognition module, which is used to determine whether the segmentation information is sensitive segmentation information based on the segmentation semantic features and label semantic features corresponding to category label information of different sensitive categories, and obtain a sensitive recognition result of the segmentation information; a text recognition module, which is used to identify whether the target text information is sensitive information based on the sensitive recognition result of the segmentation information.

[0007] In a third aspect, the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned sensitive information identification method.

[0008] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned sensitive information identification method when executed by a processor / processing core.

[0009] The embodiment provided by the present application, first, by performing word segmentation processing on the target text information, the word segmentation information corresponding to the target text information is obtained; secondly, by inputting the word segmentation information into a trained text recognition model, the word segmentation semantic features corresponding to the word segmentation information are obtained; then, according to the word segmentation semantic features and the label semantic features corresponding to the category label information of different sensitive categories, it is determined whether the word segmentation information is sensitive word segmentation information, and the sensitive recognition result of the word segmentation information is obtained, so that the word segmentation information can be sensitively recognized based on the semantic features of the category label information of different sensitive categories, thereby improving the accuracy of sensitive recognition of the word segmentation information; finally, according to the sensitive recognition result of the word segmentation information corresponding to the target text information, it can be identified whether the target text information is sensitive information. It can be seen that in the embodiment of the present application, by performing sensitive information recognition on the word segmentation information corresponding to the target text information, the fine-grainedness of sensitive recognition of text information is improved, and when performing sensitive recognition on the word segmentation information corresponding to the target text information, the label semantic features of the category label information corresponding to different sensitive categories are integrated, thereby improving the accuracy of sensitive recognition of text information.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:

[0012] Figure 1 A flowchart of a sensitive information identification method provided in an embodiment of the present application;

[0013] Figure 2Schematic diagram of the model structure of the text recognition model in the embodiment of the present application;

[0014] Figure 3 A flowchart of a sensitive information identification method provided in an embodiment of the present application;

[0015] Figure 4 A block diagram of a sensitive information identification device provided in an embodiment of the present application;

[0016] Figure 5 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In order to enable those skilled in the art to better understand the technical solution of the present application, the exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0018] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0019] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0020] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0021] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.

[0022] Sensitive information refers to all kinds of information that violates social public morality, laws and regulations, or has adverse effects on individuals and society, which is spread through the Internet. For example, Internet users are affected by emotional factors and publish negative speech information such as offensive and hurtful speech on social media. For example, some users publish prohibited information such as contraband trading content through homophonic words on the Internet platform in order to achieve illegal transactions. For example, users publish information involving bad thoughts and behaviors on the Internet platform. The above information is all sensitive information. It can be seen that sensitive information can include various types such as negative information, non-compliant information, and privacy information. This application does not limit the specific types and connotations of sensitive information. Any information that does not comply with relevant regulations can be called sensitive information.

[0023] In order to maintain a healthy network environment, automatic detection and identification of sensitive information is an important task of information content management. Since sensitive texts are expressed in various forms, such as obscure metaphors, puns, homophones, etc., existing sensitive information identification methods cannot accurately identify sensitive information.

[0024] According to the sensitive information identification method of the embodiment of the present application, it is possible to improve the fine-grainedness of sensitive identification of text information by performing sensitive information identification on the word segmentation information corresponding to the target text information, and when performing sensitive identification on the word segmentation information corresponding to the target text information, the accuracy of sensitive identification of text information is improved by fusing the label semantic features of the category label information corresponding to different sensitive categories.

[0025] The sensitive information identification method according to the embodiment of the present application can be executed by an electronic device such as a terminal device or a server, and the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory. The server can be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.

[0026] Figure 1 A flowchart of a sensitive information identification method provided in an embodiment of the present application. Figure 1 , the method comprising:

[0027] Step S110: performing word segmentation processing on the target text information to obtain word segmentation information corresponding to the target text information.

[0028] The target text information refers to the text information to be sensitively identified. The target text information can be text information corresponding to different channels and platforms, such as chat, title, comment, article and other text information.

[0029] It should be noted that performing word segmentation processing on the target text information refers to dividing the target text information into separate words or phrases, thereby obtaining word segmentation information corresponding to the target text information.

[0030] Correspondingly, the word segmentation information corresponding to the target text information is the word segmentation obtained by segmenting the target text information. For the same target text information, it may correspond to multiple word segmentation information.

[0031] For example, for the target text information "Xiao Ming likes to eat apples", the corresponding word segmentation information may include "Xiao Ming", "like", "eat", and "apple".

[0032] Therefore, when the target text information corresponds to multiple word segmentation information, the overall semantics of the target text information can be expressed by combining the word segmentation information corresponding to the target text information.

[0033] It should also be noted that the word segmentation processing of the target text information can be implemented by any word segmentation method, for example, the word segmentation processing of the target text information is based on a neural network model, and for example, the word segmentation processing of the target text information is performed by pre-defined word segmentation rules and a vocabulary. The embodiments of the present application are not limited to this.

[0034] Correspondingly, the word segmentation information can be a word segmentation text or a numerical vector corresponding to the word segmentation text. The embodiments of the present application do not limit this. For example, when the target text information is segmented based on a neural network model, the extracted word segmentation information can be a numerical vector corresponding to the word segmentation text. When the target text information is segmented by predefined word segmentation rules and a vocabulary, the extracted word segmentation information can be the original word segmentation text.

[0035] Step S120: input the word segmentation information into a text recognition model to obtain the word segmentation semantic features corresponding to the word segmentation information.

[0036] Among them, the text recognition model can extract the word segmentation semantic features corresponding to the word segmentation information. The text recognition model is any trained text processing model, such as a convolutional neural network model, a recurrent neural network model, etc.

[0037] The word segmentation semantic features corresponding to the word segmentation information are represented by feature vectors obtained by extracting features from the word segmentation information using a text recognition model.

[0038] It should be noted that, when the target text information corresponds to multiple word segmentation information, it is necessary to perform feature extraction on each word segmentation information corresponding to the target text information, so as to obtain the word segmentation semantic features corresponding to each word segmentation information.

[0039] Step S130: Determine whether the word segmentation information is sensitive word segmentation information based on the word segmentation semantic features and the label semantic features corresponding to the category label information of different sensitive categories, and obtain a sensitivity identification result of the word segmentation information.

[0040] Among them, the category label information of different sensitive categories refers to preset label information used to identify sensitive categories.

[0041] It should be noted that the division method of sensitive categories can be adaptively set according to actual identification needs, and the embodiments of the present application do not limit this.

[0042] In an optional implementation, the sensitive category can be directly divided according to whether it is sensitive information to obtain category label information. Accordingly, the category label information may include first category label information corresponding to the sensitive information category and second category label information corresponding to the non-sensitive information category. For example, the first category label information may be "sensitive information text" and the second category label information may be "non-sensitive information text".

[0043] The sensitive information category is used to identify the segmentation information as sensitive segmentation information, and the non-sensitive information category is used to identify the segmentation information as non-sensitive segmentation information.

[0044] In an optional implementation, in order to improve the granularity of sensitive category division, sensitive categories may be divided according to information sensitivity levels to obtain category label information. Accordingly, category sensitive information may include category label information corresponding to low-level sensitive information categories, such as "low-level sensitive information text", category label information corresponding to medium-level sensitive information categories, such as "medium-level sensitive information text", category label information corresponding to high-level sensitive information categories, such as "high-level sensitive information text", and category label information corresponding to non-sensitive information categories, such as "non-sensitive information text".

[0045] In an optional implementation, in order to improve the granularity of the sensitive category division, the sensitive categories may be divided according to the sensitive word types to obtain category label information.

[0046] Specifically, the sensitive word types can be misleading sensitive words, illegal sensitive words, semantic sensitive words, etc. Among them, misleading sensitive words are used to indicate that sensitive words are false propaganda words or misleading words. Illegal sensitive words are used to indicate that sensitive words are words related to illegal or illegal behaviors. Semantic sensitive words are used to indicate that sensitive words are words with offensive meanings.

[0047] Correspondingly, category sensitive information may include category label information corresponding to the misleading sensitive information category, such as “misleading sensitive information text”, category label information corresponding to the illegal sensitive information category, such as “illegal sensitive information text”, category label information corresponding to the semantic sensitive information category, such as “semantic sensitive information text”, and category label information corresponding to the non-sensitive information category, such as “non-sensitive information text”.

[0048] It should be noted that representative segmentation text corresponding to the category may also be added to the category label information of different sensitive categories to enhance the semantic content contained in the category label information.

[0049] Among them, the label semantic features corresponding to the category label information of different sensitive categories refer to the feature vector representation corresponding to the category label information of different sensitive categories, that is, the text encoding corresponding to the category label information.

[0050] Among them, the text recognition model can be used to extract features of the category label information to obtain label semantic features corresponding to the category label information. Accordingly, in the training phase of the text recognition model, the label semantic features corresponding to the category label information can be learned.

[0051] Therefore, when performing sensitive identification on the word segmentation information corresponding to the target text information, it is possible to determine whether the word segmentation information is sensitive word segmentation information based on the word segmentation semantic features and the label semantic features corresponding to the category label information of different sensitive categories, and obtain the sensitive identification result of the word segmentation information.

[0052] The sensitive word segmentation information refers to the word segmentation information being a sensitive word. The sensitive identification result of the word segmentation information is used to indicate whether the word segmentation information is sensitive word segmentation information.

[0053] In an optional implementation method, in order to improve the accuracy of sensitive identification of word segmentation information, the correlation between the word segmentation semantic feature and the semantic feature of each label can be determined based on the feature similarity between the word segmentation semantic feature and the semantic feature of each label, so as to select the sensitive category corresponding to the label semantic feature with the highest correlation as the sensitive category to which the word segmentation information belongs. Finally, based on the sensitive category to which the word segmentation information belongs, it is determined whether the word segmentation information is sensitive word segmentation information, and the sensitive identification result of the word segmentation information is obtained.

[0054] Correspondingly, the label semantic feature includes a first label semantic feature corresponding to the sensitive information category and a second label semantic feature corresponding to the non-sensitive information category. Then, based on the word segmentation semantic feature and the label semantic feature corresponding to the category label information of different sensitive categories, it is determined whether the word segmentation information is sensitive word segmentation information, and a sensitive identification result of the word segmentation information is obtained, including: determining a first probability that the word segmentation information is sensitive word segmentation information based on the feature similarity between the word segmentation semantic feature and the first label semantic feature; determining a second probability that the word segmentation information is non-sensitive word segmentation information based on the feature similarity between the word segmentation semantic feature and the second label semantic feature; comparing the first probability and the second probability, and determining whether the word segmentation information is sensitive word segmentation information based on the comparison result, and obtaining a sensitive identification result of the word segmentation information.

[0055] The first label semantic feature is a label semantic feature corresponding to the category label information of the sensitive information category, and the second label semantic feature is a label semantic feature corresponding to the category label information of the non-sensitive information category.

[0056] For example, when the category label information of the sensitive information category is "sensitive information text", the first label semantic feature is the text encoding corresponding to the information. When the category label information of the non-sensitive information category is "non-sensitive information text", the second label semantic feature is the text encoding corresponding to the information.

[0057] The feature similarity between the word segmentation semantic feature and the first label semantic feature can be obtained by performing a dot product operation on the word segmentation semantic feature and the first label semantic feature. The feature similarity between the word segmentation semantic feature and the second label semantic feature can be obtained by performing a dot product operation on the word segmentation semantic feature and the second label semantic feature.

[0058] Therefore, after obtaining the similarity between the word segmentation semantic feature and the first label semantic feature and the second label semantic feature, it can be converted into a probability distribution to obtain the first probability and the second probability.

[0059] Specifically, the similarity between the word segmentation semantic feature and the first label semantic feature and the second label semantic feature can be converted into a probability value between 0 and 1 through the Softmax function.

[0060] The first probability is used to represent the probability value of the word segmentation information being sensitive word segmentation information, and the second probability is used to represent the probability value of the word segmentation information being non-sensitive word segmentation information.

[0061] Thus, by comparing the first probability and the second probability, a comparison result is obtained. When the comparison result is that the first probability is greater than the second probability, the word segmentation information is determined to be sensitive word segmentation information. When the comparison result is that the first probability is less than the second probability, the word segmentation information is determined to be non-sensitive word segmentation information, thereby obtaining a sensitive identification result of the word segmentation information.

[0062] Step S140: Identify whether the target text information is sensitive information based on the sensitivity identification result of the word segmentation information.

[0063] Among them, identifying whether the target text information is sensitive information refers to identifying whether the target text information contains sensitive words.

[0064] Specifically, when the target text information corresponds to only one piece of word segmentation information, if the word segmentation information is sensitive word segmentation information, the target text information can be identified as sensitive information.

[0065] In the case where the target text information corresponds to multiple word segmentation information, if there is a piece of word segmentation information that is sensitive word segmentation information, the target text information can be identified as sensitive information.

[0066] The embodiment provided by the present application, first, by performing word segmentation processing on the target text information, the word segmentation information corresponding to the target text information is obtained; secondly, by inputting the word segmentation information into a trained text recognition model, the word segmentation semantic features corresponding to the word segmentation information are obtained; then, according to the word segmentation semantic features and the label semantic features corresponding to the category label information of different sensitive categories, it is determined whether the word segmentation information is sensitive word segmentation information, and the sensitive recognition result of the word segmentation information is obtained, so that the word segmentation information can be sensitively recognized based on the semantic features of the category label information of different sensitive categories, thereby improving the accuracy of sensitive recognition of the word segmentation information; finally, according to the sensitive recognition result of the word segmentation information corresponding to the target text information, it can be identified whether the target text information is sensitive information. It can be seen that in the embodiment of the present application, by performing sensitive information recognition on the word segmentation information corresponding to the target text information, the fine-grainedness of sensitive recognition of text information is improved, and when performing sensitive recognition on the word segmentation information corresponding to the target text information, the label semantic features of the category label information corresponding to different sensitive categories are integrated, thereby improving the accuracy of sensitive recognition of text information.

[0067] In addition, those skilled in the art may also make various modifications and variations to the method in this application:

[0068] In an optional implementation, in order to improve the efficiency and accuracy of sensitive recognition of target text information, a text recognition model can be used to uniformly extract features of word segmentation information and category label information and perform sensitive recognition on word segmentation information. Accordingly, the text recognition model includes a first feature extraction layer for extracting word segmentation information features, a second feature extraction layer for extracting category label information features, and a feature classification layer. The text recognition model is trained in the following manner: sensitive information training samples and non-sensitive information training samples are processed for word segmentation to obtain word segmentation training samples; the word segmentation training samples are input into the first feature extraction layer of the initial text recognition model to obtain sample features of the word segmentation training samples; the category label information of different sensitive categories is input into the second feature extraction layer of the initial text recognition model to obtain initial label semantic features corresponding to the category label information; the sample features and the initial label semantic features are input into the feature classification layer so that the feature classification layer obtains the predicted sensitive category label of the word segmentation training sample according to the feature similarity of the sample features and the initial label semantic features; the initial text recognition model is trained according to the predicted sensitive category label of the word segmentation training sample and the actual sensitive category label corresponding to the word segmentation training sample to obtain the trained text recognition model.

[0069] The initial text recognition model refers to the text recognition model to be trained. The trained text recognition model can be obtained by training the initial text recognition model with sensitive information training samples and non-sensitive information training samples.

[0070] For ease of understanding, Figure 2 A schematic diagram of the model structure of the text recognition model is shown.

[0071] Reference Figure 2 In the training stage of the model, the first feature extraction layer is used to input the segmentation training samples (i.e., Token1, Token2, Token3, ..., Tokenn-1, Tokenn) obtained after the segmentation processing of the sensitive information training samples and the non-sensitive information training samples, so as to extract features of the segmentation training samples through the first feature extraction layer, and obtain the sample features of the segmentation training samples. Among them, CLS is used to indicate the start of the segmentation training sample, and SEP is used to indicate the end of the segmentation training sample.

[0072] The second feature extraction layer is used to input category label information of different sensitive categories, such as "sensitive information text" and "non-sensitive information text", and extract features from the category label information to obtain initial label semantic features. The feature classification layer is used to input the sample features extracted by the first feature extraction layer and the initial label semantic features extracted by the second feature extraction layer, and finally obtain the predicted sensitive category label of the word segmentation training sample.

[0073] It should be noted that the difference between the initial label semantic features and the above label semantic features is that the initial label semantic features are the semantic features obtained by the text recognition model during the training phase by extracting features from the category label information of different sensitive categories, that is, the initial label semantic features are label semantic features that the model has not learned well. The label semantic features are the semantic features obtained by extracting features from the category label information when the text recognition model is trained, that is, the label semantic features that the model has learned well.

[0074] That is to say, during the training process of the text recognition model, the initial label semantic features extracted are also continuously optimized, so that when the text recognition model training is completed, the optimized initial label semantic features can be obtained, that is, the label semantic features learned by the model.

[0075] Among them, sensitive information training samples refer to sensitive text information used to train text recognition models, which contain preset sensitive words. Non-sensitive information training samples refer to non-sensitive text information used to train text recognition models, which only contain non-sensitive words.

[0076] The number of sensitive information training samples and non-sensitive information training samples can be adaptively set according to actual training needs, and the embodiments of the present application do not limit this.

[0077] It should be noted that when performing word segmentation processing on sensitive information training samples and non-sensitive information training samples to obtain word segmentation training samples, it is necessary to perform word segmentation processing on the sensitive information training samples and the non-sensitive information training samples respectively to obtain sensitive word segmentation training samples corresponding to the sensitive information training samples, and non-sensitive word segmentation training samples corresponding to the non-sensitive information training samples.

[0078] Therefore, for a certain sensitive information training sample or a certain non-sensitive information training sample, when the word segmentation training sample is input into the first feature extraction layer of the initial text recognition model, it is necessary to input all the corresponding word segmentation training samples into the first feature extraction layer to perform feature extraction on all the corresponding word segmentation training samples to obtain the sample features of the word segmentation training samples.

[0079] The initial label semantic features corresponding to the category label information refer to the text encoding of the category label information obtained by extracting features of the category label information of different sensitive categories by the second feature extraction layer of the initial text recognition model.

[0080] Among them, the category label information of different sensitive categories can be referred to the above explanation and will not be elaborated here.

[0081] It should be noted that the structure of the first feature extraction layer and the structure of the second feature extraction layer may be the same or different, and the embodiment of the present application does not limit this.

[0082] In an optional implementation, since the category label information has lower information complexity than the word segmentation information, the complexity of the second feature extraction layer can be made lower than that of the first feature extraction layer. Exemplarily, when both the first feature extraction layer and the second feature extraction layer are composed of convolutional layers, the number of convolutional layers included in the second feature extraction layer can be made smaller than the number of convolutional layers included in the first feature extraction layer.

[0083] In an optional implementation, a pre-trained feature extraction structure with better feature learning effect can be directly selected as the first feature extraction layer and the second feature extraction layer. For example, the feature extraction structure of Word-based BERT (abbreviated as WoBERT) can be used as the first feature extraction layer and the second feature extraction layer. That is, the first feature extraction layer and the second feature extraction layer are both composed of multiple layers of Transformer.

[0084] Among them, the feature classification layer is used to calculate the feature similarity of the sample features and the initial label semantic features according to the input sample features and the initial label semantic features, so as to determine the predicted sensitive category label of the word segmentation training sample according to the feature similarity.

[0085] The predicted sensitive category label is used to identify the sensitive category predicted by the feature classification layer for the word segmentation training sample. For example, the predicted word segmentation training sample is a sensitive information text or a non-sensitive information text.

[0086] Therefore, the initial text recognition model is trained according to the predicted sensitive category labels of the word segmentation training samples and the actual sensitive category labels corresponding to the word segmentation training samples, and a trained text recognition model can be obtained.

[0087] The actual sensitive category label is used to identify the actual sensitive category of the word segmentation training sample. For example, the word segmentation training sample is a sensitive information text or a non-sensitive information text.

[0088] According to the actual sensitive category labels, it can be determined whether the text recognition model can accurately identify the word segmentation training samples. Therefore, the text recognition model is initialized according to the predicted sensitive category labels and the actual sensitive category labels corresponding to the word segmentation training samples, so that the text recognition model can improve the feature learning ability of the word segmentation training samples and category label information, thereby improving the sensitive recognition ability of the word segmentation training samples.

[0089] In an embodiment of the present application, two feature extraction layers are respectively used to extract sample features of word segmentation training samples corresponding to sensitive information training samples and non-sensitive information training samples, as well as initial label semantic features of category label information of different sensitive categories, so as to calculate the feature similarity between sample features and initial label semantic features according to the feature classification layer, and obtain the predicted sensitive category label of the word segmentation training sample. Finally, the text recognition model is trained according to the actual sensitive category label corresponding to the word segmentation, thereby improving the feature learning ability of the text recognition model for sensitive information training samples and non-sensitive information training samples, as well as the feature learning ability for category label information of different sensitive categories, thereby effectively improving the accuracy of the text recognition model for sensitive recognition of word segmentation.

[0090] In an optional implementation, the inventor found that the number of sensitive information training samples is small, which affects the sensitive recognition effect of the text recognition model. Therefore, in order to improve the sample diversity and sample generation efficiency of sensitive information training samples, sensitive information training samples can be generated according to a preset text generation model and a sensitive vocabulary library.

[0091] Accordingly, sensitive information training samples are generated in the following manner: determining the number and type of sensitive words corresponding to the sensitive information training samples to be generated; screening target sensitive words from the words contained in the sensitive word library according to the number and type of sensitive words; constructing information generation instructions according to the target sensitive words and the preset information generation method, inputting the information generation instructions into the preset text generation model, and generating sensitive information training samples.

[0092] The preset text generation model may be any pre-trained large language model, or may be a text generation model obtained after training the preset large language model.

[0093] Among them, the number of sensitive words is used to represent the number of target sensitive words that need to be selected from the sensitive word library when generating sensitive information training samples. The type of sensitive word is used to represent the type of target sensitive word. Specifically, the type of sensitive word can be misleading type sensitive words, illegal type sensitive words, semantic type sensitive words, etc. The specific explanation of misleading type sensitive words, illegal type sensitive words, and semantic type sensitive words is described above and will not be repeated here.

[0094] Among them, the sensitive word library stores preset sensitive words corresponding to different preset sensitive word types.

[0095] Therefore, according to the number of sensitive words and the type of sensitive words, target sensitive words corresponding to the number of sensitive words and the type of sensitive words can be screened from the words included in the sensitive word library.

[0096] After the target sensitive words are screened, an information generation instruction needs to be constructed according to the target sensitive words and the preset information generation method. The information generation instruction is used to instruct the preset text generation model to generate sensitive information training samples according to the target sensitive words and the preset information generation method.

[0097] The preset information generation method is used to represent the specific generation method of the preset text generation model to generate sensitive information training samples according to the target sensitive words. The preset information generation method may include the target sensitive word generation method and the associated word generation method.

[0098] When the preset information generation method is a target sensitive word generation method, the preset text generation model needs to directly generate sensitive information training samples containing the target sensitive words.

[0099] In an optional implementation, the preset information generation method includes a target sensitive word generation method, then an information generation instruction is constructed according to the target sensitive word and the preset information generation method, the information generation instruction is input into a preset text generation model, and a sensitive information training sample is generated, including: constructing an information generation instruction according to the target sensitive word and the target sensitive word generation method, inputting the information generation instruction into the preset text generation model, so that the preset text generation model generates a sensitive information training sample according to the target sensitive word.

[0100] For example, the information generation instruction constructed according to the target sensitive word and the target sensitive word generation method may be:

[0101] Task: Generate text information containing sensitive words based on the given sensitive words and generation methods.

[0102] Sensitive words: token1, token2, token3.

[0103] Generation method: Generate text information that directly contains sensitive words, requiring the text information to be semantically coherent.

[0104] Therefore, after the information generation instruction is input into the preset text generation model, text information containing the above-mentioned sensitive words, that is, sensitive information training samples, can be generated.

[0105] Considering that the sensitive words included in the sensitive word library do not cover a comprehensive range, after screening out the target sensitive words, the preset text generation model can also be instructed to generate related words with the same semantics based on the target sensitive words to improve the complexity and diversity of sensitive words in sensitive information training samples.

[0106] Correspondingly, when the preset information generation method is the associated word generation method, the preset text generation model needs to generate associated words with the same semantics based on the target sensitive words, and generate sensitive information training samples based on the associated words.

[0107] In an optional implementation, the preset information generation method includes an associated word generation method, and an information generation instruction is constructed according to the target sensitive word and the preset information generation method, and the information generation instruction is input into a preset text generation model to generate sensitive information training samples, including: constructing an information generation instruction according to the target sensitive word and the associated word generation method, inputting the information generation instruction into the preset text generation model so that the preset text generation model generates associated words with the same semantics as the target sensitive word, and generating sensitive information training samples based on the associated words.

[0108] For example, the information generation instruction constructed according to the target sensitive word and the associated word generation method may be:

[0109] Task: Generate relevant text information based on given sensitive words and generation methods.

[0110] Sensitive words: token1, token2, token3.

[0111] Generation method: Generate related words with the same semantics for each sensitive word, and generate text information containing the related words, requiring the text information to be semantically coherent.

[0112] Among them, the associated words have the same semantics as the target sensitive words, that is, the associated words are associated sensitive words of the target sensitive words in different semantic expression forms. For example, the associated words can be associated sensitive words of the target sensitive words in a metaphorical semantic expression form, or associated sensitive words in a pun semantic expression form, etc., and the embodiments of the present application do not limit this.

[0113] It should be noted that the information generation instruction may also include a preset semantic expression form, so that the preset text generation model can generate associated words corresponding to the preset semantic expression form to increase the complexity of the associated words.

[0114] For example, the information generation instruction constructed according to the target sensitive word and the associated word generation method may be:

[0115] Task: Generate relevant text information based on given sensitive words and generation methods.

[0116] Sensitive words: token1, token2, token3.

[0117] Presupposed semantic expression form: metaphorical semantic expression form.

[0118] Generation method: Based on the preset semantic expression form, generate related words with the same semantics for each sensitive word, and generate text information containing the related words, requiring the text information to be semantically coherent.

[0119] In an embodiment of the present application, by enabling a preset text generation model to generate associated words having the same semantics as the target sensitive words, not only the number of sensitive words is expanded, but also complex sensitive words with more obscure expressions are generated. Thus, the sensitive information training samples generated based on the associated words can include complex sensitive words that are difficult to identify, thereby improving the sample quality of the sensitive information training samples.

[0120] In an optional implementation, the inventor found that the existing word segmentation model does not perform well for the word segmentation of sensitive words in text information. Therefore, in order to improve the word segmentation effect of the word segmentation model for sensitive words contained in text information, a preset word segmentation model can be used to perform word segmentation on the target text information, and the preset word segmentation model is a word segmentation model obtained by training the initial word segmentation model based on a candidate word library.

[0121] Correspondingly, the word segmentation processing of the target text information includes: inputting the target text information into a preset word segmentation model for word segmentation processing; the preset word segmentation model is trained in the following manner: adding preset sensitive words corresponding to different preset sensitive word types to the initial word library corresponding to the initial word segmentation model to obtain a candidate word library; inputting the preset sensitive information training sample into the initial word segmentation model, so that the initial word segmentation model obtains the predicted word segmentation corresponding to the preset sensitive information training sample according to the candidate word library; according to the sensitive category to which the label word segmentation of the preset sensitive information training sample belongs, determining the weight information corresponding to the label word segmentation; according to the predicted word segmentation, the label word segmentation and the weight information corresponding to the label word segmentation, the initial word segmentation model is trained to obtain the preset word segmentation model.

[0122] The initial word segmentation model is any existing text processing model such as the WoBERT model, which can perform word segmentation on text information according to the initial vocabulary.

[0123] Among them, the initial vocabulary contains a large number of preset words, but it does not contain sensitive words or the number of sensitive words included is small and the diversity is poor, resulting in the initial word segmentation model being unable to accurately segment the sensitive words contained in the text information.

[0124] Therefore, by adding preset sensitive words corresponding to different preset sensitive word types to the initial word library, a candidate word library is obtained, so that the candidate word library contains a variety of preset sensitive words.

[0125] Among them, the preset sensitive word types can be misleading type sensitive words, illegal type sensitive words, semantic type sensitive words, etc. Their specific meanings can be referred to the above description and will not be repeated here.

[0126] Correspondingly, the preset sensitive words corresponding to the preset sensitive word types are sensitive words belonging to the preset sensitive word types, namely, misleading type sensitive words, illegal type sensitive words, semantic type sensitive words, etc.

[0127] The preset sensitive information training sample can be generated according to the sensitive word library and the preset text generation model. After the preset sensitive information training sample is input into the initial word segmentation model, the initial word segmentation model generates a predicted word segmentation of the preset sensitive information training sample according to the candidate word library.

[0128] The predicted word segmentation is the word segmentation processing result of the initial word segmentation model on the preset sensitive information training sample. For example, for a preset sensitive information training sample, the predicted word segmentation is "word segmentation 1, word segmentation 2, word segmentation 3".

[0129] The label segmentation of the preset sensitive information training sample refers to the segmentation actually contained in the preset sensitive information training sample. The sensitive category to which the label segmentation belongs is used to characterize the sensitivity level corresponding to the label segmentation, that is, whether the label segmentation is a sensitive segmentation or the sensitivity level corresponding to the label segmentation.

[0130] Thus, according to the sensitive category to which the label segmentation belongs, the weight information corresponding to the label segmentation can be determined. Specifically, the weight information can be in numerical form. The higher the value of the weight information corresponding to the label segmentation, the higher the sensitivity level of the label segmentation, that is, the higher the importance of the initial segmentation model to correctly segment the label segmentation.

[0131] Correspondingly, training the initial segmentation model based on the predicted segmentation, label segmentation and weight information corresponding to the label segmentation can effectively improve the segmentation effect of the model for sensitive words contained in sensitive information.

[0132] In an optional implementation, in order to improve the user experience, after the target text information is identified as text information, the target text information may be filtered, so that the filtered target text information is sent to the target user.

[0133] Correspondingly, after identifying whether the target text information is sensitive information based on the sensitivity identification result of the word segmentation information, it also includes: when the target text information is sensitive information, replacing or deleting the sensitive word segmentation information contained in the target text information to obtain processed text information, and sending the processed text information to the target user.

[0134] The replacement process of the sensitive word segmentation information contained in the target text information refers to replacing the sensitive word segmentation information with preset non-sensitive words.

[0135] Specifically, corresponding preset non-sensitive words can be set for different sensitive word types, so that by determining the sensitive word type corresponding to the sensitive word segmentation information, the preset non-sensitive word corresponding to the sensitive word type is selected for replacement.

[0136] Deleting the sensitive word segmentation information contained in the target text information refers to directly deleting the sensitive word segmentation information, thereby avoiding including the sensitive word segmentation information in the target text information.

[0137] It should be noted that, in the case where the target text information is non-sensitive information, the target text information can be directly sent to the target user, and the target user is the user who is to receive the target text information.

[0138] In an embodiment of the present application, when the target text information is identified as sensitive information, the sensitive word segmentation information contained in the target text information is filtered to prevent the user from receiving text information containing sensitive words, thereby effectively improving the user experience.

[0139] For ease of understanding, the technical implementation details in the above embodiment are described in detail below using a specific example:

[0140] With the rapid development and widespread popularity of social media and self-media platforms, text information plays a vital role. Text information is not only a tool for individuals to express their opinions and share their daily lives, but also an important medium for shaping public opinion and spreading social dynamics. Information dissemination in the self-media era has obvious decentralized characteristics, and every user can become a producer and disseminator of information. Therefore, the dissemination of text information has a profound impact on the network environment, user psychology, and social order.

[0141] However, sensitive text information (such as malicious speech, etc.) poses a significant challenge to user experience and platform sustainability. Sensitive text information may cause social unrest, legal issues or moral controversy, and it also reflects some deep-seated problems in current society and culture. Therefore, in order to maintain a healthy network environment, automatic detection and filtering of sensitive text information is an important task of text content management.

[0142] Among the related sensitive information identification methods, some sensitive information identification methods combine character vectorization and word segmentation technology to form character vector sets and word vector sets. These sets are then used to construct a text structure graph, and the pre-trained text recognition model is used to analyze the text to obtain a score value for the presence of bad information in the text. If the score value exceeds the preset first threshold, it is considered that the text contains bad information. However, it has the following disadvantages: if the length of the text exceeds the maximum length that the model can handle, the text needs to be truncated or segmented, which may affect the model's understanding of the overall meaning of the text.

[0143] Some sensitive information identification methods optimize the word segmentation process by dynamically adjusting the word length value in the maximum matching algorithm, solving the problems of incorrect segmentation of long words and low efficiency in traditional word segmentation methods. This method first extracts the text to be filtered, then dynamically sets the word length value according to the length of the entry in the dictionary for word segmentation, then loops through the word segmentation results, replaces sensitive words with non-sensitive words, and outputs the final purified text. However, it has the following disadvantages: it focuses on optimizing word segmentation technology, is not accurate in handling obscure or variant forms of sensitive content, and lacks the ability to analyze the deep semantic relationship of the text.

[0144] Although the above sensitive information identification methods can filter out some sensitive words, the inherent characteristics of sensitive information bring a series of challenges:

[0145] (1) Diversity and complexity: Sensitive texts are expressed in a variety of forms, including obscure metaphors, puns, etc., and a high level of sensitive information recognition capability is required to cope with the complexity of sensitive texts.

[0146] (2) Context dependence: The sensitivity of text is often closely related to the context. Therefore, it is necessary to accurately understand the context during recognition to avoid affecting the user experience due to misjudgment or omission.

[0147] (3) Real-time and dynamic: The rapid dissemination of information on social media requires the ability to identify sensitive information in real time. At the same time, as social culture develops, the identification process needs to constantly adapt to new definitions of sensitive text.

[0148] Therefore, existing technologies are insufficient in terms of accuracy, context dependence, and real-time performance in sensitive text recognition.

[0149] The embodiment of the present application provides a sensitive information identification method, which improves the fine-grainedness of sensitive identification of text information by performing sensitive information identification on the word segmentation information corresponding to the target text information. In addition, when performing sensitive identification on the word segmentation information corresponding to the target text information, the label semantic features of the category label information corresponding to different sensitive categories are integrated, which can not only effectively identify obvious sensitive content, but also accurately capture sensitive information in obscure or variant forms, thereby improving the accuracy of sensitive identification of text information and achieving timely response and adaptation to rapidly changing sensitive information in the network environment.

[0150] Figure 3 FIG. 1 shows a flow chart of the sensitive information identification method in this example. Figure 3 As shown, the example includes the following steps:

[0151] Step S310: performing word segmentation processing on the target text information to obtain word segmentation information corresponding to the target text information.

[0152] The target text information refers to the text information to be identified as sensitive information. The target text information can come from different channels and platforms, including chat texts, titles, comments, and any other form of text data.

[0153] Among them, the input target text information can be decomposed into separate words or phrases based on a preset word segmentation model, and an internal representation of the text can be constructed, thereby obtaining word segmentation information corresponding to the target text information.

[0154] For example, the input target text information is segmented through the WoBERT model to obtain different segmentation tokens, which can be represented in the form of numerical vectors. The WoBERT model is a Chinese BERT model based on word granularity, which has shown advantages in many tasks, especially in terms of processing speed.

[0155] Step S320: input the word segmentation information into the text recognition model to obtain the word segmentation semantic features corresponding to the word segmentation information.

[0156] The text recognition model is obtained by training the initial text recognition model through the sensitive information training samples and the word segmentation training samples corresponding to the non-sensitive information training samples.

[0157] Among them, sensitive information training samples can be generated by using a sensitive word library through a large language model (LLM). Non-sensitive information training samples can be obtained by performing data preprocessing operations such as data cleaning on text information on different platforms.

[0158] Therefore, by performing word segmentation processing on the sensitive information training samples and the non-sensitive information training samples, word segmentation training samples can be obtained.

[0159] During training, you need to choose an appropriate learning rate to balance the convergence speed, determine the batch size to ensure the stability and efficiency of training, select an optimizer suitable for the problem to optimize the weight update process, and select the correct loss function such as the cross entropy loss function to ensure that the model accurately measures the prediction error. After multiple rounds of training and the loss function converges, you can save the pre-trained model.

[0160] Specifically, the model weights and model structure of the text recognition model with the best performance in the training phase can be saved, and then the text recognition model can be obtained by loading the saved model weights and model structure. Therefore, the text recognition model can identify sensitive information of the target text information in the best state, and by loading the pre-trained model, the speed of sensitive information recognition can be accelerated while maintaining the model's in-depth understanding of language patterns.

[0161] The text recognition model is a dual-tower model. The text recognition model includes two independent encoder towers. One encoder tower is the first feature extraction layer for extracting word segmentation information features. Thus, for the word segmentation information corresponding to the target text information, the word segmentation semantic features corresponding to the word segmentation information can be obtained by inputting the word segmentation information into the first feature extraction layer. The feature representations of different word segmentation information can constitute the overall semantic feature representation of the target text information.

[0162] Correspondingly, the text recognition model also includes another Encoder tower, namely, the second feature extraction layer for extracting features of category label information. The second feature extraction layer can extract features of category label information of different sensitive categories, thereby obtaining label semantic features corresponding to the category label information of different sensitive categories.

[0163] Exemplarily, the text recognition model can use WoBERT as the basic text encoder, that is, the first feature extraction layer and the second feature extraction layer can be the feature extraction structure of the WoBERT model, so that it realizes feature extraction and encoding through multi-layer Transformer.

[0164] The BERT model has powerful capabilities in semantic understanding and context awareness. By deeply understanding the contextual relationships of the text, it can not only effectively identify obvious sensitive content, but also accurately capture sensitive information in obscure or mutated forms.

[0165] It can be seen that in the text recognition model of the present application, the feature representations of category label information and word segmentation information can be learned separately, and through the word granularity analysis of the WoBERT model and the context-awareness capability of the dual-tower structure, it is possible to more accurately capture and identify diverse and obscure sensitive texts to improve the sensitive recognition accuracy of word segmentation information.

[0166] Step S330: determining a first probability that the word segmentation information is sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and the first label semantic feature corresponding to the sensitive information category.

[0167] Step S340: determining a second probability that the word segmentation information is non-sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and a second label semantic feature corresponding to the non-sensitive information category.

[0168] It should be noted that a feature classification layer can be set in the text recognition model to determine the first probability and the second probability. Specifically, the word segmentation semantic feature can be dot-multiplied with the first label semantic feature and the second label semantic feature, respectively, so that the result of the dot-multiplication is converted into the first probability and the second probability according to the Softmax function.

[0169] Step S350: Compare the first probability and the second probability, and determine whether the word segmentation information is sensitive word segmentation information based on the comparison result, to obtain a sensitive identification result of the word segmentation information.

[0170] Therefore, the first probability is compared with the second probability through the feature classification layer in the text recognition model, and the sensitive category corresponding to the label semantic feature with the highest probability value is used as the sensitive category of the word segmentation information. That is, the sensitive category of the word segmentation information is determined by the Argmax function, thereby obtaining the sensitive recognition result of the word segmentation information.

[0171] Step S360: Identify whether the target text information is sensitive information based on the sensitivity identification result of the word segmentation information.

[0172] Among them, it is necessary to identify whether the target text information is sensitive information based on the sensitivity recognition results of all word segmentation information corresponding to the target text information.

[0173] Step S370: When the target text information is sensitive information, the sensitive segmentation information contained in the target text information is replaced or deleted to obtain processed text information, and the processed text information is sent to the target user.

[0174] Wherein, when the target text information is non-sensitive information, that is, normal text information, the target text information can be directly sent to the target user.

[0175] In the embodiment of the present application, the target text information is first segmented using a preset segmentation model such as the WoBERT model to capture the segmentation information corresponding to the target text information. Then, the segmentation information and the category label information of different sensitive categories are further jointly encoded through a text recognition model such as the Twin BERT model to improve the recognition ability of sensitive texts and reduce misjudgments and missed judgments through contextual information. In addition, it can respond to the rapid information dissemination of platforms such as social media in real time, and update in time to adapt to the development of social culture, thereby maintaining the health of the network environment and the quality experience of users.

[0176] It can be understood that the above-mentioned various method embodiments mentioned in this application can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, this application will not go into details. Those skilled in the art can understand that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined by its function and possible internal logic.

[0177] In addition, the present application also provides a sensitive information identification device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any sensitive information identification method provided by the present application. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.

[0178] Figure 4 A block diagram of a sensitive information identification device provided in an embodiment of the present application.

[0179] Reference Figure 4 The embodiment of the present application provides a sensitive information identification device, the sensitive information identification device 40 includes:

[0180] The text segmentation module 41 is used to perform segmentation processing on the target text information to obtain segmentation information corresponding to the target text information;

[0181] A feature extraction module 42 is used to input the word segmentation information into a text recognition model to obtain the word segmentation semantic features corresponding to the word segmentation information;

[0182] A word segmentation identification module 43, configured to determine whether the word segmentation information is sensitive word segmentation information according to the word segmentation semantic features and label semantic features corresponding to category label information of different sensitive categories, and obtain a sensitivity identification result of the word segmentation information;

[0183] The text recognition module 44 is used to identify whether the target text information is sensitive information according to the sensitivity recognition result of the word segmentation information.

[0184] In an optional implementation, the label semantic feature includes a first label semantic feature corresponding to a sensitive information category and a second label semantic feature corresponding to a non-sensitive information category, and determining whether the word segmentation information is sensitive word segmentation information according to the word segmentation semantic feature and the label semantic feature corresponding to the category label information of different sensitive categories, and obtaining a sensitivity identification result of the word segmentation information includes:

[0185] Determining a first probability that the word segmentation information is sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and the first label semantic feature;

[0186] Determining a second probability that the word segmentation information is non-sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and the second label semantic feature;

[0187] The first probability and the second probability are compared, and according to the comparison result, it is determined whether the word segmentation information is sensitive word segmentation information, and a sensitive identification result of the word segmentation information is obtained.

[0188] In an optional implementation, the text recognition model includes a first feature extraction layer for extracting word segmentation information features, a second feature extraction layer for extracting category label information features, and a feature classification layer, and the text recognition model is trained in the following manner:

[0189] Performing word segmentation processing on the sensitive information training samples and the non-sensitive information training samples to obtain word segmentation training samples;

[0190] Inputting the word segmentation training sample into the first feature extraction layer of the initial text recognition model to obtain sample features of the word segmentation training sample;

[0191] Inputting the category label information of the different sensitive categories into the second feature extraction layer of the initial text recognition model to obtain initial label semantic features corresponding to the category label information;

[0192] Inputting the sample features and the initial label semantic features into the feature classification layer, so that the feature classification layer obtains the predicted sensitive category label of the word segmentation training sample according to the feature similarity of the sample features and the initial label semantic features;

[0193] The initial text recognition model is trained according to the predicted sensitive category labels of the word segmentation training samples and the actual sensitive category labels corresponding to the word segmentation training samples to obtain a trained text recognition model.

[0194] In an optional implementation, the sensitive information training sample is generated in the following manner:

[0195] Determine the number and types of sensitive words corresponding to the sensitive information training samples to be generated;

[0196] According to the number of sensitive words and the type of sensitive words, select target sensitive words from the words included in the sensitive word library;

[0197] An information generation instruction is constructed according to the target sensitive word and a preset information generation method, and the information generation instruction is input into a preset text generation model to generate a sensitive information training sample.

[0198] In an optional implementation, the preset information generation method includes a related word generation method, and the information generation instruction is constructed according to the target sensitive word and the preset information generation method, and the information generation instruction is input into a preset text generation model to generate a sensitive information training sample, including:

[0199] An information generation instruction is constructed according to the target sensitive word and the associated word generation method, and the information generation instruction is input into a preset text generation model so that the preset text generation model generates associated words with the same semantics as the target sensitive word, and generates sensitive information training samples according to the associated words.

[0200] In an optional implementation, the word segmentation processing of the target text information includes: inputting the target text information into a preset word segmentation model for word segmentation processing; the preset word segmentation model is trained in the following manner:

[0201] Adding preset sensitive words corresponding to different preset sensitive word types to the initial word library corresponding to the initial word segmentation model to obtain a candidate word library;

[0202] Inputting a preset sensitive information training sample into the initial word segmentation model, so that the initial word segmentation model obtains a predicted word segmentation corresponding to the preset sensitive information training sample according to the candidate word library;

[0203] Determining weight information corresponding to the label segmentation according to the sensitive category to which the label segmentation of the preset sensitive information training sample belongs;

[0204] The initial word segmentation model is trained according to the predicted word segmentation, the label word segmentation and the weight information corresponding to the label word segmentation to obtain the preset word segmentation model.

[0205] In an optional implementation, after identifying whether the target text information is sensitive information according to the sensitivity identification result of the word segmentation information, the device is further used to:

[0206] In the case that the target text information is sensitive information, the sensitive word segmentation information contained in the target text information is replaced or deleted to obtain processed text information, and the processed text information is sent to the target user.

[0207] Each module in the above-mentioned sensitive information identification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0208] Figure 5 A block diagram of an electronic device provided in an embodiment of the present application.

[0209] Reference Figure 5 An embodiment of the present application provides an electronic device, which includes: at least one processor 501; at least one memory 502, and one or more I / O interfaces 503, connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by at least one processor 501, and the one or more computer programs are executed by at least one processor 501 so that the at least one processor 501 can execute the above-mentioned sensitive information identification method.

[0210] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0211] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned sensitive information identification method when executed by a processor / processing core. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0212] An embodiment of the present application also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned sensitive information identification method.

[0213] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0214] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0215] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0216] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute a computer-readable program instruction, thereby realizing various aspects of the present application.

[0217] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0218] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0219] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0220] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0221] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the function involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs the function or action of the specification, or can be realized by a combination of special-purpose hardware and computer instructions.

[0222] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.

Claims

1. A sensitive information identification method, characterized in that: The method comprises: Performing word segmentation processing on the target text information to obtain word segmentation information corresponding to the target text information; Inputting the word segmentation information into a text recognition model to obtain word segmentation semantic features corresponding to the word segmentation information; Determine whether the word segmentation information is sensitive word segmentation information according to the word segmentation semantic features and label semantic features corresponding to category label information of different sensitive categories, and obtain a sensitivity identification result of the word segmentation information; According to the sensitivity identification result of the word segmentation information, it is identified whether the target text information is sensitive information.

2. The method according to claim 1, characterized in that The label semantic feature includes a first label semantic feature corresponding to the sensitive information category and a second label semantic feature corresponding to the non-sensitive information category, and determining whether the word segmentation information is sensitive word segmentation information according to the word segmentation semantic feature and the label semantic features corresponding to the category label information of different sensitive categories, and obtaining a sensitivity identification result of the word segmentation information includes: Determining a first probability that the word segmentation information is sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and the first label semantic feature; Determining a second probability that the word segmentation information is non-sensitive word segmentation information according to a feature similarity between the word segmentation semantic feature and the second label semantic feature; The first probability and the second probability are compared, and according to the comparison result, it is determined whether the word segmentation information is sensitive word segmentation information, and a sensitive identification result of the word segmentation information is obtained.

3. The method according to claim 1, characterized in that The text recognition model includes a first feature extraction layer for extracting word segmentation information features, a second feature extraction layer for extracting category label information features, and a feature classification layer. The text recognition model is trained in the following manner: Performing word segmentation processing on the sensitive information training samples and the non-sensitive information training samples to obtain word segmentation training samples; Inputting the word segmentation training sample into the first feature extraction layer of the initial text recognition model to obtain sample features of the word segmentation training sample; Inputting the category label information of the different sensitive categories into the second feature extraction layer of the initial text recognition model to obtain initial label semantic features corresponding to the category label information; Inputting the sample features and the initial label semantic features into the feature classification layer, so that the feature classification layer obtains the predicted sensitive category label of the word segmentation training sample according to the feature similarity of the sample features and the initial label semantic features; The initial text recognition model is trained according to the predicted sensitive category labels of the word segmentation training samples and the actual sensitive category labels corresponding to the word segmentation training samples to obtain a trained text recognition model.

4. The method according to claim 3, characterized in that The sensitive information training samples are generated in the following manner: Determine the number and types of sensitive words corresponding to the sensitive information training samples to be generated; According to the number of sensitive words and the type of sensitive words, select target sensitive words from the words included in the sensitive word library; An information generation instruction is constructed according to the target sensitive word and a preset information generation method, and the information generation instruction is input into a preset text generation model to generate a sensitive information training sample.

5. The method according to claim 4, characterized in that The preset information generation method includes a related word generation method, and the information generation instruction is constructed according to the target sensitive word and the preset information generation method, and the information generation instruction is input into a preset text generation model to generate a sensitive information training sample, including: An information generation instruction is constructed according to the target sensitive word and the associated word generation method, and the information generation instruction is input into a preset text generation model so that the preset text generation model generates associated words with the same semantics as the target sensitive word, and generates sensitive information training samples according to the associated words.

6. The method according to any one of claims 1 to 5, characterized in that: The word segmentation processing of the target text information includes: inputting the target text information into a preset word segmentation model for word segmentation processing; the preset word segmentation model is trained in the following manner: Adding preset sensitive words corresponding to different preset sensitive word types to the initial word library corresponding to the initial word segmentation model to obtain a candidate word library; Inputting a preset sensitive information training sample into the initial word segmentation model, so that the initial word segmentation model obtains a predicted word segmentation corresponding to the preset sensitive information training sample according to the candidate word library; Determining weight information corresponding to the label segmentation according to the sensitive category to which the label segmentation of the preset sensitive information training sample belongs; The initial word segmentation model is trained according to the predicted word segmentation, the label word segmentation and the weight information corresponding to the label word segmentation to obtain the preset word segmentation model.

7. The method according to any one of claims 1 to 5, characterized in that: After identifying whether the target text information is sensitive information according to the sensitivity identification result of the word segmentation information, the method further includes: In the case that the target text information is sensitive information, the sensitive word segmentation information contained in the target text information is replaced or deleted to obtain processed text information, and the processed text information is sent to the target user.

8. A sensitive information identification device, characterized in that: The device comprises: A text segmentation module is used to perform segmentation processing on the target text information to obtain segmentation information corresponding to the target text information; A feature extraction module, used for inputting the word segmentation information into a text recognition model to obtain the word segmentation semantic features corresponding to the word segmentation information; A word segmentation recognition module, used to determine whether the word segmentation information is sensitive word segmentation information according to the word segmentation semantic features and label semantic features corresponding to category label information of different sensitive categories, and obtain a sensitivity recognition result of the word segmentation information; The text recognition module is used to identify whether the target text information is sensitive information based on the sensitivity recognition result of the word segmentation information.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to execute the sensitive information identification method described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the sensitive information identification method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Text content tagging method and device, medium and program product

    CN121118913A