A method, device, and system for implementing an AI-powered safety fence.

By employing a weighted aggregation and dynamic routing mechanism with multiple detection nodes running in parallel within the AI ​​security fence, the problems of incomplete detection coverage and resource waste in existing technologies are solved, achieving efficient and flexible AI content security detection.

CN121279322BActive Publication Date: 2026-04-03BEIJING CHAITIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing AI security fence technology suffers from incomplete detection coverage, rigid processes, and low resource utilization efficiency, making it difficult to balance detection accuracy and system efficiency in different business scenarios.

Method used

It employs a multi-detection node component to execute weighted aggregation and dynamic routing mechanism in parallel. By configuring multiple detection nodes and routing rules, it can flexibly combine detection capabilities and dynamically adjust the detection path based on real-time detection results.

Benefits of technology

It achieves greater accuracy and efficiency in AI-based content security detection, reduces false negative rates, decreases average detection latency and resource consumption, and enhances system adaptability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121279322B_ABST
    Figure CN121279322B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and system for implementing AI security fences, relating to the field of artificial intelligence content supervision technology. The method configures a security detection system containing multiple detection nodes. Within each node, multiple weighted security detection components are invoked in parallel to perform detection and aggregate the results. The next detection node is then dynamically determined based on routing rules, until no route meets the conditions, at which point the process terminates and a final conclusion is generated. This invention integrates the detection advantages of different similar security detection components, achieving intelligent orchestration and dynamic routing of the detection process, significantly improving the accuracy, efficiency, and customizability of content security detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence content supervision, and particularly relates to a method, device and system for implementing an AI security fence. Background Art

[0002] With the wide application of large language models, the generated content may have risks such as illegal and违规, discrimination and prejudice, false information and privacy leakage. It is crucial to build an effective AI security fence.

[0003] An AI security fence refers to a set of security mechanisms and restrictive measures for constraining and guaranteeing the behavior of artificial intelligence systems (especially generative AIs such as large language models). Currently, the mainstream technologies are divided into two categories:

[0004] First, the rule-based detection method relies on predefined rules such as keywords and regular expressions. Although it has strong interpretability, its coverage is limited, and it is difficult to handle new and semantically complex risky content.

[0005] Second, the AI model-based detection method uses deep learning for semantic analysis. It has good generalization ability but has problems such as misjudgment, opaque decision-making, large computational overhead, etc., and a single model is difficult to meet the differentiated requirements of multiple scenarios.

[0006] Existing solutions mostly adopt a fixed detection process, either a single detector runs independently, or multiple detectors are simply connected in series, lacking the dynamic response ability to content features. This results in that obvious违规content still needs to fully traverse all detection links, causing resource waste, while complex and suspicious content may be missed due to insufficient detection intensity. This rigid architecture cannot intelligently balance detection accuracy and system efficiency, and it is difficult to meet the comprehensive requirements of accuracy, real-time performance and resource consumption in different business scenarios.

[0007] Therefore, there is an urgent need for an AI security fence solution that can flexibly combine multiple detection capabilities and support dynamically adjusting the path according to real-time detection results to solve the problems of incomplete detection coverage, poor process flexibility and low resource utilization efficiency in the prior art. Summary of the Invention

[0008] In view of the above-mentioned defects or deficiencies in the prior art, the present invention provides a method, device and system for implementing an AI security fence, which can preferably solve the technical problems mentioned in the background art.

[0009] In one aspect of the present invention, a method for implementing an AI security fence is provided, including the following steps:

[0010] Configure a security detection system according to a predefined security detection policy. The security detection system includes multiple detection nodes, each detection node includes multiple security detection components with different weight configurations, and the security detection components are at least one of a rule-based detector and an AI model-based classifier. A routing rule condition for determining the flow direction of the security detection process is configured between two adjacent detection nodes;

[0011] Receive the text to be detected input by the user, start the detection process from the entry detection node of the security detection system, and concurrently invoke all the security detection components in the current detection node to execute the detection logic on the text to be detected and generate multiple detection results. Perform weighted summation on the multiple detection results according to the weights of the security detection components to obtain the aggregated detection result of the current detection node;

