News manuscript sensitive word identification method and system, electronic equipment and storage medium

By constructing a sensitive word knowledge graph and using deep learning technology, multi-level sensitive word recognition and semantic analysis of news releases has been solved, and a more accurate and comprehensive sensitive word recognition has been achieved.

CN119622364AInactive Publication Date: 2025-03-14MINGTAI (BEIJING) TECH CO LTD

Patent Information

Application Number
CN202510153033.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art lacks the modeling and utilization of potential associations between sensitive words in the recognition of sensitive words in the news release, resulting in insufficient comprehensive and accurate identification results.

Method used

By obtaining Internet vocabulary data, a knowledge graph is constructed based on this set, and a knowledge graph is constructed using a knowledge representation learning algorithm for training to obtain a sensitive word knowledge graph. Preprocessing and feature extraction of the recognition news releases were carried out, and deep neural networks with multi-level sensitive word recognition strategies and attention mechanisms were integrated. The preliminary recognition results are mapped to the knowledge graph and used graph neural network for semantic representation learning, knowledge-enhanced recognition results are obtained through associated node inference, and the semantic similarity and emotional scores of sensitive words and context are calculated for comprehensive evaluation.

Benefits of technology

It significantly improves the accuracy and comprehensiveness of sensitive words recognition in the news release, not only can it accurately identify explicit sensitive words, but also can discover potential sensitive expressions through knowledge reasoning, taking into account the impact of context.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622364A_ABST
    Figure CN119622364A_ABST
Patent Text Reader

Abstract

The invention provides a news manuscript sensitive word recognition method and system, electronic equipment and a storage medium, and relates to the field of sensitive word recognition. The method comprises the steps that internet vocabulary data is acquired and analyzed to obtain an initial sensitive word set, a sensitive word knowledge graph is obtained through knowledge graph construction and knowledge representation learning algorithm training, and a preliminary sensitive word recognition result is obtained through deep neural network integration of multi-level sensitive word recognition and an attention mechanism. And mapping the recognition result to a sensitive word knowledge graph, and performing semantic representation learning by using a graph neural network to obtain a semantic representation result. And performing association node reasoning based on the semantic representation result to obtain a knowledge enhanced recognition result. And finally, calculating the semantic similarity between the sensitive word and the context to obtain a similarity score, performing emotional tendency analysis to obtain an emotional score, and performing comprehensive evaluation in combination with a preset threshold to obtain a final sensitive word recognition result. Through the scheme, the comprehensiveness and accuracy of news manuscript sensitive word recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sensitive word recognition, and in particular to a method, system, electronic device and storage medium for identifying sensitive words in news articles. Background Art

[0002] With the rapid development of Internet information dissemination, the identification of sensitive words in news releases has received more and more attention. The existing technology mainly uses methods based on dictionary matching and machine learning to identify sensitive words. Among them, the dictionary matching method achieves identification by building a sensitive word library and matching the text to be identified with the sensitive words in the word library. The machine learning method extracts text features and trains a classification model to determine whether the text contains sensitive words. These methods have achieved certain results in practical applications, but due to the lack of modeling and utilization of the potential correlation between sensitive words, the recognition results are often not comprehensive and accurate. Summary of the invention

[0003] The present application provides a method, system, electronic device and storage medium for identifying sensitive words in news articles, so as to improve the comprehensiveness and accuracy of identifying sensitive words in news articles.

[0004] In a first aspect, the present application provides a method for identifying sensitive words in news articles, comprising: Acquire Internet vocabulary data, and analyze the Internet vocabulary data to obtain an initial sensitive word set; Based on the initial set of sensitive words, a knowledge graph is constructed to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and the initial knowledge graph is trained using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; Acquire a news article to be identified, and pre-process the news article to be identified to obtain a basic processed text; Performing part-of-speech tagging and syntactic analysis on the basic processed text to obtain structured text, and performing feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features and semantic features; Performing multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrating the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; Mapping the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and using a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result; Based on the semantic representation result, associated node reasoning is performed in the sensitive word knowledge graph to obtain a knowledge-enhanced recognition result; Calculating the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and performing sentiment analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; A comprehensive evaluation is performed based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

[0005] In the above technical scheme, an initial sensitive word set is constructed by acquiring Internet vocabulary data, and a knowledge graph containing node types and relationship types is constructed based on the set. The knowledge graph of sensitive words is obtained by training using a knowledge representation learning algorithm, which provides a knowledge basis for subsequent sensitive word recognition. After preprocessing the news article to be recognized, structured text is obtained through part-of-speech tagging and syntactic analysis, and word features, phrase features and semantic features are extracted to achieve multi-dimensional feature representation. A multi-level sensitive word recognition strategy is used to process the structured text feature data, and a deep neural network with an attention mechanism is used for integration, thereby improving the comprehensiveness of recognition. The preliminary sensitive word recognition results are mapped to the sensitive word knowledge graph and semantic representation learning is performed using a graph neural network. The knowledge-enhanced recognition results are obtained through associated node reasoning, making full use of the semantic association information in the knowledge graph. Finally, by calculating the semantic similarity score and sentiment score between the sensitive word and the context, a comprehensive evaluation is performed in combination with a preset threshold, which not only considers the semantic relevance of the sensitive word, but also takes into account the sentiment tendency of the context, thereby obtaining an accurate final sensitive word recognition result. This method, based on a combination of knowledge graphs and deep learning, can not only accurately identify explicit sensitive words, but also discover potential sensitive expressions through knowledge reasoning, while taking into account the influence of context, significantly improving the accuracy and comprehensiveness of sensitive word identification.

[0006] In a second aspect of the present application, a news article sensitive word identification system is provided, the system comprising: A first data acquisition module, used to acquire Internet vocabulary data and analyze the Internet vocabulary data to obtain an initial sensitive word set; A knowledge graph construction module is used to construct a knowledge graph based on the initial sensitive word set to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and train the initial knowledge graph using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; The second data acquisition module is used to acquire news articles to be identified and pre-process the news articles to be identified to obtain basic processed texts; A feature extraction module, used to perform part-of-speech tagging and syntactic analysis on the basic processed text to obtain structured text, and perform feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features and semantic features; A preliminary recognition module, used to perform multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrate the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; A mapping module, used to map the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and use a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result; An enhancement module, used to perform associated node reasoning in the sensitive word knowledge graph based on the semantic representation result to obtain a knowledge-enhanced recognition result; A scoring module, used to calculate the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and to perform sentiment tendency analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; The target recognition module is used to perform a comprehensive evaluation based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

[0007] In a third aspect of the present application, a computer storage medium is provided, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.

[0008] In the fourth aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the above method.

