An agent security policy distribution and execution method, device and electronic equipment

CN122528167APending Publication Date: 2026-08-07BEIJING YIXU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING YIXU TECHNOLOGY CO LTD
Filing Date
2026-05-18
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0003]目前,针对智能体的安全控制主要存在以下几种技术路径:一是框架内嵌式安全机制,即在Agent框架内部嵌入安全规则,在prompt或tool调用阶段进行判断,该方式与具体框架强绑定,难以跨系统复用;二是基于内容的安全过滤,依赖LLM安全分类模型或关键词规则过滤,主要针对输入或输出内容本身进行判断,难以覆盖智能体的复杂行为路径;三是API/网关级安全控制,通常位于系统边界,对内部行为的细粒度控制能力有限;四是单点策略配置机制,即每个系统单独配置安全策略,缺乏统一策略表达与管理机制

Benefits of technology

[0019] This application provides a method, apparatus, and electronic device for distributing and executing security policies for intelligent agents. In this method, the server encapsulates a constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package, and distributes it to different heterogeneous target execution environments within various terminals. This security policy intermediate language is a policy description language decoupled from the intelligent agent framework. The terminal transcribes the vaccine-like policy package into local policy rules within the target execution environment and executes control actions on the intelligent agent's behavior based on these local policy rules. This invention achieves unified expression, standardized encapsulation and distribution of security policies across frameworks, as well as localized real-time control, solving the problems of existing technologies where security policies depend on specific frameworks, are difficult to reuse across systems, and lack unified governance capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122528167A_ABST
    Figure CN122528167A_ABST
Patent Text Reader

Abstract

The application provides a method and device for distributing and executing an agent security policy and an electronic device. In the method, a server encapsulates a security policy intermediate language and policy metadata into a standardized vaccine-like policy package to decouple the security policy from an agent framework, so that the same policy can be uniformly prepared, versioned, and distributed across platforms like a vaccine preparation. After a terminal receives the vaccine-like policy package, it directly completes policy adaptation and control response at a behavior occurrence point through a local transcription and execution mechanism. The method improves the reusability and deployment efficiency of the security policy in different heterogeneous agent environments and reduces the cost of repeated development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence security technology, and more specifically, to a method, apparatus, and electronic device for distributing and executing an intelligent agent security strategy. Background Technology

[0002] The application forms of AI agents are becoming increasingly diverse, expanding to include various types such as programmable AI agent systems for code generation and execution, browser-based AI agent systems, operating system-based AI agent systems, tool-invoking AI agent systems, and multi-agent collaborative systems. Different types of AI agents exhibit significant differences in execution mechanisms, behavioral patterns, and resource access methods, posing challenges to unified security control.

[0003] Currently, security control for intelligent agents mainly involves the following technical approaches: First, framework-embedded security mechanisms, which embed security rules within the agent framework and make judgments during the prompt or tool call phase. This approach is strongly bound to specific frameworks and is difficult to reuse across systems. Second, content-based security filtering, which relies on LLM security classification models or keyword rule filtering, mainly judges the input or output content itself and is difficult to cover the complex behavioral paths of intelligent agents. Third, API / gateway-level security control, which is usually located at the system boundary and has limited fine-grained control over internal behavior. Fourth, single-point policy configuration mechanisms, where each system configures security policies separately, lacking a unified policy expression and management mechanism.

[0004] However, the aforementioned existing technologies generally suffer from the problem of security policies depending on specific frameworks and being difficult to reuse across systems. Because different intelligent agent systems use different execution frameworks and tool invocation methods, security policies usually exist in specific systems as embedded code or configurations. This results in the need for repeated development of the same security policy in multiple systems, inconsistent policy expression methods, difficulty in centralized management, and the inability to share security capabilities between different systems. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, and electronic device for distributing and executing security policies for intelligent agents. By constructing a security policy intermediate language decoupled from specific frameworks and through standardized encapsulation, distribution, transcription, and local execution mechanisms, the security policy can be uniformly expressed and consistently controlled in different types of intelligent agents.

[0006] Firstly, a method for distributing and executing an agent security policy is provided, which may include: The server encapsulates the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package, and distributes the vaccine-like policy package to different heterogeneous target execution environments within each terminal; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior; In the target execution environment, any terminal transcribes the vaccine-like strategy package into local policy rules executable by the corresponding environment, and performs control actions on the behavior of the agent in the corresponding execution environment based on the local policy rules, and outputs the execution results.

[0007] In one possible implementation, the policy structure in the security policy intermediate language includes at least a policy identifier, a behavior description, a triggering condition for policy execution, and an execution decision.

[0008] In one possible implementation, the vaccine-like strategy package includes: The policy content corresponding to the policy structure of the security policy intermediate language; and the policy metadata, which includes version information, scope of application, execution dependencies, and verification information.

[0009] In one possible implementation, before distributing the vaccine-like strategy package to different heterogeneous target execution environments within each terminal, the method further includes: Based on the scope of application, select target execution environments that match the scope of application; Based on the version information, compare it with the policy version currently deployed in the selected target execution environment; Based on the execution dependencies, verify whether the selected target execution environment has the corresponding security control capabilities; When the version of the vaccine-like strategy package is higher than the version of the deployed strategy, the corresponding target execution environment has the corresponding security control capabilities, and the integrity of the content of the vaccine-like strategy package is verified using the verification information, the vaccine-like strategy package is distributed to the corresponding target execution environment.

[0010] In one possible implementation, transcribing the vaccine-like strategy package into local policy rules executable in the corresponding environment includes: Identify the environment type of the current target execution environment and call the environment detection interface to obtain the execution capabilities of the current target execution environment; Check the execution capability required for the security constraints expressed in the intermediate language of the security policy in the vaccine-like strategy package; If the environment execution capability includes the required execution capability, then according to the environment type and the required execution capability flag, the corresponding transcription template is matched, and based on the transcription template, the local policy rules executable by the target execution environment are generated; In one possible implementation, based on the local policy rules, the behavior of the agent in the corresponding execution environment is controlled and executed, and the execution results are output, including: In the appropriate execution environment, intercept the behavior triggered by the agent; The intercepted behavior is matched against the local policy rules; Based on the matching results, control actions are performed on the blocked behavior, and the execution results are output. The control actions include at least one of allowing, blocking, suspending, downgrading, or submitting for manual approval.

[0011] In one possible implementation, the local policy rule includes at least the behavior type, the triggering condition for policy execution, and the corresponding execution decision; Matching the blocked behavior with the local policy rules includes: Obtain the behavior event corresponding to the behavior to be intercepted, wherein the behavior event includes at least the behavior type and behavior parameters; The behavior type of the behavior event is compared with the behavior type in the local policy rule; if they match, the triggering condition is determined based on the behavior parameter. If true, the execution decision corresponding to the local policy rule will be determined as the matching result.