[0012] Evaluate whether the aggregated detection result of the current detection node meets the routing rule condition associated with the current detection node. If so, use the detection node pointed to by the routing rule condition as the next detection node for the text to be detected;

[0013] Repeat the detection operation of the detection node according to the above steps until the aggregated detection result of the current detection node fails to meet any routing rule condition or there is no subsequent detection node. Summarize the aggregated detection results of all the executed detection nodes to generate the final security detection conclusion.<>

[0014] On the other hand, the present invention also provides an implementation device for an AI security fence, including:

[0015] A configuration module for configuring a security detection system according to a predefined security detection policy. The security detection system includes multiple detection nodes, each detection node includes multiple security detection components with different weight configurations, and the security detection components are at least one of a rule-based detector and an AI model-based classifier. A routing rule condition for determining the flow direction of the security detection process is configured between two adjacent detection nodes;

[0016] A security detection module for receiving the text to be detected input by the user, starting the detection process from the entry detection node of the security detection system, and concurrently invoking all the security detection components in the current detection node to execute the detection logic on the text to be detected and generate multiple detection results. Perform weighted summation on the multiple detection results according to the weights of the security detection components to obtain the aggregated detection result of the current detection node;

[0017] A routing module for evaluating whether the aggregated detection result of the current detection node meets the routing rule condition associated with the current detection node. If so, use the detection node pointed to by the routing rule condition as the next detection node for the text to be detected;

[0018] A result output module, configured to repeatedly execute the detection operation of the detection node according to the above steps until the aggregated detection result of the current detection node cannot meet any routing rule condition or there is no subsequent detection node, and summarize the aggregated detection results of all the executed detection nodes to generate a final security detection conclusion.

[0019] On the other hand, the present invention also provides an AI security fence system, including:

[0020] Multiple detection nodes, each detection node includes multiple security detection components with different weight configurations, the security detection components are at least one of a rule-based detector and an AI model-based classifier, and routing rule conditions for judging the flow direction of the security detection process are configured between two adjacent detection nodes;

[0021] A security detection center, configured to receive the text to be detected input by the user, start the detection process from the entry detection node of the AI security fence system, parallelly call all the security detection components in the current detection node to execute the detection logic on the text to be detected and generate multiple detection results, perform weighted summation on the multiple detection results according to the weights of each security detection component to obtain the aggregated detection result of the current detection node; evaluate whether the aggregated detection result of the current detection node meets the routing rule condition associated with the current detection node, if so, use the detection node pointed to by the routing rule condition as the next detection node of the text to be detected; repeatedly execute the detection operation of the detection node according to the above steps until the aggregated detection result of the current detection node cannot meet any routing rule condition or there is no subsequent detection node, and summarize the aggregated detection results of all the executed detection nodes to generate a final security detection conclusion.

[0022] The implementation method, device and system of an AI security fence provided by the present invention achieve the precision and efficiency of AI content security detection. By flexibly combining various detection components and intelligently selecting the subsequent path based on the real-time detection results, it not only ensures that high-risk content undergoes in-depth analysis, but also enables low-risk content to pass quickly. This dynamic routing mechanism improves the detection accuracy, reduces the false negative rate, and significantly reduces the average detection delay and resource consumption, effectively solving the core problems of single detection ability, rigid process and low resource utilization rate in the prior art. Description of the Drawings

[0023] By reading the detailed description of the non-restrictive embodiments made with reference to the following drawings, other features, purposes and advantages of the present application will become more obvious:

[0024] Figure 1This is a flowchart illustrating an implementation method of an AI safety fence according to an embodiment of this application;

[0025] Figure 2 This is a schematic diagram of the structure of an AI safety fence implementation device provided in another embodiment of this application;

[0026] Figure 3 This is a schematic diagram of the structure of an AI safety fence system provided in another embodiment of this application;

[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] The following specific embodiment describes in detail a particular application scenario of an AI security fence implementation method, to demonstrate the complete workflow of the technical solution of the present invention in actual deployment.