[0009] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. This application constructs an initial set of sensitive words by acquiring Internet vocabulary data, and constructs a knowledge graph containing node types and relationship types based on the set, and uses the knowledge representation learning algorithm to train to obtain a knowledge graph of sensitive words, which provides a knowledge basis for subsequent sensitive word recognition. After preprocessing the news release to be recognized, structured text is obtained through part-of-speech tagging and syntactic analysis, and word features, phrase features and semantic features are extracted to achieve multi-dimensional feature representation. A multi-level sensitive word recognition strategy is used to process structured text feature data, and a deep neural network with an attention mechanism is used for integration, which improves the comprehensiveness of recognition.

[0010] 2. This application maps the preliminary sensitive word recognition results to the sensitive word knowledge graph and uses graph neural networks for semantic representation learning. It obtains knowledge-enhanced recognition results through associative node reasoning, making full use of the semantic association information in the knowledge graph. Finally, by calculating the semantic similarity score and sentiment score between the sensitive words and the context, combined with the preset threshold for comprehensive evaluation, it takes into account both the semantic relevance of the sensitive words and the sentiment tendency of the context, thereby obtaining accurate final sensitive word recognition results. This method based on the combination of knowledge graph and deep learning can not only accurately identify explicit sensitive words, but also discover potential sensitive expressions through knowledge reasoning, while taking into account the influence of the context, significantly improving the accuracy and comprehensiveness of sensitive word recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A flowchart of a method for identifying sensitive words in news articles provided in an embodiment of the present application; Figure 2 An architectural diagram of a news article sensitive word identification system provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0012] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0013] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.

[0014] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0015] In order to facilitate understanding of the method and system provided by the embodiments of the present application, before introducing the embodiments of the present application, the background of the embodiments of the present application is first introduced.

[0016] With the rapid development of Internet technology and the increasing spread of information, the identification of sensitive words in news releases has become an important research topic in content security management. At present, the identification of sensitive words mainly adopts two technical routes: one is a method based on dictionary matching, which realizes identification by establishing a preset sensitive word library and matching the text to be identified with the sensitive words in the word library; the other is a method based on machine learning, which determines whether the text contains sensitive content by extracting features and training models on the text and establishing a classifier. Although these traditional methods show certain recognition effects in specific scenarios, due to the lack of in-depth modeling and effective use of the potential semantic association between sensitive words, the recognition results often cannot accurately capture sensitive content with similar semantics but different expressions, resulting in the difficulty in ensuring the comprehensiveness and accuracy of recognition. After the background introduction of the above content, those skilled in the art can understand the problems existing in the prior art. The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them.

[0017] Based on the above background technology, please refer to Figure 1 , Figure 1 A flowchart of a method for identifying sensitive words in news articles provided in an embodiment of the present application. The system can be implemented by a computer program or can be run as an independent tool application. Specifically, in an embodiment of the present application, the method can be applied on a server, but can also be applied on electronic devices such as servers. A method for identifying sensitive words in news articles includes the following steps: S101, obtaining Internet vocabulary data, and analyzing the Internet vocabulary data to obtain an initial sensitive word set; Specifically, when the present application is implemented, Internet vocabulary data is obtained through a web crawler program, specifically including collecting text content posted by users from multiple network platforms such as social media, news websites, and forums. When analyzing the acquired Internet vocabulary data, text preprocessing technology is used to clean the data, including removing special characters, word segmentation, and removing stop words. Then, word frequency statistics and text clustering methods are used to analyze the processed vocabulary to extract high-frequency vocabulary with sensitive attributes. By setting word frequency thresholds and sensitivity scoring criteria, words that meet the conditions are screened out to form an initial set of sensitive words. This analysis method based on Internet vocabulary data enables the system to automatically discover and collect sensitive words, which greatly improves efficiency compared to traditional manual construction methods, and due to the extensiveness and real-time nature of the data source, the initial set of sensitive words obtained has high coverage and timeliness.

[0018] S102, constructing a knowledge graph based on the initial set of sensitive words to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and training the initial knowledge graph using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; Specifically, the present application constructs an initial knowledge graph based on the acquired initial sensitive word set. The knowledge graph represents different categories of sensitive words through node types, and describes the semantic associations between sensitive words through the relationship types between nodes. During the construction process, each sensitive word is used as a node in the graph, and the corresponding node type is assigned to it according to the semantic characteristics of the sensitive word. At the same time, the semantic associations such as the upper and lower relationships and synonymous relationships between sensitive words are analyzed, and these associations are represented as the relationship types between nodes. Then, the constructed initial knowledge graph is trained using a knowledge representation learning algorithm. The algorithm learns the distributed representation of nodes and relationships by mapping the nodes and relationships in the graph to a low-dimensional vector space, and finally obtains a sensitive word knowledge graph with rich semantic information. This method based on the knowledge graph can not only clearly show the complex association relationships between sensitive words, but also convert these relationships into computable vector forms through the knowledge representation learning algorithm, thereby providing more accurate semantic feature support for subsequent sensitive word recognition, and effectively improving the accuracy and comprehensiveness of recognition.

[0019] Based on the above embodiment, as an optional embodiment, the knowledge graph is constructed based on the initial sensitive word set to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and the initial knowledge graph is trained using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph, including: S201, constructing the words in the initial sensitive word set as entity nodes of the knowledge graph; Specifically, each sensitive word in the initial sensitive word set is used as the basic building unit of the knowledge graph, and each word is converted into an entity node in the knowledge graph through the entity extraction method. During the construction process, the sensitive words are first preprocessed, including word segmentation, deduplication and standardization, and then a unique identifier is created for each sensitive word and used as an entity node in the knowledge graph. The entity node contains the basic attribute information of the sensitive word, such as the word itself, part of speech, frequency of use and other features. This method of converting sensitive words into graph entity nodes provides a basis for the subsequent establishment of relationships between nodes, so that the semantic information of sensitive words can be effectively represented in the graph structure, and it also facilitates subsequent knowledge expansion and relationship reasoning. By constructing words as entity nodes, a structured representation of sensitive words is established, laying the foundation for building a complete knowledge graph.

[0020] S202, defining attributes for the entity nodes, the attributes including sensitivity, timeliness and usage frequency, and constructing relationship edges between the entity nodes for the entity nodes, the relationship edges including synonymy, antonym, hyponymy and hyponymy, and combination relationships; Specifically, key attributes are first defined for entity nodes, including sensitivity that reflects the degree of harm of sensitive words, timeliness that indicates the validity period of sensitive words, and statistical data that reflects the frequency of use. When constructing relationship edges, semantic analysis technology is used to identify the semantic associations between entity nodes, and four basic relationships are established: synonymous relationships that indicate similar meanings, antonymic relationships that indicate opposite meanings, upper and lower relationships that indicate conceptual hierarchies, and combination relationships that indicate word combinations. These relationship edges connect related entity nodes in the knowledge graph in the form of directed edges to form a complete network structure. By defining node attributes and constructing relationship edges, not only the basic characteristics of sensitive words are described, but also the semantic associations between sensitive words are portrayed, so that the knowledge graph can fully express the attribute information and relationship information of sensitive words. This structured knowledge representation method provides rich semantic information and relationship basis for subsequent knowledge reasoning and sensitive word identification, and improves the accuracy and completeness of sensitive word identification.