[0012] In one possible implementation, the method further includes: The terminal collects the execution results of the corresponding target execution environment and generates audit information; the audit information includes behavior content, matching policy identifier, execution action and time information; the audit information is centrally stored and fed back to the server for optimization and adjustment of the security policy intermediate language.

[0013] Secondly, a method for distributing and executing intelligent agent security policies is provided, applied to the server side. This method may include: The constructed security policy intermediate language and policy metadata are encapsulated into a standardized vaccine-like policy package; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior; The vaccine-like strategy package is distributed to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like strategy package into local policy rules executable in the target execution environment, so as to perform control actions on the behavior of the agent in the corresponding execution environment.

[0014] Thirdly, a method for distributing and executing intelligent agent security policies is provided, applied to a terminal. This method may include: The server receives a standardized vaccine-like policy package distributed to the target execution environment. The vaccine-like policy package is obtained by the server encapsulating the constructed security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior. In the target execution environment, the vaccine-like strategy package is transcribed into local policy rules executable by the corresponding execution environment; Based on the local policy rules, control actions are performed on the behavior of the agent in the corresponding execution environment, and the execution results are output.

[0015] Fourthly, a device for distributing and executing intelligent agent security policies is provided, applied to a server. This device may include: The encapsulation unit is used to encapsulate the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on the agent's behavior; The distribution unit is used to distribute the vaccine-like strategy package to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like strategy package into local policy rules executable by the corresponding environment in the target execution environment, so as to perform control actions on the behavior of the agent in the corresponding execution environment.

[0016] Fifthly, a device for distributing and executing intelligent agent security policies is provided, applied to a terminal. This device may include: The receiving unit is used to receive a standardized vaccine-like policy package distributed by the server to the target execution environment. The vaccine-like policy package is obtained by the server encapsulating the constructed security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior. A transcription unit is used to transcribe the vaccine-like strategy package into local policy rules executable by the corresponding execution environment in the target execution environment. The execution unit is used to perform control actions on the behavior of the intelligent agent in the corresponding execution environment based on the local policy rules, and output the execution results.

[0017] In a sixth aspect, an electronic device is provided, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of any one of the methods described in the first, second, and third aspects above.

[0018] In a seventh aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any one of the methods described in the first, second, and third aspects above.

[0019] This application provides a method, apparatus, and electronic device for distributing and executing security policies for intelligent agents. In this method, the server encapsulates a constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package, and distributes it to different heterogeneous target execution environments within various terminals. This security policy intermediate language is a policy description language decoupled from the intelligent agent framework. The terminal transcribes the vaccine-like policy package into local policy rules within the target execution environment and executes control actions on the intelligent agent's behavior based on these local policy rules. This invention achieves unified expression, standardized encapsulation and distribution of security policies across frameworks, as well as localized real-time control, solving the problems of existing technologies where security policies depend on specific frameworks, are difficult to reuse across systems, and lack unified governance capabilities. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A schematic diagram of the structure of an agent security policy distribution and execution system provided in this application embodiment; Figure 2 A flowchart illustrating a method for distributing and executing an agent security policy, provided in an embodiment of this application; Figure 3 A flowchart illustrating another method for distributing and executing an intelligent agent security policy provided in an embodiment of this application; Figure 4 A flowchart illustrating another method for distributing and executing an intelligent agent security policy provided in an embodiment of this application; Figure 5 A flowchart illustrating another method for distributing and executing an intelligent agent security policy provided in an embodiment of this application; Figure 6 A schematic diagram of the structure of a device for distributing and executing an agent security policy, provided in an embodiment of this application; Figure 7 A schematic diagram of the structure of another intelligent agent security policy distribution and execution device provided in an embodiment of this application; Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The terms "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but does not exclude other elements or objects. The terms "connection," "coupled," or "linked," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0023] For ease of understanding, the terms used in the embodiments of this application are explained below: Security Policy Intermediate Representation (SPIR) is a policy description language decoupled from any specific agent framework (such as LangChain, AutoGPT, or various self-developed frameworks). It is used to unambiguously express security constraints on agent behavior. Specifically, SPIR is an abstract, platform-independent description specification that does not depend on a specific programming language, agent runtime framework, or underlying operating system. For example, for the security requirement of "prohibiting access to a specific network address," SPIR does not directly write specific browser plugin code or operating system firewall rules, but instead uses a unified semantic description of the constraint intent. This decoupling characteristic allows the same SPIR-described security policy to be distributed to heterogeneous environments such as browser-based agent environments, programming-based agent environments, operating system-based agent environments, or tool-invoking agent environments, thereby achieving unified expression and reuse of security policies across frameworks.

[0024] Example 1 The method for distributing and executing intelligent agent security policies provided in this application embodiment can be applied to... Figure 1 In the agent security policy distribution and execution system shown, such as Figure 1As shown, the system can include: a server for managing security policies for intelligent agents and multiple terminals for executing these policies. The system adopts a server-terminal distributed architecture to achieve unified security governance for various AI agents. The system consists of a security policy intermediate language construction module, a policy standardization encapsulation module, and a policy distribution module deployed on the server, and a policy transcription engine, a local execution engine, and an auditing module deployed in different heterogeneous target execution environments on each terminal, working collaboratively. The connection relationships between the components are as follows: A. For the server side: The output of the Security Policy Intermediate Language (SPIR) building module is connected to the input of the policy standardization encapsulation module, used to pass the generated unified policy description, i.e., the Security Policy Intermediate Language (SPIR), to the encapsulation module. The output of the policy standardization encapsulation module is connected to the input of the policy distribution module. The policy distribution module establishes a communication connection with the policy transcription engine deployed in each terminal through a network communication interface, used to distribute the standardized "vaccine-like policy package" to the target execution environment.

[0025] B. For terminals: Each terminal may run one or more heterogeneous target execution environments (such as browser operation environments, programming environments, operating system operation environments, tool invocation intelligent agent environments, or multi-agent collaborative systems). Each target execution environment deploys: a policy transcription engine, a local execution engine, and an auditing and result output module; The policy transcription engine receives a "vaccine-like policy package" from the server terminal at its input end, and its output end connects to the input end of the local execution engine to pass the transcribed local policy rules to the local execution engine. The local execution engine is the core of policy execution, containing a behavior interception component, a policy matching component, and a control execution component. The behavior interception component of this local execution engine is embedded in the agent's behavior call chain to capture actions before they are actually executed. The output end of this local execution engine connects to the input end of the audit and result output module. The input end of the audit and result output module connects to the output end of the local execution engine to collect execution results. Its output end can further connect to the server's policy management module, forming a feedback loop.

