A Search Content Filtering Method and System Based on Rule Configuration and Sensitive Keywords

By combining rule configuration and intelligent detection, and utilizing multimodal content detection models and learning ranking models, the problems of missed detection and false judgment in traditional sensitive word matching are solved, achieving efficient and accurate search content filtering to meet the needs of different scenarios.

CN123115404APending Publication Date: 2026-11-17CAIXIN MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611394670.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Traditional sensitive word matching methods cannot combine semantic context to make compliance judgments, resulting in high rates of missed detections and false positives. Furthermore, single AI detection models lack standardized rule constraints, making it difficult to adapt to the differentiated filtering needs of different scenarios and failing to balance filtering efficiency and accuracy.

Method used

It adopts a dual mechanism based on rule configuration and intelligent detection. It performs semantic analysis through a multimodal content detection model, dynamically adjusts content weights by combining a learning ranking model, and performs sensitive word detection and hierarchical processing, including preliminary screening and precise verification of inclusion, exclusion and priority rules.

Benefits of technology

Significantly reduces the false negative rate and false positive rate, improves the accuracy and flexibility of filtering, adapts to various complex search scenarios, and ensures the compliance and security of online search content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115404A_ABST
    Figure CN123115404A_ABST
Patent Text Reader

Abstract

This invention discloses a search content filtering method and system based on rule configuration and sensitive words, relating to the field of data search technology. In response to a search request, it reads a filtering rule set stored in a configuration center, which includes inclusion rules, exclusion rules, and priority rules. It performs compliance detection on the multi-dimensional semantic feature information to obtain the compliance prediction probability of a first candidate content. The compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into a learning ranking model to determine the ranking weight of the first candidate content and perform ranking to obtain a second candidate content. Sensitive word detection is performed on the search terms in the search request and the second candidate content to obtain sensitive word detection results. Based on the sensitive word detection results, the second candidate content is subjected to blocking, de-weighting, replacement, and interception processing to obtain the target candidate content and display it in the search results. This significantly improves the accuracy, flexibility, and stability of search content filtering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data search technology, and in particular to a method and system for filtering search content based on rule configuration and sensitive words. Background Technology

[0002] With the explosive growth of massive amounts of UGC content on the internet, content compliance filtering in search scenarios has become a core aspect of online information governance. Accurate and efficient content filtering mechanisms are crucial for ensuring search information security and regulating online dissemination. Traditional sensitive word matching methods rely solely on fixed word libraries for mechanical matching, failing to consider semantic context and content scenarios to determine compliance. They are highly susceptible to missed detections due to circumvention techniques such as homophones, symbol substitution, and semantic distortion, and often result in indiscriminate false positives, leading to a high false negative rate and insufficient filtering accuracy. While single AI detection models possess some semantic analysis capabilities, they lack standardized rule constraints, resulting in chaotic filtering logic that cannot adapt to the differentiated filtering needs of various scenarios. Furthermore, the lack of a priority control mechanism makes it difficult to balance content compliance with the diversity of search content. This makes it difficult to balance filtering efficiency and accuracy, easily leading to problems such as blocking compliant content while allowing illegal content to slip through, failing to meet the current demands for high-precision, highly adaptable, and low-error search content filtering applications. Summary of the Invention

[0003] The purpose of this invention is to solve the above-mentioned problems by designing a search content filtering method and system based on rule configuration and sensitive words.

[0004] To achieve the above objectives, the technical solution of the present invention further includes the following steps in the above-mentioned search content filtering method based on rule configuration and sensitive words: In response to a search request, the filter rule set stored in the configuration center is read, and the filter rule set includes inclusion rules, exclusion rules and priority rules; The initial candidate content is initially filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. Compliance detection is performed on the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content; The compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model to determine the ranking weight of the first candidate content and sort it to obtain the second candidate content. Sensitive word detection is performed on the search terms and second candidate content in the search request to obtain sensitive word detection results; Based on the sensitive word detection results, the second candidate content is subjected to blocking, de-weighting, replacement and interception processes to obtain the target candidate content and display it in the search.

[0005] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the initial candidate content is preliminarily filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information, including: Based on the inclusion and exclusion rules, filtering conditions are dynamically concatenated in the query statement of the retrieval engine layer. By performing bitmap operations on the inverted index, content that does not meet the permissions, status, and category criteria is filtered out to obtain the first candidate content.