[0021] S203, calculating the association strength between the entity nodes to obtain weighted relationship edges, and organizing the entity nodes and the weighted relationship edges into a network structure to obtain the initial knowledge graph; Specifically, the association strength between entity nodes is calculated through the semantic similarity algorithm, and the calculated association strength value is used as the weight of the relationship edge to form a weighted relationship edge. During the calculation process, factors such as the semantic similarity, co-occurrence frequency and relationship type between nodes are considered to comprehensively generate weight values ​​reflecting the degree of association between nodes. Subsequently, the entity nodes and weighted relationship edges are organized according to the graph structure, and the connection relationship and weight information between nodes are stored through the adjacency matrix to construct a complete network structure to form an initial knowledge graph. This weighted network structure not only reflects the association relationship between sensitive words, but also quantitatively describes the strength of the association through weights, so that the knowledge graph has a more fine-grained semantic expression capability. By organizing entity nodes and weighted relationship edges into a network structure, a structured knowledge system with quantitative relationship description is established, which provides more accurate relationship information for subsequent graph training and knowledge reasoning.

[0022] S204, mapping the entity nodes in the initial knowledge graph into vector representations of fixed dimensions; Specifically, a knowledge representation learning algorithm is used to vectorize the entity nodes in the initial knowledge graph, converting discrete entity nodes into a continuous vector space. Specifically, through knowledge representation learning models such as TransE and TransH, each entity node is mapped to a vector representation of a fixed dimension, which contains the semantic features and relationship information of the entity node. During the mapping process, a unique vector is generated for each entity node based on the attribute characteristics and relationship structure of the node, so that in the vector space, entity nodes with similar semantics have similar vector representations, while entity nodes with large semantic differences have a larger vector distance. By mapping entity nodes to vector representations of fixed dimensions, the conversion of the knowledge graph from symbolic space to vector space is realized, allowing computers to directly process and calculate the semantic relationships between entity nodes, providing a mathematical basis for subsequent similarity calculations and relationship reasoning.

[0023] S205, sampling the node sequence of the initial knowledge graph based on a random walk strategy to generate a node walk path, and training the node walk path using a Skip-gram model to obtain an updated vector representation, and calculating the cosine similarity between entity nodes based on the updated vector representation to obtain the semantic similarity between entity nodes; Specifically, a random walk strategy is first used to traverse nodes on the initial knowledge graph. Starting from each entity node, the next visited node is randomly selected according to the weight probability of the relationship edge to generate multiple node walk paths. These paths reflect the structural relationship and semantic connection pattern between nodes in the graph. Then, the Skip-gram model is used to train the node walk path. The model learns the distributed representation of nodes by predicting the node context and generates an updated vector representation. After obtaining the updated vector representation, the cosine similarity between entity nodes is calculated, and the semantic similarity between nodes is measured by the cosine value of the vector angle. This training method based on random walk and Skip-gram models makes full use of the structural and semantic information of the graph, so that the updated vector representation can more accurately characterize the semantic relationship between nodes. Through the calculation of cosine similarity, the distance in the vector space is converted into an intuitive similarity value, which provides a reliable similarity measurement standard for subsequent sensitive word recognition and relationship reasoning.

[0024] S206, updating the relationship edge weights in the initial knowledge graph according to the semantic similarity to obtain updated relationship edge weights, and optimizing and reorganizing the network structure of the initial knowledge graph based on the updated relationship edge weights to obtain the sensitive word knowledge graph.

[0025] Specifically, based on the calculated semantic similarity, the weights of the relationship edges in the initial knowledge graph are updated. The updating process weights the semantic similarity and the original weights to obtain the updated relationship edge weights, which more accurately reflect the semantic association strength between entity nodes. Subsequently, the network structure of the initial knowledge graph is optimized and reorganized based on the updated relationship edge weights, including deleting relationship edges with weights below the threshold, merging nodes with highly similar semantics, and adjusting the connection relationship between nodes, and finally forming an optimized sensitive word knowledge graph. This weight update and structure optimization method based on semantic similarity not only improves the quality of the knowledge graph, but also reduces the redundancy of the graph. The sensitive word knowledge graph obtained after optimization and reorganization has a more reasonable structure and more accurate semantic relationships, which improves the application effect of the graph in sensitive word recognition and relationship reasoning tasks, and provides a more reliable knowledge basis for subsequent sensitive information governance.

[0026] S103, obtaining a news article to be identified, and preprocessing the news article to be identified to obtain a basic processed text; Specifically, the present application obtains news articles to be identified through the system interface, including news titles, text content and other text information, and then performs preprocessing operations on the obtained news articles to be identified. The preprocessing process first performs text cleaning to remove HTML tags, special characters and redundant spaces in the news text, and then uses Chinese word segmentation technology to divide the text into individual word units, and removes punctuation and stop words. Then the word segmentation results are tagged with parts of speech, and key words such as nouns, verbs, and adjectives in the text are extracted, and finally a standardized basic processing text is obtained. This preprocessing method eliminates noise information and irrelevant content in the original text by standardizing the news articles to be identified, making the text structure clearer, providing standardized input data for subsequent sensitive word recognition, and improving the accuracy and efficiency of recognition.

[0027] S104, performing part-of-speech tagging and syntactic analysis on the basic processed text to obtain structured text, and performing feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features, and semantic features; Specifically, the present application first uses a part-of-speech tagging tool to tag the part-of-speech information of each word on the basic processing text, including grammatical attributes such as nouns, verbs, and adjectives, and then constructs a grammatical structure tree of the sentence through syntactic analysis technology to identify sentence components such as subject, predicate, and object and their hierarchical relationships, thereby obtaining a structured text. Next, a multi-dimensional feature extraction is performed on the obtained structured text, and word features, phrase features, and semantic features are extracted respectively. Among them, word features include word frequency statistics, part-of-speech distribution, and other word-level statistical information; phrase features extract phrase collocations and syntactic patterns by analyzing the phrase structure in the grammatical tree; semantic features use word vector technology to calculate the semantic representation and contextual association of words in the text. In this way, through a layer-by-layer progressive analysis method, the text information is converted into structured text feature data, which not only retains the surface information of the text, but also digs out deep semantic associations, providing rich feature representations for subsequent sensitive content recognition, and improving the accuracy and robustness of recognition.

