AI agent-oriented security protection method and device based on intent recognition

By recognizing user intent and inferring boundary operation behaviors through a large language model, combined with a comprehensive scoring mechanism, the false alarm and missed alarm problems in the security protection of AI intelligent agents in existing technologies are solved, and more accurate security protection is achieved.

CN123055351APending Publication Date: 2026-11-06RIVER INFORMATION TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611119079.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing rule-based or policy-based security methods cannot accurately distinguish between high-risk operations authorized by users and unauthorized operations, resulting in high false alarms or false negatives, and thus failing to effectively protect the security of AI agents.

Method used

The Large Language Model (LLM) is used to identify the intent of user commands, deduce the user authorization boundary, intercept the operation behavior of the AI ​​agent, and provide precise security protection through a comprehensive scoring and decision-making mechanism, including intent type identification, boundary operation behavior deduction, current operation behavior comparison and processing.

Benefits of technology

It improves the accuracy of distinguishing between high-risk and unauthorized user-authorized operations, enhances the security protection of AI agents, and reduces false alarms and false negatives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123055351A_ABST
    Figure CN123055351A_ABST
Patent Text Reader

Abstract

The present disclosure provides an AI agent-oriented security protection method and device based on intent recognition, equipment, medium and product, relating to computer, network security and other technical fields. The AI agent-oriented security protection method based on intent recognition comprises: using LLM to perform intent recognition on a user instruction to obtain a target intent type; based on the target intent type, deriving a user authorization boundary to obtain a boundary operation behavior; intercepting a current operation behavior of an AI agent; comparing the current operation behavior with the boundary operation behavior to obtain a target decision; and based on the target decision, processing the current operation behavior. The present disclosure can improve the security protection effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of computer and network security, and in particular to a security protection method, apparatus, device, medium and product based on intent recognition for AI intelligent agents. Background Technology

[0002] With the rapid development of Large Language Model (LLM) and Artificial Intelligence (AI) agent technologies, more and more enterprises are deploying AI agents in production environments to perform complex business processes such as email management, file operations, system maintenance, and data analysis. AI agents can understand users' natural language commands, autonomously plan execution paths, and call various tools and application programming interfaces (APIs) to complete multi-step tasks, greatly improving work efficiency. However, this autonomous execution capability also brings new security challenges: the behavior of AI agents is no longer entirely predictable, and their understanding of user intent and selection of execution strategies may lead to unauthorized sensitive operations.

[0003] In related technologies, access control can be based on rules or policies. Specifically, unauthorized operations can be blocked through predefined keyword blacklists, operation type whitelists, or static path policies. However, the accuracy needs to be improved. Summary of the Invention

[0004] This disclosure provides a security protection method, apparatus, device, medium, and product based on intent recognition for AI intelligent agents.

[0005] According to one aspect of this disclosure, a security protection method based on intent recognition for AI agents is provided, comprising: using LLM to perform intent recognition on user instructions to obtain a target intent type; deriving user authorization boundaries based on the target intent type to obtain boundary operation behavior; intercepting the current operation behavior of the AI ​​agent; comparing the current operation behavior with the boundary operation behavior to obtain a target decision; and processing the current operation behavior based on the target decision.

[0006] According to another aspect of this disclosure, a security protection device based on intent recognition for AI agents is provided, comprising: an identification module for performing intent recognition on user instructions using LLM to obtain an intent type; an inference module for inferring user authorization boundaries based on the intent type to obtain boundary operation behavior; an interception module for intercepting the current operation behavior of the AI ​​agent; a decision module for comparing the current operation behavior with the boundary operation behavior to obtain a target decision; and a processing module for processing the current operation behavior based on the target decision.

[0007] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to said at least one processor; wherein the memory stores instructions executable by said at least one processor, said instructions being executed by said at least one processor to enable said at least one processor to perform the method as described in any of the foregoing aspects.

[0008] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to any of the preceding aspects.

[0009] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to any of the preceding aspects.

[0010] According to the embodiments of this disclosure, the security protection effect can be improved.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0013] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;

[0014] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;

[0015] Figure 3 yes Figure 2 Corresponding overall architecture diagram;

[0016] Figure 4 This is a schematic diagram of the decision-making process provided according to an embodiment of this disclosure;

[0017] Figure 5 This is a schematic diagram according to the third embodiment of the present disclosure;

[0018] Figure 6 This is a schematic diagram according to the fourth embodiment of the present disclosure;

[0019] Figure 7 This is a schematic diagram of an electronic device used to implement the intent recognition-based security protection method for AI intelligent agents according to the embodiments of this disclosure. Detailed Implementation

[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0021] In related technologies, rule-based or policy-based security protection methods are simple to implement and have low performance overhead, but they cannot understand the semantic context of operations and cannot distinguish between "user-authorized high-risk operations" and "unauthorized high-risk operations", resulting in high false positives or false negatives.

[0022] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure. This embodiment provides a security protection method for AI agents based on intent recognition, such as... Figure 1 As shown, the method includes:

[0023] 101. Use LLM to identify the intent of user commands and obtain the target intent type.

[0024] 102. Based on the target intent type, deduce the user authorization boundary and obtain the boundary operation behavior.

[0025] 103. Intercept the current operation behavior of the AI ​​agent.

[0026] 104. Compare the current operation behavior with the boundary operation behavior to obtain the target decision.

[0027] 105. Based on the target decision, process the current operation behavior.

[0028] The method in this embodiment can be executed by a security protection system, which can be located between the AI ​​agent and the underlying operating environment.

[0029] User commands are instructions entered by the user. These can be natural language commands and are used to trigger the AI ​​agent to perform corresponding operations. For example, a user command might be "check email status".

[0030] The security protection system can intercept user commands and send them to the LLM, instructing the LLM to identify the intent and obtain the target intent type.

[0031] Multiple candidate intent types can be pre-configured, and the LLM can be instructed to select one of the candidate intent types as the target intent type.

[0032] Multiple candidate intent types include: read, query, analyze, delete, modify, execute, export, and install.

[0033] In addition, the mapping relationship between intent types and boundary operation behaviors can be pre-configured. In this way, after the target intent type is determined from the candidate intent types, the boundary operation behavior corresponding to the target intent type can be obtained based on the mapping relationship.

[0034] Boundary operations can specifically include authorized operations and prohibited operations. Authorized operations are those that are allowed to be performed, while prohibited operations are those that are not allowed to be performed.

[0035] The mapping relationship between various intent types and authorized and prohibited operations can be found in Table 1.

[0036] Table 1