[0030] Suppose a cloud service provider deploys a content security filtering layer / security fence for its Large Language Model (LLM) service to prevent the generation of inappropriate content (such as illegal information, discriminatory speech, etc.). Based on the high content compliance requirements of the financial industry, the provider has pre-configured a set of security detection strategies.

[0031] The following section details the execution process of the AI ​​safety fence implementation method, with specific steps provided. (See also...) Figure 1 The method includes the following steps:

[0032] Step S101: Configure the security detection system according to the predefined security detection strategy.

[0033] Specifically, a security detection system is configured according to a predefined security detection strategy. The security detection system includes multiple detection nodes, and each detection node includes multiple security detection components with different weight configurations. The security detection components are at least one of a rule-based detector and an AI model-based classifier. Routing rules are configured between two adjacent detection nodes to determine the flow direction of the security detection process.

[0034] A security detection strategy represents a complete detection workflow, and users can configure different strategies to meet specific scenario requirements. A strategy defines the detection process from input to final decision, including multiple detection nodes and their connection order. Each strategy can be customized according to business scenarios (such as finance and healthcare), for example: a high-precision strategy combining specialized models and general-purpose large models, and a fast detection strategy using keyword matching, etc.

[0035] A detection node is a collection of logically related security detection components used to organize detection units serving the same sub-target. For example, one detection node might specialize in detecting prohibited words, while another handles prompt word injection detection. Each detection node contains multiple security detection components that execute detection tasks in parallel. Weight configuration balances the priorities of different security detection components, enabling complementary advantages. For instance, a high-precision but time-consuming AI model can collaborate with a fast-responding rule engine, leveraging the deterministic nature of rule-based detection to handle explicit violations while addressing complex semantic risks through model-based detection. This fusion mechanism significantly expands risk coverage while achieving an optimized balance between accuracy and efficiency, effectively reducing the inherent false positives and false negatives of single detection methods.

[0036] Security detection components are the actual detection units. They can be rule-based detectors (such as those relying on keyword lists or regular expressions for matching) or AI model-based classifiers (such as those using BERT, RoBERTa, etc. for semantic analysis). These security detection components execute specific detection logic, such as keyword matching of text content or identification of risks from injecting prompt words.

[0037] Routing rule conditions are rules used to connect two detection nodes in a directed manner, controlling the flow direction of the detection process. Routing rule conditions are evaluated based on the detection result of the current detection node. For example, "safety probability greater than 0.8" is a routing rule condition. The next detection node will only be triggered if the condition expression evaluates to true. Since the text questions (e.g., prompts) entered by the user into the large model are different each time, the detection results of each detection node are also different each time. Combined with the above-mentioned routing rule condition judgment mechanism, intelligent routing based on runtime context is achieved, allowing the system to dynamically adjust the detection path.

[0038] This step essentially constructs a customizable and scalable security detection framework. By flexibly configuring detection nodes and routing rules, it achieves dynamic orchestration of the detection process, resource optimization, and intelligent path selection. Multi-component weight configuration allows for the integration of the advantages of different detection technologies, improving overall robustness. This effectively solves the "one-size-fits-all" problem in traditional AI security fences—that is, a fixed detection sequence cannot adapt to diverse scenarios—thus improving the system's adaptability and accuracy.

[0039] The configuration process of this step is described below through a specific embodiment. The security detection system of this embodiment includes the following three detection nodes:

[0040] (1) Node A

[0041] Node A is a prohibited word detection node, which contains a rule-based detector with a configured weight of 1.0. This detector identifies obviously prohibited content, such as illegal words, through keyword matching and regular expressions.

[0042] (2) Node B

[0043] Node B is the prompt injection detection node, which contains two AI-based classifiers: defender-prompt-guard-86M and defender-deberta-v3-base-prompt-injection.

[0044] Among them, Defender-Prompt-Guard-86M is a lightweight, specialized model with 86 million parameters, implemented based on a simplified Transformer architecture. This model has a small number of parameters and low computational requirements, resulting in very fast inference speeds and the ability to meet real-time detection needs in high-concurrency scenarios. However, it is only suitable for deployment in resource-constrained environments (such as edge devices and concurrent detection in large applications).