[0028] Based on the above embodiment, as an optional embodiment, performing part-of-speech tagging and syntactic analysis on the basic processed text to obtain a structured text includes: S301, performing word segmentation processing on the basic processing text to obtain a word sequence, and performing part-of-speech tagging on each word in the word sequence to obtain a part-of-speech tagging result, wherein the parts of speech include nouns, verbs, adjectives, adverbs, and prepositions; Specifically, the basic processing text is first segmented, and the maximum forward matching and reverse matching algorithms based on dictionaries are used in combination with the conditional random field model to segment the continuous text sequence into word sequences. In the process of word segmentation, the dictionary library and statistical language model are maintained to solve the problem of ambiguous segmentation and improve the accuracy of word segmentation. Part-of-speech tagging is performed on each word in the obtained word sequence, and the hidden Markov model and part-of-speech transition probability matrix are used to divide the words into nouns, verbs, adjectives, adverbs, prepositions and other part-of-speech categories to obtain the part-of-speech tagging results. The part-of-speech tagging process considers the part-of-speech probability of the word itself and the part-of-speech transition probability of the context, and finds the optimal part-of-speech tagging sequence through a dynamic programming algorithm. Through word segmentation and part-of-speech tagging, the unstructured text is converted into a tagging sequence with word boundaries and grammatical attributes, laying the foundation for subsequent syntactic analysis and semantic understanding. This processing method not only identifies the basic language units in the text, but also marks the grammatical function of each word, improving the computability and structured degree of the text.

[0029] S302, performing syntactic structure analysis on the word sequence based on a dependency syntactic analysis method to obtain syntactic relations, and constructing a syntactic dependency tree based on the word sequence and the syntactic relations; Specifically, the dependency syntactic analysis method is used to analyze the syntactic structure of the word sequence, and the syntactic relationship between words is identified through the neural network dependency syntactic analyzer. Dependency syntactic analysis first determines the core predicate of the sentence, and then analyzes the dominance and dependency relationship between each word, including grammatical relationships such as subject-predicate relationship, verb-object relationship, and attributive-predicate relationship. After obtaining the syntactic relationship, a syntactic dependency tree is constructed based on the word sequence and syntactic relationship. The tree takes the core predicate of the sentence as the root node, and the dependency relationship between words is represented by directed edges. The label of each edge represents the specific type of syntactic relationship. The construction of the syntactic dependency tree adopts a transfer system and a neural scorer to determine the optimal tree structure in an iterative manner. This processing method based on dependency syntactic analysis converts the linear word sequence into a hierarchical tree structure, clearly shows the grammatical dependency relationship and syntactic structure between words in the sentence, and provides a structured grammatical representation for subsequent semantic understanding and relationship extraction. Through the construction of the syntactic dependency tree, not only the syntactic association between words is captured, but also the hierarchical structure information of the sentence is retained, which improves the structured representation ability of the text.

[0030] S303, combining the words in the syntactic dependency tree at the phrase level to obtain a hierarchical structure including word groups and phrases; Specifically, the words in the syntactic dependency tree are combined at the phrase level, and the words with close syntactic relationships in the syntactic dependency tree are combined into larger grammatical units in a bottom-up manner. The combination process is based on syntactic rules and phrase structure grammar. First, basic phrase structures such as noun phrases and verb phrases are identified, and adjacent words with complete grammatical functions are combined into phrases. Then, according to the syntactic relationship between phrases, the phrases are further combined into larger phrase units to form a hierarchical structure containing phrases and phrases. This hierarchical structure is represented by a tree, in which the leaf nodes are single words, the middle nodes are phrases and phrases, and the root node is the entire sentence. The syntactic dependency tree is combined at the phrase level, and the dependency relationship at the word level is promoted to the phrase level, making the text structure clearer and more complete. Through this phrase-level combination processing, not only the dependency relationship between words is retained, but also a higher-level grammatical unit is constructed, which provides richer structured information for subsequent semantic analysis and enhances the grammatical expression ability of the text.

[0031] S304: Integrate the part-of-speech tagging result and the hierarchical structure to generate the structured text.

[0032] Specifically, the part-of-speech tagging results and the hierarchical structure are integrated to represent the grammatical and structural information of the text by constructing a unified data structure. The integration process first maps the part-of-speech information in the part-of-speech tagging results to the leaf nodes of the hierarchical structure, so that each word contains both the part-of-speech attribute and the positional relationship in the phrase structure. Then, the phrase and phrase nodes in the hierarchical structure are associated with the part-of-speech information of the words they contain to form a hierarchical representation with part-of-speech tags. This integration adopts a tree storage structure, and each node contains attribute information such as part-of-speech tags, phrase types, and structural relationships. Through integration, a structured text is generated, which not only retains the part-of-speech characteristics of the words, but also contains the hierarchical structural information at the phrase level. This structured text representation method not only fully preserves the grammatical attributes and structural characteristics of the text, but also facilitates subsequent text analysis and information extraction, and improves the accuracy and efficiency of text processing.

[0033] S105, performing multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrating the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; Specifically, multi-level sensitive word recognition is performed on structured text feature data. Direct sensitive words are identified through precise matching at the word level, sensitive word combinations are identified through pattern matching at the phrase level, and variant sensitive words are identified through similarity calculation at the semantic level, thereby obtaining multi-level sensitive words. Subsequently, a deep neural network based on an attention mechanism is used to integrate the identified multi-level sensitive words. The network assigns different weights to sensitive words at different levels through the attention layer, focusing on words that have a greater impact on the sensitivity of the text. At the same time, the multi-layer structure of the deep neural network can learn the combination features between sensitive words, and finally output preliminary sensitive word recognition results. This method of multi-level recognition combined with deep learning can not only capture sensitive information from different language levels, but also effectively integrate the recognition results of each level through the attention mechanism, greatly improving the accuracy and comprehensiveness of sensitive word recognition, and effectively reducing the probability of misidentification and missed recognition.

[0034] Based on the above embodiment, as an optional embodiment, the multi-level sensitive word recognition is performed on the structured text feature data to obtain the multi-level sensitive words, including: S401, using a combination strategy of rule recognition, dictionary matching and machine learning to identify the word features and obtain word-level sensitive words; Specifically, a combination strategy of rule recognition, dictionary matching and machine learning is used to identify word features to obtain word-level sensitive words. First, through the rule recognition method, the grammatical rules and feature patterns of sensitive words are formulated, including rules such as specific character combinations and digital encodings, and the text is pattern matched. Then, the dictionary matching method is used to establish a dictionary library containing known sensitive words, and a multi-mode matching algorithm such as AC automaton is used to quickly match the text. At the same time, the machine learning method is used to train the semantic representation of words through a deep learning model, and the context features are captured using a bidirectional long short-term memory network, and the words with sensitive meanings are identified in combination with the attention mechanism. This combination strategy combines rule-based precise matching, dictionary-based fast retrieval and machine learning-based semantic understanding to form a multi-level sensitive word recognition system. High precision is ensured through rule recognition, efficiency is improved through dictionary matching, and generalization ability is improved through machine learning, and finally a comprehensive and accurate word-level sensitive word recognition result is obtained. This recognition method not only covers explicit sensitive words, but also recognizes implicit sensitive expressions, improving the accuracy and completeness of sensitive word recognition.