[0006] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the initial candidate content is preliminarily filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information, including: The multimodal content detection model adopts a three-stream encoder architecture, which includes at least a text stream, an image stream, and a video stream; The text stream introduces BERT as the backbone coding network. After concatenating the title, summary and body text, it is fed into the multi-layer transformer coding layer after being superimposed with word embedding, segment embedding and position embedding, and outputs a semantic vector that includes deep contextual relationships. The image stream introduces the ViT visual transformer architecture, which divides the cover image into fixed-size image blocks, converts them into sequence vectors through a linear projection layer, and captures the spatial dependencies between image blocks through a Transformer encoder to extract visual semantic vectors. The video stream introduces a video shift window transformer architecture, which uses a 3D shift window attention mechanism to perform local attention calculations simultaneously in the spatial and temporal dimensions to extract the dynamic temporal vector of the video.

[0007] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the compliance detection of the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content includes: A compliance detection head is established, which is a multi-layer fully connected network, including two hidden layers in structure, and a Dropout random deactivation layer is set between each layer; The forward propagation calculation results are normalized using the Softmax activation function of the compliance detection head to obtain the compliance prediction probability.

[0008] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the step of inputting the compliance prediction probability, inclusion rules, exclusion rules, and priority rules into the learning ranking model to determine the ranking weight of the first candidate content and perform ranking to obtain the second candidate content includes: The compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model; The learning ranking model uses Lambda MART as the core ranking algorithm, where each regression tree is fitted with the residual of the previous round and the gradient is optimized for the normalized loss cumulative gain evaluation index specific to the search scenario. By learning multiple trees of the ranking model, the feature space is nonlinearly partitioned and weighted to obtain the second candidate content.

[0009] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the step of performing sensitive word detection on the search terms and second candidate content in the search request to obtain sensitive word detection results includes: A cascaded structure model of BERT-BiLSTM-CRF bidirectional encoder representation-bidirectional long short-term memory network-conditional random field is introduced for sensitive word detection, and sensitive word detection results are obtained. The embedding layer uses the BERT model to convert characters into dynamic word vectors. The sequence encoding layer uses a BiLSTM bidirectional long short-term memory network to capture long-distance text dependencies from both forward and backward directions and extract contextual temporal features. The decoding layer uses a CRF conditional random field to calculate the transition probabilities between labels and outputs the optimal label sequence.

[0010] Furthermore, in the above-mentioned search content filtering method based on rule configuration and sensitive words, the step of performing blocking, de-weighting, replacement, and interception processing on the second candidate content according to the sensitive word detection results to obtain the target candidate content and display it in the search includes: If the search term itself contains high-risk sensitive words, the highest level of circuit breaker mechanism will be triggered, all second candidate contents will be discarded, an empty result will be returned and a security log will be recorded. If a second candidate item is determined to be of a high-risk level, the second candidate item will be removed from the display list.

[0011] Furthermore, in the search content filtering system based on rule configuration and sensitive words, the search content filtering system includes the following modules: The filtering rule acquisition module is used to read the filtering rule set stored in the configuration center in response to a search request. The filtering rule set includes inclusion rules, exclusion rules, and priority rules. The semantic feature extraction module is used to perform preliminary filtering of the initial candidate content according to the inclusion and exclusion rules to obtain the first candidate content, and input the first candidate content into the pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. The compliance prediction module is used to perform compliance detection on the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content. The candidate content ranking module is used to input the compliance prediction probability, inclusion rules, exclusion rules and priority rules into the learning ranking model, determine the ranking weight of the first candidate content and rank them to obtain the second candidate content. The sensitive word detection module is used to detect sensitive words in the search terms and second candidate content in the search request, and obtain sensitive word detection results; The content search and display module is used to perform masking, weight reduction, replacement and interception processing on the second candidate content based on the sensitive word detection results, so as to obtain the target candidate content and perform search and display.