[0037] Intent type Authorized operation behavior Prohibited Operations Read Select, Get, List, Show, Display, View, Check, Inspect Delete, drop, update, kill, export Query Search, find, query, lookup, check Delete, Update, Export, Write Analysis Analyze, evaluate, assess, review, inspect, calculate Delete, Write, Execute, Modify Delete Delete, remove, clear, purge, erase, drop All operations outside the target range Modify Update, edit, change, modify, append Delete, drop, kill Execute Run, execute, start, stop, terminate Operations beyond the scope of the task Export Export, Download, Copy, Share, Forward Determined by data sensitivity Install Install, clone, pull, fetch, download Software not approved by the whitelist

[0038] After the AI ​​agent executes its actions, its current operation behavior can be intercepted in real time, such as intercepting tool call operations, and extracting operation type, target resources, and operation parameters.

[0039] After obtaining the boundary operation behavior corresponding to the target intent type and the current operation behavior of the AI ​​agent, cross-validation can be performed to obtain the target decision.

[0040] The target decision is selected from a set of pre-defined candidate decisions, such as blocking, waiting for confirmation, and allowing passage.

[0041] After obtaining the target decision, the corresponding operation is executed. For example, if the target decision is to allow, the current operation is allowed; if the target decision is to block, the current operation is denied; if the target decision is to wait for confirmation, the corresponding operation can be executed based on the user's confirmation instruction (such as whether to allow execution).

[0042] In this embodiment, by performing intent recognition on user commands to obtain the target intent type, and deriving the boundary operation behavior corresponding to the target intent type, as well as comparing the current operation behavior and boundary operation behavior of the AI ​​agent, the accuracy of target decision-making can be improved, effectively distinguishing between "high-risk operations authorized by the user" and "high-risk operations exceeding authority", thereby improving the security protection effect.

[0043] Figure 2 This is a schematic diagram based on the second embodiment of the present disclosure. This embodiment provides a security protection method based on intent recognition for AI intelligent agents. Figure 3 yes Figure 2 The corresponding overall architecture diagram.

[0044] like Figure 3 As shown, the overall security protection system is a middleware architecture, deployed between the AI ​​agent (which may include multiple AI agents) and the underlying operating environment (such as file system, database, API gateway, process management and network). It can intercept the current operation behavior of the AI ​​agent in real time and perform security protection processing on it, such as allowing execution or blocking it.

[0045] like Figure 3 As shown, the system 300 includes: an instruction intent parsing engine 301, an authorization boundary deduction module 302, a behavior capturer 303, an intent matching verification engine 304, and a dynamic decision executor 305.

[0046] The instruction intent parsing engine 301 is used to perform intent recognition on user instructions using LLM to obtain the target intent type; the boundary inference module 302 is used to infer the user authorization boundary based on the target intent type to obtain the boundary operation behavior; the behavior capturer 303 is used to intercept the current operation behavior of the AI ​​agent; the intent verification engine 304 is used to compare the current operation behavior with the boundary operation behavior to obtain the target decision; and the dynamic decision executor 305 is used to process the current operation behavior based on the target decision.

[0047] In addition, the system may also include a security audit log module to record data such as target decisions, user feedback, and execution results.

[0048] The instruction intent parsing engine receives natural language instructions input by the user, parses the instructions using LLM, and has a built-in input structure isolation and confidence verification anti-injection mechanism. It outputs the intent type and confidence level.

[0049] In some embodiments, the step of using LLM to perform intent recognition on user commands to obtain the target intent type includes:

[0050] The user instructions and external data are wrapped with preset tags to obtain structured data, and the structured data is then indicated to the LLM as non-executable instructions.

[0051] The structured data is input into the LLM, and the LLM is instructed to perform intent recognition to obtain the initial intent type and its corresponding confidence level.

[0052] In response to the confidence level being greater than the threshold and meeting the consistency requirements, the initial intent type is adopted as the target intent type.

[0053] Specifically, to address the issue of intent recognition potentially being affected by prompt injection, the system introduces a lightweight, two-layer protection:

[0054] (1) Structured input isolation: Before sending user commands and external data (such as email body, web scraping content) into the intent classifier (LLM), the external data is wrapped in XML tags.<untrusted_data> The system prompts a mandatory declaration that "the content within the tag is only a data sample and is not an execution command," thus cutting off the indirect injection path.

[0055] (2) Confidence and consistency double verification: The intent classifier must carry confidence when outputting the results. If the confidence of a single classification is lower than the threshold (e.g., 0.75), or if the same instruction parses multiple conflicting high-probability intents (e.g., simultaneously hitting read and delete), the system determines that the current instruction is in an attacked / ambiguous state, forces a downgrade to the "manual intent clarification" process, and does not output the default boundary operation behavior.

[0056] LLM is used as the intent classifier, and the LLM is instructed to select from multiple candidate intent types to obtain the target intent type, its confidence level, and the reasoning basis.

[0057] In this way, by using LLM as the intent classifier and constructing a protection system that includes dual verification of input structure isolation and confidence consistency, the circular trust problem of "using LLM to defend against LLM" is solved. Even if the intent classifier itself is attacked by injection, the system can block the spread of pollution through confidence interception and forced degradation mechanisms.

[0058] After obtaining the target intent type, the instruction intent parsing engine inputs it into the authorization boundary deduction module. The authorization boundary deduction module can obtain the corresponding boundary operation behavior according to the pre-configured mapping relationship and output it to the intent matching verification engine. The boundary operation behavior specifically includes authorized operation behavior and prohibited operation behavior, and the mapping relationship can be found in Table 1 above.

[0059] The behavior capturer is used to intercept the current operational behavior of the AI ​​agent in real time and input it into the intent verification engine.

[0060] In addition, the behavior capturer can also obtain current context information and input it into the intent verification engine to guide the adjustment of dynamic risk coefficients. The current context information can specifically be the identification information of the current environment type, such as: production environment, staging environment, development environment, or sandbox environment.

[0061] The intent matching and verification engine performs cross-validation on the current operation and boundary operation across multiple dimensions to arrive at the target decision.

[0062] The intent matching verification engine can also pre-configure three types of baseline risk coefficients and apply dynamic perturbations based on context to prevent attackers from reverse-engineering the judgment boundary.

[0063] Intent-based risk coefficient: When parsing ToolCall, the behavior capturer normalizes and maps the action verbs of each operation of the AI ​​agent to one of the pre-configured intent types. For example, delete, drop, and remove are all mapped to delete, and get, list, and show are all mapped to read.

[0064] In addition, a base risk coefficient is pre-configured for each intent type. For example, the base risk coefficient for the read intent is 0, and the base risk coefficient for the delete intent is 0.8.

[0065] Basic risk coefficient for hazard parameters: The risk coefficient for each hazard parameter is pre-configured. For example, if the suffix parameter of the current operation is rf, then its basic risk coefficient for hazard parameters is 0.8. If the current operation contains 666, then its basic risk coefficient for hazard parameters is 0.7, etc.