[0035] S402, based on window segmentation and syntactic analysis, identifying the phrase features to obtain phrase-level sensitive words; Specifically, phrase features are identified based on window segmentation and syntactic analysis to obtain phrase-level sensitive words. First, a sliding window method is used to set windows of different sizes to segment the text and obtain continuous word sequences as candidate phrases. Window segmentation ensures that all possible phrase combinations are covered by sliding word by word. Then, syntactic analysis technology is used to perform syntactic structure analysis on the candidate phrases obtained by segmentation to identify the syntactic components and grammatical relations therein. The syntactic analysis uses a dependency syntactic analyzer to construct a syntactic tree of the candidate phrases to determine the completeness and grammatical rationality of the phrases. On this basis, the sensitivity of the candidate phrases is judged by combining the phrase structure features and semantic features through a deep learning model to identify complete phrase units with sensitive meanings. This recognition method based on window segmentation and syntactic analysis not only takes into account the continuity features of the phrases, but also ensures the grammatical integrity of the phrases, and realizes the accurate recognition of complex sensitive expressions. Through phrase-level sensitive word recognition, new sensitive meanings generated by word combinations are captured, and the coverage and accuracy of sensitive content recognition are improved.

[0036] S403, using a pre-trained language model to identify the semantic features and obtain semantic-level sensitive words; Specifically, a pre-trained language model is used to identify semantic features and obtain semantic-level sensitive words. The pre-trained language model uses a deep neural network pre-trained with large-scale corpus to capture the deep semantic representation of the text through the transformer architecture and self-attention mechanism. First, the text is input into the pre-trained language model to obtain the context-related semantic vector representation of each word in the text. Then, based on these semantic vectors, a multi-layer perceptron is used to semantically understand the text fragments and identify the sensitive meanings contained therein. The pre-trained language model learns the semantic association and context dependency of the text through the masked language model task and the next sentence prediction task, and achieves accurate understanding of implicit and ambiguous expressions. In the process of semantic-level sensitive word recognition, the model not only pays attention to the meaning of the word itself, but also considers the semantic expression in the overall context, so as to identify expressions with sensitive meanings in a specific context. This semantic recognition method based on a pre-trained language model breaks through the limitations of traditional rule-based and matching methods, realizes the understanding of deep semantics and accurate recognition of sensitive content, and improves the semantic understanding ability and recognition accuracy of sensitive word recognition.

[0037] S404: Use the semantic-level sensitive words, the phrase-level sensitive words, and the word-level sensitive words as the multi-level sensitive words.

[0038] Specifically, semantic-level sensitive words, phrase-level sensitive words, and word-level sensitive words are integrated into multi-level sensitive words to construct a hierarchical sensitive word recognition system. The integration process first organizes the three levels of sensitive words according to their coverage and language unit size, and establishes a progressive relationship from word to phrase to semantics. In terms of data structure, a tree structure is used to store these multi-level sensitive words, in which word-level sensitive words are located at leaf nodes, phrase-level sensitive words are located at middle-level nodes, and semantic-level sensitive words are located at higher-level nodes. By establishing an association relationship between levels, a complete sensitive word hierarchy is formed, so that sensitive words at each level are both independent and related. This multi-level sensitive word system realizes the representation of sensitive content from concrete to abstract, including both clear sensitive words and complex sensitive expressions, as well as deep semantic sensitive information. Through this multi-level integration, the comprehensiveness and accuracy of sensitive word recognition are improved, providing a more complete sensitive word reference system for subsequent text filtering and content review.

[0039] S106, mapping the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and performing semantic representation learning on the preliminary mapping result using a graph neural network to obtain a semantic representation result; Specifically, the sensitive words in the preliminary sensitive word recognition results are first mapped to the corresponding node positions in the sensitive word knowledge graph through the entity alignment technology, and the mapping association is established according to the semantic similarity and contextual relationship of the words to obtain the preliminary mapping results. Then, the graph neural network is used to learn the semantic representation of these mapping results. The network aggregates information in the knowledge graph through the message passing mechanism, uses the relationship between nodes in the graph structure to transmit feature information, and considers the local structure and global semantic information of the nodes at the same time. The structured representation of sensitive words in the knowledge graph is converted into a continuous vector space representation, and finally the semantic representation result is obtained. This semantic representation learning method based on the knowledge graph makes full use of the rich semantic information and structured knowledge contained in the graph, making the semantic representation of sensitive words more accurate and comprehensive. It can not only capture the explicit association between words, but also discover the implicit semantic relationship, providing high-quality feature representation for subsequent sensitivity calculations.

[0040] Based on the above embodiment, as an optional embodiment, mapping the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result includes: S501, extracting sensitive word entities according to the preliminary sensitive word recognition result, and performing search and matching in the sensitive word knowledge graph based on the sensitive word entities to obtain entity matching results; Specifically, sensitive word entities are extracted according to the preliminary sensitive word recognition results, and search and match are performed in the sensitive word knowledge graph to obtain entity matching results. First, sensitive word entities are extracted from the preliminary sensitive word recognition results. The entity extraction process uses named entity recognition technology to identify entity information such as sensitive word names, attributes and relationships in the text. The extracted sensitive word entities contain the text expression, type label and context features of the entity. Then, the extracted sensitive word entities are used as query conditions to perform search and match in the sensitive word knowledge graph. The retrieval process uses the graph database query language to perform matching calculations through multiple dimensions such as text similarity and semantic relevance of the entity. In the sensitive word knowledge graph, each node represents a sensitive word entity, and the edges between nodes represent the semantic relationship between entities. The graph traversal algorithm is used to find nodes matching the input entity in the knowledge graph. This entity matching method based on the knowledge graph not only considers the text features of the entity, but also utilizes the structured information in the knowledge graph to improve the accuracy of entity matching. Through entity matching, the corresponding relationship between the preliminary sensitive word recognition results and the standard sensitive word entities in the knowledge graph is established, which provides a basis for subsequent relationship reasoning.

[0041] S502, extracting corresponding association relationships and attribute information according to the entity matching results; Specifically, the corresponding association relationship and attribute information are extracted according to the entity matching results. First, for each matching entity in the entity matching results, the direct association relationship in the sensitive word knowledge graph is obtained through a graph database query, including semantic associations such as hyponymy, synonymy, and antonymy. The association relationship is extracted using a graph traversal algorithm, starting from the matching entity node, and exploring the edges and adjacent nodes connected to it. At the same time, the attribute information attached to each matching entity node is extracted, including structured features such as sensitivity, usage scenario, and part-of-speech tagging. The extraction of attribute information is completed by accessing the attribute fields of the entity nodes in the knowledge graph. In the extraction process, the relationship reasoning rules are used to deduce implicit semantic associations based on known association relationships, and the coverage of association relationships is expanded. This method of extracting association relationships and attribute information based on the knowledge graph makes full use of the structured knowledge in the knowledge graph and obtains rich semantic information of sensitive word entities. Through the extraction of association relationships and attribute information, a more comprehensive and in-depth understanding of sensitive words is formed, which provides an important basis for subsequent sensitivity determination.

