Rule-based and deep learning model-based illegal content detection method, device and medium

By combining a rule engine and a deep learning model, a hybrid detection method is used to dynamically select either a lightweight or a large model for detecting illegal content. This solves the problems of high false positive rate and slow detection efficiency in existing technologies, and achieves fast and accurate detection of illegal content.

CN122112840APending Publication Date: 2026-05-29BEIJING YUNSHANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING YUNSHANG TECH CO LTD
Filing Date
2026-02-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies that use a single method for content violation detection suffer from high false alarm rates and slow detection efficiency, failing to balance accuracy, real-time performance, and interpretability.

Method used

A hybrid detection method based on rule engine and deep learning model is adopted. The rule engine initially analyzes the data content, and then dynamically selects a lightweight or large model for further detection based on rule confidence and system load. The results are then weighted and summed to generate the final judgment result.

Benefits of technology

It achieves fast and accurate detection of illegal content, improves the accuracy and controllability of detection, and balances system load and detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122112840A_ABST
    Figure CN122112840A_ABST
Patent Text Reader

Abstract

The application discloses a rule and deep learning model-based illegal content detection method and device and medium, relates to the technical field of content security, and comprises the following steps: obtaining to-be-detected data; analyzing the data content based on a preset rule engine to obtain a rule determination result and a rule confidence; determining a target deep learning model corresponding to the rule confidence and system load, inputting the data content into the target deep learning model, and obtaining a model determination result output by the target deep learning model; performing weighted summation processing on the rule determination result, the model determination result and user information to obtain a final determination result, and generating indicating content indicating that the to-be-detected data is illegal in the case that the final determination result represents illegality. The application is used to solve the problems of low accuracy and slow detection efficiency in the prior art when a single mode is used for illegal content detection, and realizes fast and accurate illegal content detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of content security technology, and in particular to a method, device and medium for detecting illegal content based on rules and deep learning models. Background Technology

[0002] With the rapid growth of social media, instant messaging, live streaming, and short video platforms, the scale of internet content is expanding exponentially. This includes illegal, violent, pornographic, abusive, and content involving minors, which not only spreads quickly and in large quantities but also exhibits a trend towards diversification in content format and more sophisticated circumvention methods. Therefore, identifying whether uploaded content is illegal is a crucial issue that the industry urgently needs to address.

[0003] In existing technologies, a single method is used to determine whether content violates regulations, but this single method has a series of problems such as high false alarm rate and slow detection efficiency. Summary of the Invention

[0004] To address the aforementioned problems and technical requirements, this applicant proposes a rule-based and deep learning model-based method, device, and medium for detecting illegal content. This addresses the issues of low accuracy and slow detection efficiency in existing technologies that use a single method for content violation detection, enabling rapid and accurate detection of illegal content.

[0005] This application provides a method for detecting illegal content based on rules and deep learning models, the method comprising: Acquire the data to be detected, wherein the data to be detected includes: data content and user information; The data content is analyzed based on a preset rule engine to obtain rule judgment results and rule confidence levels used to characterize the content characteristics, wherein the content characteristics include: violation, no violation, and suspected violation; If the content characteristics are determined to be non-violation or suspected violation, a target deep learning model corresponding to the rule confidence and system load is determined, and the data content is input into the target deep learning model to obtain the model judgment result output by the target deep learning model to characterize the content characteristics. The rule judgment result, the model judgment result, and the user information are weighted and summed to obtain the final judgment result. If the final judgment result indicates a violation, an indication is generated indicating that the data to be detected is in violation.

[0006] According to an embodiment of the rule-based and deep learning model-based illegal content detection method of this application, the method analyzes the data content based on a preset rule engine to obtain rule judgment results and rule confidence levels used to characterize content features, including: The data content is analyzed based on a preset rule engine to obtain sensitive feature words used to characterize the content characteristics, an initial judgment score corresponding to each sensitive feature word, and an initial confidence level corresponding to each sensitive feature word. Based on the length of the data content and the number of sensitive feature words, the initial judgment score is corrected to obtain the rule judgment result, and the initial confidence level is corrected to obtain the rule confidence level.