[0012] Furthermore, in the search content filtering system based on rule configuration and sensitive words, the sensitive word detection module includes the following sub-modules: A submodule is introduced to introduce a cascaded structure model of BERT-BiLSTM-CRF bidirectional encoder representation-bidirectional long short-term memory network-conditional random field for sensitive word detection, and obtain sensitive word detection results; The extraction submodule is used in the embedding layer to convert characters into dynamic word vectors through the BERT model. The sequence encoding layer uses a BiLSTM bidirectional long short-term memory network to capture long-distance text dependencies from both forward and backward directions and extract contextual temporal features. The decoding layer calculates the transition probabilities between labels through a CRF conditional random field and outputs the optimal label sequence.

[0013] Furthermore, in the search content filtering system based on rule configuration and sensitive words, the content search display module includes the following sub-modules: The first judgment submodule is used to trigger the highest level of circuit breaker mechanism if the search term itself hits a high-risk sensitive word, discard all second candidate content, return an empty result and record a security log; The second judgment submodule is used to remove a second candidate content from the display list if it is determined to be of a high-risk level.

[0014] Its beneficial effects lie in the fact that, based on a dual mechanism of fusion rule configuration and intelligent detection, it completes the initial screening through three types of rules: inclusion, exclusion, and priority. Relying on a multimodal content detection model to mine multi-dimensional semantic features, it achieves a combination of surface-level word matching and deep semantic understanding, completely overcoming the limitation of traditional sensitive word matching in failing to identify variant violations, and significantly reducing the false negative and false positive rates. The introduction of a learning ranking model, combined with rules and compliance probabilities, dynamically adjusts content weights, allowing for adaptive adjustments to filtering standards based on different business scenarios, balancing content compliance with the richness of search results, and avoiding the loss of high-quality content caused by a one-size-fits-all filtering approach. Finally, this technology adds a secondary sensitive word review and differentiated handling process, accurately verifying the ranked candidate content. Through hierarchical processing methods such as blocking, downgrading, replacement, and interception, it replaces the single interception mode, improving the precision of filtering. This significantly improves the accuracy, flexibility, and stability of search content filtering, adapting to various complex search scenarios and effectively ensuring the compliance and security of online search content. Attached Figure Description

[0015] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention.

[0016] Figure 1 This is a schematic diagram of the first embodiment of the search content filtering method based on rule configuration and sensitive words in this invention. Figure 2 This is a schematic diagram of a second embodiment of the search content filtering method based on rule configuration and sensitive words in this invention. Figure 3 This is a schematic diagram of the first embodiment of the search content filtering system based on rule configuration and sensitive words in this invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0018] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms "one," "an," and "this" used herein may also include the plural forms. It should be further understood that the terminology used in this specification includes the presence of features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of other features, integers, steps, operations, elements, components, and / or groups thereof.

[0019] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 As shown, a search content filtering method based on rule configuration and sensitive words includes the following steps: Step 101: In response to the search request, read the filtering rule set stored in the configuration center. The filtering rule set includes inclusion rules, exclusion rules, and priority rules. Specifically, in this embodiment, after receiving a search request from a front-end application, including a web application, mobile application, or API caller, the first step in the system's core processing flow is not to search the index, but to trigger a configuration reading thread to establish communication with the distributed configuration center. This configuration center preferably uses mature middleware with a long polling mechanism to achieve near real-time push notifications of rule changes. Internally, the configuration center stores a complete set of filtering rules in key-value pairs and a multi-level directory structure. This set of rules is logically and strictly divided into three layers: inclusion rules, as a whitelist strategy, define the hard admission conditions that content must meet, such as belonging to a specific column ID array, the content type being text / image or video, the content status being marked as published, and the current requesting user having the corresponding RBAC permission bit; exclusion rules, as a blacklist strategy, define the absolute rejection conditions for content, such as prohibiting the inclusion of specific marketing tags or prohibiting content from being in a deleted or pending review state; priority rules are used to adjudicate the arbitration order when inclusion and exclusion conditions logically conflict for the same content, for example, stipulating that the exclusion effect of the blacklist takes precedence over the inclusion effect of the whitelist.

[0020] The configuration center also integrates an event listening mechanism. When business personnel or operations engineers dynamically adjust any rule in the backend management interface, the configuration center publishes a change event. The client captures this event through a listener and performs a hot-reload operation of the local cache, serializing the latest rule into an efficient query structure in memory. This process does not require restarting the search service process, thus ensuring the agile iteration capability of business policies and ensuring that all subsequent filtering steps can make accurate decisions based on the latest effective business compliance policy.