[0026] Through the above connections, the system forms a complete and closed-loop security governance system that includes "policy definition → standardized encapsulation → distribution and injection → local transcription → real-time execution → audit feedback".

[0027] The method for distributing and executing the security policy of the intelligent agent provided in this application is based on the above system architecture. The core idea of ​​this method is to provide a "vaccine-like" security policy operation mechanism: that is, the security policy is standardized and prepared (encapsulated as a policy package), distributed and inoculated (distributed to heterogeneous environments), triggers a security response locally (transcription and execution), and forms audit feedback (immune memory).

[0028] Example 2 The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0029] Figure 2 This is a flowchart illustrating a method for distributing and executing a security policy for an intelligent agent, as provided in an embodiment of this application. Figure 2 As shown, when applied to this system, the method may include: Step S201: The server encapsulates the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package, and distributes the vaccine-like policy package to different heterogeneous target execution environments within each terminal.

[0030] The intermediate language for security policies is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior.

[0031] A vaccine-like strategy package is an independent distribution unit that standardizes and encapsulates a security policy. Similar to how vaccine formulations are standardized for storage, transportation, and administration, the vaccine-like strategy package in this embodiment encapsulates the policy content (i.e., SPIR) along with policy metadata (such as version, scope of application, etc.). This encapsulation mechanism ensures the integrity and traceability of the strategy package during distribution, enabling the security policy to be managed and deployed as a standardized whole.

[0032] During the distribution process, the server acts as the policy production and distribution center, responsible for pushing the packaged vaccine-like policy package to various terminals in the network. It should be understood that the server can proactively distribute the latest vaccine-like policy package, and terminals can also proactively request the latest vaccine-like policy package from the server, as long as the transmission of the vaccine-like policy package from the server to the terminal can be achieved.

[0033] Step S202: In the target execution environment, any terminal transcribes the vaccine-like policy package into local policy rules executable by the corresponding environment, and performs control actions on the behavior of the agent in the corresponding execution environment based on the local policy rules, and outputs the execution results.

[0034] Specifically, after receiving the vaccine-like policy package, the terminal does not directly execute the abstract policy described by SPIR. Instead, it uses a policy transcription engine deployed locally on the terminal to "translate" or "transcribe" the abstract SPIR into specific local policy rules that the current target execution environment can understand and execute.

[0035] For example, if the target execution environment is a browser-based intelligent agent environment, the description of "prohibiting access to a specific network address" in SPIR will be transcribed into a URL interception rule that can be recognized by the browser extension; if the target execution environment is a programmable intelligent agent environment, the same SPIR description may be transcribed into a file system hook rule or a network socket call restriction rule. This transcription mechanism decouples the policy definition from the execution environment, allowing the same policy package to automatically adapt to different heterogeneous environments.

[0036] After generating local policy rules, the terminal can control the agent's behavior in real time through the local execution engine. When the agent triggers a behavior in the execution environment (such as initiating a network request, reading or writing files, or calling a tool), the local execution engine intercepts the behavior and matches it against the local policy rules. If the match is successful, the corresponding control action is executed according to the policy decision, such as blocking, allowing, suspending, or demoting privileges. Since the control actions are executed locally on the terminal, there is no need to interact with the central server every time, thus achieving low-latency local real-time security control, effectively ensuring security even in offline or private deployment scenarios.

[0037] Through steps S100 to S200 above, this embodiment constructs a complete closed loop of "server-side construction and encapsulation - terminal transcription and execution". The server is responsible for the standardized production and distribution of policies, while the terminal is responsible for the localized adaptation and execution of policies. The two work together to achieve unified governance and efficient execution of security policies in heterogeneous intelligent agent systems.

[0038] Example 3 Figure 3 This is a flowchart illustrating a method for distributing and executing a security policy for an intelligent agent, as provided in an embodiment of this application. Figure 3 As shown, when applied to this system, the method may include: S301. The server encapsulates the security policy intermediate language and policy metadata into a standardized vaccine-like policy package.

[0039] Specifically, the policy structure in the security policy intermediate language includes at least a policy ID, an action description, a trigger condition for policy execution, and an execution decision. Among these: A policy identifier is used to uniquely identify a security policy in the system, facilitating indexing, auditing, and version management. It can be in the form of a UUID, an auto-incrementing sequence, or a string with business meaning.

[0040] Behavioral descriptions define the specific types of operations or behavioral patterns performed by an agent. Examples include file deletion, network requests, tool invocation, or code execution. It should be understood that behavioral descriptions are not limited to simple verbs; they can also include semantic information such as the object of the operation and resource paths, for example, accessing a specific Uniform Resource Locator (URL) or modifying a system configuration file.

[0041] The triggering conditions for policy execution specify when to constrain or intervene in the behavior. These triggering conditions need to be judged based on behavioral parameters, and the judgment methods can include, but are not limited to, syntactic logic matching and semantic analysis. Syntactic logic matching can include regular expressions, string comparisons, numerical ranges, etc.; semantic analysis can include assessing the risk meaning of behavioral parameters based on natural language understanding or machine learning models. For example, to determine whether a URL accessed by an agent contains malicious domain characteristics, a semantic model can be used to identify whether the domain is a phishing or malicious site; to determine whether a file path belongs to a sensitive system directory, semantic understanding can be used to determine the sensitive attributes of paths such as " / etc / passwd" and "C:\Windows\System32"; in addition, semantic-level understanding can be performed on behavioral parameters such as command parameters and code snippets to identify potential injection attacks, privilege escalation operations, etc.

[0042] The execution decision defines the specific control actions the system should take when the behavior matches and the triggering conditions are met, such as blocking, allowing, suspending, downgrading privileges, or submitting for manual approval. Through the combination of these four core elements, SPIR can accurately describe the security constraint intent on the agent's behavior in a way that is decoupled from specific frameworks.

[0043] To support more granular and complex security detection scenarios, the security policy intermediate language may also include at least one of the following extended structural elements: (1) Action sequence: This describes the order, dependency, or combination of multiple actions and is key to detecting complex multi-step attack patterns. For example, an attacker might first read a sensitive file and then send data out. Single action detection cannot discover this associated risk, while action sequence can link these two actions into an attack chain in chronological order. Multiple actions in this attack chain may occur within the same session or may be scattered across different sessions (e.g., cross-session credential theft and subsequent login operations).