[0007] According to one embodiment of the rule-based and deep learning model-based illegal content detection method of this application, the data content is analyzed based on a preset rule engine to obtain sensitive feature words for characterizing content features, including: Based on the rule engine, semantic matching is performed on the data content and the pre-created sensitive word library to obtain sensitive feature words corresponding to the data content.

[0008] According to one embodiment of the rule-based and deep learning model-based illegal content detection method of this application, the target deep learning model includes any one or more of a lightweight model and a large model; Determining the target deep learning model corresponding to the rule confidence and system load includes: If the content characteristics are determined to be non-violation or suspected violation, a detection path corresponding to the rule confidence and the system load is determined. Different detection paths correspond to different target deep learning models. The detection paths include: a first detection path, a second detection path, and a third detection path. The first detection path includes a lightweight model, the second detection path includes a lightweight model and a large model, and the third detection path includes a large model.

[0009] According to one embodiment of the rule-based and deep learning model-based illegal content detection method of this application, the target deep learning model includes any one or more of a lightweight model and a large model; Determining the target deep learning model corresponding to the rule confidence and system load includes: If the rule confidence is less than the first preset rule confidence and the system load is greater than the preset load, the lightweight model is determined as the target deep learning model. When the confidence level of the rule is less than the first preset rule confidence level and the system load is less than or equal to the preset load, the target deep learning model is determined based on the data type of the data to be detected, wherein the data type includes: text data, image data and video data.

[0010] According to an embodiment of the rule-based and deep learning model-based illegal content detection method of this application, the target deep learning model is determined based on the data type of the data to be detected, including: If the data type is determined to be image data or video data, the large model is determined to be the target deep learning model; If the data type is determined to be text data, the data content is input into the lightweight model to obtain the lightweight model judgment result output by the lightweight model and the lightweight model confidence level corresponding to the lightweight model judgment result. If the lightweight model confidence level is greater than or equal to the second confidence level, the lightweight model is determined as the target deep learning model. If the data type is determined to be text data, the data content is input into the lightweight model to obtain the lightweight model judgment result output by the lightweight model and the lightweight model confidence level corresponding to the lightweight model judgment result. If the lightweight model confidence level is less than the second preset confidence level, the lightweight model and the large model are determined as the target deep learning model.

[0011] According to one embodiment of the rule-based and deep learning model-based method for detecting illegal content, the rule engine includes hard rules and soft rules; The data content is analyzed based on a preset rule engine to obtain rule determination results and rule confidence levels used to characterize content features, including: When the data content is determined to match the hard rule, a rule judgment result and rule confidence level are obtained for the content characteristics to be violated, and an indication content indicating that the data to be detected is violated is generated.

[0012] According to an embodiment of the rule-based and deep learning model-based violation content detection method of this application, after generating indication content indicating that the data to be detected is violation, it further includes: The data to be detected and the final judgment result are updated to a preset training sample library so as to optimize the target deep learning model using the updated training samples.

[0013] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the rule-based and deep learning model-based illegal content detection method as described in any of the preceding claims.

[0014] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the rule-based and deep learning model-based illegal content detection method as described in any of the preceding claims.

[0015] The rule-based and deep learning model-based method, device, and medium for detecting illegal content provided in this application first analyze data content based on a preset rule engine to obtain rule judgment results and rule confidence levels to characterize content features. If the rule engine determines the content is not illegal, a target deep learning model is then used to determine illegality, ensuring the accuracy of the illegality determination. Furthermore, during the illegality determination process using the target deep learning model, the system's real-time load is fully considered based on the rule confidence level and system load, ensuring the efficiency of the illegality determination. Finally, the rule judgment results, model judgment results, and user information are weighted and summed to obtain the final judgment result. Therefore, this application ensures the accuracy and controllability of the judgment by fully considering the rule judgment results and model judgment results, and combining them with user information, achieving rapid and accurate detection of illegal content. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is one of the flowcharts illustrating the rule-based and deep learning model-based illegal content detection method provided in the embodiments of this application; Figure 2 This is the second flowchart of the rule-based and deep learning model-based illegal content detection method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, 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 invention.

[0019] To further clarify the determination of illegal content in this application: Decision-making method based on rule engine: Typical methods include keyword matching, regular expressions, and pattern library filtering. These methods have the advantages of simple implementation, low latency, and strong interpretability, but they have the following problems: (1) high false positive rate; (2) easy for users to avoid by homophones and variant words; (3) inability to handle complex contextual semantics.