[0066] Sensitive path basic risk coefficient: Pre-configure sensitive path information and its risk coefficient. For example, if the path information accessed by the current operation contains / etc / , then its sensitive path basic risk coefficient is 0.8. If the path information accessed contains / tmp / , then its sensitive path basic risk coefficient is 0.3, etc.

[0067] In intent matching, the verification mechanism can be divided into two levels: pre-blocking and scoring verification.

[0068] That is, if the current operation meets the pre-blocking condition, the target decision is directly blocked. Otherwise, if the current operation does not meet the pre-blocking condition, a comprehensive score is calculated, and the target decision is determined based on the comprehensive score. The comprehensive score is inversely related to risk; that is, the higher the comprehensive score, the lower the risk. See subsequent embodiments for details.

[0069] After obtaining the target decision, the intent matching and verification engine inputs it into the dynamic decision executor. The dynamic decision executor performs the corresponding processing on the current operation behavior according to the preset mapping relationship between decision and processing method.

[0070] Combination Figure 3 The overall architecture shown is as follows: Figure 2 As shown, the method includes:

[0071] 201. Use LLM to identify the intent of user commands and obtain the target intent type.

[0072] 202. Based on the target intent type, deduce the user authorization boundary to obtain the boundary operation behavior, which includes: authorized operation behavior and prohibited operation behavior.

[0073] 203. Intercept the current operation behavior of the AI ​​agent.

[0074] 204. In response to the current operation hitting the pre-blocking condition, determine that the target decision is to block.

[0075] Wherein, the current operation behavior hits the pre-blocking condition, including at least one of the following:

[0076] The current operation behavior belongs to the prohibited operation behavior among the boundary operation behaviors, and the corresponding intentional basic risk coefficient is greater than the threshold.

[0077] The current operation sequence is obtained based on the current operation behavior and the historical operation sequence, and the current operation sequence is consistent with the preset severity mode sequence.

[0078] Before calculating the overall score, a preliminary blocking judgment can be performed. If any preliminary blocking condition is met, the blocking can be performed directly.

[0079] Pre-blocking conditions may include:

[0080] Single-point high-risk unauthorized access: The current operation is a prohibited operation, and the basic risk coefficient of the intent is greater than the threshold (e.g., 0.7). For example, if the target intent type is read, the corresponding prohibited operations D = {delete, drop, update, kill, export}. If the AI ​​agent's current operation O is any of the above prohibited operations, and its corresponding basic risk coefficient of intent is greater than the threshold (e.g., O = delete, which is a prohibited operation, and its basic risk coefficient of intent is 0.8, which is greater than the threshold (0.7), then it is considered a single-point high-risk unauthorized access, and the direct judgment result is blocking.

[0081] Sequence-based lethal attacks: Assuming the historical operation sequence is represented by [O1, O2, ..., Ok], and the current operation refers to the currently intercepted operation, denoted by O, the current operation is appended to the end of the historical operation sequence. A sequence with a known pattern step count is then selected as the current operation sequence. For example, the appended sequence would be [O1, O2, ..., Ok, O]. If the known pattern step count is k, then the current operation sequence would be [O2, ..., Ok, O]. If the current operation sequence is identical to a known critical pattern sequence (i.e., the operation steps are in the same order), then it constitutes a sequence-based lethal attack, and the direct result is blocking.

[0082] The known pattern sequences are pre-configured; see Table 2 for details.

[0083] Table 2

[0084] Pattern ID name Risk level Step sequence Sequence 1 After reading sensitive files, they were transmitted over the network. Critical Step 1: Read + Sensitive Path → Step 2: Network Connection or Network Write Operation Sequence 2 Execute attack after system reconnaissance high Step 1: Query or read system information → Step 2: Modify, execute, or install Sequence 3 Perform the operation after disabling safety measures. Critical Step 1: Modify or run + security facilities → Step 2: Any high-risk intent Sequence 4 ... ... ...

[0085] In this way, high-risk operations that are explicitly prohibited or confirmed fatal attack chains cannot be "whitewashed" and allowed by fusion computing even if they have a high score in any low-risk dimension.

[0086] 205. In response to the current operation not meeting the pre-blocking condition, calculate a comprehensive score based on the current operation and the boundary operation, and determine the target decision based on the comprehensive score.

[0087] In some embodiments, calculating a comprehensive score based on the current operational behavior and the boundary operational behavior includes:

[0088] Calculate a single-point layer score based on the current operation behavior and the boundary operation behavior;

[0089] Calculate the sequence layer score based on the current operation behavior and the historical operation sequence;

[0090] The single-point layer score and the sequence layer score are multiplied together to obtain the comprehensive score.

[0091] Further, the calculation of the single-point layer score based on the current operation behavior and the boundary operation behavior includes:

[0092] Based on the subordinate relationship between the current operation behavior and the authorized and prohibited operation behaviors in the boundary operation behaviors, a first score is obtained;

[0093] Calculate the basic semantic similarity between the current operation and the target intent type, and obtain a second score based on whether the current operation belongs to the authorized operation and the basic semantic similarity;

[0094] Based on the contextual risk coefficient, a third score was obtained;

[0095] The first score, the second score, and the third score are weighted and summed to obtain the single-point layer score.

[0096] The calculation of the sequence layer score based on the current operation behavior and the historical operation sequence includes:

[0097] Based on the current operation behavior and the historical operation sequence, the current operation sequence is obtained, and the current operation sequence is matched with a known pattern sequence to obtain the first engine result;

[0098] A baseline intent vector is obtained based on the historical operation sequence. The intent drift distance is calculated based on the baseline intent vector and the current intent vector corresponding to the current operation behavior. The second engine result is obtained based on the intent drift distance.

[0099] The sequence layer score is obtained based on the results of the first engine and the second engine.

[0100] Furthermore, determining the target decision based on the comprehensive score includes:

[0101] If the comprehensive score is greater than or equal to a first threshold, the target decision is to allow passage.

[0102] In response to the comprehensive score being greater than or equal to the second threshold and less than the first threshold, it is determined that the target decision is to wait for confirmation;

[0103] In response to the overall score being less than the second threshold, the target decision is determined to be blocking.

[0104] For example, referring to Table 3, the first threshold is 0.8 and the second threshold is 0.3.

[0105] Specifically, for single-point layer scoring:

[0106] The single-point layer score is obtained by weighted summation of the scores from the three dimensions.

[0107] The three dimensions of the score can be referred to as the scope of authorization matching score (D1), intention, and other scores, respectively. Figure 1 Consistency score (D2) and contextual risk score (D3).

[0108] D1 - Scope of Authorization Matching Score:

[0109] If O.action ∈ A (the set of authorized operations), then D1 = 1.0

[0110] If O.action ∉ A and O.action ∉ D (the forbidden set), then D1 = 0.5

[0111] If O.action ∈ D (the set of prohibited operations), then D1 = 0.0.