[0044] In practice, the behavior chain relationship can be represented as an ordered list, where each element contains a behavior description (action) and an optional triggering condition. During the transcription matching logic, this behavior chain rule is transcribed into stateful rules that require maintaining a short-term behavior history across sessions. The matching unit of the local execution engine needs to maintain a global or agent-identified behavior sequence cache (not limited to a single session ID), which can track behavior based on correlation dimensions such as time windows, agent identity, source IP, and device fingerprints. When a predefined behavior chain is fully matched, the corresponding execution decision is triggered regardless of whether the behavior spans multiple sessions.

[0045] (2) Risk features (risk_features): Used to define the risk attributes or threat indicators associated with a behavior, supporting refined risk scoring during matching. Risk features can be discrete labels (such as is_high_risk, requires_audit) or continuous values ​​(such as risk_score).

[0046] In the matching logic, risk characteristics can be combined to implement weighted decision-making: that is, the matched strategy may execute different control actions depending on the different risk characteristics. For example, for the file.delete action, if is_sensitive_path=true, it will be blocked directly; if is_sensitive_path=false and historical_frequency=low, it will be allowed. In addition, risk characteristics can also be used to support anomaly detection. When the triggering frequency of a certain action exceeds a preset threshold within a unit of time (e.g., frequency>10 times / minute), its risk_score is dynamically increased to trigger stricter control actions.

[0047] (3) Context information: used to carry environmental information during the operation of the agent, supporting dynamic adjustment of policy execution logic. Context information can be static (such as user role, permission level) or dynamic (such as session state, current stage of the agent, system load).

[0048] In the matching logic, trigger conditions can reference fields in the context information. For example, for the file.write behavior, conditions can be set: allow if user_role=="admin", and block if user_role=="guest". This allows the same policy package to exhibit differentiated security constraints in different contexts without the need to define multiple policies.

[0049] (4) Time window: Used to define the time range in which the policy takes effect, supporting absolute time, relative time, or periodic scheduling. For example, some time windows can be expressed as: Absolute time window: {"start":"2025-01-01 00:00:00","end":"2025-12-31 23:59:59"}; Relative time window: {"duration_minutes":30} indicates that the policy package is valid for 30 minutes after it is distributed; Repeat window: {"weekdays":["Monday", "Friday"],"time_range":"09:00-17:00"}; In the policy matching logic, each time a policy is evaluated, it first checks whether the current time is within the time window. If it is not within the time window, the policy is skipped (considered a mismatch or the default decision is returned directly). This mechanism can be used to implement scenarios such as relaxing certain restrictions on nighttime maintenance time windows and strengthening monitoring during working hours.

[0050] Furthermore, the vaccine-like strategy package may include policy content corresponding to the policy structure of the security policy intermediate language (i.e., policy identifier, behavior description, triggering conditions for policy execution, and specific content of execution decisions; furthermore, it may include specific content of at least one of the following: behavior chain relationships, risk characteristics, context information, and time window), as well as policy metadata. Policy metadata may include version information, scope of application, execution dependencies, and verification information.

[0051] The version information is used to record the iteration history of the policy package, supporting policy upgrades and rollbacks, and preventing older versions from overwriting newer versions.

[0052] The scope of application is defined by the "target environment label" of the policy package, which precisely limits the types of agent execution environments in which the policy package should be distributed and applied, thus preventing policy mismatch.

[0053] Execution dependencies describe the security control capabilities or prerequisites required for the target execution environment to function properly under this policy. For example, "file system hooks need to be supported" or "network traffic interception interfaces need to be available". If the target environment does not have these capabilities, the policy cannot be executed effectively.

[0054] Verification information is used to ensure the integrity and authenticity of the policy package. It typically includes digital signatures, hash values, etc., to prevent the policy package from being tampered with during transmission or storage.

[0055] It should be noted that the metadata does not come from SPIR itself, but is automatically generated by the policy management system based on the configuration during the encapsulation stage or manually specified by the security engineer. For example, the version number can be automatically incremented by the version control system, and the scope of application can be configured by the administrator according to business needs.

[0056] S302. The server distributes the vaccine-like strategy package to different heterogeneous target execution environments within the target terminal. The target terminal is any terminal connected to the server that requires agent security policy processing.

[0057] To ensure the accuracy and security of vaccine-like strategy package distribution and to avoid sending incompatible or expired strategies to target terminals, the server sets up a rigorous pre-verification mechanism before executing the distribution action, including: Step S41: Based on the scope of application, filter the target execution environments that match the scope. The scope of application is a key field in the policy metadata, used to define the effective targets of this type of vaccine policy package. Specifically: The server maintains a registry of all terminals across the network and their deployed execution environment types. Before distribution, the server parses the scope of application field in the vaccine policy package. For example, if the scope of application for a policy package is marked as "browser-agent" (browser-type agent environment), the server will search the registry and only filter execution environments with the environment type "browser-agent" as target execution environments, excluding "coding-agent" (programming-type agent environment) or "os-agent" (operating system-type agent environment). This method effectively avoids mis-distribution of policies and reduces the resource consumption of terminals processing invalid policies.

[0058] Step S42: Based on the version information, compare it with the currently deployed policy version in the selected target execution environment. Specifically, the version information (e.g., v1.0.2) contained in the policy metadata is used to identify the policy's age. Specifically: Before distribution, the server queries the currently active policy version in the target execution environment. If the policy package's version number is lower than or equal to the version already deployed in the target environment, it indicates that the policy package is not the latest version, and distribution will result in version rollback or invalid updates. Therefore, only when the version of the vaccine-like policy package is higher than the deployed policy version is the subsequent distribution process allowed. This mechanism ensures that the terminal always runs the latest security policy, preventing security vulnerabilities caused by version rollback.

[0059] Step S43: Based on execution dependencies, verify whether the selected target execution environment possesses the corresponding security control capabilities. Execution dependencies describe the preconditions or system capabilities required for the policy to function correctly. For example, a policy regarding "file system access control" might require the target environment to have "file system hook" capabilities. Specifically, before distribution, the server calls the environment detection interface or queries the capability list reported by the terminal to determine whether the target environment possesses these capabilities. If the target environment does not support file system hooks, forcibly distributing the policy will result in policy transcription failure or execution errors. Therefore, distribution only occurs when the target execution environment possesses the corresponding security control capabilities. This step achieves "capability matching" between the policy and the environment, improving the success rate of policy execution.

[0060] Step S44: When the version of the vaccine-like strategy package is higher than the version of the deployed strategy, the corresponding target execution environment has the corresponding security control capabilities, and the integrity of the content of the vaccine-like strategy package is verified by using verification information, the vaccine-like strategy package is distributed to the corresponding target execution environment.