[0045] Among them, defender-deberta-v3-base-prompt-injection is a high-performance, strongly generalized model. It is based on the DeBERTa-v3-base architecture, which is an advanced pre-trained model with a larger number of parameters. With stronger model capabilities and broader pre-trained knowledge, it can better cope with various unknown and variant injection attacks and reduce false negatives, but its inference speed is slower and its computational and memory resource consumption is also greater.

[0046] The weights of the two AI classification models mentioned above are 0.5 and 0.5, respectively. These two classifiers are specifically designed to detect prompt injection attacks, such as malicious command bypass.

[0047] (3) Node C

[0048] Node C is a content compliance detection node, which contains two AI-based classifiers: defender-Llama-Guard-3-8B and defender-Qwen3Guard-Gen-8B.

[0049] Among them, the defender-Llama-Guard-3-8B is a classifier built on the Llama Guard series of models. It is a large language model specifically tuned for content security, with the aim of performing multi-category security risk assessment on user input and AI-generated content.

[0050] Among them, the defender-Qwen3Guard-Gen-8B is a security classifier finely tuned from the Qwen2.5-Math model, which can effectively identify model illusions, factual errors, and generated content that does not meet the requirements of specific domains (such as finance and healthcare).

[0051] When the two AI classification models described above, employing two different technical approaches, both determine whether the same text is safe or dangerous, the confidence level of the final conclusion will be extremely high. Furthermore, Llama Guard is stronger in terms of globally applicable security strategies, while Qwen Guard is more sensitive to Chinese language and specific generated risks; their combination ensures maximum risk coverage.

[0052] Based on actual test results, the weights of the two classifiers were set to 0.4 and 0.6, respectively. These classifiers perform deep semantic analysis on the input text to identify implicit risks, such as value biases and commercial violations. In this embodiment, the routing rule condition between node A and node B is set to "normal probability greater than 0.8", and the condition between node B and node C is set to "normal probability greater than 0.7". The entry detection node is node A. This configuration ensures that high-risk content is blocked early, while potentially safe text enters deep detection, balancing accuracy and efficiency.

[0053] Step S102: Receive the text to be detected and perform entry node detection.

[0054] Specifically, the system receives the text to be detected from the user's input, and executes the detection process starting from the entry detection node of the security detection system. It concurrently calls all security detection components within the current detection node to perform detection logic on the text and generate multiple detection results. These multiple detection results are then weighted and summed according to the weights of each security detection component to obtain the aggregated detection result for the current detection node. This step aims to perform preliminary risk screening on the text to be detected and improve the coverage and reliability of the detection through parallel execution and weighted aggregation mechanisms. Its significance lies in avoiding the limitations of single detection methods, such as missed detections in rule-based detection or false positives in model-based detection, while also reducing system latency through parallel processing.

[0055] The execution process of this step will be described below through specific embodiments.

[0056] Suppose a user inputs a financial investment recommendation text generated by an LLM: "Recommended investment in stock XX, which is expected to surge by 50%."

[0057] The system starts detecting from entry node A:

[0058] (1) The security detection component within node A is invoked in parallel. This component matches based on a predefined list of prohibited words, such as "surge" and "guaranteed returns". The detection result generates a probability vector, for example: normal probability 0.85, violation probability 0.15.

[0059] (2) Since node A has only one security detection component with a weight of 1.0, the aggregated detection result is directly the output of this security detection component (normal probability 0.85). Node A quickly identifies the potential risk of exaggerated claims in the text, but does not completely determine it as a violation, so it needs to proceed to the next step of route evaluation.

[0060] Step S103: Evaluate the routing rule conditions and route to the next node.