[0020] Decision-making methods based on deep learning models: Relying on NLP models, CNN, Transformer, multimodal models, etc. for identification, it has the advantages of high accuracy and strong generalization ability, but it has the following problems: (1) large inference overhead and high latency; (2) the model cannot cope with extreme high concurrency scenarios; (3) the model has weak interpretability and cannot directly provide evidence of violations.

[0021] Existing technologies employ a single judgment method, which either over-relies on rules leading to severe false alarms or over-relies on models resulting in high computational costs and system instability, failing to balance accuracy, real-time performance, cost, and interpretability.

[0022] This application provides a method for detecting illegal content based on rules and deep learning models. This method can be applied to smart terminals or servers. Other descriptions in this application are illustrative and not intended to limit the scope of protection of this application, and will not be described in detail thereafter. The specific implementation of the method is as follows: Figure 1 As shown: Step 101: Obtain the data to be detected.

[0023] The data to be tested includes: data content and user information.

[0024] Step 102: Analyze the data content based on the preset rule engine to obtain the rule judgment results and rule confidence levels used to characterize the content characteristics.

[0025] The content characteristics include: violation, no violation, and suspected violation.

[0026] Step 103: If the content characteristics are determined to be non-violation or suspected violation, determine the target deep learning model corresponding to the rule confidence and system load, and input the data content into the target deep learning model to obtain the model judgment result output by the target deep learning model to represent the content characteristics.

[0027] Step 104: Perform weighted summation on the rule judgment result, model judgment result, and user information to obtain the final judgment result. If the final judgment result indicates a violation, generate an indication that the data to be detected is in violation.

[0028] The rule-based and deep learning model-based content violation detection method provided in this application first analyzes data content based on a preset rule engine to obtain rule judgment results and rule confidence levels to characterize content features. If the rule engine determines the content is not in violation, a target deep learning model is then used for violation judgment, ensuring the accuracy of the violation judgment. Furthermore, during the violation judgment process using the target deep learning model, the system's real-time load is fully considered based on the rule confidence level and system load, ensuring the efficiency of the violation judgment. Finally, the rule judgment results, model judgment results, and user information are weighted and summed to obtain the final judgment result. It is evident that this application, by fully considering the rule judgment results and model judgment results, and combining them with user information, ensures the accuracy and controllability of the judgment, achieving rapid and accurate content violation detection.

[0029] In one specific embodiment, the specific implementation of analyzing data content based on a preset rule engine to obtain rule determination results and rule confidence levels used to characterize content features includes: The data content is analyzed based on a preset rule engine to obtain sensitive feature words that characterize the content characteristics, an initial judgment score for each sensitive feature word, and an initial confidence level for each sensitive feature word. Based on the length of the data content and the number of sensitive feature words, the initial judgment score is corrected to obtain the rule judgment result, and the initial confidence level is corrected to obtain the rule confidence level.

[0030] Specifically, the rules engine is an application component written based on user judgment requirements and judgment logic, which is equivalent to a black box.

[0031] In one specific embodiment, a rule engine is used to perform semantic matching between the data content and a pre-created sensitive vocabulary database to obtain sensitive feature words corresponding to the data content.

[0032] Specifically, a sensitive word database is pre-created. The rule engine automatically performs semantic matching between the data content and the sensitive words in the database to obtain sensitive feature words corresponding to the data content. Each sensitive feature word is then scored and an initial confidence level is calculated. This process may yield one or multiple sensitive feature words.

[0033] Specifically, a correspondence between the length of the data content and the number of sensitive feature words and the correction coefficient was pre-established. The correction coefficient is the correction coefficient corresponding to each sensitive feature word. The initial judgment score is corrected and weighted and summed. The rule judgment result is determined based on the summation result. The initial confidence is corrected by the average of multiple correction coefficients to obtain the rule confidence.

[0034] In one specific embodiment, the rule engine includes hard rules and soft rules.

[0035] The specific implementation of analyzing data content based on a pre-defined rule engine to obtain rule determination results and rule confidence levels used to characterize content features includes: When determining whether the data content matches the hard rules, the rule judgment result and rule confidence of the content characteristics are illegal are obtained, and the indication content indicating that the data to be detected is illegal is generated.