[0061] Specifically, verification information is crucial for ensuring the security of policy transmission. When encapsulating the policy package, the server calculates the hash value of the policy content or generates a digital signature as verification information. In the final step before distribution, the server or terminal (depending on the specific architecture; this embodiment uses server-side verification as an example) uses this verification information to check whether the policy package has been tampered with during storage or transmission. If the hash value is inconsistent or the signature verification fails, the content integrity is deemed compromised, and distribution is rejected. Only when all three conditions (version update, capability matching, and integrity verification) are met simultaneously will the server actually perform the distribution action.

[0062] Through the aforementioned multi-dimensional pre-verification logic, a strict distribution admission mechanism has been constructed. Scope of application screening ensures accurate policy deployment, version comparison prevents policy rollback, execution dependency verification avoids runtime failures caused by environment incompatibility, and integrity verification eliminates the risk of policy tampering.

[0063] S303. In the target execution environment, the target terminal transcribes the vaccine-like policy package into local policy rules executable by the corresponding environment. This step includes the following sub-steps: Step S51: Identify the environment type of the current target execution environment and call the environment detection interface to obtain the execution capabilities of the current target execution environment. The environment type characterizes the basic architecture for the intelligent agent's operation, such as a browser-based intelligent agent environment, a programming-based intelligent agent environment, or an operating system-based intelligent agent environment. Environment execution capabilities refer to the access permissions of the target execution environment to security control interfaces or underlying resources, such as whether it supports tool call interception, has file system hook capabilities, and allows network traffic filtering.

[0064] When the terminal starts up or updates its policies, it automatically detects these capability identifiers of the current execution environment and generates a capability list. This step ensures that the rules subsequently transcribed are actually executable in the current environment, avoiding policy execution failures due to missing environment capabilities.

[0065] Step S52: Check the execution capabilities required for the security constraints expressed in the intermediate language of the security policy within the vaccine-like policy package. Specifically, the terminal parses the received vaccine-like policy package and extracts the Policy Content (SPIR). The security constraints defined in the SPIR often implicitly require specific environmental execution capabilities. For example, a policy about "prohibiting access to a specific URL" implicitly requires the environment to have the capability of "network request interception"; a policy about "prohibiting modification of system configuration files" implicitly requires the environment to have the capability of "file system access control". By parsing the behavioral descriptions and triggering conditions in the SPIR, the terminal derives the minimum set of capabilities required to execute the policy.

[0066] Step S53: If the environment execution capability includes the required execution capability, then match the corresponding transcription template according to the environment type and the required execution capability flag, and generate local policy rules that can be executed by the target execution environment based on the transcription template.

[0067] In some embodiments, for vaccine-like strategy packages containing action sequences, stateful rules need to be generated during transcription. Specifically, the transcription engine generates management code for an agent action cache while generating local rules. This cache can be indexed by agent identifiers (such as agent_id, user account, device fingerprint, or composite key) and maintains N action records (N is a preset window size) of the most recently executed actions in each session. These action records can be accumulated across sessions. When a new action occurs, the local execution engine, when matching rules, not only checks the current action but also queries the agent action cache to determine if there is a historical action sequence that matches the action sequence (regardless of whether these actions occurred in the same session or different sessions). If the sequence matches successfully, the corresponding decision is triggered. This transcription method enables the originally stateless rule engine to detect multi-step attack chains.

[0068] If the current environment does not contain the required execution capabilities, the transcription engine marks that the security constraint cannot take effect in the current environment and generates an audit alert to record the failure event.

[0069] Provided the capabilities are met, the transcription engine matches the best template from a locally pre-built transcription template library based on the environment type and capability flags. The transcription template defines the mapping relationship between SPIR semantics and specific local control instructions. Placeholders in the transcription template are filled with the policy ID, action description, condition, decision, and extended elements (such as action sequence, risk features, context, and time window) from the SPIR, dynamically generating local policy rules executable by the target execution environment. The types of local policy rules can include at least one of the following: tool call interception rules, interface access control rules, file and system operation control rules, or network request control rules.

[0070] S304. The target terminal, based on local policy rules, performs control actions on the behavior of the intelligent agent in the corresponding execution environment and outputs the execution results.

[0071] After generating local policy rules, the terminal enters the real-time control phase, which specifically includes: Step S54: In the corresponding execution environment, intercept the behavior triggered by the agent. Specifically, the terminal deploys a local execution engine. This engine uses hook technology, proxy patterns, or API rewriting to capture behaviors (such as tool calls, code execution, file access, or at least one of network requests) before the agent attempts to call underlying resources (such as initiating network requests, reading or writing files, or executing system commands), preventing their direct execution. This interception mechanism ensures that all behaviors must pass through security policy checkpoints, which is the foundation for achieving local real-time control.

[0072] Step S55: Match the intercepted behavior with local policy rules. The local policy rules must include at least the behavior type, the triggering conditions for policy execution, and the corresponding execution decision.

[0073] First, obtain the behavior event corresponding to the behavior to be intercepted. This behavior event must at least contain the behavior type and behavior parameters. The behavior parameters are data describing the specific details of the behavior, such as file path, URL address, command string, etc.

[0074] Secondly, the behavior type of the behavioral event is compared with the behavior type in the local policy rule. If they match, the triggering condition is determined based on the behavior parameters. The determination of the triggering condition includes syntax-logic matching and semantic analysis. Syntax-logic matching typically involves parameter matching algorithms, such as regular expression matching, wildcard matching, or logical expression calculation. Semantic analysis, for example, assesses the risk meaning of behavior parameters based on natural language understanding or machine learning models, determining whether the URL belongs to a phishing domain, whether command parameters implicitly contain privilege escalation intent, and whether code snippets contain backdoor logic. For example, if the behavior type defined by the local rule is file.write, and the triggering condition is "pathcontains ' / etc / '", when the intercepted behavior event type is file.write and the file path in the parameter is / etc / hosts, the triggering condition is determined to be met. As another example, if the rule defines the behavior type as http.request, and the triggering condition is "URL has malicious semantics", a semantic classification model can be called to judge the requested URL. If the model outputs "malicious", the corresponding decision is triggered. If the result is met, the execution decision corresponding to the local policy rule is determined as the matching result. To improve efficiency, rule sets can be sorted by priority, with higher priority rules being matched first.

[0075] In some embodiments, for behavior chain relationship matching, as mentioned above, for the stateful rules generated during transcription, while evaluating the current behavior, the behavior cache corresponding to the session ID is retrieved and sequence pattern matching is performed with the behavior chain relationship. The matching algorithm can be KMP (Knuth-Morris-Pratt) or a pattern matching algorithm based on finite state automata. If the complete sequence match is successful, the corresponding execution decision is triggered. The time complexity of sequence matching is O(n), where n is the cache window size.