[0021] Step 102: Perform preliminary filtering on the initial candidate content according to the inclusion and exclusion rules to obtain the first candidate content. Input the first candidate content into the pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. Specifically, in this embodiment, filtering conditions are dynamically concatenated in the query statement of the retrieval engine layer according to the inclusion and exclusion rules. By performing bitmap operations on the inverted index, content that does not meet the permissions, status and column requirements is filtered out to obtain the first candidate content.

[0022] The multimodal content detection model adopts a three-stream encoder architecture, including at least a text stream, an image stream, and a video stream. The text stream uses BERT as the backbone encoding network, concatenating the title, summary, and body text, and then feeding it into a multi-layer transformer encoding layer after superimposing word embedding, segment embedding, and position embedding. The output is a semantic vector that includes deep contextual relationships. The image stream uses the ViT visual transformer architecture, which segments the cover image into fixed-size image blocks, converts them into sequence vectors through a linear projection layer, and captures the spatial dependencies between image blocks through a Transformer encoder to extract visual semantic vectors. The video stream uses a video shift window transformer architecture, which performs local attention calculations simultaneously in the spatial and temporal dimensions through a 3D shift window attention mechanism to extract the dynamic temporal vector of the video.

[0023] After obtaining the latest rule set, the system immediately performs the first phase of coarse-grained content pruning. The core objective of this step is to leverage the rule engine to quickly reduce the scale of data to be processed at the retrieval engine layer. Specifically, the system maps inclusion and exclusion rules to retrieval engines, such as Boolean query clauses in Elasticsearch based on the Lucene kernel. Complex filtering condition trees are constructed by combining multiple clauses. Inclusion rules are transformed into filters that must be satisfied, while exclusion rules are transformed into filters that must not be matched.

[0024] The retrieval engine utilizes its underlying inverted index and bitmap data structure to efficiently merge the filtering results from different fields using bitwise operations. This allows it to filter out a first set of candidate content that meets permission, status, and classification requirements from millions or even tens of millions of original documents within milliseconds. This filtering stage is entirely based on the document's structured metadata fields and does not involve deep semantic parsing of text or image content, thus resulting in extremely low computational overhead. After this round of pruning, a large number of documents that users do not have permission to access, are no longer available, or belong to blocked categories are discarded, greatly reducing the computational burden on subsequent complex models. Simultaneously, the system records the details of each candidate content's match to the inclusion rules, such as whether it matched category conditions or tag conditions. This structured matching information is encapsulated as important discrete features and passed to the learning and ranking model in the fourth step to guide the final weight calculation. After this initial screening, the system sends a manageable set of first candidate content and its associated rule-matching features into the subsequent multimodal semantic analysis pipeline.

[0025] Step 103: Perform compliance detection on the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content; Specifically, in this embodiment, a compliance detection head is established. The compliance detection head is a multi-layer fully connected network, which includes two hidden layers in structure and a Dropout random deactivation layer between each layer. The Softmax activation function of the compliance detection head is used to normalize the calculation results of the forward propagation to obtain the compliance prediction probability.

[0026] When the first set of candidate content is fed into the deep learning inference pipeline, the system first calls the pre-trained Multimodal Content Model (MCM) for comprehensive semantic deconstruction. This model employs a cutting-edge three-stream encoder architecture to adapt to different data types of input: For text modality, the model introduces BERT as the backbone encoding network, concatenating the title, summary, and body text, then overlaying word embeddings, segment embeddings, and positional embeddings before feeding them into a multi-layer Transformer for processing, ultimately outputting a text semantic vector rich in contextual information; for image modality, the model uses the ViT architecture, segmenting the cover image into a fixed-size sequence of image blocks, which, after linear projection, are also captured by a Transformer encoder to capture the spatial dependencies between the image blocks; for video modality, the VideoSwinTransformer is used, whose core lies in using a 3D shifting window attention mechanism to simultaneously perform hierarchical local attention calculations in the spatial, width / height, and temporal dimensions, as well as the frame sequence, thereby efficiently extracting the temporal evolution features of dynamic content.