[0036] Specifically, hard rules are rules that are definitely violated, while soft rules are rules that are likely to be violated.

[0037] When data content is matched against hard rules, an indication of violation is directly generated. When data content is matched against soft rules (i.e., when the content characteristics are not in violation or are suspected of being in violation), further violation detection is performed based on a deep learning model.

[0038] In one specific embodiment, the target deep learning model includes one or more of lightweight and large models.

[0039] Determining the specific implementation of the target deep learning model corresponding to the rule confidence and system load includes: If the content characteristics are determined to be non-violation or suspected violation, determine the detection path corresponding to the rule confidence level and system load.

[0040] Different detection paths correspond to different target deep learning models.

[0041] The detection paths include: a first detection path, a second detection path, and a third detection path.

[0042] The first detection path includes a lightweight model, the second detection path includes both a lightweight model and a large model, and the third detection path includes a large model.

[0043] In one specific embodiment, if the rule confidence is less than a first preset rule confidence and the system load is greater than a preset load, the lightweight model is determined as the target deep learning model.

[0044] When the rule confidence is less than the first preset rule confidence and the system load is less than or equal to the preset load, the target deep learning model is determined based on the data type of the data to be detected.

[0045] The data types include: text data, image data, and video data.

[0046] In one specific embodiment, the specific implementation of determining the target deep learning model based on the data type of the data to be detected includes: If the data type is determined to be image data or video data, the large model is identified as the target deep learning model.

[0047] Given that the data type is text data, the data content is input into the lightweight model to obtain the lightweight model judgment result output by the lightweight model, as well as the lightweight model confidence score corresponding to the lightweight model judgment result. If the lightweight model confidence score is greater than or equal to the second confidence score, the lightweight model is determined as the target deep learning model.

[0048] Given that the data type is text data, the data content is input into the lightweight model to obtain the lightweight model judgment result and the corresponding lightweight model confidence score. If the lightweight model confidence score is less than the second preset confidence score, the lightweight model and the large model are determined as the target deep learning model.

[0049] The detection path in this application is dynamically determined, that is, the detection path is dynamically determined based on the real-time changing system load, rule confidence, and model confidence when using deep learning models for detection.

[0050] Specifically, it is also dynamically determined based on real-time changes in system load, rule confidence, data type, and model confidence when using deep learning models for detection (e.g., lightweight model confidence).

[0051] This application improves overall detection efficiency and achieves high-performance content detection by dynamically determining the detection path, or in other words, dynamically determining the target deep learning model.

[0052] In one specific embodiment, after generating the indication content indicating that the data to be detected is in violation, the data to be detected and the final judgment result are updated to a preset training sample library so as to optimize the target deep learning model using the updated training samples.

[0053] Specifically, both lightweight and large models are pre-trained based on data from a training sample library. During application, the deep learning model is periodically optimized as the sample library is updated to ensure the accuracy of the deep learning model's output. The training of the deep learning model is a standard technique used in model training and is not specifically limited in this application.

[0054] In one specific embodiment, after generating the instruction content indicating that the data to be detected is in violation, an instruction to not publish the content can be generated, or the instruction content and the data to be detected can be sent to an account with review authority for manual review. Finally, in response to the manual review result, the content can be published or not published.

[0055] Below, through Figure 2 This application will be described in detail as follows: Step 201: Obtain the data to be detected.

[0056] Step 202: Analyze the data to be detected based on the rule engine to obtain the rule judgment result and rule confidence. If the rule judgment result is a violation, proceed to step 207; if the rule judgment result is no violation or suspected violation, proceed to step 203.

[0057] Step 203: Determine the detection path based on a dynamic strategy.

[0058] Step 204: Input the data to be detected into the lightweight model to obtain the lightweight model judgment result and the lightweight model confidence score. If the lightweight model judgment result indicates a violation and the lightweight model confidence score is greater than or equal to the second confidence score, proceed to step 206; otherwise, proceed to step 205.

[0059] Step 205: Input the data to be detected into the large model to obtain the large model judgment result and the large model confidence score.