[0076] For risk feature matching: the behavioral parameters of the event are compared with the risk features in the rules. For numerical risk features (such as risk_score), a threshold can be set for judgment (e.g., if risk_score > 70, a high-risk decision is triggered). For label-based risk features (such as is_sensitive_path), a Boolean match is performed directly. The matching logic can support the combined evaluation of multiple risk features; for example, if is_sensitive_path = true and historical_frequency = high, the decision is upgraded to blocking.

[0077] For context information matching: When evaluating the trigger condition, the value of the context information field is read from the locally maintained session context. Context information can be proactively reported by the agent framework via API, or captured by the execution engine during behavior interception (such as extracting user role information from the call stack). The trigger condition expression supports referencing variables in the context information, such as context.user_role=="admin".

[0078] For time window filtering: Before evaluating each rule, first check whether the current system timestamp is within the time window (time_window) range of the vaccine-like strategy package. The judgment logic is as follows: if the time_window is missing, it is considered to be always effective; if it exists, its format (absolute / relative / periodic) is parsed, and it is calculated whether the current time satisfies the window constraint. If it does not satisfy the constraint, the rule is skipped directly, and no further matching is performed.

[0079] If none of the rules match or the triggering conditions are met, a preset default decision is returned (this default decision can be configured by the administrator, for example, to block for security reasons or to allow for availability).

[0080] Step S56: Based on the matching results, execute control actions on the intercepted behavior and output the execution results. These control actions may include, but are not limited to: allowing (allowing the behavior to continue execution and returning a normal result), blocking (immediately terminating the behavior and returning an error message), suspending (placing the behavior in a waiting queue, pausing execution, and waiting for subsequent signals, such as asynchronous approval); demoting (modifying behavior parameters or reducing permissions before execution), and submitting for manual approval (triggering an external approval workflow, deciding whether to allow or block based on the approval result). Finally, the local execution engine outputs the execution result of this control (success / failure / suspended status).

[0081] As can be seen, the above steps enable the terminal to achieve fine-grained, low-latency control over the behavior of the intelligent agent without having to interact with the central server every time, thus ensuring security in offline or private deployment scenarios.

[0082] Furthermore, to form a traceable governance loop, all security events can be recorded and analyzed. This application may also include an audit feedback mechanism. Specifically, each terminal collects the execution results of the corresponding target execution environment and generates structured audit information for each intercepted / controlled behavior. This audit information includes at least: behavior content (specific parameters of the operation), matching policy identifier (the hit policy_id), execution action (such as block, allow), and time information (precise timestamps of interception, decision, and completion). The audit information may also include context such as execution environment ID and agent session ID. In other words, the behavior content records what the agent specifically did; the matching policy identifier records which policy triggered the control; the execution action records whether the control was ultimately granted or blocked; and the time information precisely records the timestamps of the behavior occurrence, interception, and decision.

[0083] This audit information is transmitted in real-time or near real-time to a centralized audit storage system (such as a time-series database, ELK stack, or blockchain audit ledger) to support post-event tracing, behavioral analysis, and report generation for security incidents.

[0084] Furthermore, the stored audit information can be fed back to the server periodically or on demand (e.g., to Module 1). This information is a valuable data source for policy optimization. The server-side security analytics engine can: Analyze frequently blocked behavioral patterns to discover potential new attack or abnormal behavior patterns.

[0085] Identify policies that are too strict or too lenient, and assess the false positive / false negative rate.

[0086] Based on the analysis results, the intermediate language SPIR of security policy is optimized and adjusted, such as adjusting the threshold of triggering conditions, refining risk characteristics, modifying execution decisions, or expanding the scope of application.

[0087] A new, optimized version of the strategy package is generated and re-entered into the packaging and distribution process, thus forming a continuous, data-driven closed-loop strategy optimization process.

[0088] The aforementioned feedback mechanism corresponds to the immune memory function of a "vaccine-like" system. It not only provides the auditing capabilities required for compliance and traceability, but more importantly, it feeds back runtime security data to the policy definition phase, enabling security policies to evolve dynamically and continuously adapt to new threat environments and business needs, thus achieving "closed-loop governance" of the system.

[0089] Example 4 Figure 4This is a flowchart illustrating a method for distributing and executing security policies for intelligent agents, provided as an embodiment of this application. This embodiment details the construction and distribution process of security policies from a single server-side perspective. The difference between this embodiment and embodiments 1-2 is that embodiments 1-2 describe the overall system process including interaction between the server and the terminal, while this embodiment focuses on how the server, as the policy production center, completes the standardized production and scheduling distribution of policies. Figure 4 As shown, the method may include: Step S401: The server constructs a security policy intermediate language.

[0090] The security policy intermediate language (SPIR) is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior. The server, as the policy production center, provides a visual policy configuration interface or a standardized API. Security engineers can input security requirements through the interface, such as "prohibit access to specific malicious domains" or "restrict file writing to sensitive directories." After receiving these requirements, the server converts them into the standardized SPIR format. It should be understood that SPIR can be constructed not only from manual input but also from automatic imports from the policy knowledge base, dynamic generation of threat intelligence, or API calls from third-party security systems. Through unified semantic parsing and conversion logic, the server transforms diverse input sources into a unified, framework-independent intermediate language description, thereby achieving standardization and decoupling at the policy definition level.

[0091] In step S402, the server encapsulates the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package.

[0092] During the encapsulation phase, the server not only packages the SPIR as policy content but also automatically injects or associates policy metadata. Specifically, the server calls the version control system to generate version information for the current policy package, ensuring a unique version identifier for each encapsulation; it determines the applicable scope based on configuration information, such as marking the policy package as suitable for browser-based intelligent agent environments or programming-based intelligent agent environments; it parses the behavioral descriptions in the SPIR to deduce the system capabilities required to execute the policy, such as network interception capabilities or file system hook capabilities, and generates execution dependency descriptions; simultaneously, the server also calls the security infrastructure to digitally sign or calculate hash values ​​for the policy package content, generating verification information. Through the above process, the server encapsulates the policy's business semantics (SPIR) and management and maintenance information (metadata) into an independent, self-describing standardized unit, namely a vaccine-like policy package. This encapsulation mechanism gives the policy package the characteristics of being storable, transportable, and verifiable, similar to vaccine preparations, laying the foundation for subsequent cross-environment distribution.

[0093] In step S403, the server distributes the vaccine-like strategy package to different heterogeneous target execution environments within each terminal.

