Sensitive word recognition method and system, storage medium and program product
By analyzing the text features of the entered text information in real time, dynamically updating the list of sensitive words, combining preset sensitive words and excluding sensitive words for recognition, the shortcomings of traditional methods in identifying new sensitive words and filtering sensitive words are solved, and the accuracy and efficiency of recognition are improved.
Patent Information
- Application Number
- CN202510219035.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-02-26
AI Technical Summary
Traditional sensitive word recognition methods rely on predefined sensitive thesaurus and matching rules, cannot effectively identify emerging sensitive words, and may filter out outdated sensitive words, with high false positive rates, low accuracy and efficiency.
By obtaining and analyzing the text features of the entered text information in real time, we determine the excluded sensitive words and update the preset sensitive words list, combine the preset sensitive words and excluded sensitive words for recognition, and dynamically update the recognition system to adapt to changes in the network environment and user needs.
It improves the accuracy and efficiency of sensitive word recognition, reduces the probability of false positives, can timely identify emerging sensitive words and eliminate outdated sensitive words, and adapt to the ever-changing network environment.
Smart Images

Figure CN120124629A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular, to a sensitive word recognition method, a recognition system, a storage medium, and a program product. Background Art
[0002] With the rapid development of the Internet, the speed and scope of the spread of network information are increasing day by day, and the supervision of network content has become particularly important. Sensitive word recognition, as a key link in network content supervision, is of great significance for maintaining a healthy network environment and preventing the spread of bad information.
[0003] Traditional sensitive word recognition methods mainly rely on pre-defined sensitive word libraries and matching rules to perform word-by-word matching on the input text information. Once the same words as those in the pre-defined sensitive word library are found in the input text information, they are determined as sensitive words. Although this method is simple and easy to implement, the pre-defined sensitive word library may not be able to adapt to the constantly changing network environment and recognition requirements, so it may not be able to effectively recognize newly emerging sensitive words. At the same time, it may also perform unnecessary filtering on outdated sensitive words. In addition, some words that are harmless in a specific context may be misjudged as sensitive words when using the pre-defined sensitive word library and matching rules for keyword matching. Therefore, when relying on the pre-defined sensitive word library and matching rules to perform word-by-word matching and recognize sensitive words included in the input text information, the accuracy and efficiency are relatively low. Summary of the Invention
[0004] In order to improve the accuracy and efficiency in the process of sensitive word recognition, the present application provides a sensitive word recognition method, a recognition system, a storage medium, and a program product.
[0005] In a first aspect, the present application provides a sensitive word recognition method, adopting the following technical solution: A sensitive word recognition method includes: Obtain real-time input text information, and recognize text features included in the real-time input text information; Determine excluded sensitive words based on the text features, and update a preset sensitive word list based on the excluded sensitive words; Based on the updated preset sensitive word list and the text features, determine whether the real-time input text information includes target sensitive words, and the preset sensitive word list includes preset sensitive words and preset excluded sensitive words; If so, generate a sensitive detection result based on the target sensitive words.
[0006] By adopting the above technical solution, through real-time feature recognition of the input text information, it is convenient to deeply analyze the content contained in the real-time input text information. By determining the excluded sensitive words based on the feature recognition results and adding the excluded sensitive words to the preset sensitive word list, the dynamic update of the preset sensitive word list is realized, so that the recognition system can continuously learn and adapt to new sensitive words and excluded sensitive words, rather than using a fixed sensitive word library or matching rules for matching. The combination of preset sensitive words and excluded sensitive words is used for sensitive word recognition, which is convenient to reduce the false alarm probability while meeting the changing network environment and user needs, thereby improving the accuracy and efficiency in the sensitive word recognition process.
[0007] In a possible implementation manner, after updating the preset sensitive word list based on the excluded sensitive words, the method further includes: Performing semantic analysis on the real-time input text information to determine a text summary, and based on the text summary and the preset sensitive word mapping relationship, determining the derivative sensitive words corresponding to the text summary; Obtaining the matching records of the preset sensitive word list within a first preset time period, and determining the hot sensitive words based on the matching records; Obtaining the derivative word vectors corresponding to the derivative sensitive words and the hot word vectors corresponding to the hot sensitive words, and determining the sensitive words to be supplemented based on the derivative word vectors and the hot word vectors; Updating the preset sensitive word list based on the sensitive words to be supplemented.
[0008] By adopting the above technical solution, through semantic analysis of the real-time input text information, a text summary can be determined, and based on the preset sensitive word mapping relationship, the potential derivative sensitive words in the text can be deduced, which is convenient to capture some disguised sensitive expressions that avoid direct sensitive word detection through synonym replacement, pinyin abbreviation, etc. After analyzing the word vectors of the derivative sensitive words and the hot sensitive words and identifying the potential sensitive words to be supplemented by using the similarity of these word vectors, the preset sensitive word list is updated based on the sensitive words to be supplemented, which is convenient to timely respond to newly emerging sensitive topics or problems, thereby facilitating the reduction of detection loopholes caused by the lag of the preset sensitive word list.
[0009] In a possible implementation manner, the method further includes: Obtaining the trigger behavior records of the input user within a second preset time period, and based on the trigger behavior records and the preset operation diagram, determining whether the input user has regular behaviors; If so, determining the target behavior path of the input user based on the regular behaviors of the input user within the second preset time period; Obtain the node data corresponding to each path node in the target behavior path, and identify the encrypted data features corresponding to each node data; Update the preset sensitive word list based on the encrypted data features.
[0010] By adopting the above technical solution, by analyzing the trigger behavior records of the input user within the second preset time period, it is convenient to identify the regular operation habits of the input user, so as to facilitate the prediction of the access or operation behavior path of the input user in the next period of time. Based on the prediction result, determine the nodes that the input user may access. Analyze the node data corresponding to the possible access nodes, and set relevant encrypted data features in advance according to the analysis result, and then update the preset sensitive word list in time, so as to facilitate improving the response and processing ability of the recognition system to newly emerging sensitive data.
[0011] In a possible implementation manner, the method further includes: Identify the first generation time and the first real-time matching times of each sensitive word in the preset sensitive word list, and identify the second generation time and the second real-time matching times of each excluded sensitive word in the preset sensitive word list; Based on the first preset cache duration mapping relationship, and the first generation time and the first real-time matching times of each sensitive word in the preset sensitive word list, determine the first cache duration corresponding to each sensitive word; Based on the second preset cache duration mapping relationship, and the second generation time and the second real-time matching times of each excluded sensitive word in the preset sensitive word list, determine the second cache duration corresponding to each excluded sensitive word; Based on the first cache duration corresponding to each sensitive word and the second cache duration corresponding to each excluded sensitive word, cache each sensitive word and excluded sensitive word in the preset sensitive word list into the preset storage space.
[0012] By adopting the above technical solution, by identifying the first generation time and the first real-time matching times of each sensitive word in the preset sensitive word list, and the second generation time and the second real-time matching times of each excluded sensitive word, it is convenient to analyze the usage of each sensitive word and excluded sensitive word. By dynamically determining a suitable cache duration for each sensitive word and excluded sensitive word, it is convenient to better adapt to the actual usage requirements of different sensitive words and excluded sensitive words. By caching the sensitive words and excluded sensitive words into the preset storage space and setting a reasonable cache duration, it is convenient to ensure that the preset sensitive word list can be quickly accessed when needed, while reducing unnecessary memory occupancy.
[0013] In a possible implementation manner, the method further includes: When an exclusion sensitive word appears in the real-time input text information, obtaining a text position of the exclusion sensitive word in the real-time input text information; Performing semantic recognition on the real-time input text information based on the text position, and determining a replacement word list based on the semantic recognition result, wherein the replacement word list includes a plurality of replacement words; Feedback prompt information is generated based on the replacement word list to remind relevant input personnel to select any replacement word from the replacement word list to replace the excluded sensitive word.
[0014] By adopting the above technical solution, by excluding the text position and semantic recognition results of sensitive words in the real-time input text information, it is convenient to intelligently provide a list of related replacement words, which helps to guide the relevant input personnel to select compliant vocabulary to replace sensitive words after generating feedback prompt information, thereby ensuring the compliance of the text content, and by reducing the frequency of occurrence of excluded sensitive words from the input source, it is convenient to reduce the number of excluded sensitive words that the recognition system needs to identify and process in the subsequent text processing process, that is, it helps to reduce the processing pressure of the system, thereby facilitating the improvement of overall operating efficiency.
[0015] In a possible implementation, after determining the replacement word list based on the semantic recognition result, the method further includes: Acquire the calling frequency of each substitute word in the substitute word list by the relevant input user within a third preset time period; When the call frequency higher than the preset frequency threshold is not higher than a preset number, adjusting the list position of each substitute word in the substitute word list based on the call frequency of each substitute word to obtain a first updated substitute word list; When the call frequency higher than the preset frequency threshold is higher than a preset number, based on the call frequency of each alternative word, the list position of each alternative word in the alternative word list is adjusted, and the alternative words not higher than the preset frequency threshold are removed to obtain a second updated alternative word list.
[0016] By adopting the above technical solution, by analyzing the calling frequency of each alternative word in the alternative word list by the relevant input user within the third preset time period, it is convenient to understand the preferences and common words of the relevant input user, and adjust the position of the alternative word in the alternative word list based on the usage preferences and common words, so that the alternative words more commonly used by the relevant input user are located at the front of the list, thereby facilitating the improvement of the experience of the relevant input user when using the alternative word list next time. In addition, infrequently used alternative words can be removed from the alternative word list according to U usage preferences. By streamlining the alternative word list, it is more focused on the alternative words that the relevant input user really needs, thereby facilitating the improvement of the effectiveness and practicality of the alternative word list.
[0017] Second aspect, the present application provides an identification system, adopting the following technical solution: An identification system, the identification system includes: At least one processor; A memory; At least one application program, wherein the at least one application program is stored in the memory and is configured to be executed by at least one processor, and the at least one application program is configured to: execute the above-mentioned sensitive word recognition method.
[0018] Third aspect, the present application provides a computer-readable storage medium, adopting the following technical solution: A computer-readable storage medium, including: a computer program that can be loaded and executed by a processor to execute the above-mentioned sensitive word recognition method.
[0019] Fourth aspect, the present application provides a computer program product, adopting the following technical solution: A computer program product, including a computer program, and when the computer program is executed by a processor, it implements the above-mentioned sensitive word recognition method.
[0020] In summary, the present application includes at least one of the following beneficial technical effects: By performing real-time feature recognition on the input text information, it is convenient to deeply analyze the content contained in the real-time input text information. By determining and adding the excluded sensitive words to the preset sensitive word list based on the feature recognition results, the dynamic update of the preset sensitive word list is realized, so that the identification system can continuously learn and adapt to new sensitive words and excluded sensitive words, rather than using a fixed sensitive word library or matching rules for matching. The sensitive word recognition is carried out in a combination of preset sensitive words and excluded sensitive words, which is convenient for reducing the false alarm probability while meeting the changing network environment and user needs, thereby improving the accuracy and efficiency in the sensitive word recognition process.
[0021] By identifying the first generation time and the first real-time matching times of each sensitive word in the preset sensitive word list, as well as the second generation time and the second real-time matching times of each excluded sensitive word, it is convenient to analyze the usage conditions of each sensitive word and excluded sensitive word. By dynamically determining a suitable cache duration for each sensitive word and excluded sensitive word, it is convenient to better adapt to the actual usage requirements of different sensitive words and excluded sensitive words. By caching the sensitive words and excluded sensitive words in a preset storage space and setting a reasonable cache duration, it is convenient to ensure that the preset sensitive word list can be quickly accessed when needed, while reducing unnecessary memory occupation. Description of the Drawings
[0022] Figure 1 is a schematic flowchart of a sensitive word recognition method in an embodiment of the present application; Figure 2 It is a schematic diagram of the caching process of a preset sensitive word list in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of an identification system in an embodiment of the present application. Detailed implementation manners
[0023] The following will further describe the present application in detail with reference to the attached Figures 1 to 3 drawings.
[0024] Those skilled in the art can make modifications to this embodiment without creative contributions according to their needs after reading this specification, but as long as they are within the scope of the claims of the present application, they are protected by the Patent Law.
[0025] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.
[0026] It should be noted that in the optional embodiments of the present application, for relevant data such as object information, when the embodiments in the present application are applied to specific products or technologies, object permission or consent needs to be obtained, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions. That is to say, if the embodiments in the present application involve data related to an object, it needs to be obtained under the condition of object authorization consent, relevant department authorization consent, and compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the consent of the individual needs to be obtained for all personal information. If sensitive information is involved, the separate consent of the information subject needs to be obtained, and the embodiments also need to be implemented under the condition of object authorization consent.
[0027] Specifically, the embodiments of the present application provide a sensitive word recognition method, which is executed by an identification system. The identification system can be a server or a terminal device. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication methods, and the embodiments of the present application do not make limitations here.
[0028] Refer to Figure 1 , Figure 1It is a schematic flow diagram of a sensitive word recognition method in an embodiment of the present application. The method includes steps S110 - S140, where: Step S110: Obtain real-time input text information and identify the text features included in the real-time input text information.
[0029] Specifically, current national-level software systems are required not to input Secret-Associated information. Relevant enterprises or companies have confidentiality offices internally, which are used to regularly check the input information in the system to prevent relevant users from inputting sensitive information into the system and bringing unnecessary troubles to the project and the enterprise. Among them, Secret-Associated information usually refers to those information recognized as confidential, secret or sensitive, and these information need to be protected and managed specially to prevent unauthorized access, leakage or abuse.
[0030] The real-time input text information is the text information input or entered in real time by the input user after logging in to the internal platform or internal system. The recognition system can capture the real-time input of the input user through a preset text input interface. The preset text input interface can be a text box, a chat window or other interface elements that allow users to input text. The specific text input interface is not specifically limited in the embodiment of the present application. The recognition system can capture and process these real-time input text information in a timely manner. In addition, it is also possible to capture the input content of the input user in real time by listening to text input events, such as keyboard key events, text change events, etc. Text input events are usually triggered by the input behavior of the input user and contain information about the input content. The manner of obtaining the real-time input text information is not specifically limited in the embodiment of the present application. Based on a preset feature recognition algorithm, the text features included in the real-time input text information can be identified. Among them, the preset feature recognition algorithm can be word embedding technologies such as Word2Vec, GloVe, etc., or can also be a convolutional neural network or a recurrent neural network and its variants. The specific feature recognition algorithm is not specifically limited in the embodiment of the present application, as long as it can identify the text features included in the real-time input text information.
[0031] Step S120: Determine excluded sensitive words based on the text features and a preset sensitive word list, and update the preset sensitive word list based on the excluded sensitive words.
[0032] Specifically, before updating based on excluded sensitive words, the preset sensitive word list only contains preset sensitive words, which can be determined by relevant staff based on historical experimental data and then uploaded to the recognition system. The text features can be lexical features, syntactic features, semantic features, and context features, etc. Among them, through lexical features, it is convenient to analyze the key points of the real-time input text information based on the number of occurrences of each word in the real-time input text information, and it is also possible to understand the functions and roles of each word in the real-time input text information through the part of speech of the word; through syntactic features, it is convenient to understand the dependency relationships between the words in the real-time input text information, so as to understand the structural relationships between the components in the real-time input text information, and further help to understand the overall semantics of the real-time input text information; through semantic features, it is convenient to understand the emotion expressed by the real-time input text information, for example, positive emotion, negative emotion, or neutral emotion, so as to facilitate the understanding of the real-time input text information; through context features, it is convenient to understand the position of a word or sentence in the real-time input text information and other words or sentences around it, providing additional context information, which helps to more accurately understand the meaning of the word or sentence.
[0033] When determining the excluded sensitive words based on the text features and the preset sensitive word list, the identified text features can be first matched with the preset sensitive word list based on the preset keyword matching algorithm. Among them, the preset keyword matching algorithm can be a simple matching algorithm, a prefix tree matching algorithm, etc. Then, based on the analysis of the matching result and the text features, the context environment of the word in the real-time input text information is determined to judge whether it constitutes sensitive content, including considering the words around the word, the overall semantics of the sentence, and the theme of the text, etc. For example, when the preset sensitive word is "confidential", "diesel engine seal" appears in the text describing machinery or engineering technology and has no direct association or implication with "confidential", then "diesel engine seal" can be determined as an excluded sensitive word. It is also possible to use semantic models such as Word2Vec and BERT to analyze similar words corresponding to the preset sensitive words, and then analyze whether the similar words have similar meanings to the corresponding preset sensitive words in the context information corresponding to the real-time input text information. If not, the similar words corresponding to the preset sensitive words can be determined as the excluded sensitive words of the preset sensitive words. In addition to being able to determine the excluded sensitive words through semantic recognition or analysis, relevant staff can also determine the excluded sensitive words corresponding to the preset sensitive words based on historical experience. The specific method is not specifically limited in the embodiments of the present application. Update the preset sensitive word list based on the excluded sensitive words, that is, add the excluded sensitive words to the preset sensitive word list. The preset sensitive word configuration and the excluded sensitive word configuration can be configured on the recognition system attributes. For example, the key of the preset sensitive word can be: mgc, and the key of the excluded sensitive word can be: exclude.mgc. When the number of preset sensitive words or excluded sensitive words is large, commas can be used for isolation in the middle.
[0034] Step S130: Based on the updated preset sensitive word list and text features, determine whether the real-time input text information contains target sensitive words. The preset sensitive word list includes preset sensitive words and excluded sensitive words.
[0035] Step S140: If so, generate a sensitive detection result based on the target sensitive word.
[0036] Specifically, the sensitive word detection component in the recognition system intercepts all real-time input request text information and performs sensitive word detection on the text in the real-time input request text information. If the real-time input request text information contains a preset sensitive word, the sensitive word check component intercepts the input request of the input user and responds with the detected preset sensitive word result. For example, when the preset sensitive word is "confidential", the generated sensitive detection result can be "Operation failed. Please replace the sensitive word in the text information. The sensitive word is: confidential". Since the excluded sensitive words are set, even if the text information contains "diesel engine seal", the recognition system will not determine "diesel engine seal" as a sensitive word.
[0037] For the embodiments of the present application, by performing real-time feature recognition on the input text information, it is convenient to deeply analyze the content contained in the real-time input text information. By determining the excluded sensitive words based on the feature recognition result and adding the excluded sensitive words to the preset sensitive word list, the dynamic update of the preset sensitive word list is realized, so that the recognition system can continuously learn and adapt to new sensitive words and excluded sensitive words, rather than using a fixed sensitive word library or matching rules for matching. The method of combining preset sensitive words and excluded sensitive words is used for sensitive word recognition, which is convenient for reducing the false alarm probability while meeting the changing network environment and user requirements, thereby improving the accuracy and efficiency in the sensitive word recognition process.
[0038] Further, in order to facilitate reducing the detection loopholes caused by the lag of the preset sensitive word list, after updating the preset sensitive word list based on the excluded sensitive words, the method provided by the embodiments of the present application further includes: Perform semantic analysis on the real-time input text information to determine the text summary, and determine the derivative sensitive words corresponding to the text summary based on the text summary and the preset sensitive word mapping relationship; obtain the matching records of the preset sensitive word list within the first preset time period, and determine the hot sensitive words based on the matching records; obtain the derivative word vectors corresponding to the derivative sensitive words and the hot word vectors corresponding to the hot sensitive words, and determine the sensitive words to be supplemented based on the derivative word vectors and the hot word vectors; update the preset sensitive word list based on the sensitive words to be supplemented.
[0039] Specifically, the real-time input text information can be preprocessed first, removing irrelevant characters, punctuation marks, etc. contained in the real-time input text information, performing word segmentation on the real-time input text information, splitting it into independent words or phrases, and then using natural language processing technology to deeply understand the words or phrases after word segmentation, extracting the core information and theme of the real-time input text information. Different from the text features determined in the above embodiments, the text summary is mainly used to summarize the main content of the real-time input text information. The preset sensitive word mapping relationship contains derivative sensitive words corresponding to different text summaries. The specific content is not specifically limited in the embodiments of the present application and can be determined by relevant staff based on historical experimental data and then uploaded to the recognition system. The derivative sensitive words are different from the preset sensitive words proposed in the above embodiments. The preset sensitive words are sensitive words determined by relevant staff based on historical experimental data and are applicable to all theme scenarios, while the derivative sensitive words are only applicable to the current real-time input text information. For example, the derivative sensitive words corresponding to the real-time input text information in the financial theme may be related to economy, finance, etc. and are not applicable to the real-time input text information in the breeding theme. Since the real-time input text information is changing, the corresponding derivative sensitive words are also dynamically changing.
[0040] After determining the derivative sensitive words, the matching records of the preset sensitive word list in the first preset time period can be obtained and analyzed first. The first preset time period is a period of time after updating the preset sensitive word list based on the excluded sensitive words. The duration corresponding to the first preset time period can be 3 minutes or 5 minutes. The specific duration is not specifically limited in the embodiments of the present application. The matching records contain the moments and frequencies of successful matching of each preset sensitive word in the first preset time period. Based on the matching records, the hot sensitive words corresponding to the first preset time period can be determined. The hot sensitive words are successfully matched more times than the preset number threshold and have a higher matching frequency than the preset frequency threshold in the first preset time period. The number of hot sensitive words, the preset number threshold, and the preset frequency threshold are not specifically limited in the embodiments of the present application and can be determined by relevant staff based on historical experimental data and then uploaded to the recognition system.
[0041] After determining the hot-spot sensitive words, first, based on pre-trained models such as the preset Word2Vec, GloVe, and BERT, obtain the derivative word vectors corresponding to the derivative sensitive words and the hot-spot word vectors corresponding to the hot-spot sensitive words. Then, use measurement methods such as cosine similarity to calculate the candidate words that are similar to the derivative word vectors and the hot-spot word vectors. Determine the candidate words with a similarity higher than the preset similarity threshold and the derivative sensitive words as the sensitive words to be supplemented. The preset similarity threshold and the number of sensitive words to be supplemented are not specifically limited in the embodiments of the present application and can be determined by relevant staff based on historical experimental data and then uploaded to the recognition system. Add the sensitive words to be supplemented to the preset sensitive word list to implement the update operation of the preset sensitive word list. Updating the preset sensitive word list based on the sensitive words to be supplemented facilitates timely response to newly emerging sensitive topics or problems.
[0042] Further, in order to facilitate improving the response and processing capabilities of the recognition system for newly emerging sensitive data, the method provided in the embodiments of the present application further includes: Obtain the trigger behavior records of the input user within the second preset time period, and based on the trigger behavior records and the preset operation diagram, determine whether the input user has regular behaviors; if so, determine the target behavior path of the input user based on the regular behaviors of the input user within the second preset time period; obtain the node data corresponding to each path node in the target behavior path, and identify the encrypted data features corresponding to each node data; update the preset sensitive word list based on the encrypted data features.
[0043] Specifically, the second preset time period is a period of time after the input user is detected to log in to or access the recognition system. The duration corresponding to the second preset time period can be 30 seconds or 60 seconds. The specific duration is not specifically limited in the embodiments of the present application. The trigger behavior record of the input user in the second preset time period can be monitored by a monitoring tool provided in the recognition system and recorded in the memory of the recognition system or written into a log file, and can be directly retrieved when needed. The preset operation diagram contains multiple start nodes, operation nodes, decision nodes, and end nodes, as well as the connection lines between each node. The trigger behavior record of the input user in the second preset time period is matched with the preset operation diagram. When the trigger behavior record follows the operation sequence of a certain node route in the preset operation diagram, it can be determined that the input user has regular behavior. At this time, the node route followed by the trigger behavior record can be predicted as the target behavior path that the input user may need to complete. There can be one or multiple target behavior paths. For example, based on the trigger behavior record in the second preset time period, it is determined that the trigger nodes of the input user are node a, node b, and node c. Among them, path X is composed of node a, node b, node c, node d, and node e, and path Y is composed of node a, node b, node c, node f, and node g. At this time, both path X and path Y can be predicted as the target behavior paths of the input user.
[0044] After predicting the target behavior path that the input user may need to access, the node data corresponding to each path node in the target behavior path can be feature-recognized. After determining the encrypted data feature corresponding to each node data, based on the method for determining the derivative sensitive word in the above embodiment, the encrypted sensitive word corresponding to the encrypted data feature is determined, which will not be elaborated here. The encrypted sensitive word is added to the preset sensitive word list to implement the update operation of the preset sensitive word list.
[0045] By analyzing the trigger behavior record of the input user in the second preset time period, it is convenient to identify the regular operation habits of the input user, so as to facilitate the prediction of the access or operation behavior path of the input user in the next period of time. Based on the prediction result, the nodes that the input user may access are determined. By analyzing the node data corresponding to the possible access nodes and setting relevant encrypted data features in time according to the analysis result, the preset sensitive word list is updated, so as to facilitate improving the response and processing capabilities of the recognition system for newly emerging sensitive data.
[0046] Furthermore, in order to ensure that the preset sensitive word list can be quickly accessed when needed, the method provided in the embodiments of the present application may further include steps S210 - S240, as Figure 2 shown, where: Step S210: Identify the first generation time and the first real-time matching count of each sensitive word in the preset sensitive word list, and identify the second generation time and the second real-time matching count of each excluded sensitive word in the preset sensitive word list.
[0047] Specifically, since the preset sensitive word list is updated when the real-time input text information changes, the first generation times corresponding to different sensitive words in the preset sensitive word list are different. The first generation time corresponding to each sensitive word is determined according to the time when each sensitive word is written into the preset sensitive word list. Based on the same method, the second generation time of each excluded sensitive word is determined according to the updated preset sensitive word list in real time. After the first generation time when the sensitive word is written into the preset sensitive word list, the number of times the sensitive word is successfully matched is the first real-time matching count corresponding to the sensitive word. The more the first real-time matching count is, the more times the corresponding sensitive word appears in the real-time input text information. Based on the same method as above, the second real-time matching count of each excluded sensitive word can be determined.
[0048] Step S220: Based on the first preset cache duration mapping relationship, and the first generation time and the first real-time matching count of each sensitive word in the preset sensitive word list, determine the first cache duration corresponding to each sensitive word.
[0049] Specifically, the first generation duration of each sensitive word can be determined based on the first generation time and the current time. The first cache durations corresponding to different first generation durations and first real-time matching counts are different. The first preset cache duration mapping relationship includes the first cache durations corresponding to parameter combinations of different first generation durations and first real-time matching counts. The specific content is not specifically limited in the embodiments of the present application and can be determined by relevant staff according to historical experimental data and then uploaded to the recognition system. Based on the above method, the first cache duration corresponding to each sensitive word can be determined.
[0050] Step S230: Based on the second preset cache duration mapping relationship, and the second generation time and the second real-time matching count of each excluded sensitive word in the preset sensitive word list, determine the second cache duration corresponding to each excluded sensitive word.
[0051] Specifically, the method for determining the second cache duration corresponding to each excluded sensitive word can refer to the method for determining the first cache duration corresponding to each sensitive word in the above embodiments and will not be elaborated here. The second preset cache duration mapping relationship includes the second cache durations corresponding to parameter combinations of different second generation durations and second real-time matching counts. The specific content is not specifically limited in the embodiments of the present application and can be determined by relevant staff according to historical experimental data and then uploaded to the recognition system.
[0052] Step S240: Based on the first caching duration corresponding to each sensitive word and the second caching duration corresponding to each excluded sensitive word, cache each sensitive word and excluded sensitive word in the preset sensitive word list into the preset storage space.
[0053] Specifically, based on the first caching duration corresponding to each sensitive word, limit the storage duration of each sensitive word in the preset storage space. At the same time, based on the second caching duration corresponding to each excluded sensitive word, limit the storage duration of each excluded sensitive word in the preset storage space. Among them, the preset storage space can be the JVM memory, so that the recognition system can quickly access the preset sensitive word list when performing sensitive word recognition. Compared with reading the preset sensitive word list from a disk file or a database, the access speed of the JVM memory is much faster. Storing the preset sensitive word list in the JVM memory helps to improve the response speed and overall performance of the program.
[0054] Furthermore, in order to facilitate reducing the number of excluded sensitive words that need to be recognized and processed by the recognition system in the subsequent text processing, the method provided in the embodiment of the present application further includes: When an excluded sensitive word appears in the real-time input text information, obtain the text position of the excluded sensitive word in the real-time input text information; perform semantic recognition on the real-time input text information based on the text position, and determine a list of substitute words based on the semantic recognition result. The list of substitute words contains multiple substitute words; generate a feedback prompt message based on the list of substitute words to remind the relevant input personnel to select any one of the substitute words from the list of substitute words to replace the excluded sensitive word.
[0055] Specifically, if a word or phrase in the real-time input text information is successfully matched with any excluded sensitive word, it can be determined that an excluded sensitive word appears in the real-time input text information. At this time, the text position of the corresponding excluded sensitive word in the real-time input text information can be located. After determining the text position, based on the preset natural language processing technology and the text position, in-depth semantic analysis can be performed on the real-time input text information to understand the meaning of the real-time input text information and the connection between the text position context, and a list of substitute words corresponding to the excluded sensitive word can be determined. The list of substitute words contains multiple substitute words. When determining the substitute words, substitute candidate words with a similar relationship to the excluded word vector can be determined based on the excluded word vector corresponding to the excluded sensitive word and the semantic recognition result, and then the substitute candidate words can be screened based on the sensitive words contained in the excluded sensitive word to obtain substitute words that do not contain sensitive words. For example, when the sensitive word is "confidential", the corresponding excluded sensitive word can be "diesel engine seal". Among them, the sensitive word "confidential" is included in "diesel engine seal". After lexical matching based on the preset sensitive word list, "diesel engine seal" will not be processed as a sensitive word. After detecting the excluded sensitive word "diesel engine seal", substitute candidate words with a similar relationship to the excluded word vector can be determined based on the excluded word vector corresponding to "diesel engine seal" and the semantic recognition result. The substitute candidate words can be "diesel engine seal storage", "diesel engine leak prevention", "diesel engine closure", "diesel engine airtightness", "diesel engine liquid tightness". After removing the substitute candidate word "diesel engine seal storage" that includes the sensitive word "confidential", "diesel engine leak prevention", "diesel engine closure", "diesel engine airtightness", and "diesel engine liquid tightness" can be used as substitute words.
[0056] If it is detected again that the relevant inputter needs to input "diesel engine seal", the list of substitute words can be directly fed back to remind the relevant input personnel to select any substitute word from the list of substitute words to replace the excluded sensitive word, so as to reduce the occurrence frequency of the excluded sensitive word from the input source, thereby facilitating the reduction of the number of excluded sensitive words that the recognition system needs to identify and process in the subsequent text processing process, that is, it helps to reduce the processing pressure of the system, thereby facilitating the improvement of the overall operation efficiency.
[0057] Furthermore, after determining the list of substitute words based on the semantic recognition result, the method provided by the embodiment of the present application further includes: Obtain the call frequency of each substitute word in the substitute word list by the relevant input user within the third preset time period; when the number of call frequencies higher than the preset frequency threshold is not higher than the preset quantity, based on the call frequency of each substitute word, adjust the list position of each substitute word in the substitute word list to obtain the first updated substitute word list; when the number of call frequencies higher than the preset frequency threshold is higher than the preset quantity, based on the call frequency of each substitute word, adjust the list position of each substitute word in the substitute word list, and remove the substitute words not higher than the preset frequency threshold to obtain the second updated substitute word list.
[0058] Specifically, based on the trigger records of the relevant input user for the substitute word list, the call frequency of each substitute word in the substitute word list by the relevant input user within the third preset time period can be determined. The third preset time period is a period of time after the substitute word list is generated. The duration corresponding to the third preset time period can be 3 minutes or 5 minutes. The specific duration is not specifically limited in the embodiments of the present application. The substitute words with call frequencies higher than the preset frequency threshold are determined as the concerned substitute words.
[0059] When the number of concerned substitute words is not higher than the preset quantity, each substitute word can be sorted based on the call frequency of each substitute word in the substitute word list to obtain a substitute word queue sorted from high to low in call frequency. Based on the substitute word queue, the list position of each substitute word in the substitute word list is determined to obtain the first updated substitute word list. When the number of concerned substitute words is higher than the preset quantity, first, based on the content disclosed in the above embodiments, the position of each substitute word in the substitute word list is adjusted, and then the substitute words not higher than the preset frequency threshold are removed to obtain the second updated substitute word list, that is, the second updated substitute word list only contains the concerned substitute words. Among them, the specific preset frequency threshold and preset quantity are not specifically limited in the embodiments of the present application and can be determined by relevant staff according to historical experimental data.
[0060] For the embodiments of the present application, by analyzing the call frequency of each substitute word in the substitute word list by the relevant input user within the third preset time period, it is convenient to understand the preferences and commonly used words of the relevant input user. Based on the usage preferences and commonly used words, the position of the substitute word in the substitute word list is adjusted, so that the more commonly used substitute words by the relevant input user are located at the front end of the list, thereby facilitating the improvement of the experience of the relevant input user when using the substitute word list next time. In addition, the less commonly used substitute words can be removed from the substitute word list according to the usage preferences, and by streamlining the substitute word list, it can be more focused on the substitute words that the relevant input user really needs, which is convenient for improving the effectiveness and practicality of the substitute word list.
[0061] An identification system is provided in the embodiments of the present application, as Figure 3 shown Figure 3The recognition system 300 shown includes: a processor 301 and a memory 303. Among them, the processor 301 and the memory 303 are connected, such as connected through a bus 302. Optionally, the recognition system 300 may further include a transceiver 304. It should be noted that in practical applications, the transceiver 304 is not limited to one, and the structure of the recognition system 300 does not constitute a limitation to the embodiments of the present application.
[0062] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 301 may also be a combination that implements computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0063] The bus 302 may include a path for transmitting information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 only one line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0064] The memory 303 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0065] The memory 303 is used to store the application program code for executing the solution of this application, and is controlled by the processor 301 for execution. The processor 301 is used to execute the application program code stored in the memory 303 to implement the content shown in the foregoing method embodiments.
[0066] Among them, the recognition system includes but is not limited to: mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 3 The shown recognition system is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0067] The embodiments of this application provide a computer-readable storage medium, on which a computer program is stored. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments.
[0068] The embodiments of this application provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method in any of the above embodiments.
[0069] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially according to the indication of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this document, there is no strict order restriction for the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0070] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A sensitive word identification method, characterized in that: include: Acquire real-time input text information, and identify text features contained in the real-time input text information; Determine exclusion sensitive words based on the text features and the preset sensitive word list, and update the preset sensitive word list based on the exclusion sensitive words; Based on the updated preset sensitive word list and the text features, determining whether the real-time input text information contains a target sensitive word, the preset sensitive word list containing preset sensitive words and excluded sensitive words; If so, a sensitivity detection result is generated based on the target sensitive word.
2. A sensitive word identification method according to claim 1, characterized in that: After the preset sensitive word list is updated based on the excluded sensitive words, the method further includes: Performing semantic analysis on the real-time input text information to determine a text summary, and determining a derived sensitive word corresponding to the text summary based on a mapping relationship between the text summary and preset sensitive words; Obtain matching records of the preset sensitive word list within a first preset time period, and determine hot sensitive words based on the matching records; Obtaining a derived word vector corresponding to the derived sensitive word and a hot word vector corresponding to the hot sensitive word, and determining a sensitive word to be supplemented based on the derived word vector and the hot word vector; The preset sensitive word list is updated based on the sensitive words to be supplemented.
3. A sensitive word identification method according to claim 1, characterized in that: Also includes: Acquire the triggering behavior record of the input user within the second preset time period, and determine whether the input user has regular behavior based on the triggering behavior record and the preset operation map; If yes, determining the target behavior path of the recorded user based on the regular behavior of the recorded user within the second preset time period; Obtaining node data corresponding to each path node in the target behavior path, and identifying encrypted data features corresponding to each node data; The preset sensitive word list is updated based on the encrypted data characteristics.
4. A sensitive word identification method according to claim 2, characterized in that: Also includes: Identify a first generation time and a first real-time matching number for each sensitive word in the preset sensitive word list, and identify a second generation time and a second real-time matching number for each excluded sensitive word in the preset sensitive word list; Determine a first cache duration corresponding to each sensitive word based on a first preset cache duration mapping relationship and a first generation time and a first real-time matching number of each sensitive word in the preset sensitive word list; Determine the second cache duration of each excluded sensitive word based on the second preset cache duration mapping relationship, the second generation time and the second real-time matching number of each excluded sensitive word in the preset sensitive word list; Based on a first cache duration corresponding to each sensitive word and a second cache duration corresponding to each excluded sensitive word, each sensitive word and excluded sensitive word in the preset sensitive word list is cached to a preset storage space.
5. A sensitive word identification method according to claim 1, characterized in that: Also includes: When an exclusion sensitive word appears in the real-time input text information, obtaining a text position of the exclusion sensitive word in the real-time input text information; Performing semantic recognition on the real-time input text information based on the text position, and determining a replacement word list based on the semantic recognition result, wherein the replacement word list includes a plurality of replacement words; Feedback prompt information is generated based on the replacement word list to remind relevant input personnel to select any replacement word from the replacement word list to replace the excluded sensitive word.
6. A sensitive word identification method according to claim 5, characterized in that: After determining the list of alternative words based on the semantic recognition result, the method further includes: Acquire the calling frequency of each substitute word in the substitute word list by the relevant input user within a third preset time period; When the call frequency higher than the preset frequency threshold is not higher than a preset number, adjusting the list position of each substitute word in the substitute word list based on the call frequency of each substitute word to obtain a first updated substitute word list; When the call frequency higher than the preset frequency threshold is higher than a preset number, based on the call frequency of each alternative word, the list position of each alternative word in the alternative word list is adjusted, and the alternative words not higher than the preset frequency threshold are removed to obtain a second updated alternative word list.
7. A recognition system, characterized in that: The identification system includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute a sensitive word recognition method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that: include: A computer program is stored which can be loaded by a processor and execute a sensitive word identification method as described in any one of claims 1 to 6.
9. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the steps of a sensitive word identification method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Sensitive word detection method and device, electronic equipment and readable storage medium
CN114860897A
Sensitive word detection method and device, computer equipment and storage medium
CN116127001A
Method and system for identifying variant words in text and extracting sensitive words
CN117725161A
Sensitive word recognition and replacement method and device
CN118013963A
Sensitive word recognition method and apparatus based on artificial intelligence, and computer device
WO2021151333A1