[0112] Where O.action is the current operation behavior, A is the set of authorized operations corresponding to the target intent type, D is the set of prohibited operations corresponding to the target intent type, and ∈ and ∉ represent belonging and not belonging, respectively.

[0113] D2 - Italy Figure 1 Consistency score:

[0114] Calculate the basic semantic similarity sim = cos(E(O), E(B.primary_intent)), where E(O) is the semantic feature of the current operation behavior, E(B.primary_intent) is the semantic feature of the target intent type, and cos represents the cosine similarity.

[0115] If O.action ∈ A (the operation falls within the authorized set), then D2 = sim (no risk attenuation is applied to avoid misjudging legitimate high-risk operations);

[0116] If O.action ∉ A (operation exceeding authority), then D2 = sim × (1 - R[O.intent]) (the score of high-risk operations exceeding authority is significantly suppressed, and R[O.intent] is the basic risk coefficient of the intent corresponding to the current operation behavior).

[0117] Among them, the authorization criterion of D2 adopts the same O.action ∈ A as D1 to ensure that the two are of the same type; the attenuation coefficient R is determined by looking up the basic risk coefficient of the intent according to the intent type to which the operation belongs.

[0118] D3 - Contextual Risk Assessment Score:

[0119] Base score = 0.7 (fluctuates dynamically based on the environmental context, such as 0.5 in production environment and 0.9 in sandbox).

[0120] Path risk coefficient = the maximum risk coefficient of the target path of the matching operation in the sensitive path; if no match is found, the coefficient is 0.

[0121] Parameter risk coefficient = the maximum risk coefficient of the matched operation parameter among the dangerous parameters; if not matched, it is 0.

[0122] D3 = clamp(base score - max(path risk coefficient, parameter risk coefficient), 0, 1)

[0123] Here, clamp(x, 0, 1) = min(max(x, 0), 1) clamps the result to [0,1]. (In this formula, since the base score is ≤ 0.9, the upper bound is never triggered, and the clamp is only used to prevent the subtraction result from being negative.)

[0124] Single-point layer scoring (dynamic weighting):

[0125] Baseline weights: W1=0.40, W2=0.35, W3=0.25

[0126] The weights W1', W2', and W3' are adjusted in conjunction with the dynamic anti-bypass disturbance factor.

[0127] Single-point layer score (S_op) = W1' × D1 + W2' × D2 + W3' × D3

[0128] Scoring for sequence layers:

[0129] Sequential risk is separated from single-point weighting and the sequential risk factor, i.e., the sequential layer score F_seq, is calculated independently by the dual engines.

[0130] Engine 1: Known pattern matching (including complete matching and intermediate step matching)