[0061] Specifically, the system evaluates whether the aggregated detection results of the current detection node meet the routing rule conditions associated with that node. If so, the detection node pointed to by the routing rule conditions is designated as the next detection node for the text to be detected. Furthermore, if the aggregated detection results of the current detection node determine that the text to be detected is either illegal or absolutely safe, the subsequent detection process is stopped. This step uses a dynamic routing mechanism to intelligently adjust the detection path, ensuring that texts of different risk levels undergo the most suitable detection process. Its significance lies in breaking through the rigid mode of traditional linear execution. The system can terminate high-risk text processes early and guide potentially safe texts to more nodes, thereby optimizing resource allocation, reducing average latency, and increasing the processing priority of high-risk content, thus improving the system's flexibility and efficiency.

[0062] The execution process of this step will be described below through specific embodiments.

[0063] Following step S102, the system evaluates whether the aggregated detection result of node A (normal probability 0.85) satisfies the routing rule condition "normal probability greater than 0.8". Since the condition 0.85 > 0.8 is met, the system selects node B (the prompt word injection detection node) as the next detection node. If the normal probability in the aggregated result of node A is 0.75 (not meeting the condition), the process terminates directly, the text is judged as high-risk, and there is no need to proceed to subsequent nodes. This routing mechanism avoids unnecessary calculations and is particularly suitable for high-concurrency scenarios such as real-time filtering of social media.

[0064] Step S104: Repeat the detection node operation and generate the final security detection conclusion.

[0065] Repeat the above steps to perform the detection operations of the detection nodes until the aggregated detection result of the current detection node fails to meet any routing rule condition or there are no subsequent detection nodes. Then, summarize the aggregated detection results of all executed detection nodes to generate the final security detection conclusion. This step achieves multi-level and refined analysis of the text through iterative execution of detection and routing, ultimately generating a comprehensive security conclusion. This ensures the integrity of the detection process and the reliability of the conclusion.

[0066] The execution process of this step will be described below through specific embodiments.

[0067] In node B, the system calls two prompt word injection classifiers (each with a weight of 0.5) in parallel to detect whether the text contains malicious instructions. Assuming the aggregation result is a normal probability of 0.85, which satisfies the routing condition "normal probability greater than 0.7", the system proceeds to node C. In node C, the system calls two content compliance classifiers (with weights of 0.4 and 0.6) to perform deep semantic analysis on the text, and the aggregation result shows a normal probability of 0.92. Since there are no other nodes after node C, the detection process terminates.

[0068] The system aggregates the results from all nodes:

[0069] (1) Node A: Normal probability 0.85

[0070] (2) Node B: Normal probability 0.85

[0071] (3) Node C: Normal probability 0.92

[0072] The final conclusion is "Text is safe, can be allowed," along with detailed detection information such as node risk classification and weight calculation, for administrator review. If the aggregation result of any node does not meet the routing conditions (e.g., node B has a normal probability of 0.6), the process will stop early, and the conclusion will be "Text violates regulations, needs to be blocked."

[0073] This embodiment demonstrates a complete and choreographable AI security fence workflow. By configuring a multi-node detection network, executing weighted aggregation in parallel, dynamic routing, and iterative detection, this method effectively solves the problems of incomplete coverage, poor flexibility, and resource waste inherent in traditional technologies. In practical scenarios, this solution is particularly suitable for industries with high precision requirements, such as finance and healthcare, significantly reducing system latency and false alarm rates while ensuring detection accuracy. Furthermore, users can easily adapt to different business needs by adjusting policy configurations (such as node components, weights, and routing conditions), achieving a high degree of customizability and scalability.

[0074] See Figure 2 Another embodiment of the present invention provides an AI safety fence implementation apparatus 200, including a configuration module 201, a security detection module 202, a routing module 203, and a result output module 204. This AI safety fence implementation apparatus 200 can be used to execute the AI ​​safety fence implementation method in the method embodiment.

[0075] The AI ​​safety fence implementation device 200 includes:

[0076] The configuration module 201 is used to configure the security detection system according to a predefined security detection strategy. The security detection system includes multiple detection nodes, and each detection node includes multiple security detection components with different weight configurations. The security detection components are at least one of a rule-based detector and an AI model-based classifier. Routing rule conditions for determining the flow direction of the security detection process are configured between two adjacent detection nodes.