[0042] S503: Based on the association relationship and attribute information, a mapping association between the sensitive word entity and the sensitive word knowledge graph is constructed, and the mapping association is used as the preliminary mapping result.

[0043] Specifically, based on the association relationship and attribute information, a mapping association between sensitive word entities and sensitive word knowledge graphs is constructed, and the mapping association is used as the preliminary mapping result. First, the extracted association relationship and attribute information are organized into a structured mapping representation, which includes the semantic association, hierarchical relationship and attribute characteristics between entities. The construction of the mapping association adopts a graph structure mapping method to establish the corresponding relationship between sensitive word entities and knowledge graph nodes. In the mapping process, the strength of the association between entities is determined by calculating the relationship weight. The weight calculation considers factors such as association type, path length and attribute similarity. For each sensitive word entity, its corresponding node identifier, associated entity set and attribute value set in the knowledge graph are recorded to form a complete mapping association structure. This mapping association construction method based on the knowledge graph realizes the precise correspondence between sensitive word entities and the standard knowledge system, and establishes a bridge between text recognition results and the knowledge base. Through the construction of mapping associations, a knowledge-based representation of sensitive word recognition is formed, which provides structured knowledge support for subsequent sensitive word verification and expansion.

[0044] Based on the above embodiment, as an optional embodiment, the using of a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result includes: S601, constructing a sensitive word semantic graph based on the preliminary mapping result, and aggregating node features in the sensitive word semantic graph using the convolutional layer of the graph neural network to obtain node representations; Specifically, a sensitive word semantic graph is constructed based on the preliminary mapping results, and the convolutional layer of the graph neural network is used to aggregate the node features in the sensitive word semantic graph to obtain the node representation. First, the preliminary mapping results are converted into a sensitive word semantic graph structure, in which the nodes in the graph represent sensitive word entities, the edges represent the semantic association relationship between entities, and the nodes and edges carry the corresponding feature vectors. The sensitive word semantic graph is mathematically represented by the adjacency matrix and the feature matrix, providing the input data structure for the processing of the graph neural network. Then, the convolutional layer of the graph neural network is used to learn the features of the sensitive word semantic graph, and the convolutional layer aggregates the features of each node through the message passing mechanism. In the feature aggregation process, each node collects information from its neighboring nodes and transforms and combines the features through a trainable weight matrix. Specifically, the convolutional layer first calculates the message vectors of the node neighborhood, and then uses aggregation functions (such as average pooling and maximum pooling) to combine these messages into a new node representation. Through the superposition of multiple layers of graph convolution, the deep extraction and fusion of node features are achieved, and the structured representation of sensitive word entities in the semantic graph is captured. This node representation learning method based on graph neural network makes full use of the semantic association information between sensitive words, generates node vector representations with context-awareness, and provides richer semantic features for subsequent sensitive word verification.

[0045] S602, using the attention mechanism layer of the graph neural network to perform weighted fusion on the node representations to obtain a graph representation; Specifically, the attention mechanism layer of the graph neural network is used to perform weighted fusion on the node representation to obtain the graph representation. First, the attention weight is calculated for the node representation generated by the convolution layer of the graph neural network, and the importance of each node in the overall semantic expression is evaluated through the attention mechanism layer. The attention mechanism layer uses the query vector and key-value pairs to calculate the similarity score between the query vector and each node representation, and these scores are normalized by the softmax function to obtain the attention weight of the node. Then, the node representation is weighted summed using the attention weight to fuse the information of all nodes into a unified graph representation vector. In the weighted fusion process, important nodes obtain higher attention weights and contribute more to the final graph representation, while the influence of minor nodes is appropriately reduced. This node fusion method based on the attention mechanism realizes the global feature extraction of the semantic graph of sensitive words and generates a graph-level representation that reflects the overall semantic information. Through the attention weighting method, the semantic information of the key nodes in the graph is retained, while the interference of noise nodes is suppressed, improving the quality and expression ability of the graph representation.

[0046] S603, performing nonlinear transformation on the graph representation through the fully connected layer of the graph neural network to obtain a semantic vector, and using the semantic vector as the semantic representation result.

[0047] S107, performing associated node reasoning in the sensitive word knowledge graph based on the semantic representation result to obtain a knowledge-enhanced recognition result; Specifically, based on the semantic representation results, the associated node reasoning is performed in the sensitive word knowledge graph. First, the relationship path in the graph is used for reasoning. By finding the nodes directly connected to the identified sensitive words and the nodes reachable through multi-hop paths, potential sensitive word associations are mined. During the reasoning process, the graph reasoning algorithm is used to calculate the semantic relevance and propagation distance between nodes, and the associated nodes that meet the reasoning rules are included in the recognition scope. After the reasoning is completed, the newly discovered associated sensitive words are integrated with the original recognition results to form a knowledge-enhanced recognition result. This knowledge graph-based association reasoning method makes full use of the structured knowledge in the graph, expands the recognition scope through semantic association, and can not only discover explicit sensitive words, but also identify sensitive content with potential associations, improving the coverage and accuracy of sensitive word recognition, and effectively solving the problem that traditional methods are difficult to discover implicit sensitive information.

[0048] Based on the above embodiment, as an optional embodiment, the associated node reasoning is performed in the sensitive word knowledge graph based on the semantic representation result to obtain the knowledge enhanced recognition result, including: S701, based on the semantic representation result, similar semantic nodes are retrieved in the sensitive word knowledge graph to obtain similar semantic nodes, and multi-hop neighbor expansion is performed on the similar semantic nodes based on a graph propagation algorithm to obtain a set of associated nodes; Specifically, according to the semantic representation result, similar semantic nodes are retrieved in the sensitive word knowledge graph to obtain similar semantic nodes, and similar semantic nodes are expanded by multi-hop neighbors based on the graph propagation algorithm to obtain a set of associated nodes. First, the semantic representation result is used as the query vector, and the semantic similarity between the node and the query vector is calculated in the sensitive word knowledge graph. The cosine similarity measurement method is used to select nodes whose similarity exceeds a preset threshold as similar semantic nodes. Similar semantic node retrieval is implemented by vector retrieval technology, which ensures that the retrieval results have a high correlation with the input semantics. Then, multi-hop neighbor expansion is performed on the retrieved similar semantic nodes. The graph propagation algorithm starts from the similar semantic nodes and iteratively expands along the edges in the knowledge graph according to the preset hop limit. In each hop expansion, the direct neighbor nodes of the current node are collected, and the propagation probability is calculated. The expansion range is controlled according to the weight of the edge and the importance of the node. Through multi-hop expansion, semantically related nodes are gradually included in the associated node set to form a complete knowledge context. This node expansion method based on graph propagation realizes the correlation mining of sensitive word knowledge and enriches the semantic content of the original recognition results. Through similar node retrieval and multi-hop expansion, a set of entities related to the recognition target at the knowledge level is obtained, providing an expansion basis for subsequent knowledge enhancement.