[0131] In the splicing sequence H⁺= [O1, ..., O k In [O, O], take the tail window [O_{k-m+2}, ..., O] that ends with the current operation O and has a length equal to the number of pattern steps m. k [, O], compare with the predefined attack pattern P in step sequence:

[0132] Complete match: The window's m steps and all m steps of P are hit sequentially (attack chain complete);

[0133] Intermediate step matching (ordered prefix matching): There exists j∈[1, m-1] such that the tail of H⁺ hits the first j steps of P in order (step 1.. step j of P), but the (j+1)th step of P has not yet appeared (attack chain in progress, final high-risk trigger step not reached).

[0134] Only consecutive prefixes starting from step 1 of the pattern are counted as intermediate step matches; isolated hits in a certain step of the pattern or out-of-order hits are not counted (to avoid false triggering of missing attack text above).

[0135] Engine 2: Unknown Intent Drift Anomaly Detection.

[0136] Let the embedding function E(·) map operations or intentions to vectors in the same semantic space.

[0137] The baseline intent vector v̄ = (1 / k)·Σᵢ=1...k (E(Oᵢ)) (mean is calculated only from the historical sequence H, and the current operation O is not included in the baseline to avoid the baseline shifting towards the current operation and reducing drift sensitivity); when k=0 (the first operation of the session, there is no historical baseline), engine 2 does not participate in this round of detection, and its contribution of F_seq component is 1.0 - at this time "no history means no drift", and the entire defense line is covered by pre-blocking, single-point layer scoring and known pattern matching of engine 1.

[0138] Current intent vector v_cur = E(O);

[0139] The drift distance is calculated using cosine distance: drift = 1 - cos(v_cur, v̄)

[0140] (An embedding metric system consistent with the cosine similarity of D2, measuring deviation from the intended direction, with values ​​ranging from [0, 2]);

[0141] Dual threshold grading: Let the dynamic threshold be θ = θ_env × (1 + δ), where θ_env is the baseline threshold preset according to the deployment environment (e.g., production=0.30 / staging=0.40 / sandbox=0.60, configurable), and δ is the dynamic anti-bypass disturbance factor, which fluctuates within [-0.15, +0.15] with the frequency of session anomalies and threat intelligence (δ decreases during high-frequency probing or high-threat events, lowering the threshold and making the threshold unreducible). Let the severe threshold be θ_high = θ and the minor threshold be θ_low = 0.5·θ.

[0142] The definition of "user's original intent is low risk" is: the basic risk coefficient R[user intent] of the user's instruction intent is ≤ a threshold (e.g., 0.1), specifically read-only intents such as READ / QUERY / INSPECT; legitimate operations of such intents should not generate any high-risk behaviors, so a rapid drift of the intent vector towards the high-risk area is considered an induced anomaly).

[0143] If drift ≥ θ_high and the user's original intent was low-risk → Severe intent drift anomaly

[0144] θ_low ≤ drift < θ_high → slight drift.

[0145] Note: Engine 2 only considers intent drift as an anomaly signal in low-risk sessions—low-risk read-only tasks should not semantically generate high-risk intents, so their drastic drift towards the high-risk zone is almost certainly a induced attack, resulting in the highest signal-to-noise ratio. Conversely, when the user's original intent is not low-risk (e.g., R[user intent] > 0.1), significant fluctuations in the operational intent within the high-risk zone are normal business evolution rather than an attack signal. Classifying these as anomalies would cause numerous false positives, and the security of such sessions is already covered by pre-emptive hard blocking, single-point layer D1 / D2 overreach suppression, and Engine 1's known pattern matching, eliminating the need for repeated intervention from Engine 2. Therefore, Engine 2's drift criterion focuses on low-risk sessions with the highest signal-to-noise ratio.

[0146] The sequence layer score F_seq value is used to combine the detection results of both engines.

[0147] If the engine triggers a complete match of any CRITICAL mode → it will be blocked immediately (it has already been blocked in the preceding steps);

[0148] If the engine triggers a complete match in any HIGH mode → F_seq = 0.3;

[0149] If Engine 2 detects a severe intentional drift anomaly → F_seq = 0.4;

[0150] If engine one hits an intermediate step match, or engine two detects a slight drift → F_seq = 0.7;

[0151] No sequence outliers (other cases) → F_seq = 1.0 (no penalty, no dilution);

[0152] Among them, the F_seq=0.4 of the engine 2 intention drift anomaly is slightly higher than the F_seq=0.3 of the known mode of engine 1 HIGH. Since the unknown drift is a heuristic judgment and there is a certain possibility of false alarm, a slightly higher CONFIRM buffer space is reserved to avoid false killing of legitimate business processes that are naturally evolving in intent; while the known HIGH mode is more deterministic and is suppressed more heavily.

[0153] Then, the final overall score S = S_op × F_seq

[0154] In the case of single-point operation (no sequence risk): F_seq = 1.0, S = S_op, the single-point dimension is not diluted; in the case of sequence risk: F_seq < 1.0, the single-point score is reduced proportionally, and the higher the sequence risk, the more significant the reduction.

[0155] 206. Based on the target decision, process the current operation behavior.

[0156] After obtaining the comprehensive score, a target decision can be made based on the comprehensive score, and corresponding processing can be performed.

[0157] The mapping relationship between comprehensive scoring, target decision-making, and treatment methods can be seen in Table 3.

[0158] Table 3

[0159] Overall rating: S Goal Decision Handling method S>=0.8 Allow Normal execution 0.3<=S<0.8 Awaiting confirmation. Waiting for user confirmation S<0.3 Block Immediately block

[0160] Figure 4 This is a schematic diagram of the decision-making process provided according to embodiments of this disclosure. For example... Figure 4 As shown, the decision-making process mainly includes:

[0161] 401. Obtain authorized and prohibited operation behaviors based on the target intent type corresponding to the user instruction.

[0162] 402. Determine whether the current operation of the AI ​​agent hits the pre-blocking condition. If so, determine that the target decision is to block; otherwise, execute 403.

[0163] 403. Calculate the overall score.

[0164] This involves calculating a single-point risk score and a sequence risk score, and then multiplying the two to obtain a comprehensive score.

[0165] The single-point risk score S_op can be obtained by weighted summation of the scores in the three dimensions, and the sequence risk score can be obtained by using dual engines. The comprehensive score S = S_op * S_seq (* indicates multiplication operation).

[0166] The calculation process for each of the above scores can be found in the relevant descriptions of the above embodiments.

[0167] 404. Determine the target decision based on the comprehensive score.

[0168] If the overall score is greater than or equal to the first threshold (e.g., 0.8), the target decision is to allow passage (ALLOW); if it is less than the second threshold (e.g., 0.3), the target decision is to block (BLOCK); and if it is between 0.3 and 0.8, confirmation is required (CONFIRM).

[0169] In addition, for the key parameters (weights, thresholds, and sequence factors) in the system, this disclosure uses a four-step method of analytic hierarchy process (AHP) modeling, sequence factor hierarchical calibration, threshold boundary deduction, and ablation experiment to scientifically calibrate them, ensuring that they achieve the optimal balance between the legitimate business release rate and the unauthorized interception rate.

[0170] (I) Derivation of the Analytic Hierarchy Process (AHP) for Single-Point Layer Weights

[0171] The single-point rating S_op contains only three dimensions: D1, D2, and D3. Pairwise comparisons are performed on each of the three dimensions, and the judgment matrix A is constructed using the Saaty 1-9 scaling method.

[0172] Dimension D1 D2 D3 D1 Scope of Authorization 1 8 / 7 8 / 5 D2 Meaning Figure 1 Desire 7 / 8 1 7 / 5 D3 Contextual Risk 5 / 8 5 / 7 1

[0173] Calculation results:

[0174] The largest eigenvalue λ_max ≈ 3.0

[0175] Consistency index CI = (λ_max - n) / (n-1)

[0176] The random consistency index RI (n=3) = 0.58

[0177] If the consistency ratio (CR) is much lower than the 0.10 threshold, it indicates that the matrix has good consistency and the weight allocation is reliable.

[0178] Normalized feature vector (i.e., final weights of a single-point layer): W = [0.40, 0.35, 0.25]

[0179] Weight semantic interpretation:

[0180] D1 (0.40) has the highest weight because "whether it is within the authorized scope" is the most fundamental requirement of access control;

[0181] D2 (0.35) is the second most important factor, and is considered the core innovation of this disclosure (meaning...). Figure 1 (Conformity determination)

[0182] D3 (0.25) serves as an auxiliary dimension for amplifying contextual risk.

[0183] (ii) Basis for determining the value of the sequence factor F_seq

[0184] The four values ​​of F_seq (0.3 / 0.4 / 0.7 / 1.0) are based on the determinism and severity of the attack chain.

[0185] Classification: The CRITICAL mode is irreversible and the mode is fixed, so it is directly rejected.

[0186] HIGH mode is highly dangerous but may be legal; F_seq=0.3 indicates severe suppression.

[0187] Engine 2 intention drift anomaly (unknown attack) F_seq=0.4, slightly higher than HIGH known mode, retain CONFIRM buffer;

[0188] Intermediate steps / slight drift F_seq=0.7 Mild hint;

[0189] No abnormalities were found (F_seq=1.0). No intervention was given to the single-point scoring.

[0190] (III) Mathematical boundary derivation of the threshold

[0191] The ALLOW threshold of 0.80 and the BLOCK threshold of 0.30 are determined through mathematical deduction of the following eight typical boundary scenarios (S = S_op × F_seq):

[0192] Boundary Scene D1 D2 D3 S_op F_seq S Expected decision verify Fully compliant single point 1.0 1.0 0.7 0.925 1.0 0.925 ALLOW >=0.8, passed Medium-sensitivity paths 1.0 1.0 0.4 0.850 1.0 0.850 ALLOW >=0.8, passed Intent slightly off 1.0 0.6 0.7 0.785 1.0 0.785 CONFIRM 0.3-0.8, through Overstepping authority but low risk 0.5 0.5 0.7 0.550 1.0 0.550 CONFIRM 0.3-0.8, through Compliant single point + HIGH sequence 1.0 1.0 0.7 0.925 0.3 0.278 BLOCK <0.3, passed Compliance single point + intent deviation 0.5 0.6 0.7 0.585 0.4 0.234 BLOCK <0.3, passed Single-point high-risk overreach (with hard obstruction) — — — — — Direct blocking BLOCK Hard blockage as a last resort, through CRITICAL sequence (with hard resistance) — — — — — Direct blocking BLOCK The sequence has a veto power, and the motion passes.

[0193] This deduction proves that:

[0194] In the two-layer model, the compliance single-point operation S=S_op, and the single-point score is not diluted by any external factors;

[0195] Once a HIGH sequence or intentional drift is hit, the multiplication factor can suppress the high single-point score (0.925) to the blocking zone (0.278), thus achieving strong suppression of the sequence attack;

[0196] When the prerequisite hard blocking condition is met, BLOCK is output directly, skipping the scoring calculation, thus mathematically preventing any whitewashing.

[0197] (iv) Ablation experiment verification

[0198] A test set containing 500 legitimate user commands and 500 privilege escalation / injection attack commands was constructed to progressively ablation-verify each capability level of this disclosure:

[0199] Scoring framework configuration False Alarm Rate (FPR) False negative rate (FNR) Balanced accuracy (BA) D1 only (traditional access control baseline, only verifies the authorized scope) 8.2% 27.6% 82.1% D1+D2+D3 Single-point weighting (no sequence detection, no pre-blocking) 6.9% 7.5% 92.8% This disclosure (3D weighted + F_seq sequence factor + pre-hard impedance) 6.4% 3.8% 94.9%

[0200] The Balanced Accuracy (BA) = ((1-FNR) + (1-FPR)) / 2, also known as Balanced Accuracy, comprehensively reflects the ability to distinguish between positive and negative samples. It is suitable for scenarios where positive and negative samples are balanced. Compared with the F1 Score formula, it is more intuitive and its consistency with FPR / FNR is obvious.

[0201] The three configuration tiers in the table above are in a progressive relationship—the first tier only verifies the authorized scope (D1), corresponding to traditional access control capabilities; the second tier introduces additional features on top of D1. Figure 1 The first level is based on the risk of consistency (D2) and contextual risk (D3), but does not include sequence detection and pre-blocking, representing pure single-point risk assessment capability; the third level is the complete solution disclosed in this publication, which superimposes the sequence risk factor F_seq and pre-blocking hard blocking on the basis of single-point three-dimensional weighting.

[0202] Experimental data show that by splitting the sequence model into independent multiplication factors and introducing a pre-emptive hard block, the false negative rate is further reduced from 7.5% of the pure single-point weighted model to 3.8% without increasing the false positive rate. This effectively demonstrates the effectiveness of the sequence risk decoupling and hard block mechanism in defending against multi-step attacks.

[0203] (5) Hierarchical decision-making execution and closed-loop reconciliation

[0204] Semantic reconciliation between ALLOW and execution results: Normal execution records audit logs. To address blind spots where multi-agent collaboration might bypass standard interface interception, the system intercepts the results returned by the underlying execution environment (standard output, API response) for operations that are allowed by the ALLOW decision. It extracts key action descriptions from the results using a lightweight NLU model and compares them semantically with the expected authorized behavior. If a contradiction is found, such as "expected READ but result contains DELETE semantics," a security alert is immediately triggered. Furthermore, when a parent agent calls a child agent, the child agent's authorization boundaries are strictly inherited from the parent agent and cannot be extended in cascading.

[0205] CONFIRM and alarm fatigue circuit breaker mechanism:

[0206] The system introduces a session-level trust points mechanism, with an initial points of T.

[0207] Pause the operation and display the operation details, risk assessment, and comparison with the original instructions to the user.

[0208] Fatigue control: If the time interval since the last user confirmation is less than a set threshold (e.g., 5 minutes), or if the current session has triggered CONFIRM 3 times consecutively, the system determines that "confirmation fatigue" has occurred and automatically upgrades the decision to BLOCK (silent interception and recording) to prevent users from mechanically clicking to confirm, which would cause the security defense to fail.

[0209] Trust decay: Each time a user selects "deny confirmation", the session trust score T decreases; when T is below the safety threshold, subsequent operations will directly execute BLOCK without a confirmation pop-up.

[0210] BLOCK: Immediately block the operation, send a security alert to the SIEM / SOAR system, record the complete event context, and notify the security operations team.

[0211] Typical application scenarios

[0212] Scenario 1: Legitimate High-Risk Operations Allowed Normally (Distinguishing between Legitimate and Illegal High-Risk) — User command "Empty Trash" (DELETE intent), agent executes DELETE / mail / trash. No pre-emptive hard blocking is triggered (D1=1.0). Single-point layer: D1=1.0, D2 calculation sim=1.0 and O.action ∈ A → D2=1.0 (no risk attenuation applied), D3=0.7, therefore S_op = 0.40×1.0 + 0.35×1.0 + 0.25×0.7 = 0.925. Sequence layer: No sequence risk, F_seq=1.0. Finally S =0.925×1.0 = 0.925, triggering ALLOW decision, legitimate high-risk deletion operation is correctly allowed, breaking the deadlock of traditional security's one-size-fits-all approach to high-risk operations.

[0213] Scenario 2: High-Risk Unauthorized Access Hard Block – The user commands "View Logs" (READ intent), and the agent attempts to execute DROP to delete the database. The system detects that DROP is outside the READ authorization range (D1=0.0), and DROP is normalized to the DELETE intent category, R[DELETE]=0.8 ≥ 0.7. Step 0 is triggered for pre-processing hard blocking, directly outputting the BLOCK decision without needing to enter single-point weighting and sequence fusion. This prevents subsequent low-risk dimensions (such as those without sensitive parameter D3=0.7) from artificially inflating the total score through fusion calculation, thus allowing the action to pass.

[0214] Scenario 3: Unknown Multi-Step Attack Drift Detection (Verification of Sequence Factor Multiplication Suppression) — The attacker induces the agent to first execute multiple "queries" (QUERY), then "modifies configuration" (MODIFY), and finally attempt to "establish a network connection" (NETWORK_CONNECT) using a long context. The final step, NETWORK_CONNECT, itself has a medium single-point risk: assuming D1=0.5, D2=0.6, D3=0.7, the single-point score S_op = 0.40×0.5 +0.35×0.6 + 0.25×0.7 = 0.585 (falling in the CONFIRM region). However, in this publicly disclosed sequence layer, Engine 2 (Unknown Sequence Anomaly Detection) detects that the historical sequence intent mean rapidly drifts from the low-risk QUERY to the high-risk NETWORK_CONNECT, determining F_seq=0.4. Ultimately, S = 0.585 × 0.4 = 0.234 < 0.30, directly triggering the BLOCK decision. This scenario highlights the advantages of the two-layer architecture: the sequence factor multiplies the average single-point distribution into the blocking region, rather than being diluted by a weighted average.

[0215] Scenario 4: Alarm Fatigue Circuit Breaker – An attacker attempts to embed multiple hidden commands in the email body, inducing the agent to continuously attempt unauthorized operations. After the first two CONFIRM triggers, the system detects frequent pop-ups within a short period, determining "confirmation fatigue," and subsequent unauthorized operations are automatically upgraded to BLOCK silent interception to prevent the user from blindly clicking confirm and breaching the defenses.

[0216] Scenario 5: Ordered Prefix Matching in the Intermediate Steps of the Attack Chain (Warning for Incomplete Steps) — The agent executes "INSPECT" and "EXECUTE / AUTH" sequentially, hitting the first two ordered prefixes of CRITICAL mode SEQ-004 (privilege escalation chain: STEP1 privilege probe → STEP2 privilege escalation command → STEP3 write system file), but STEP3 (write system file) has not yet appeared. At this time, the engine determines that it is an intermediate step match (attack chain in progress, final high-risk trigger step not reached), sets F_seq=0.7, and applies mild suppression to this step to enter the CONFIRM warning; once STEP3 is completed to form a complete match, a hard block is directly implemented before step 0. Conversely, if only STEP2 (privilege escalation command) appears in isolation and there is no continuous prefix of STEP1 (privilege probe) before it, it is not counted as an intermediate step match (F_seq=1.0), avoiding false triggering due to missing attack context. This scenario confirms the effectiveness of the disclosed technique of "detecting attacks before the progressive attack chain is complete".

[0217] The security protection process, taking the email agent scenario as an example, can be as follows: Figure 5 As shown, the security protection middleware is a security protection system provided in this disclosure, which can be located between the AI ​​intelligent agent (such as the AI ​​email intelligent agent) and the underlying operating environment (such as the underlying email service).

[0218] Based on the above embodiments, this disclosure can achieve the following technical effects:

[0219] The "Intent-Authorization-Behavior" ternary verification model: Traditional non-LLM protection solutions (RBAC / sandbox / WAF, etc.) can only solve the permission problem of "can it be done?", but cannot solve the intention deviation problem of "should it be done?". This disclosure uses "original user intent" as a dynamic baseline to achieve precise differentiation between "legitimate high-risk operations (such as deletion by user instruction)" and "unauthorized high-risk operations (such as deletion by inducement)", breaking the deadlock of static permission management.

[0220] The "Single-Point 3D Weighted × Sequence Risk Factor" two-layer cascaded scoring architecture completely decouples the inherent risk of a single operation (authorization / intent / context 3D weighted S_op) from the sequence risk across operations (dual-engine sequence factor F_seq), fusing them through multiplication: S = S_op × F_seq. The single-point layer focuses on the authorization, intent, and context risk of the operation itself; the sequence layer independently identifies multi-step attack chains and unknown intent drift. The two are fused through multiplication rather than weighted summation. When there is no sequence risk, F_seq=1.0, which does not interfere with the single-point scoring; when there is sequence risk, it is proportionally reduced; and when a fatal attack is hit, it is a veto. Ablation experiments have verified that after introducing the sequence factor and pre-emptive hard blocking, the false negative rate has been further reduced from 7.5% with pure single-point weighting to 3.8%.

[0221] A semantic verification algorithm incorporating pre-emptive hard blocking and conditional risk attenuation (core security defense): This algorithm proposes a semantic verification method based on semantic embedding space. Figure 1 The algorithm employs a consistency verification mechanism and introduces a pre-emptive hard blocking mechanism: high-risk operations that explicitly exceed authority (D1=0) and have a base risk coefficient ≥0.7, as well as operations that hit a CRITICAL attack sequence, are directly vetoed. Simultaneously, based on cosine similarity, a conditional attenuation is applied using the intent base risk coefficient—no attenuation within authorized limits, and proportional reduction within exceeded limits. This mechanism mathematically ensures that "explicitly prohibited high-risk operations" cannot be excused by high scores in any low-risk dimension, while also preventing legitimate high-risk operations from being misjudged.

[0222] The intent parsing module's own trust protection mechanism: It adopts LLM as the intent classifier and constructs a protection system that includes dual verification of input structure isolation and confidence consistency, completely solving the circular trust problem of "using LLM to defend against LLM". Even if the intent classifier itself is attacked by injection, the system can block the spread of pollution through confidence interception and forced degradation mechanisms.

[0223] A dual-engine architecture-based operation sequence association detection mechanism is designed, consisting of known pattern matching and unknown sequence anomaly detection (intent drift computation). This architecture not only accurately captures predefined multi-step attack chains but also identifies unknown novel attack methods through intent drift anomalies when the agent's progressive attack chain is incomplete and has not yet hit the known pattern library. The detection results are incorporated into the scoring as independent sequence factors, preventing dilution by high scores on a single point.

[0224] Dynamic anti-bypass disturbance, alarm fatigue circuit breaker, and execution result closed-loop reconciliation mechanism: To address the risk that fixed scoring logic is easily reverse-derived, the system introduces a dynamic disturbance factor, with thresholds and weights dynamically fluctuating according to the environment and threat intelligence; to address human confirmation fatigue, a session trust score and frequency control circuit breaker mechanism are introduced to prevent user numb confirmation from being exploited; to address the blind spots in multi-agent collaboration, the system constructs an authorization inheritance restriction and execution result semantic reconciliation mechanism, realizing a complete security closed loop from "instruction interception" to "execution review".

[0225] A scientific parameter calibration method based on AHP and ablation experiments: key parameters such as weights, thresholds, and risk coefficients are determined through rigorous boundary extrapolation and multiple ablation experiments (overall equilibrium accuracy BA=94.9%). This method differs from traditional empirical parameter design and has interpretability, reproducibility, and continuous optimization capabilities.

[0226] Figure 6 The diagram is based on the third embodiment of the present disclosure. This embodiment provides a security protection device based on intent recognition for AI intelligent agents. The device 600 includes: an identification module 601, an inference module 602, an interception module 603, a decision module 604, and a processing module 605.

[0227] The identification module 601 is used to identify the intent of the user command using LLM to obtain the intent type; the deduction module 602 is used to deduce the user authorization boundary based on the intent type to obtain the boundary operation behavior; the interception module 603 is used to intercept the current operation behavior of the AI ​​agent; the decision module 604 is used to compare the current operation behavior with the boundary operation behavior to obtain the target decision; and the processing module 605 is used to process the current operation behavior based on the target decision.

[0228] In some embodiments, the identification module 601 is further configured to:

[0229] The user instructions and external data are wrapped with preset tags to obtain structured data, and the structured data is then indicated to the LLM as non-executable instructions.

[0230] The structured data is input into the LLM, and the LLM is instructed to perform intent recognition to obtain the initial intent type and its corresponding confidence level.

[0231] In response to the confidence level being greater than the threshold and meeting the consistency requirements, the initial intent type is adopted as the target intent type.

[0232] In some embodiments, the decision module 604 is further configured to:

[0233] In response to the current operation failing to meet the pre-blocking condition, a comprehensive score is calculated based on the current operation and the boundary operation, and the target decision is determined based on the comprehensive score.

[0234] In some embodiments, the device 600 further includes:

[0235] A pre-processing module is used to determine that the target decision is to block in response to the current operation behavior hitting a pre-blocking condition.

[0236] In some embodiments, the current operation behavior hits a pre-blocking condition, including at least one of the following:

[0237] The current operation behavior belongs to the prohibited operation behavior among the boundary operation behaviors, and the corresponding intentional basic risk coefficient is greater than the threshold.

[0238] The current operation sequence is obtained based on the current operation behavior and the historical operation sequence, and the current operation sequence is consistent with the preset severity mode sequence.

[0239] In some embodiments, the decision module 604 is further configured to:

[0240] Calculate a single-point layer score based on the current operation behavior and the boundary operation behavior;

[0241] Calculate the sequence layer score based on the current operation behavior and the historical operation sequence;

[0242] The single-point layer score and the sequence layer score are multiplied together to obtain the comprehensive score.

[0243] In some embodiments, the decision module 604 is further configured to:

[0244] Based on the subordinate relationship between the current operation behavior and the authorized and prohibited operation behaviors in the boundary operation behaviors, a first score is obtained;

[0245] Calculate the basic semantic similarity between the current operation and the target intent type, and obtain a second score based on whether the current operation belongs to the authorized operation and the basic semantic similarity;

[0246] Based on the contextual risk coefficient, a third score was obtained;

[0247] The first score, the second score, and the third score are weighted and summed to obtain the single-point layer score.

[0248] In some embodiments, the decision module 604 is further configured to:

[0249] Based on the current operation behavior and the historical operation sequence, the current operation sequence is obtained, and the current operation sequence is matched with a known pattern sequence to obtain the first engine result;

[0250] A baseline intent vector is obtained based on the historical operation sequence. The intent drift distance is calculated based on the baseline intent vector and the current intent vector corresponding to the current operation behavior. The second engine result is obtained based on the intent drift distance.

[0251] The sequence layer score is obtained based on the results of the first engine and the second engine.

[0252] In some embodiments, the decision module 604 is further configured to:

[0253] If the comprehensive score is greater than or equal to a first threshold, the target decision is to allow passage.

[0254] In response to the comprehensive score being greater than or equal to the second threshold and less than the first threshold, it is determined that the target decision is to wait for confirmation;

[0255] In response to the overall score being less than the second threshold, the target decision is determined to be blocking.

[0256] It is understood that the same or similar content in different embodiments of this disclosure can be referred to each other.

[0257] It is understood that the terms "first" and "second" in the embodiments of this disclosure are only used for distinction and do not indicate the degree of importance or the order of events.

[0258] It is understandable that, unless otherwise specified, the order of steps in the process indicates that the temporal relationship between these steps is not limited.

[0259] The technical solutions disclosed herein involve the collection, storage, use, processing, transmission, provision, and disclosure of various types of information, such as user personal information, in accordance with relevant laws and regulations and do not violate public order and good morals.

[0260] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0261] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0262] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the electronic device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0263] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of displays, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0264] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as an intent-based security protection method for AI agents. For example, in some embodiments, the intent-based security protection method for AI agents can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the intent-based security protection method for AI agents described above can be performed. Alternatively, in other embodiments, computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform an intent-based security protection method for AI agents.