[0060] Step 206: Perform weighted summation on the rule judgment result, model judgment result, and user information to obtain the final judgment result. If the final judgment result indicates a violation, generate an indication that the data to be detected is in violation.

[0061] Step 207: Generate an indication that the data to be detected is in violation.

[0062] Specifically, the following examples illustrate this application: Example 1: Text Violation Detection Input: Text messages posted by users in the game's chat channel.

[0063] System Flow: The rule engine detected sensitive words in the text message, with a rule confidence score of 0.53 (below the strong blocking threshold of 0.8, corresponding to a hard rule). It assigned the message to a lightweight NLP classification model for violation determination. The lightweight model output "abusive language violation" with a confidence score of 0.85. Since the lightweight model has already determined it as a violation, a weighted summation of the rule determination result, the model determination result, and the user information is directly performed to obtain the final determination result (the model determination result in this process only includes the lightweight model's determination result). The final conclusion is: violation. Simultaneously, a text message with the sensitive words removed is generated, and detailed information about the sensitive words is returned separately.

[0064] If the lightweight model outputs "suspected violation" with a confidence level of 0.7 (below the lightweight model's judgment threshold), the data content is input into the large model to obtain the large model's judgment result. Then, a weighted summation process is performed on the rule judgment result, the model judgment result, and the user information to obtain the final judgment result (the model judgment result in this process only includes the lightweight model judgment result and the large model judgment result).

[0065] Example 2: Image Violation Detection Input: Images posted by users on social media platforms.

[0066] System Flow: The image preprocessing module extracts valid image frames and text content from images. Several images are randomly provided as valid images.

[0067] The rules engine missed a hard rule and sent the image to the large model. The model's judgment result was "pornographic image," with a confidence level of 0.75, which is below the judgment threshold of 0.8 and above the suspected judgment threshold of 0.7. The system then performs a weighted summation of the rule judgment result, the model judgment result, and the user information to obtain the final judgment result. If the image is found to be in violation, the system sends the original image and the result to the manual review module.

[0068] The human reviewer determined that the image was in violation and wrote the result back to the model training set.

[0069] Example 3: Video Violation Detection Input: Videos uploaded by users in short video apps.

[0070] System Flow: The video preprocessing module extracts audio and transcribes it into text, extracts image frames, and performs OCR recognition. The text preprocessing module performs word segmentation and norming on the obtained text. The rule engine did not hit any hard rules but detected suspicious words, which were then sent to the large model. The model's judgment result was "violent scene," with a confidence level of 0.92. A weighted summation of the rule judgment result, the model judgment result, and user information is then performed to obtain the final judgment result. If a violation is found, the system sends a screenshot of the video along with this result to the manual review module.

[0071] This application achieves high-performance content security detection by constructing a three-tiered hybrid detection system consisting of a rule engine, a lightweight model, and a large model, and introducing dynamic routing and multi-factor weighted fusion mechanisms. The multi-factor dynamic routing mechanism dynamically determines the detection path based on multiple parameters such as rule confidence, content complexity, model execution efficiency, and system complexity, thus improving overall detection performance. The multi-factor weighted fusion mechanism enhances the accuracy and controllability of the final judgment results. Finally, the sample database is updated using manual review results to optimize the rule engine and learning model, achieving closed-loop automated processing.

[0072] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 301, a communications interface 302, a memory 303, and a communication bus 304. The processor 301, communications interface 302, and memory 303 communicate with each other via the communication bus 304. The processor 301 can call logical instructions from the memory 303 to execute a rule-based and deep learning model-based violation content detection method.

[0073] Furthermore, the logical instructions in the aforementioned memory 303 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0074] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer is able to execute the rule-based and deep learning model-based illegal content detection methods provided by the above methods.

[0075] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the rule-based and deep learning model-based illegal content detection method provided in the above embodiments.

[0076] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0078] Finally, it should be noted that the above descriptions are merely preferred embodiments of this application, and this application is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of this application should be considered to be included within the protection scope of this application.

Claims