[0049] S702, calculating the semantic relevance between each node in the associated node set and the initial node to obtain semantic relevance data, and screening highly correlated associated nodes according to a preset semantic relevance threshold and the semantic relevance data to obtain a highly correlated associated node set; Specifically, the present application obtains semantic relevance data by calculating the semantic relevance between each node in the associated node set and the initial node, and screens highly correlated associated nodes according to a preset semantic relevance threshold and semantic relevance data to obtain a highly correlated associated node set. First, for each node in the associated node set, its semantic relevance to the initial node is calculated. The calculation of semantic relevance adopts a multi-dimensional similarity measurement method, including factors such as path distance between nodes, cosine similarity of semantic vectors, and weight of relationship type. These factors are weighted to obtain a comprehensive semantic relevance score to form semantic relevance data. Then, a semantic relevance threshold is set as a screening criterion to filter the associated nodes. The semantic relevance threshold is determined according to the application scenario and data characteristics and is used to control the quality of the associated nodes. The semantic relevance data is compared with a preset threshold, and nodes with a relevance higher than the threshold are retained to form a highly correlated associated node set. This node screening method based on semantic relevance ensures that the associated nodes have a close semantic connection with the initial recognition results and improves the accuracy of the knowledge enhancement results. Through strict relevance screening, noise nodes with weak semantic associations are removed and the most valuable knowledge association information is retained.

[0050] S703: Use the highly correlated node set as the knowledge enhanced recognition result.

[0051] Specifically, the present application uses a set of highly correlated associated nodes as the recognition result of knowledge enhancement. The set of highly correlated associated nodes screened by semantic relevance is directly used as the final knowledge enhancement recognition result. These nodes contain sensitive word entities that are highly correlated with the initial recognition result at the knowledge level. Each node in the set of highly correlated associated nodes carries complete attribute information, including structured data such as the node's identifier, type, and attribute value. This knowledge-enhanced recognition result retains the semantic association relationship between sensitive words and reflects the contextual context of sensitive words in the knowledge graph. By using a set of highly correlated associated nodes as the recognition result of knowledge enhancement, semantic expansion and knowledge supplementation of the original recognition result are achieved, providing richer semantic information and knowledge background for subsequent sensitive word processing. This knowledge graph-based enhancement method enables the sensitive word recognition result to have stronger semantic expression capabilities and knowledge relevance.

[0052] S108, calculating the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and performing sentiment tendency analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; Specifically, the semantic similarity of the knowledge-enhanced recognition results is first calculated. The cosine similarity between the identified sensitive words and the surrounding context words is calculated through word vector technology, and the similarity score reflecting the degree of semantic association between the sensitive words and the context is obtained by combining the position weight of the words. Subsequently, the complete sentences containing sensitive words are extracted, and the sentiment analysis model is used to analyze the sentiment tendency of these sentences. The model learns the semantic features of sentences through deep learning methods, identifies the sentiment polarity and intensity in the sentences, and finally outputs the sentiment score representing the sentiment tendency of the sentences. This dual scoring mechanism not only considers the semantic relevance between sensitive words and context, but also analyzes the emotional attitude expressed by the sentences containing sensitive words, providing a more comprehensive evaluation basis for the final sensitivity judgment, and improving the accuracy and reliability of sensitive content recognition. By considering both semantic similarity and sentiment tendency at the same time, the meaning and impact of sensitive words in specific contexts can be better understood.

[0053] S109, performing a comprehensive evaluation based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

[0054] Specifically, the similarity threshold and sentiment score threshold are set according to historical data and expert experience, and then the similarity score of each sensitive word is compared with the similarity threshold, and the sentiment score of the corresponding sentence is compared with the sentiment score threshold. When the similarity score is higher than the similarity threshold and the sentiment score exceeds the sentiment score threshold, the sensitive word is marked as high sensitivity; when only one of the two scores exceeds the threshold, the sensitive word is marked as medium sensitivity; when both scores do not exceed the threshold, the sensitive word is marked as low sensitivity or excluded from the sensitive word list, and finally the final sensitive word recognition result is formed. This dual threshold-based evaluation method not only considers the semantic association strength between sensitive words and context, but also combines the degree of sentiment tendency of sentences. Through strict threshold screening, it ensures the accuracy and reliability of the recognition results, effectively reduces the misjudgment rate, and makes sensitive word recognition more accurate and reasonable.

[0055] On the other hand, the present application also provides a news article sensitive word identification system, such as Figure 2 The system comprises: The first data acquisition module 1 is used to acquire Internet vocabulary data and analyze the Internet vocabulary data to obtain an initial sensitive word set; A knowledge graph construction module 2 is used to construct a knowledge graph based on the initial sensitive word set to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and train the initial knowledge graph using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; The second data acquisition module 3 is used to acquire news articles to be identified and pre-process the news articles to be identified to obtain basic processed texts; A feature extraction module 4 is used to perform part-of-speech tagging and syntactic analysis on the basic processed text to obtain a structured text, and to perform feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features and semantic features; A preliminary recognition module 5 is used to perform multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrate the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; A mapping module 6 is used to map the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and use a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result; Enhancement module 7, used for performing associated node reasoning in the sensitive word knowledge graph based on the semantic representation result to obtain a knowledge enhanced recognition result; Scoring module 8, used to calculate the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and perform sentiment tendency analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; The target recognition module 9 is used to perform a comprehensive evaluation based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

[0056] Please refer to Figure 3 The application also discloses an electronic device. Figure 33 is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 may be a short-term storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 and execute a series of instruction operations in the memory 332 on the electronic device 301. The electronic device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and / or, one or more operating systems 341. The steps in the sensitive word identification method of the news article described above can be implemented by the structure of the electronic device.

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

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

[0059] The present application also provides a computer storage medium that can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 The method for identifying sensitive words in news articles in the embodiment shown in the figure can be found in the specific implementation process. Figure 1 The specific description of the illustrated embodiment will not be repeated here.

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

[0061] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.

[0062] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.

[0063] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A method for identifying sensitive words in news articles, characterized in that: The method comprises: Acquire Internet vocabulary data, and analyze the Internet vocabulary data to obtain an initial sensitive word set; Based on the initial set of sensitive words, a knowledge graph is constructed to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and the initial knowledge graph is trained using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; Acquire a news article to be identified, and pre-process the news article to be identified to obtain a basic processed text; Performing part-of-speech tagging and syntactic analysis on the basic processed text to obtain structured text, and performing feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features and semantic features; Performing multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrating the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; Mapping the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and using a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result; Based on the semantic representation result, associated node reasoning is performed in the sensitive word knowledge graph to obtain a knowledge-enhanced recognition result; Calculating the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and performing sentiment analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; A comprehensive evaluation is performed based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