[0265] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0266] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable task processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0267] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0268] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0269] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0270] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0271] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0272] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An intent recognition-based security protection method for an AI agent, characterized in that, include: LLM is used to identify the intent of user commands and obtain the target intent type; Based on the target intent type, the user authorization boundary is derived, and the boundary operation behavior is obtained; Intercept the current actions of the AI ​​agent; The current operation behavior is compared with the boundary operation behavior to obtain the target decision; Based on the target decision, the current operational behavior is processed.

2. The method of claim 1, wherein, The process of using LLM to identify the intent of user commands and obtain the target intent type includes: The user instructions and external data are wrapped with preset tags to obtain structured data, and the structured data is then indicated to the LLM as non-executable instructions. The structured data is input into the LLM, and the LLM is instructed to perform intent recognition to obtain the initial intent type and its corresponding confidence level. In response to the confidence level being greater than the threshold and meeting the consistency requirements, the initial intent type is adopted as the target intent type.

3. The method of claim 1, wherein, The step of comparing the current operation behavior with the boundary operation behavior to obtain the target decision includes: In response to the current operation failing to meet the pre-blocking condition, a comprehensive score is calculated based on the current operation and the boundary operation, and the target decision is determined based on the comprehensive score.

4. The method of claim 3, wherein, Also includes: In response to the current operation hitting the pre-blocking condition, the target decision is determined to be blocking.