[0027] The feature vectors output from the three encoded streams are not simply concatenated. Instead, they are fed into a cross-modal attention fusion module for deep interaction. This module uses text features as the query vector and visual or video features as the key and value vectors. It calculates dot product attention weights to highlight the visual regions most relevant to the text semantics, ultimately outputting a unified high-dimensional multimodal semantic feature tensor. This feature tensor is then fed into a compliance detection head for risk inference. This detection head is essentially a multi-layer fully connected network containing two hidden layers with random deactivation between layers to prevent overfitting. Finally, a sigmoid activation function maps the output to the zero-to-one range, generating a compliance prediction probability. This probability quantifies the risk of content violating sensitive red lines such as political, violent, or pornographic content. A higher probability indicates safer content. This soft score will become a key penalty factor in subsequent ranking processes to influence content placement.

[0028] Step 104: Input the compliance prediction probability, inclusion rules, exclusion rules and priority rules into the learning ranking model, determine the ranking weight of the first candidate content and rank them to obtain the second candidate content; Specifically, in this embodiment, the compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model. The learning ranking model uses Lambda MART as the core ranking algorithm, where each regression tree fits the residual of the previous round and performs gradient optimization for the normalized loss cumulative gain evaluation index specific to the search scenario. The feature space is nonlinearly partitioned and weighted by multiple trees of the learning ranking model to obtain the second candidate content.

[0029] After obtaining the compliance prediction probability, the system enters the core ranking weight calculation stage. This stage introduces the Learning to Rank (LTR) model to achieve a qualitative upgrade from hard rule matching to intelligent semantic ranking. First, the system performs refined feature engineering, unifying heterogeneous information into numerical feature vectors as model input. These feature vectors consist of three main categories: the first is the rule feature layer, including the hit score of included rules, the trigger flag of excluded rules, and the effective sequence encoding of priority rules; the second is the content quality and compliance feature layer, namely the compliance prediction probability, content publication timeliness, and historical click heat statistics output in step three; the third is the query relevance feature layer, namely the traditional text matching score between search terms and titles / body text.

[0030] After feature concatenation, the system inputs these features into the LambdaMART model for ranking decisions. This model is a variant of gradient boosting decision trees, and its internal structure consists of multiple regression trees serially integrated through iterative boosting. During the training phase, the model performs gradient optimization for the normalized loss cumulative gain evaluation metric specific to the search scenario. It not only focuses on the absolute prediction score of individual content but also optimizes the relative ranking order among candidate content through partial order pairs or list-level loss functions. During the inference phase, multiple regression trees non-linearly partition the input feature space. Each tree routes samples to different leaf nodes based on feature values ​​and assigns corresponding weights. Finally, the prediction values ​​of all trees are weighted and summed to accurately output a ranking weight for each content in the first candidate content set. The system then performs descending reordering based on this weight, prioritizing compliant and highly relevant content while suppressing content with low compliance probability or that hits the exclusion rules to the end, thereby generating a second candidate content set that has been intelligently reordered.

[0031] Step 105: Perform sensitive word detection on the search terms and second candidate content in the search request to obtain the sensitive word detection results; Specifically, in this embodiment, a cascaded structure model of BERT-BiLSTM-CRF bidirectional encoder representation-bidirectional long short-term memory network-conditional random field is introduced to detect sensitive words and obtain sensitive word detection results. The embedding layer converts characters into dynamic word vectors through the BERT model. The sequence encoding layer uses the BiLSTM bidirectional long short-term memory network to capture long-distance text dependencies from both forward and backward directions and extract contextual temporal features. The decoding layer calculates the transition probability between labels through the CRF conditional random field and outputs the optimal label sequence.

[0032] After semantic ranking is completed, the system activates the final security gate by performing deep detection based on a hybrid enhanced sensitive word recognition architecture. This detection simultaneously covers the user-input search terms and the second candidate content. For the search terms, the system first executes an efficient multi-pattern matching algorithm based on the AC automaton, using a finite state machine to hit the pre-set sensitive word root library at millisecond speeds, completing the initial risk screening of user intent with extremely low latency. For the title and body text of the second candidate content, the system employs a more sophisticated three-level cascaded deep network structure, BERT-BiLSTM-CRF, for fine-grained sequence annotation.