[0077] The security detection module 202 is used to receive the text to be detected input by the user, start the detection process from the entry detection node of the security detection system, call all security detection components in the current detection node in parallel to perform detection logic on the text to be detected and generate multiple detection results, and perform weighted summation of the multiple detection results according to the weight of each security detection component to obtain the aggregated detection result of the current detection node.

[0078] The routing module 203 is used to evaluate whether the aggregated detection result of the current detection node satisfies the routing rule conditions associated with the current detection node. If so, the detection node pointed to by the routing rule conditions is taken as the next detection node of the text to be detected.

[0079] The result output module 204 is used to repeatedly execute the detection operation of the detection node according to the above steps until the aggregated detection result of the current detection node cannot meet any routing rule condition or there is no subsequent detection node. The module then summarizes the aggregated detection results of all executed detection nodes and generates the final security detection conclusion.

[0080] It should be noted that the AI ​​safety fence implementation device 200 provided in this embodiment corresponds to the technical solutions that can be used to execute various method embodiments. Its implementation principle and technical effect are similar to the method, and will not be repeated here.

[0081] See Figure 3 Another embodiment of the present invention also provides an AI safety fence system 300, comprising:

[0082] Multiple detection nodes 301, each detection node includes multiple security detection components with different weight configurations, the security detection components are at least one of rule-based detectors and AI model-based classifiers, and there are routing rule conditions configured between two adjacent detection nodes to determine the flow direction of the security detection process.

[0083] Security Detection Center 302 is used to receive the text to be detected input by the user, start the detection process from the entry detection node of the AI ​​security fence system, and execute the detection process in parallel by calling all security detection components within the current detection node to perform detection logic on the text to be detected and generate multiple detection results. The multiple detection results are weighted and summed according to the weight of each security detection component to obtain the aggregate detection result of the current detection node. It evaluates whether the aggregate detection result of the current detection node meets the routing rule conditions associated with the current detection node. If so, the detection node pointed to by the routing rule conditions is taken as the next detection node for the text to be detected. The detection operation of the detection node is repeated according to the above steps until the aggregate detection result of the current detection node fails to meet any routing rule conditions or there are no subsequent detection nodes. The aggregate detection results of all executed detection nodes are summarized to generate the final security detection conclusion.

[0084] It should be noted that the AI ​​safety fence system 300 provided in this embodiment has the same line or correspondence with the method embodiment. Its implementation principle and technical effect are similar to the method, and will not be repeated here.

[0085] See Figure 4 Another embodiment of the present invention provides an electronic device 400. This electronic device 400 is used to implement the AI ​​security fence implementation method in the method embodiment. The electronic device 400 in the embodiments of the present invention may include, but is not limited to, a PC, server, laptop, smartphone, tablet, etc. Figure 4 The illustrated electronic device 400 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0086] like Figure 4As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes to implement the methods of embodiments of the present invention according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. Various programs and data required for the operation of electronic device 400 are also stored in RAM 403. The processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.

[0087] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0088] The above description is merely a preferred embodiment of the present invention. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to the specific combination of the above-described technical features, but should also cover other technical solutions formed by any combination of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

Claims

1. A method for implementing an AI-powered safety fence, characterized in that, Includes the following steps: The security detection system is configured according to a predefined security detection strategy. The security detection system includes multiple detection nodes, and each detection node includes multiple security detection components with different weight configurations. The security detection components are at least one of rule-based detectors and AI model-based classifiers. Routing rule conditions for determining the flow direction of the security detection process are configured between two adjacent detection nodes. The system receives the text to be detected input by the user, executes the detection process starting from the entry detection node of the security detection system, calls all security detection components in the current detection node in parallel to execute the detection logic on the text to be detected and generate multiple detection results, and performs a weighted summation of the multiple detection results according to the weight of each security detection component to obtain the aggregated detection result of the current detection node. Evaluate whether the aggregated detection result of the current detection node satisfies the routing rule conditions associated with the current detection node. If so, the detection node pointed to by the routing rule conditions is taken as the next detection node of the text to be detected. Repeat the above steps to perform the detection operation of the detection node until the aggregated detection result of the current detection node fails to meet any routing rule condition or there is no subsequent detection node. Then, summarize the aggregated detection results of all the executed detection nodes to generate the final security detection conclusion.