5. The method of claim 4, wherein, The current operation behavior hits the pre-blocking condition, including at least one of the following: The current operation behavior belongs to the prohibited operation behavior among the boundary operation behaviors, and the corresponding intentional basic risk coefficient is greater than the threshold. The current operation sequence is obtained based on the current operation behavior and the historical operation sequence, and the current operation sequence is consistent with the preset severity mode sequence.

6. The method of claim 3, wherein, The calculation of the comprehensive score based on the current operation behavior and the boundary operation behavior includes: Calculate a single-point layer score based on the current operation behavior and the boundary operation behavior; Calculate the sequence layer score based on the current operation behavior and the historical operation sequence; The single-point layer score and the sequence layer score are multiplied together to obtain the comprehensive score.

7. The method of claim 6, wherein, The calculation of a single-point layer score based on the current operation behavior and the boundary operation behavior includes: Based on the subordinate relationship between the current operation behavior and the authorized and prohibited operation behaviors in the boundary operation behaviors, a first score is obtained; Calculate the basic semantic similarity between the current operation and the target intent type, and obtain a second score based on whether the current operation belongs to the authorized operation and the basic semantic similarity; Based on the contextual risk coefficient, a third score was obtained; The first score, the second score, and the third score are weighted and summed to obtain the single-point layer score.