[0094] The server maintains a registration information and status list of all terminals on the network, enabling it to identify the target execution environment type deployed on different terminals. During distribution, the server acts as a scheduling center, matching the policy package's applicable scope with the terminal's environment type. For example, if the policy package's applicable scope is marked as "browser-agent," the server will retrieve all terminals in the network that have deployed browser-like agent environments and push the policy package to these terminals. Distribution can be done using an active push mode, where the server starts the distribution task immediately after the policy package is encapsulated; or using a terminal pull mode, where terminals periodically query the server for the latest policy and actively download it. Regardless of the mode used, the server is responsible for ensuring that the policy package is accurately and completely transmitted to the target environment, so that the terminal can transcribe the vaccine-like policy package into local policy rules executable in the target execution environment, thereby controlling the behavior of agents in the corresponding execution environment.

[0095] Through steps S401 to S403 described above, this embodiment demonstrates the core role of the server in the security policy management system. The server achieves centralized control over heterogeneous intelligent agent environments through unified SPIR construction, standardized encapsulation, and precise distribution scheduling.

[0096] Example 5 Figure 5 This is a flowchart illustrating a method for distributing and executing security policies for intelligent agents, provided as an embodiment of this application. This embodiment details the reception, transcription, and execution of security policies from a single terminal perspective. This embodiment corresponds to Embodiment 4, which describes the processing logic of the server as the policy production center. This embodiment focuses on how the terminal, as the policy execution node, achieves localized adaptation and real-time control of policies, demonstrating the autonomous capabilities of the edge side. Figure 5 As shown, the method may include: Step S501: The terminal receives a standardized vaccine-like strategy package distributed by the server to the target execution environment.

[0097] Among them, the vaccine-like strategy package is obtained by the server encapsulating the security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior.

[0098] In this embodiment, the terminal can receive policy packets in two modes: passive reception and active retrieval. (1) In passive reception mode, after the server completes policy encapsulation, it actively pushes the policy packet to the registered terminal. The receiving unit on the terminal side listens to the server's distribution port and performs integrity verification after receiving the data packet. (2) In active retrieval mode, the terminal periodically or when it detects environmental changes, sends a query request to the server to check if there is a latest policy version applicable to the current environment type. If so, it actively downloads it. This dual-mode reception mechanism ensures the terminal's policy synchronization capability in various network environments. Even in scenarios where the server load is high or the network is unstable, the terminal can ensure timely policy updates through the active retrieval mechanism.

[0099] In step S502, the terminal transcribes the vaccine-like policy package into a local policy rule executable by the corresponding execution environment in the target execution environment.

[0100] Specifically, upon receiving a vaccine-like policy package, the terminal does not directly execute the abstract policy description. Instead, it invokes a locally deployed policy transcription engine for environment adaptation. The transcription engine first parses the metadata in the policy package, identifying its scope of application and execution dependencies, and determining whether the current target execution environment meets the runtime conditions. If so, it further parses the Security Policy Intermediate Language (SPIR) to extract the behavioral description, triggering conditions, and execution decisions. Subsequently, based on the current environment type (e.g., browser-based, programming-based) and capability identifier, the transcription engine matches the corresponding mapping rules from a locally pre-built transcription template library, transforming the abstract semantics described by SPIR into locally executable concrete instructions. For example, a policy of "blocking access to a specific URL" is transcribed into a browser extension blocking rule in a browser-based environment and into a network socket call filtering rule in a programming-based environment. The transcription process is entirely completed locally on the terminal, without relying on real-time server-side computation, thus achieving autonomous policy adaptation at the edge.

[0101] In step S503, the terminal performs control actions on the behavior of the intelligent agent in the corresponding execution environment based on local policy rules and outputs the execution results.

[0102] Specifically, after generating local policy rules, the terminal loads them into the memory of the local execution engine, entering a real-time control state. When an agent triggers a behavior in the execution environment, the local execution engine intercepts the behavior using Hook technology or a proxy pattern, encapsulating it into a standardized event object containing information such as behavior type and behavior parameters. Subsequently, the execution engine matches the event object with the local policy rules. If the behavior type matches and the triggering conditions are met, the corresponding control action is executed, such as blocking, allowing, suspending, or demoting privileges. Since the entire matching and decision-making process is completed locally on the terminal, without network interaction with the server, millisecond-level low-latency control can be achieved. Even in offline or private deployment scenarios, the terminal can independently complete security protection based on locally loaded policy rules, demonstrating the autonomy of the edge side. Finally, the execution results are recorded as audit logs and can be synchronized to the server after network recovery for policy optimization and compliance auditing.

[0103] Through steps S501 to S503 described above, this embodiment demonstrates the execution role of the terminal in the security policy management system. By receiving standardized policy packages, locally transcribing and adapting them, and controlling execution in real time, the terminal enables the implementation of security policies in heterogeneous environments. This "edge-autonomous" architecture not only reduces dependence on the central server and improves the real-time performance of security responses, but also ensures security protection capabilities in offline scenarios, effectively solving the high latency and availability problems caused by policy execution relying on a central system in existing technologies.

[0104] Example 6 Corresponding to the above method, embodiments of this application also provide a device for distributing and executing intelligent agent security policies, applied to a server, such as... Figure 6 As shown, the device includes: The encapsulation unit 610 is used to encapsulate the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on the agent's behavior; The distribution unit 620 is used to distribute the vaccine-like strategy package to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like strategy package into local policy rules executable by the corresponding environment in the target execution environment, so as to perform control actions on the behavior of the agent in the corresponding execution environment.

[0105] The functions of each functional unit in the agent security policy distribution and execution device provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the agent security policy distribution and execution device provided in the embodiments of this application will not be repeated here.

[0106] Example 7 Corresponding to the above method, embodiments of this application also provide a device for distributing and executing intelligent agent security policies, applied to a terminal, such as... Figure 7 As shown, the device includes: The receiving unit 710 is used to receive a standardized vaccine-like policy package distributed by the server to the target execution environment. The vaccine-like policy package is obtained by the server encapsulating the constructed security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior. Transcription unit 720 is used to transcribe the vaccine-like strategy package into local policy rules executable by the corresponding execution environment in the target execution environment; The execution unit 730 is used to perform control actions on the behavior of the intelligent agent in the corresponding execution environment based on the local policy rules, and output the execution results.

[0107] The functions of each functional unit in the agent security policy distribution and execution device provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the agent security policy distribution and execution device provided in the embodiments of this application will not be repeated here.

[0108] Example 8 This application also provides an electronic device, such as... Figure 8 As shown, it includes a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840.