[0033] In this structure, the embedding layer utilizes BERT to transform characters into dynamic word vectors to effectively address the problem of polysemy; the sequence encoding layer captures long-distance textual dependencies simultaneously from both forward and backward directions through a bidirectional long short-term memory network, extracting deep contextual temporal features; the decoding layer introduces a conditional random field, calculating the state transition probability matrix between labels to output the globally optimal label sequence, thereby accurately marking the start and end positions of sensitive word entities. To further resist variant sensitive word attacks, such as homophones, word splitting, pinyin substitution, and similar-looking characters, the system synchronously maps the above detection results to a pre-constructed sensitive word knowledge graph, SKG.

[0034] This knowledge graph constructs heterogeneous graph nodes from sensitive words, their common variations, and related contextual concepts. It utilizes graph neural networks for neighborhood aggregation and relational reasoning, effectively inferring implicit sensitive semantic nodes that are not explicitly present in the text but have high semantic relevance through iterative propagation of neighboring node embeddings. Finally, the system comprehensively arbitrates the pattern matching results from the AC automaton, the entity boundary results from deep sequence annotation, and the implicit relational reasoning results from the knowledge graph, outputting a structured sensitive word detection result object. This object records in detail the hit location, sensitive category (e.g., political, pornographic, violent), and a preliminary quantified level of harm.

[0035] Step 106: Based on the sensitive word detection results, perform blocking, demotion, replacement and interception on the second candidate content to obtain the target candidate content and display it in the search.

[0036] Specifically, in this embodiment, if the search term itself matches a high-risk sensitive word, the highest level of circuit breaker mechanism is triggered, all second candidate content is discarded, an empty result is returned, and a security log is recorded; if a second candidate content is determined to be of a high-risk level, the second candidate content is deleted from the display list.

[0037] Based on the structured sensitive word detection results output in step five, the system imports them into the arbitration decision engine to execute a tiered and quantitative handling strategy. This engine performs strict routing based on preset multi-level thresholds. The first level is the highest-level circuit breaker mechanism: if the search term itself is found to contain high-risk sensitive words, a global block is triggered, discarding all second-candidate content and returning an empty result. At the same time, a security audit log is asynchronously recorded to prevent the spread of illegal searches. The second level performs refined tiered governance for individual candidate content: if candidate content is judged to be high-risk, it is blocked, physically removed from the final display list, and not involved in subsequent rendering; if the content contains medium-risk sensitive rules, the engine calls the ranking intervention interface to apply a punitive decay factor to the ranking weight generated in step four, forcibly demoting the content to after normal compliant content, ensuring that low-risk content can be accessed but is in an inconspicuous display position; if the content contains only slightly sensitive words, such as borderline internet slang, the text purification filter is called to perform replacement processing, replacing sensitive words with asterisks or synonymous compliant words, thus preserving the informational value of the main content while avoiding the risk of violations.

[0038] After the rigorous arbitration process described above, the remaining target candidate content is packaged into a standard response data packet and returned to the front end for rendering and display, according to the final determined order. For content that has been replaced, the front end will simultaneously highlight it to alert the user. Meanwhile, all details of content that triggers sensitive rules, user identifiers, and decision actions during this search process are asynchronously written to the audit and monitoring platform, forming a closed-loop data feedback loop. This feedback data not only meets regulatory compliance requirements but also serves as high-quality negative and positive samples, periodically fed back into the training dataset of the multimodal detection model and the learning and ranking model, driving incremental learning and performance iteration, thereby enabling the entire search content filtering system to continuously optimize itself during ongoing operation.

[0039] Its beneficial effects lie in the fact that, based on a dual mechanism of fusion rule configuration and intelligent detection, it completes the initial screening through three types of rules: inclusion, exclusion, and priority. Relying on a multimodal content detection model to mine multi-dimensional semantic features, it achieves a combination of surface-level word matching and deep semantic understanding, completely overcoming the limitation of traditional sensitive word matching in failing to identify variant violations, and significantly reducing the false negative and false positive rates. The introduction of a learning ranking model, combined with rules and compliance probabilities, dynamically adjusts content weights, allowing for adaptive adjustments to filtering standards based on different business scenarios, balancing content compliance with the richness of search results, and avoiding the loss of high-quality content caused by a one-size-fits-all filtering approach. Finally, this technology adds a secondary sensitive word review and differentiated handling process, accurately verifying the ranked candidate content. Through hierarchical processing methods such as blocking, downgrading, replacement, and interception, it replaces the single interception mode, improving the precision of filtering. This significantly improves the accuracy, flexibility, and stability of search content filtering, adapting to various complex search scenarios and effectively ensuring the compliance and security of online search content.