8. The method of claim 6, wherein, The calculation of the sequence layer score based on the current operation behavior and the historical operation sequence includes: Based on the current operation behavior and the historical operation sequence, the current operation sequence is obtained, and the current operation sequence is matched with a known pattern sequence to obtain the first engine result; A baseline intent vector is obtained based on the historical operation sequence. The intent drift distance is calculated based on the baseline intent vector and the current intent vector corresponding to the current operation behavior. The second engine result is obtained based on the intent drift distance. The sequence layer score is obtained based on the results of the first engine and the second engine.

9. The method of claim 3, wherein, The process of determining the target decision based on the comprehensive score includes: If the comprehensive score is greater than or equal to a first threshold, the target decision is to allow passage. In response to the comprehensive score being greater than or equal to the second threshold and less than the first threshold, it is determined that the target decision is to wait for confirmation; In response to the overall score being less than the second threshold, the target decision is determined to be blocking.

10. A security protection device based on intent recognition for AI intelligent agents, characterized in that, include: The recognition module is used to perform intent recognition on user commands using LLM to obtain the intent type; The derivation module is used to deduce the user authorization boundary based on the intent type and obtain the boundary operation behavior; The interception module is used to intercept the current operational behavior of the AI ​​agent; The decision module is used to compare the current operation behavior with the boundary operation behavior to obtain the target decision; The processing module is used to process the current operation behavior based on the target decision.

11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.