[0109] Memory 830 is used to store computer programs; When the processor 810 executes the program stored in the memory 830, it performs the following steps: The constructed security policy intermediate language and policy metadata are encapsulated into a standardized vaccine-like policy package. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on agent behavior. The vaccine-like policy package is distributed to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like policy package into local policy rules executable in the target execution environment to perform control actions on the behavior of agents in the corresponding execution environment.

[0110] Alternatively, a standardized vaccine-like policy package is received from the server and distributed to the target execution environment. This vaccine-like policy package is obtained by the server encapsulating a security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and used to express security constraints on agent behavior. In the target execution environment, the vaccine-like policy package is transcribed into local policy rules executable by the corresponding execution environment. Based on these local policy rules, control actions are executed on the agent's behavior in the corresponding execution environment, and the execution result is output.

[0111] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0112] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0113] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0114] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0115] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments for solving the problem can be found in [reference needed]. Figure 2 The steps in the illustrated embodiments are used to implement the electronic device. Therefore, the specific working process and beneficial effects of the electronic device provided in this application will not be repeated here.

[0116] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the distribution and execution method of the intelligent agent security policy described in any of the above embodiments.

[0117] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the distribution and execution method of the intelligent agent security policy described in any of the above embodiments.

[0118] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0122] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.

[0123] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.

Claims

1. A method for distributing and executing a security policy for an intelligent agent, characterized in that, The method includes: The server encapsulates the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package, and distributes the vaccine-like policy package to different heterogeneous target execution environments within each terminal; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior; In the target execution environment, any terminal transcribes the vaccine-like strategy package into local policy rules executable by the corresponding environment, and performs control actions on the behavior of the agent in the corresponding execution environment based on the local policy rules, and outputs the execution results.

2. The method as described in claim 1, characterized in that, The policy structure in the security policy intermediate language includes at least a policy identifier, behavior description, triggering conditions for policy execution, and execution decision.

3. The method as described in claim 2, characterized in that, The vaccine strategy package includes: The policy content corresponding to the policy structure of the security policy intermediate language; and the policy metadata, which includes version information, scope of application, execution dependencies, and verification information.

4. The method as described in claim 3, characterized in that, Before distributing the vaccine-like strategy package to different heterogeneous target execution environments within each terminal, the method further includes: Based on the scope of application, select target execution environments that match the scope of application; Based on the version information, compare it with the policy version currently deployed in the selected target execution environment; Based on the execution dependencies, verify whether the selected target execution environment has the corresponding security control capabilities; When the version of the vaccine-like strategy package is higher than the version of the deployed strategy, the corresponding target execution environment has the corresponding security control capabilities, and the integrity of the content of the vaccine-like strategy package is verified using the verification information, the vaccine-like strategy package is distributed to the corresponding target execution environment.

5. The method as described in claim 1, characterized in that, Transcribe the vaccine-like strategy package into local policy rules executable in the corresponding environment, including: Identify the environment type of the current target execution environment and call the environment detection interface to obtain the execution capabilities of the current target execution environment; Check the execution capability required for the security constraints expressed in the intermediate language of the security policy in the vaccine-like strategy package; If the environment execution capability includes the required execution capability, then according to the environment type and the required execution capability flag, the corresponding transcription template is matched, and based on the transcription template, the local policy rule executable by the target execution environment is generated.

6. The method as described in claim 1, characterized in that, Based on the local policy rules, the behavior of the agent in the corresponding execution environment is controlled and executed, and the execution results are output, including: In the appropriate execution environment, intercept the behavior triggered by the agent; The intercepted behavior is matched against the local policy rules; Based on the matching results, control actions are performed on the blocked behavior, and the execution results are output. The control actions include at least one of allowing, blocking, suspending, downgrading, or submitting for manual approval.

7. The method according to claim 6, characterized in that, The local policy rule includes at least the behavior type, the triggering conditions for policy execution, and the corresponding execution decision; Matching the blocked behavior with the local policy rules includes: Obtain the behavior event corresponding to the behavior to be intercepted, wherein the behavior event includes at least the behavior type and behavior parameters; The behavior type of the behavior event is compared with the behavior type in the local policy rule; if they match, the triggering condition is determined based on the behavior parameter. If true, the execution decision corresponding to the local policy rule will be determined as the matching result.

8. The method as described in claim 1, characterized in that, The method further includes: The terminal collects the execution results of the corresponding target execution environment and generates audit information; the audit information includes behavior content, matching policy identifier, execution action and time information; the audit information is centrally stored and fed back to the server for optimization and adjustment of the security policy intermediate language.

9. A method for distributing and executing a security policy for intelligent agents, characterized in that, Applied to the server side, the method includes: The constructed security policy intermediate language and policy metadata are encapsulated into a standardized vaccine-like policy package; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on agent behavior; The vaccine-like strategy package is distributed to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like strategy package into local policy rules executable in the target execution environment, so as to perform control actions on the behavior of the agent in the corresponding execution environment.

10. A method for distributing and executing a security policy for an intelligent agent, characterized in that, Applied to a terminal, the method includes: The server receives a standardized vaccine-like policy package distributed to the target execution environment. The vaccine-like policy package is obtained by the server encapsulating the constructed security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior. In the target execution environment, the vaccine-like strategy package is transcribed into local policy rules executable by the corresponding execution environment; Based on the local policy rules, control actions are performed on the behavior of the agent in the corresponding execution environment, and the execution results are output.

11. A device for distributing and executing an intelligent agent security policy, characterized in that, Applied to the server side, the device includes: The encapsulation unit is used to encapsulate the constructed security policy intermediate language and policy metadata into a standardized vaccine-like policy package; the security policy intermediate language is a policy description language decoupled from the agent framework, used to express security constraints on the agent's behavior; The distribution unit is used to distribute the vaccine-like strategy package to different heterogeneous target execution environments within each terminal, so that the terminal can transcribe the vaccine-like strategy package into local policy rules executable by the corresponding environment in the target execution environment, so as to perform control actions on the behavior of the agent in the corresponding execution environment.

12. A device for distributing and executing an intelligent agent security policy, characterized in that, Applied to a terminal, the device includes: The receiving unit is used to receive a standardized vaccine-like policy package distributed by the server to the target execution environment. The vaccine-like policy package is obtained by the server encapsulating the constructed security policy intermediate language and policy metadata. The security policy intermediate language is a policy description language decoupled from the agent framework and is used to express security constraints on the agent's behavior. A transcription unit is used to transcribe the vaccine-like strategy package into local policy rules executable by the corresponding execution environment in the target execution environment. The execution unit is used to perform control actions on the behavior of the intelligent agent in the corresponding execution environment based on the local policy rules, and output the execution results.

13. An electronic device, characterized in that, The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-10.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-10.