2. The method according to claim 1, characterized in that The knowledge graph is constructed based on the initial sensitive word set to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and the initial knowledge graph is trained using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph, including: Constructing the words in the initial sensitive word set as entity nodes of the knowledge graph; Defining attributes for the entity nodes, the attributes including sensitivity, timeliness and usage frequency, and constructing relationship edges between the entity nodes for the entity nodes, the relationship edges including synonymy, antonym, hyponymy and hyponymy, and combination relationships; Calculating the association strength between the entity nodes to obtain weighted relationship edges, and organizing the entity nodes and the weighted relationship edges into a network structure to obtain the initial knowledge graph; Mapping entity nodes in the initial knowledge graph into vector representations of fixed dimensions; Based on the random walk strategy, the initial knowledge graph is sampled for node sequence to generate a node walk path, and the node walk path is trained using a Skip-gram model to obtain an updated vector representation, and the cosine similarity between entity nodes is calculated based on the updated vector representation to obtain the semantic similarity between entity nodes; The relationship edge weights in the initial knowledge graph are updated according to the semantic similarity to obtain updated relationship edge weights, and based on the updated relationship edge weights, the network structure of the initial knowledge graph is optimized and reorganized to obtain the sensitive word knowledge graph.

3. The method according to claim 1, characterized in that: The step of performing part-of-speech tagging and syntactic analysis on the basic processed text to obtain a structured text includes: Performing word segmentation processing on the basic processing text to obtain a word sequence, and performing part-of-speech tagging on each word in the word sequence to obtain a part-of-speech tagging result, wherein the parts of speech include nouns, verbs, adjectives, adverbs, and prepositions; Performing syntactic structure analysis on the word sequence based on a dependency syntactic analysis method to obtain syntactic relations, and constructing a syntactic dependency tree based on the word sequence and the syntactic relations; Combining the words in the syntactic dependency tree at the phrase level to obtain a hierarchical structure including word groups and phrases; The part-of-speech tagging result and the hierarchical structure are integrated to generate the structured text.

4. The method according to claim 1, characterized in that: The step of performing multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words includes: A combination strategy of rule recognition, dictionary matching and machine learning is adopted to identify the word features and obtain word-level sensitive words; Based on window segmentation and syntactic analysis, the phrase features are identified to obtain phrase-level sensitive words; Using a pre-trained language model, the semantic features are identified to obtain semantic-level sensitive words; The semantic-level sensitive words, the phrase-level sensitive words and the word-level sensitive words are used as the multi-level sensitive words.

5. The method according to claim 1, characterized in that The mapping of the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result includes: Extract sensitive word entities according to the preliminary sensitive word recognition results, and perform search and matching in the sensitive word knowledge graph based on the sensitive word entities to obtain entity matching results; According to the entity matching results, extract corresponding association relationships and attribute information; Based on the association relationship and attribute information, a mapping association between the sensitive word entity and the sensitive word knowledge graph is constructed, and the mapping association is used as the preliminary mapping result.

6. The method according to claim 1, characterized in that The using of a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result includes: Constructing a sensitive word semantic graph based on the preliminary mapping result, and aggregating node features in the sensitive word semantic graph using the convolutional layer of the graph neural network to obtain node representations; The attention mechanism layer of the graph neural network is used to perform weighted fusion on the node representations to obtain a graph representation; The graph representation is nonlinearly transformed through the fully connected layer of the graph neural network to obtain a semantic vector, and the semantic vector is used as the semantic representation result.

7. The method according to claim 1, characterized in that The associated node reasoning is performed in the sensitive word knowledge graph based on the semantic representation result to obtain a knowledge-enhanced recognition result, including: According to the semantic representation result, similar semantic nodes are retrieved in the sensitive word knowledge graph to obtain similar semantic nodes, and multi-hop neighbor expansion is performed on the similar semantic nodes based on a graph propagation algorithm to obtain a set of associated nodes; Calculating the semantic relevance between each node in the associated node set and the initial node to obtain semantic relevance data, and screening highly correlated associated nodes according to a preset semantic relevance threshold and the semantic relevance data to obtain a highly correlated associated node set; The highly correlated node set is used as the knowledge enhanced recognition result.

8. A news article sensitive word recognition system, characterized in that: The system comprises: A first data acquisition module, used to acquire Internet vocabulary data and analyze the Internet vocabulary data to obtain an initial sensitive word set; A knowledge graph construction module is used to construct a knowledge graph based on the initial sensitive word set to obtain an initial knowledge graph, wherein the initial knowledge graph includes node types and relationship types between nodes, and train the initial knowledge graph using a knowledge representation learning algorithm to obtain a sensitive word knowledge graph; The second data acquisition module is used to acquire news articles to be identified and pre-process the news articles to be identified to obtain basic processed texts; A feature extraction module, used to perform part-of-speech tagging and syntactic analysis on the basic processed text to obtain structured text, and perform feature extraction on the structured text to obtain structured text feature data, wherein the structured text feature data includes word features, phrase features and semantic features; A preliminary recognition module, used to perform multi-level sensitive word recognition on the structured text feature data to obtain multi-level sensitive words, and integrate the multi-level sensitive words using a deep neural network with an attention mechanism to obtain a preliminary sensitive word recognition result; A mapping module, used to map the preliminary sensitive word recognition result to the sensitive word knowledge graph to obtain a preliminary mapping result, and use a graph neural network to perform semantic representation learning on the preliminary mapping result to obtain a semantic representation result; An enhancement module, used to perform associated node reasoning in the sensitive word knowledge graph based on the semantic representation result to obtain a knowledge-enhanced recognition result; A scoring module, used to calculate the semantic similarity between the sensitive words and the context in the knowledge-enhanced recognition result to obtain a similarity score, and to perform sentiment tendency analysis on the sentences containing the sensitive words in the knowledge-enhanced recognition result to obtain a sentiment score; The target recognition module is used to perform a comprehensive evaluation based on the similarity score and the sentiment score in combination with a preset threshold to obtain a final sensitive word recognition result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It includes a processor, a memory and a transceiver, the memory is used to store instructions, the transceiver is used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Sensitive information knowledge graph construction method and device and sensitive information determination method

    CN115062158A

  • Sensitive word auditing method based on large language model, storage medium and electronic equipment

    CN116720515A

  • Knowledge retrieval-based vertical type government affair large model service method and system

    CN118916470A

  • Social media text named entity recognition method and system fusing multi-scale features and syntactic information

    CN119272772A

Cited By

  • Multi-task hepatitis B drug screening method and system based on knowledge graph assistance

    CN120452598A

  • A multi-task hepatitis b drug screening method and system based on knowledge graph assistance

    CN120452598B

  • Visual setting calculation system and method thereof

    CN120494072A

  • Text auditing method and engine

    CN121301947A

  • Patchable script generation method and system based on multi-agent countermeasure cooperation

    CN121562563A