A sensitive content fast filtering method and system based on dynamic multi-rule matching
By using a dynamic multi-rule matching method, filtering rules are selected according to different application scenarios, which solves the problem of incorrect filtering of normal content in the existing technology for sensitive content filtering, and achieves more efficient sensitive content filtering and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING INFORMATION TECH BOTE INTELLIGENT TECH CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies often mistakenly filter normal content when filtering sensitive content, affecting user experience and communication.
A dynamic multi-rule matching method is adopted, which selects keyword filtering rules or semantic filtering rules according to different application scenarios, and dynamically adjusts the filtering strategy by combining alternative keyword updates and real-time detection of new words.
It improves the accuracy of sensitive content filtering, reduces the probability of normal content being mistakenly filtered, and enhances the smoothness and experience of user communication.
Smart Images

Figure CN119917737B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method and system for fast filtering of sensitive content based on dynamic multi-rule matching. Background Technology
[0002] With the development and progress of internet technology, various online platforms have gradually emerged, and more and more people have joined these platforms. Through these platforms, users can share their daily lives and popularize scientific knowledge. However, there are also some low-quality individuals who publish inappropriate information. Therefore, relevant platforms have applied various filtering methods to filter out this inappropriate and sensitive content.
[0003] When relevant platforms filter this sensitive content, they usually do so by filtering keywords. While this method can block some sensitive content, it also blocks some normal content containing these keywords, affecting users' normal communication and user experience. Summary of the Invention
[0004] This application provides a method and system for rapid filtering of sensitive content based on dynamic multi-rule matching. It can filter sensitive content as much as possible while reducing the probability of normal content being filtered, thus ensuring normal communication for users and improving user experience.
[0005] This application provides a method for fast filtering of sensitive content based on dynamic multi-rule matching, including:
[0006] Obtain the current application scenario of the content to be filtered;
[0007] Obtain filtering rule application condition information, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario;
[0008] Based on the current application scenario and the filtering condition application rules, the preset filtering rule corresponding to the current application scenario is determined as the current application rule;
[0009] The content to be filtered is processed based on the current application rules to obtain the content processing result.
[0010] Optionally, in some embodiments, the preset filtering rules include keyword filtering rules and semantic filtering rules. The step of determining the preset filtering rule corresponding to the current application scenario, based on the current application scenario and the filtering conditions, as the current application rule, includes:
[0011] When the current application scenario is a structured scenario, the preset filtering rule corresponding to the structured scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0012] Optionally, in some embodiments, before determining the preset filtering rule corresponding to the structured scenario as the keyword filtering rule when the current application scenario is a structured scenario, and using the keyword filtering rule as the current application rule, the method further includes:
[0013] Obtain the preset keywords from the keyword filtering rules;
[0014] Based on the preset keywords, alternative keywords are obtained according to a preset search frequency;
[0015] The keyword filtering rules are updated based on the alternative keywords.
[0016] Optionally, in some embodiments, determining the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the filtering condition application rule further includes:
[0017] When the current application scenario is a content-based scenario, the preset filtering rule corresponding to the content-based scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule.
[0018] Optionally, in some embodiments, when the current application scenario is a content-based scenario, before determining that the preset filtering rule corresponding to the content-based scenario is the semantic filtering rule and using the semantic filtering rule as the current application rule, the method further includes:
[0019] Obtain the number of online users in the content-driven scenario;
[0020] When the number of online users exceeds the preset number of users, the preset filtering rule corresponding to the content-based scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0021] Optionally, in some embodiments, after obtaining the number of online users in the content-driven scenario, the method further includes:
[0022] When the number of online users does not exceed the preset number of users, the preset filtering rule corresponding to the content-based scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule.
[0023] Optionally, in some embodiments, when the number of online users exceeds a preset number of users, before determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule and using the semantic filtering rule as the current application rule, the method further includes:
[0024] Obtain the content update frequency corresponding to the number of online users;
[0025] When the content update frequency does not exceed the preset update frequency, the preset filtering rule corresponding to the content scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule.
[0026] When the content update frequency exceeds the preset update frequency, the preset filtering rule corresponding to the content-based scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0027] Optionally, in some embodiments, after obtaining the current application rules, the method further includes:
[0028] Determine whether the content-based scenario is a real-time live streaming scenario;
[0029] If the content-based scenario is a real-time live streaming scenario, then obtain the live streaming tag of the content-based scenario;
[0030] The semantic filtering rules corresponding to the live streaming tag are used to block the live streaming tag.
[0031] Optionally, in some embodiments, after determining whether the content-based scenario is a live streaming scenario, the method further includes:
[0032] If the content-based scenario is a non-real-time live streaming scenario, then the semantic filtering rules that were previously blocked are restored.
[0033] Accordingly, embodiments of this application provide a rapid sensitive content filtering system based on dynamic multi-rule matching, including:
[0034] The scene acquisition module is used to acquire the current application scene of the content to be filtered;
[0035] The condition information acquisition module is used to acquire the application condition information of the filtering rules, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario.
[0036] The rule determination module is used to determine the preset filtering rule corresponding to the current application scenario based on the current application scenario and the filtering conditions, and use it as the current application rule;
[0037] The content processing module is used to process the content to be filtered based on the current application rules to obtain the content processing result.
[0038] This application provides a method and system for rapid filtering of sensitive content based on dynamic multi-rule matching. The method can obtain the current application scenario of the content to be filtered; obtain filtering rule application condition information, including a preset application scenario and preset filtering rules corresponding to the preset application scenario; determine the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the filtering rule; and process the content to be filtered based on the current application rule to obtain the content processing result. This application can select different filtering rules according to different scenarios, which can filter sensitive content as much as possible while reducing the probability of normal content being filtered, ensuring normal communication for users and improving user experience. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of a scenario for a fast sensitive content filtering method based on dynamic multi-rule matching provided in an embodiment of this application.
[0041] Figure 2 This is a flowchart of a method for fast filtering of sensitive content based on dynamic multi-rule matching provided in an embodiment of this application;
[0042] Figure 3 This is a schematic diagram of the structure of the model configuration device provided in the embodiments of this application;
[0043] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] This application provides a method and system for rapid filtering of sensitive content based on dynamic multi-rule matching. Specifically, the rapid filtering system for sensitive content based on dynamic multi-rule matching can be integrated into an electronic device, such as a terminal or a server.
[0046] It is understood that the sensitive content fast filtering method based on dynamic multi-rule matching in this embodiment can be executed on a terminal, on a server, or jointly by a terminal and a server. The above examples should not be construed as limiting this application.
[0047] like Figure 1 As shown, an example is a method for quickly filtering sensitive content based on dynamic multi-rule matching, where the terminal and server jointly execute the method. The model training system provided in this application includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected via a network, such as a wired or wireless network, etc., wherein the model configuration device can be integrated into the terminal.
[0048] Terminal 10 may include mobile phones, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, tablet computers, laptops, or personal computers (PCs), etc. A client may also be configured on terminal 10, which may be an application client or a browser client, etc.
[0049] The server 11 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The sensitive content fast filtering method or apparatus based on dynamic multi-rule matching disclosed in this application allows multiple servers to form a blockchain, with each server acting as a node on the blockchain.
[0050] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0051] This embodiment will be described from the perspective of a model configuration device, which can be integrated into an electronic device, such as a server or a terminal.
[0052] This embodiment can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving.
[0053] like Figure 2 As shown, the specific process of this fast sensitive content filtering method based on dynamic multi-rule matching can be as follows:
[0054] 110. Obtain the current application scenario of the content to be filtered.
[0055] Content to be filtered refers to content uploaded by users to the platform in preparation for publication, or content that has already been published but has not been authorized for public release by the platform. If the platform's filtering rules allow publication, the user's published content will be publicly released on the platform; if publication is not permitted, other users on the platform will not be able to view the content published by that user.
[0056] The current application scenario can be determined by the platform system based on the platform's current sections. Current application scenarios include structured scenarios and content-based scenarios. Structured scenarios refer to content with a fixed structural pattern. Compared to content-based scenarios, their interaction frequency and real-time nature are lower, and content updates are slower. For example, online forums are a structured scenario; their structure has a fixed pattern, existing in the form of posts and replies, and discussions often focus on specific topics.
[0057] Content in content-driven scenarios lacks a fixed structural pattern and encompasses a wide variety of formats, including text, images, videos, and audio. Furthermore, the content often contains more implicit meanings and complex expressions, such as humor, satire, and metaphors. For example, live streaming and short video platforms feature frequent user interaction, rapid content updates, and strong real-time characteristics, potentially involving various formats such as instant messaging, comments, and sharing.
[0058] 120. Obtain the application condition information of the filtering rules. The application condition information of the filtering rules includes the preset application scenario and the preset filtering rules corresponding to the preset application scenario.
[0059] The system pre-stores filtering rule application conditions. When a user posts information, the system can directly call these rules to process the content to be filtered. The filtering rule application conditions include preset application scenarios and the preset filtering rules corresponding to those scenarios.
[0060] Specifically, the preset filtering rules include keyword filtering rules and semantic filtering rules. Keyword filtering rules correspond to structured scenarios, while semantic filtering rules correspond to content-based scenarios. It is important to understand that the keyword filtering model includes not only keywords but also key terms.
[0061] 130. Based on the current application scenario and filtering conditions, determine the preset filtering rules corresponding to the current application scenario and use them as the current application rules.
[0062] This means matching the current application scenario with the structured and content-based scenarios in the filtering application rules. For example, if the current application scenario is an online forum or Tieba, it is determined to correspond to a structured scenario. If the current application scenario is a live broadcast or short video, it is determined to correspond to a content-based scenario.
[0063] Then, based on the correspondence between the preset filtering rules and the application scenario, keyword filtering rules are selected for structured scenarios, and semantic filtering rules are selected for content-based scenarios. It should be understood that both semantic filtering rules and keyword filtering rules can be obtained through trained filtering models. The application of current semantic filtering models and keyword filtering models is quite mature, and will not be elaborated on in this embodiment.
[0064] Furthermore, in some embodiments, based on the current application scenario and filtering conditions, a preset filtering rule corresponding to the current application scenario is determined as the current application rule, including:
[0065] When the current application scenario is a structured scenario, the preset filtering rule corresponding to the structured scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0066] In other words, when the current application scenario is determined to be a structured scenario, the preset filtering rule can be determined as the keyword filtering rule. At this time, the platform can use the keyword filtering rule as the current application rule and filter the content to be filtered according to the current application rule.
[0067] Furthermore, in some embodiments, as culture progresses, the language used by users becomes increasingly unconventional, and more and more words containing sensitive content are constantly emerging. Therefore, in order to more accurately filter this sensitive content, when the current application scenario is a structured scenario, the preset filtering rule corresponding to the structured scenario is determined as the keyword filtering rule. Before using the keyword filtering rule as the current application rule, the following steps are also included:
[0068] Retrieve preset keywords from keyword filtering rules;
[0069] Based on preset keywords, alternative keywords are obtained according to preset search frequencies;
[0070] Update keyword filtering rules based on alternative keywords.
[0071] Specifically, keyword filtering rules are based on keywords. The initial keyword filtering rules must contain at least one keyword, and the keywords present in the keyword filtering rules are the preset keywords.
[0072] Then, according to the preset keywords, obtain the substitute keywords of the preset keywords according to the preset search frequency. The preset search frequency can be set according to the actual situation. For example, it can be set to search once a month, once a year, or once an hour, and can be set according to the actual situation. Of course, in some embodiments, the search frequency can also be to search when new words appear on the network. For example, the once-popular network keywords such as "lan shou xiang gu" and "YYDS". When detecting new words emerging on the network through means such as web crawlers, the search can be carried out.
[0073] The substitute keywords of the preset keywords refer to those keywords that can represent the meaning of the preset keywords. For example, the meaning represented by "lan shou xiang gu" in the example is "nán shòu xiǎng kū". So, if the preset keyword is "nán shòu xiǎng kū", then the substitute keyword is "lan shou xiang gu".
[0074] Finally, after obtaining the substitute keywords, add the substitute keywords to the corresponding keyword filtering rules. Then, the substitute keywords added to the keyword filtering rules can be used as the initial keywords for the next update and combined with the previous initial keywords for subsequent updates. For example, if the initial keyword is "nán shòu xiǎng kū", then after "lan shou xiang gu" is added to the keyword filtering rules, the "lan shou xiang gu" of this time and the "nán shòu xiǎng kū" of the previous time will be used as the new initial keywords for subsequent updates. Of course, if there is no corresponding substitute keyword after the search, there is no need to update the keyword filtering rules. Therefore, through the above method, it is possible to more accurately filter the newly emerging vocabulary content corresponding to these sensitive contents, and can尽可能保证待过滤内容过滤的准确性。
[0075] Further, in some embodiments, different filtering rules are applied to different application scenarios, which can尽可能防止出现一刀切的情况,也就是能够尽可能防止出现不论内容的正确与否,只要存在相应的关键字均进行过滤的情况。So, based on the current application scenario and filtering conditions to apply rules, determine the preset filtering rule corresponding to the current application scenario as the current application rule, and it also includes:
[0076] When the current application scenario is a content-based scenario, determine that the preset filtering rule corresponding to the content-based scenario is a semantic filtering rule, and use the semantic filtering rule as the current application rule.
[0077] The method for obtaining semantic filtering rules is the same as that for obtaining keyword filtering rules; the only difference lies in the current application scenario. When the current application rule is a semantic filtering rule, it can combine the contextual semantics of the content to be filtered to determine whether the content is sensitive. For example, if only keyword filtering is used, and the preset keywords are words like "money," "politics," "country," or "discrimination," then all content containing these keywords will be filtered. However, if a semantic filtering rule is used, the relevant filtering rule model will analyze whether the content is sensitive or not. For example, if the content to be filtered is "The state issued corresponding policies to increase farmers' monetary income," then the semantic filtering rule will consider this sentence to be non-sensitive content and does not need to be filtered.
[0078] Furthermore, in content-driven scenarios, different filtering rules may be considered due to the limitation on the number of users. This is because when the number of users is too large, the computational complexity of semantic filtering rules is high, requiring significant computing resources and time. Therefore, to address the above issues, when the current application scenario is a content-driven scenario, before determining the preset filtering rule corresponding to the content-driven scenario as a semantic filtering rule and using the semantic filtering rule as the current application rule, the following steps are also included:
[0079] Acquire the number of online users in content-driven scenarios;
[0080] When the number of online users exceeds the preset number of users, the preset filtering rule corresponding to the content-based scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0081] First, the platform obtains the number of online users in the content-based context where the content to be filtered is located. The more online users there are, the more content to be filtered will be generated, because the interaction in the content-based context is frequent and fast.
[0082] Therefore, if the number of online users exceeds the preset number, it proves that using semantic filtering rules for the content to be filtered at this time would cause the system to run under heavy load, resulting in slow filtering speed and potential system lag. Therefore, in this case, the preset filtering rule corresponding to the content-based scenario is determined to be the keyword filtering rule, and this keyword filtering rule is used as the current application rule. Compared to semantic filtering rules, keyword filtering rules do not require understanding the contextual semantics of the content, consume fewer computing resources, and have a faster computation speed, thus resulting in faster filtering.
[0083] Correspondingly, if the number of online users does not exceed the preset number of users, the preset filtering rule corresponding to the content-based scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule.
[0084] Since the number of online users is small at this point, the maximum amount of content to be filtered will not affect the normal operation of the system. Therefore, in order to improve accuracy, semantic filtering rules will continue to be used to filter the content to be filtered.
[0085] Furthermore, in some embodiments, a large number of online users may not necessarily generate a large amount of content to be filtered. Therefore, the accuracy of determining filtering rules solely based on the number of online users needs improvement. Thus, when the number of online users exceeds a preset number, before determining the preset filtering rule corresponding to the content-based scenario as a semantic filtering rule and using the semantic filtering rule as the current application rule, the following steps are also included:
[0086] Get the content update frequency corresponding to the number of online users;
[0087] When the content update frequency does not exceed the preset update frequency, the preset filtering rule corresponding to the content-based scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule.
[0088] When the content update frequency exceeds the preset update frequency, the preset filtering rule corresponding to the content-based scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
[0089] First, the content update frequency of the number of online users in the current application scenario is obtained. The content update frequency refers to the amount of content to be filtered generated per unit time under the current application scenario and the number of online users. For example, the amount of content to be filtered generated per second or per minute. This unit time can be set according to the actual situation, and this embodiment does not limit it.
[0090] Content update frequency can be calculated in real time. For example, multiple time intervals can be preset to record the number of items to be filtered. These time intervals can be the same or different. For instance, the first interval might be one second, the second one second, and the third one minute. The average of these three intervals is then calculated to obtain the content update frequency. Of course, the time unit in the average calculation needs to be converted to the same unit, such as seconds. The intervals for each interval can be the same or different, depending on the specific requirements.
[0091] When the content update frequency does not exceed the preset update frequency, it proves that even if the number of online users exceeds the preset number of users, there will not be too much content to be filtered. The content to be filtered can be a word, multiple words, a sentence, or multiple sentences, etc. Multiple pieces of content to be filtered can be at least one of these types.
[0092] When there isn't a large amount of content to be filtered, resource consumption won't be overloaded, and there's sufficient time to filter sensitive content. In this case, accuracy is the primary consideration, so the preset filtering rule corresponding to the content-driven scenario is determined to be a semantic filtering rule, which is then used as the current application rule. Conversely, if the content update frequency exceeds the preset update frequency, it means that even if the number of online users exceeds the preset number, too much content will be generated to filter. Continuing to use semantic filtering in this situation would lead to system overload, consuming excessive computing resources, and potentially slowing down the filtering speed of sensitive content. Therefore, filtering speed becomes the primary consideration, so the preset filtering rule corresponding to the content-driven scenario is determined to be a keyword filtering rule, which is then used as the current application rule.
[0093] By combining the number of online users and the frequency of content updates, the filtering rules can be selected, which can further improve the accuracy and speed of filtering the content to be filtered.
[0094] Furthermore, in some embodiments, due to different application scenarios, some content to be filtered that may be sensitive may be allowed in certain specific application scenarios, in which case it is not necessary to filter this content. Therefore, after obtaining the current application rules, the method further includes:
[0095] Determine whether the content-based scenario is a real-time live streaming scenario;
[0096] If the content-based scenario is a real-time live streaming scenario, then obtain the live streaming tag for the content-based scenario;
[0097] Based on the live streaming tag blocking and the semantic filtering rules corresponding to the live streaming tag.
[0098] In live streaming scenarios, some sensitive content is permitted but not allowed in non-live streaming scenarios. Therefore, it's necessary to determine whether the content-based scenario is a live streaming scenario. If the content-based scenario is a live streaming scenario, then the live streaming tag for the content-based scenario is obtained. The live streaming tag is pre-set by the platform backend; users can only select the corresponding tag and cannot change the tag content.
[0099] For example, in a live streaming scenario, the live stream tags might be "games," "social networking," or "storytelling." Furthermore, the "storytelling" tag might have more specific sub-tags like "ghosts and deities," "history," or "online games." Therefore, if the obtained live stream tag is "storytelling," then one of its corresponding sub-tags, such as "ghosts and deities," "history," or "online games," can also be obtained. These tags are selected by the user when creating the live stream. When other users enter the corresponding live stream room, all users in that live stream room carry that live stream tag. If a user leaves the live stream room, they lose that live stream tag.
[0100] At this point, the semantic filtering rules corresponding to the live stream tag are blocked. For example, "ghosts and gods" are not allowed under the current semantics. That is, the semantics related to ghosts and gods exist in the filtering rules. If the live stream tag of the current live stream scenario is "storytelling" and "ghosts and gods", then the semantics related to ghosts and gods in the filtering rules will be blocked. That is, if there is "ghosts and gods" related content in the content to be filtered, it is allowed. This can ensure that the content related to the live stream tag published by the user in this live stream scenario can be discovered by other users, which is convenient for communication.
[0101] Of course, after determining whether the content-based scenario is a real-time live stream, if it is a non-real-time live stream, the semantic filtering rules that previously blocked the content will be reinstated. That is, if the real-time live stream ends and transitions to a non-real-time live stream, continuing to publish content corresponding to that live stream tag is not allowed. Therefore, the semantic filtering rules are reinstated, meaning that sensitive content published by the user corresponding to that live stream tag will not be discovered by other users. This approach ensures that users can publish relevant content under specific circumstances while preventing users from indiscriminately publishing content under those circumstances, thus guaranteeing the security of content publishing.
[0102] 140. Process the content to be filtered based on the current application rules to obtain the content processing result.
[0103] In other words, content is filtered according to defined filtering rules. This could be done using keyword filtering rules or semantic filtering rules. If any content in the content to be filtered conflicts with a filtering rule, that content will be filtered and cannot be published. In other words, the content processing result can be either "qualified" (can be published) or "unqualified" (cannot be published). The platform can then notify users, reminding them to edit the content according to the processing result or delete it directly.
[0104] As can be seen from the above, this embodiment can obtain the current application scenario of the content to be filtered; obtain the application condition information of the filtering rules, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario; determine the preset filtering rule corresponding to the current application scenario based on the current application scenario and the filtering condition application rule, and use it as the current application rule; process the content to be filtered based on the current application rule to obtain the content processing result. This application can select different filtering rules according to different scenarios, which can filter sensitive content as much as possible while reducing the probability of normal content being filtered, ensuring normal communication for users and improving user experience.
[0105] Based on the method described in the preceding embodiments, the following will provide a more detailed explanation by taking the specific integration of this model configuration device into a terminal as an example.
[0106] To better implement the above methods, embodiments of this application also provide a model configuration device, such as... Figure 3 As shown, the model configuration device may include a scene acquisition module 310, a condition information acquisition module 320, a rule determination module 330, and a content processing module 340, as follows:
[0107] The scene acquisition module 310 is used to acquire the current application scene of the content to be filtered;
[0108] The condition information acquisition module 320 is used to acquire the application condition information of the filtering rules. The application condition information of the filtering rules includes the preset application scenario and the preset filtering rule corresponding to the preset application scenario.
[0109] The rule determination module 330 is used to determine the preset filtering rule corresponding to the current application scenario based on the current application scenario and filtering conditions, and use it as the current application rule.
[0110] The content processing module 340 is used to process the content to be filtered based on the current application rules to obtain the content processing result.
[0111] As can be seen from the above, in this embodiment, the scene acquisition module obtains the current application scene of the content to be filtered; the condition information acquisition module obtains the application condition information of the filtering rules, which includes a preset application scene and a preset filtering rule corresponding to the preset application scene; the rule determination module determines the preset filtering rule corresponding to the current application scene based on the current application scene and the filtering condition application rule, and uses it as the current application rule; the content processing module processes the content to be filtered based on the current application rule to obtain the content processing result. This application can select different filtering rules according to different scenes, which can filter sensitive content as much as possible while reducing the probability of normal content being filtered, ensuring normal communication for users and improving user experience.
[0112] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0113] This application also provides an electronic device, such as... Figure 4 The diagram shows a structural schematic of an electronic device involved in an embodiment of this application. This electronic device can be a terminal or a server, specifically:
[0114] The electronic device may include components such as a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, and an input unit 104. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0115] The processor 101 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 102, and calls data stored in the memory 102, to perform various functions and process data. Optionally, the processor 101 may include one or more processing cores; preferably, the processor 101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 101.
[0116] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.
[0117] The electronic device also includes a power supply 103 that supplies power to the various components. Preferably, the power supply 103 can be logically connected to the processor 101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 103 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0118] The electronic device may also include an input unit 104, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0119] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 101 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 102 according to the following instructions, and the processor 101 runs the applications stored in the memory 102 to realize various functions, as follows:
[0120] Obtain the current application scenario of the content to be filtered; obtain the application condition information of the filtering rules, which includes the preset application scenario and the preset filtering rules corresponding to the preset application scenario; based on the current application scenario and the filtering condition application rules, determine the preset filtering rule corresponding to the current application scenario as the current application rule; process the content to be filtered based on the current application rule to obtain the content processing result.
[0121] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0122] As can be seen from the above, this embodiment can obtain the current application scenario of the content to be filtered; obtain the application condition information of the filtering rules, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario; determine the preset filtering rule corresponding to the current application scenario based on the current application scenario and the filtering condition application rule, and use it as the current application rule; process the content to be filtered based on the current application rule to obtain the content processing result. This application can select different filtering rules according to different scenarios, which can filter sensitive content as much as possible while reducing the probability of normal content being filtered, ensuring normal communication for users and improving user experience.
[0123] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0124] To this end, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the sensitive content fast filtering methods based on dynamic multi-rule matching provided in embodiments of this application. For example, the instructions can execute the following steps:
[0125] Obtain the current application scenario of the content to be filtered; obtain the application condition information of the filtering rules, which includes the preset application scenario and the preset filtering rules corresponding to the preset application scenario; based on the current application scenario and the filtering condition application rules, determine the preset filtering rule corresponding to the current application scenario as the current application rule; process the content to be filtered based on the current application rule to obtain the content processing result.
[0126] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0127] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0128] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the sensitive content fast filtering methods based on dynamic multi-rule matching provided in the embodiments of this application, the beneficial effects that any of the sensitive content fast filtering methods based on dynamic multi-rule matching provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0129] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations regarding the above-described content ordering.
[0130] The above provides a detailed description of a method and system for rapid filtering of sensitive content based on dynamic multi-rule matching, as provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0131] It should be noted that when the above embodiments of this application are applied to specific products or technologies, the relevant data of the object needs to be authorized or agreed to by the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A method for fast filtering of sensitive content based on dynamic multi-rule matching, characterized in that, include: Obtain the current application scenario of the content to be filtered; Obtain filtering rule application condition information, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario; Based on the current application scenario and the application conditions of the filtering rule, the preset filtering rule corresponding to the current application scenario is determined and used as the current application rule; The preset filtering rules include keyword filtering rules and semantic filtering rules. The step of determining the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the application conditions of the filtering rules includes: when the current application scenario is a structured scenario, determining the preset filtering rule corresponding to the structured scenario as the keyword filtering rule, and using the keyword filtering rule as the current application rule. The content to be filtered is processed based on the current application rules to obtain the content processing result; The step of determining the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the application conditions of the filtering rule, and using it as the current application rule, further includes: when the current application scenario is a content-based scenario, determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule, and using the semantic filtering rule as the current application rule; When the current application scenario is a content-based scenario, before determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule and using the semantic filtering rule as the current application rule, the method further includes: obtaining the number of online users in the content-based scenario; when the number of online users exceeds a preset number of users, determining the preset filtering rule corresponding to the content-based scenario as the keyword filtering rule and using the keyword filtering rule as the current application rule; when the number of online users does not exceed the preset number of users, determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule and using the semantic filtering rule as the current application rule. In this context, the structured scenario refers to content with a fixed structural pattern, while the content-based scenario does not have a fixed structural pattern.
2. The method for fast filtering of sensitive content based on dynamic multi-rule matching according to claim 1, characterized in that, Before determining the preset filtering rule corresponding to the structured scenario as the keyword filtering rule and using the keyword filtering rule as the current application rule when the current application scenario is a structured scenario, the method further includes: Obtain the preset keywords from the keyword filtering rules; Based on the preset keywords, alternative keywords are obtained according to a preset search frequency; The keyword filtering rules are updated based on the alternative keywords.
3. The method for fast filtering of sensitive content based on dynamic multi-rule matching according to claim 1, characterized in that, When the number of online users exceeds a preset number of users, determining the preset filtering rule corresponding to the content-based scenario as the keyword filtering rule, and using the keyword filtering rule as the current application rule, includes: Obtain the content update frequency corresponding to the number of online users; When the content update frequency does not exceed the preset update frequency, the preset filtering rule corresponding to the content scenario is determined as the semantic filtering rule, and the semantic filtering rule is used as the current application rule. When the content update frequency exceeds the preset update frequency, the preset filtering rule corresponding to the content-based scenario is determined as the keyword filtering rule, and the keyword filtering rule is used as the current application rule.
4. The method for fast filtering of sensitive content based on dynamic multi-rule matching according to any one of claims 1 or 3, characterized in that, After obtaining the current application rules, the process also includes: Determine whether the content-based scenario is a real-time live streaming scenario; If the content-based scenario is a real-time live streaming scenario, then obtain the live streaming tag of the content-based scenario; The semantic filtering rules corresponding to the live streaming tag are used to block the live streaming tag.
5. The method for fast filtering of sensitive content based on dynamic multi-rule matching according to claim 4, characterized in that, After determining whether the content-based scenario is a real-time live streaming scenario, the method further includes: If the content-based scenario is a non-real-time live streaming scenario, then the semantic filtering rules that were previously blocked are restored.
6. A rapid sensitive content filtering system based on dynamic multi-rule matching, characterized in that, include: The scene acquisition module is used to acquire the current application scene of the content to be filtered; The condition information acquisition module is used to acquire the application condition information of the filtering rules, which includes a preset application scenario and a preset filtering rule corresponding to the preset application scenario. The rule determination module is used to determine the preset filtering rule corresponding to the current application scenario based on the current application scenario and the application conditions of the filtering rule, and use it as the current application rule; The preset filtering rules include keyword filtering rules and semantic filtering rules. The step of determining the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the application conditions of the filtering rules includes: when the current application scenario is a structured scenario, determining the preset filtering rule corresponding to the structured scenario as the keyword filtering rule, and using the keyword filtering rule as the current application rule. The content processing module is used to process the content to be filtered based on the current application rules to obtain the content processing result; The step of determining the preset filtering rule corresponding to the current application scenario as the current application rule based on the current application scenario and the application conditions of the filtering rule, and using it as the current application rule, further includes: when the current application scenario is a content-based scenario, determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule, and using the semantic filtering rule as the current application rule; When the current application scenario is a content-based scenario, before determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule and using the semantic filtering rule as the current application rule, the method further includes: obtaining the number of online users in the content-based scenario; when the number of online users exceeds a preset number of users, determining the preset filtering rule corresponding to the content-based scenario as the keyword filtering rule and using the keyword filtering rule as the current application rule; when the number of online users does not exceed the preset number of users, determining the preset filtering rule corresponding to the content-based scenario as the semantic filtering rule and using the semantic filtering rule as the current application rule. In this context, the structured scenario refers to content with a fixed structural pattern, while the content-based scenario does not have a fixed structural pattern.