1. A method for detecting illegal content based on rules and deep learning models, characterized in that, The method includes: Acquire the data to be detected, wherein the data to be detected includes: data content and user information; The data content is analyzed based on a preset rule engine to obtain rule judgment results and rule confidence levels used to characterize the content characteristics, wherein the content characteristics include: violation, no violation, and suspected violation; If the content characteristics are determined to be non-violation or suspected violation, a target deep learning model corresponding to the rule confidence and system load is determined, and the data content is input into the target deep learning model to obtain the model judgment result output by the target deep learning model to characterize the content characteristics. The rule judgment result, the model judgment result, and the user information are weighted and summed to obtain the final judgment result. If the final judgment result indicates a violation, an indication is generated indicating that the data to be detected is in violation.

2. The method for detecting illegal content based on rules and deep learning models according to claim 1, characterized in that, The data content is analyzed based on a preset rule engine to obtain rule determination results and rule confidence levels used to characterize content features, including: The data content is analyzed based on a preset rule engine to obtain sensitive feature words used to characterize the content characteristics, an initial judgment score corresponding to each sensitive feature word, and an initial confidence level corresponding to each sensitive feature word. Based on the length of the data content and the number of sensitive feature words, the initial judgment score is corrected to obtain the rule judgment result, and the initial confidence level is corrected to obtain the rule confidence level.

3. The method for detecting illegal content based on rules and deep learning models according to claim 2, characterized in that, The data content is analyzed based on a preset rule engine to obtain sensitive feature words used to characterize the content characteristics, including: Based on the rule engine, semantic matching is performed on the data content and the pre-created sensitive word library to obtain sensitive feature words corresponding to the data content.

4. The method for detecting illegal content based on rules and deep learning models according to any one of claims 1-3, characterized in that, The target deep learning model includes: one or more of the following: lightweight models and large models; Determining the target deep learning model corresponding to the rule confidence and system load includes: If the content characteristics are determined to be non-violation or suspected violation, a detection path corresponding to the rule confidence and the system load is determined. Different detection paths correspond to different target deep learning models. The detection paths include: a first detection path, a second detection path, and a third detection path. The first detection path includes a lightweight model, the second detection path includes a lightweight model and a large model, and the third detection path includes a large model.

5. The method for detecting illegal content based on rules and deep learning models according to any one of claims 1-3, characterized in that, The target deep learning model includes: one or more of the following: lightweight models and large models; Determining the target deep learning model corresponding to the rule confidence and system load includes: If the rule confidence is less than the first preset rule confidence and the system load is greater than the preset load, the lightweight model is determined as the target deep learning model. When the confidence level of the rule is less than the first preset rule confidence level and the system load is less than or equal to the preset load, the target deep learning model is determined based on the data type of the data to be detected, wherein the data type includes: text data, image data and video data.

6. The method for detecting illegal content based on rules and deep learning models according to claim 5, characterized in that, Determining the target deep learning model based on the data type of the data to be detected includes: If the data type is determined to be image data or video data, the large model is determined to be the target deep learning model; If the data type is determined to be text data, the data content is input into the lightweight model to obtain the lightweight model judgment result output by the lightweight model and the lightweight model confidence level corresponding to the lightweight model judgment result. If the lightweight model confidence level is greater than or equal to the second confidence level, the lightweight model is determined as the target deep learning model. If the data type is determined to be text data, the data content is input into the lightweight model to obtain the lightweight model judgment result output by the lightweight model and the lightweight model confidence level corresponding to the lightweight model judgment result. If the lightweight model confidence level is less than the second preset confidence level, the lightweight model and the large model are determined as the target deep learning model.

7. The method for detecting illegal content based on rules and deep learning models according to any one of claims 1-3, characterized in that, The rule engine includes hard rules and soft rules; The data content is analyzed based on a preset rule engine to obtain rule determination results and rule confidence levels used to characterize content features, including: When the data content is determined to match the hard rule, a rule judgment result and rule confidence level are obtained for the content characteristics to be violated, and an indication content indicating that the data to be detected is violated is generated.

8. The method for detecting illegal content based on rule-based and deep learning models according to any one of claims 1-3, characterized in that, After generating the indication content indicating that the data to be detected is in violation, it also includes: The data to be detected and the final judgment result are updated to a preset training sample library so as to optimize the target deep learning model using the updated training samples.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the rule-based and deep learning model-based illegal content detection method as described in any one of claims 1 to 8.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the rule-based and deep learning model-based illegal content detection method as described in any one of claims 1 to 8.