2. The method for implementing an AI safety fence according to claim 1, characterized in that, If the aggregated detection results from the current detection node determine that the text to be detected is either illegal or absolutely safe, then the subsequent detection process will be stopped.

3. The method for implementing an AI safety fence according to claim 1, characterized in that: The rule-based detector includes at least one of keyword matching detector, regular expression matching detector, and blacklist / whitelist matching detector; The AI-based classifier includes at least one of a BERT-based prompt word injection detection classifier and an LLM-based content compliance classifier.

4. The method for implementing an AI safety fence according to claim 1, characterized in that, Also includes: Configure different security detection strategies for different AI business scenarios.

5. The method for implementing an AI safety fence according to claim 1, characterized in that, The routing rule conditions include at least one of logical operation conditions and comparison operation conditions.

6. A device for implementing an AI safety fence, characterized in that, include: The configuration module is used to configure the security detection system according to the predefined security detection strategy. The security detection system includes multiple detection nodes, and each detection node includes multiple security detection components with different weight configurations. The security detection components are at least one of rule-based detectors and AI model-based classifiers. Routing rule conditions for determining the flow direction of the security detection process are configured between two adjacent detection nodes. The security detection module is used to receive the text to be detected input by the user, start the detection process from the entry detection node of the security detection system, call all security detection components in the current detection node in parallel to perform detection logic on the text to be detected and generate multiple detection results, and perform weighted summation of the multiple detection results according to the weight of each security detection component to obtain the aggregated detection result of the current detection node. The routing module is used to evaluate whether the aggregated detection result of the current detection node meets the routing rule conditions associated with the current detection node. If so, the detection node pointed to by the routing rule conditions is taken as the next detection node of the text to be detected. The results output module is used to repeatedly execute the detection operations of the detection nodes according to the steps in the above module until the aggregated detection results of the current detection node cannot meet any routing rule conditions or there are no subsequent detection nodes. The module then summarizes the aggregated detection results of all executed detection nodes to generate the final security detection conclusion.

7. The device for implementing an AI safety fence according to claim 6, characterized in that: The security detection module is also used to stop the subsequent detection process if the aggregated detection results of the current detection node determine that the text to be detected is illegal or absolutely safe.

8. The device for implementing an AI safety fence according to claim 6, characterized in that, The configuration module is also used to configure different security detection strategies for different AI business scenarios.

9. The device for implementing an AI safety fence according to claim 6, characterized in that, The routing rule conditions include at least one of logical operation conditions and comparison operation conditions.

10. An AI-powered safety fence system, characterized in that, include: Multiple detection nodes, each including multiple security detection components with different weight configurations, wherein the security detection components are at least one of rule-based detectors and AI model-based classifiers, and routing rule conditions are configured between two adjacent detection nodes to determine the flow direction of the security detection process. The security detection center receives text input by the user and executes the detection process starting from the entry detection node of the AI ​​security fence system. It calls all security detection components within the current detection node in parallel to perform detection logic on the text and generate multiple detection results. The multiple detection results are weighted and summed according to the weight of each security detection component to obtain the aggregate detection result of the current detection node. It evaluates whether the aggregate detection result of the current detection node meets the routing rule conditions associated with the current detection node. If so, the detection node pointed to by the routing rule conditions is taken as the next detection node for the text. Repeat the above steps to perform the detection operations of the detection nodes until the aggregated detection results of the current detection node fail to meet any routing rule conditions or there are no subsequent detection nodes. Then, summarize the aggregated detection results of all executed detection nodes to generate the final security detection conclusion.

Citation Information

Patent Citations

  • Method for optimizing multi-strategy-multi-rule detection scheme

    CN102708420A

  • Block chain supervision method and system based on NLP and rule fusion

    CN119646893A