[0040] Please see Figure 2 In the search content filtering method based on rule configuration and sensitive words, the compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model to determine the ranking weight of the first candidate content and rank them to obtain the second candidate content. This includes the following steps: Step 201: Input the compliance prediction probability, inclusion rules, exclusion rules, and priority rules into the learning ranking model; Step 202: The learning ranking model uses Lambda MART as the core ranking algorithm. Each regression tree is fitted with the residual of the previous round and the gradient is optimized for the normalized loss cumulative gain evaluation index, which is specific to the search scenario. Step 203: By learning multiple trees of the ranking model, the feature space is nonlinearly partitioned and weighted to obtain the second candidate content.

[0041] The above describes embodiments of the search content filtering method based on rule configuration and sensitive words of the present invention. Please refer to [link / reference]. Figure 3 In a search content filtering system based on rule configuration and sensitive words, the search content filtering system includes the following modules: The filtering rule acquisition module is used to read the filtering rule set stored in the configuration center in response to a search request. The filtering rule set includes inclusion rules, exclusion rules, and priority rules. The semantic feature extraction module is used to perform preliminary filtering of the initial candidate content according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into the pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. The compliance prediction module is used to perform compliance detection on multi-dimensional semantic feature information and obtain the compliance prediction probability of the first candidate content. The candidate content ranking module is used to input the compliance prediction probability, inclusion rules, exclusion rules and priority rules into the learning ranking model, determine the ranking weight of the first candidate content and rank them to obtain the second candidate content. The sensitive word detection module is used to detect sensitive words in the search request and the second candidate content, and obtain the sensitive word detection results. The content search and display module is used to perform processes such as blocking, downgrading, replacing, and intercepting the second candidate content based on the sensitive word detection results, so as to obtain the target candidate content and display it for search.

[0042] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended technical solutions and equivalents.

Claims

1. A search content filtering method based on rule configuration and sensitive words, characterized in that, The search content filtering method includes the following steps: In response to a search request, the filter rule set stored in the configuration center is read, and the filter rule set includes inclusion rules, exclusion rules and priority rules; The initial candidate content is initially filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. Compliance detection is performed on the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content; The compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model to determine the ranking weight of the first candidate content and sort it to obtain the second candidate content. Sensitive word detection is performed on the search terms and second candidate content in the search request to obtain sensitive word detection results; Based on the sensitive word detection results, the second candidate content is subjected to blocking, de-weighting, replacement and interception processes to obtain the target candidate content and display it in the search.

2. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The initial candidate content is preliminarily filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information, including: Based on the inclusion and exclusion rules, filtering conditions are dynamically concatenated in the query statement of the retrieval engine layer. By performing bitmap operations on the inverted index, content that does not meet the permissions, status, and category criteria is filtered out to obtain the first candidate content.

3. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The initial candidate content is preliminarily filtered according to the inclusion and exclusion rules to obtain the first candidate content. The first candidate content is then input into a pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information, including: The multimodal content detection model adopts a three-stream encoder architecture, which includes at least a text stream, an image stream, and a video stream; The text stream introduces BERT as the backbone coding network. After concatenating the title, summary and body text, it is fed into the multi-layer transformer coding layer after being superimposed with word embedding, segment embedding and position embedding, and outputs a semantic vector that includes deep contextual relationships. The image stream introduces the ViT visual transformer architecture, which divides the cover image into fixed-size image blocks, converts them into sequence vectors through a linear projection layer, and captures the spatial dependencies between image blocks through a Transformer encoder to extract visual semantic vectors. The video stream introduces a video shift window transformer architecture, which uses a 3D shift window attention mechanism to perform local attention calculations simultaneously in the spatial and temporal dimensions to extract the dynamic temporal vector of the video.

4. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The compliance detection of the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content includes: A compliance detection head is established, which is a multi-layer fully connected network, including two hidden layers in structure, and a Dropout random deactivation layer is set between each layer; The forward propagation calculation results are normalized using the Softmax activation function of the compliance detection head to obtain the compliance prediction probability.

5. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The process involves inputting the compliance prediction probability, inclusion rules, exclusion rules, and priority rules into a learning ranking model to determine the ranking weights of the first candidate content and then ranking them to obtain the second candidate content, including: The compliance prediction probability, inclusion rules, exclusion rules, and priority rules are input into the learning ranking model; The learning ranking model uses Lambda MART as the core ranking algorithm, where each regression tree is fitted with the residual of the previous round and the gradient is optimized for the normalized loss cumulative gain evaluation index specific to the search scenario. By learning multiple trees of the ranking model, the feature space is nonlinearly partitioned and weighted to obtain the second candidate content.

6. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The process of performing sensitive word detection on the search terms and second candidate content in the search request to obtain sensitive word detection results includes: A cascaded structure model of BERT-BiLSTM-CRF bidirectional encoder representation-bidirectional long short-term memory network-conditional random field is introduced for sensitive word detection, and sensitive word detection results are obtained. The embedding layer uses the BERT model to convert characters into dynamic word vectors. The sequence encoding layer uses a BiLSTM bidirectional long short-term memory network to capture long-distance text dependencies from both forward and backward directions and extract contextual temporal features. The decoding layer uses a CRF conditional random field to calculate the transition probabilities between labels and outputs the optimal label sequence.

7. The search content filtering method based on rule configuration and sensitive words as described in claim 1, characterized in that, The step of performing masking, de-weighting, replacement, and interception processing on the second candidate content based on the sensitive word detection results to obtain the target candidate content and display it for search includes: If the search term itself contains high-risk sensitive words, the highest level of circuit breaker mechanism will be triggered, all second candidate contents will be discarded, an empty result will be returned and a security log will be recorded. If a second candidate item is determined to be of a high-risk level, the second candidate item will be removed from the display list.

8. A search content filtering system based on rule configuration and sensitive words, characterized in that, The search content filtering system includes the following modules: The filtering rule acquisition module is used to read the filtering rule set stored in the configuration center in response to a search request. The filtering rule set includes inclusion rules, exclusion rules, and priority rules. The semantic feature extraction module is used to perform preliminary filtering of the initial candidate content according to the inclusion and exclusion rules to obtain the first candidate content, and input the first candidate content into the pre-trained multimodal content detection model for semantic analysis to obtain multi-dimensional semantic feature information. The compliance prediction module is used to perform compliance detection on the multi-dimensional semantic feature information to obtain the compliance prediction probability of the first candidate content. The candidate content ranking module is used to input the compliance prediction probability, inclusion rules, exclusion rules and priority rules into the learning ranking model, determine the ranking weight of the first candidate content and rank them to obtain the second candidate content. The sensitive word detection module is used to detect sensitive words in the search terms and second candidate content in the search request, and obtain sensitive word detection results; The content search and display module is used to perform masking, weight reduction, replacement and interception processing on the second candidate content based on the sensitive word detection results, so as to obtain the target candidate content and perform search and display.

9. The search content filtering system based on rule configuration and sensitive words as described in claim 8, characterized in that, The sensitive word detection module includes the following sub-modules: A submodule is introduced to introduce a cascaded structure model of BERT-BiLSTM-CRF bidirectional encoder representation-bidirectional long short-term memory network-conditional random field for sensitive word detection, and obtain sensitive word detection results; The extraction submodule is used in the embedding layer to convert characters into dynamic word vectors through the BERT model. The sequence encoding layer uses a BiLSTM bidirectional long short-term memory network to capture long-distance text dependencies from both forward and backward directions and extract contextual temporal features. The decoding layer calculates the transition probabilities between labels through a CRF conditional random field and outputs the optimal label sequence.

10. The search content filtering system based on rule configuration and sensitive words as described in claim 8, characterized in that, The content search and display module includes the following sub-modules: The first judgment submodule is used to trigger the highest level of circuit breaker mechanism if the search term itself hits a high-risk sensitive word, discard all second candidate content, return an empty result and record a security log; The second judgment submodule is used to remove a second candidate content from the display list if it is determined to be of a high-risk level.