A multi-agent cooperative assistance behavior verification method and device
Patent Information
- Application Number
- CN202611022232.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-10
AI Technical Summary
[0005]本申请提供了一种多智能体协同辅助的行为校验方法及装置,以解决现有的行为校验方式因灵活性和可信度差,导致行为校验的准确性低的问题
[0024]第五方面,本申请实施例提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行如第一方面及其任一种实现方式提供的多智能体协同辅助的行为校验方法。
Smart Images

Figure CN122528149B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and in particular to a method and apparatus for behavior verification assisted by multi-agent collaboration. Background Technology
[0002] Trusted Data Space is a data circulation and utilization infrastructure based on consensus rules, connecting multiple stakeholders to achieve data resource sharing and utilization. In the data sharing practice of Trusted Data Space, data providers create and publish digital contracts within the Trusted Data Space through their connectors, and data users discover, understand, and sign the digital contracts online within the Trusted Data Space through their connectors to establish rights and responsibilities.
[0003] During the data usage phase, the data user requests the corresponding data product from the data provider based on a digital contract and performs operations on that data product on their own. To ensure that data usage strictly adheres to the terms of the digital contract, behavioral verification of the operation process is necessary.
[0004] Existing behavior validation methods largely rely on static rules and predefined context identity and state parsing. This approach lacks the ability to dynamically adapt to runtime contexts, making it difficult to cope with complex and ever-changing real-world usage scenarios, and it also lacks semantic consistency verification. Therefore, the poor flexibility and reliability of existing behavior validation methods result in low accuracy. Summary of the Invention
[0005] This application provides a multi-agent collaborative behavior verification method and apparatus to solve the problem that existing behavior verification methods have low accuracy due to poor flexibility and reliability.
[0006] Firstly, this application provides a multi-agent collaborative behavior verification method applied to a data user connector. The method includes: obtaining a digital contract signed between a data provider and a data user; parsing the digital contract through a policy parsing agent to generate a static compliance confidence score, a policy semantic vector, and a list of executable micro-instructions; and, based on the policy semantic vector and the list of executable micro-instructions, collaboratively verifying the data user's runtime context through an environment-aware agent and a behavior-auditing agent, outputting a dynamic context anomaly score, semantic matching confidence score, and condition verification completeness score. The dynamic context anomaly score refers to the deviation of multiple runtime monitoring indicators corresponding to the data usage behavior from their historical values. The degree of baseline consistency, semantic matching confidence refers to the degree of consistency between the semantics of the current operation and the semantics of the contract strategy, and condition verification completeness refers to the proportion of conditions that have been successfully verified among all the constraints declared in the digital contract that require dynamic verification. Through the confidence decision function and the auxiliary intelligent agent, the static compliance confidence, dynamic context anomaly score, semantic matching confidence, and condition verification completeness are integrated to calculate the comprehensive confidence score. Through the confidence decision function and the auxiliary intelligent agent, the decision corresponding to the current data usage behavior is output according to the relationship between the comprehensive confidence score and the preset threshold. The decision includes any one of the following: allow decision, reject decision, and conditionally allow decision.
[0007] The multi-agent collaborative behavior verification method provided in this application constructs an intelligent verification system capable of dynamically perceiving behavioral intent and understanding policy semantics through the collaborative assistance of multiple agents, including policy parsing, environmental perception, behavior auditing, and confidence decision-making, via a data user connector. This method departs from traditional static rule-based binary (pass / reject) verification, instead employing a dynamic, intelligent, and refined behavior understanding and decision-making process. This effectively addresses the shortcomings of existing solutions, such as rigid policy parsing, reliance on preset information for behavior verification, lack of semantic consistency guarantees, and non-adaptiveness, thereby accurately identifying complex scenarios such as "illegal operations by legitimate users."
[0008] In some implementations, a policy parsing agent parses digital contracts to generate static compliance confidence, policy semantic vectors, and a list of executable micro-instructions. This includes: parsing static constraint rules and dynamic verification information from the digital contract; performing reachability checks on the static constraint rules to generate static compliance confidence; converting dynamic verification information into a first natural language description based on a predefined descriptive text template, and then using an embedding model to convert the first natural language description into a policy semantic vector; and decomposing the first natural language description into a list of executable micro-instructions, which includes monitoring weight suggestions and a condition verification list. The monitoring weight suggestions indicate the importance of different monitoring metrics during runtime, and the condition verification list includes dynamic constraints that need to be verified during the behavior verification phase. In this way, by decomposing the first natural language description into a list of executable micro-instructions through the policy parsing agent, static contract terms are transformed into dynamic condition verification lists and monitoring weight suggestions that can guide subsequent monitoring and verification, thus achieving policy operability and dynamic adaptation.
[0009] In some implementations, based on policy semantic vectors and a list of executable micro-instructions, an environment-aware agent and a behavior auditing agent collaboratively verify the operational context of the data user. This outputs a dynamic context anomaly score, semantic matching confidence, and conditional verification completeness. Specifically, the environment-aware agent calculates the dynamic context anomaly score and conditional verification completeness based on the list of executable micro-instructions. When triggering conditions are met, the behavior auditing agent is activated and calculates the semantic matching confidence based on the policy semantic vector. Triggering conditions include a dynamic context anomaly score greater than a first preset threshold, a confidence decision function and auxiliary agent returning a conditionally permissive decision in the previous behavior verification, or the current operation being marked as a high-risk instruction in the list of executable micro-instructions. Thus, during the behavior verification phase, the data user connector constructs a two-layer verification mechanism: the environment-aware agent quickly screens for obvious anomalies, and the behavior auditing agent performs in-depth analysis of suspicious behaviors, forming an effective defense depth. The behavior auditing agent is only activated for deep semantic analysis when specific triggering conditions are met, avoiding unnecessary waste of computational resources.
[0010] In some implementations, a dynamic context anomaly score is calculated by an environmentally aware agent. This process includes: the agent configuring monitoring weights for a data acquisition probe system based on monitoring weight suggestions from an executable microinstruction list; the probe system then collecting current observations of multiple monitoring indicators based on these weights; the agent calculating the standardized deviation of these current observations relative to the historical normal baseline mean; and finally, the agent weighted and summed the absolute values of the standardized deviations of the multiple indicators, processing the sum using a pre-defined exponential mapping function to obtain the dynamic context anomaly score. In this way, the agent normalizes complex, multi-indicator runtime behavior deviations into a unified, interpretable dynamic context anomaly score through weighted summation and exponential mapping, achieving quantitative perception of abnormal behavior patterns from an environmental perspective.
[0011] In some implementations, the completeness of condition verification is calculated using an environmentally aware agent. This includes: the agent verifying each dynamic constraint condition during data execution according to the condition verification list in the executable microinstruction list; the agent records the number of successfully verified dynamic constraints as the number of verified and passed conditions, and calculates the condition verification completeness based on the ratio of the number of verified and passed conditions to the total number of constraints requiring dynamic verification in the condition verification list. In this way, using an environmentally aware agent to verify dynamic constraints avoids affecting the accuracy of behavior verification due to omissions in verifying certain constraints, thus improving the accuracy of behavior verification in the condition dimension.
[0012] In some implementations, a behavior auditing agent calculates semantic matching confidence based on policy semantic vectors. This process includes: the behavior auditing agent acquiring raw operational data from the data user during data usage; extracting runtime context information and previous K-step operation history information from the raw operational data to construct an enhanced behavior description, and then using an embedding model to transform the enhanced behavior description into a behavior semantic vector; calculating the cosine similarity between the policy semantic vector and the behavior semantic vector to obtain the raw semantic similarity; validating the raw operational data based on logical assertions in the executable microinstruction list; calculating a penalty factor based on the severity level of the logical assertion violation if the validation fails; and finally, calculating the semantic matching confidence based on the raw semantic similarity and the penalty factor. In this way, the data user connector utilizes the behavior auditing agent for deep semantic verification, improving the efficiency and depth of behavior verification in the semantic dimension.
[0013] In some implementations, an enhanced behavior description is constructed by extracting runtime context information and previous K-step operation history information from the raw operation data using a behavior auditing agent. This includes: the behavior auditing agent extracting the runtime context information corresponding to the current moment and the previous K-step operation history information from the raw operation data; the runtime context information including the actual operation behavior, the actual environment configuration, and the actual constraint compliance; the behavior auditing agent converting the runtime context information into a second natural language description based on a predefined description text template; and the behavior auditing agent concatenating the second natural language description and the previous K-step operation history information to construct the enhanced behavior description. In this way, semantic comparison using the enhanced behavior description during deep semantic verification can more accurately determine behavior patterns and intentions.
[0014] In some implementations, the confidence decision function and the auxiliary agent calculate the comprehensive confidence score using the following weighted fusion confidence decision function formula: Comprehensive Confidence Score = Static Compliance Confidence × [w1 × (1 - Dynamic Context Anomaly Score) + w2 × Semantic Matching Confidence + w3 × Condition Verification Completeness]; where w1 is the environmental dimension weight, w2 is the semantic dimension weight, w3 is the condition dimension weight, and w1 + w2 + w3 = 1. This merges the confidence scores from the four dimensions of static compliance, dynamic anomaly, semantic matching, and condition completeness into a single comprehensive confidence score, transforming the current data usage behavior into a single quantifiable value.
[0015] Some implementations also include: when the dynamic context anomaly score is less than or equal to a first preset threshold, the confidence decision function and the auxiliary agent adjust the semantic dimension weight w2 based on a decay factor, and adjust the environment dimension weight w1 and the condition dimension weight w3 based on a preset allocation ratio. This allows for real-time adjustment of the weights of each dimension to ensure the accuracy of the final output comprehensive confidence score.
[0016] In some implementations, a confidence-based decision function and an auxiliary agent output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and a preset threshold. This includes: the confidence-based decision function and the auxiliary agent comparing the comprehensive confidence score with a second preset high threshold and a second preset low threshold; if the comprehensive confidence score is greater than or equal to the second preset high threshold and the conditional completeness is 1, a permission decision is made; if the comprehensive confidence score is less than the second preset low threshold, a rejection decision is made; if the comprehensive confidence score is between the second preset high threshold and the second preset low threshold, a conditionally permission decision is made. In this way, outputting a three-state decision based on the comprehensive confidence score and preset threshold not only improves the consistency and auditability of the decision but also solves the problem of rigid policy execution, thereby enhancing the system's usability and user experience.
[0017] Some implementations also include: when the confidence decision function and the auxiliary agent make a conditionally permissible decision, executing unverified constraints or preset remedial measures through an environment-aware agent; after all unverified constraints have been verified or remedial measures have been executed, obtaining updated runtime context information, and recalculating at least one of the following through the environment-aware agent and the behavior audit agent: condition verification completeness, dynamic context anomaly score, and semantic matching confidence; and recalculating the overall confidence score by fusing the static compliance confidence and the recalculated condition verification completeness, dynamic context anomaly score, and semantic matching confidence through the confidence decision function and the auxiliary agent, for a new round of behavior verification. This allows the system to take remedial measures such as adding watermarks and secondary authentication and re-evaluate when faced with uncertainty or partial condition non-compliance, improving system usability and user experience, and creating a feedback-enabled and correctable management loop throughout the verification process.
[0018] Some implementations also include: recording historical behavior verification decision results, static compliance confidence scores, dynamic context anomaly scores, semantic matching confidence scores, condition verification completeness scores, and audit feedback labels through a behavior auditing agent to obtain evidence records; wherein, the audit feedback label corresponding to compliant behavior is the first value, and the audit feedback label corresponding to non-compliant behavior is the second value; based on the evidence records, the confidence decision function and the auxiliary agent use optimization algorithms to adjust the environmental dimension weight w1, semantic dimension weight w2, and condition dimension weight w3, and / or adjust the second preset high threshold and the second preset low threshold. This optimizes decision accuracy, ensuring that the overall confidence score is as high as possible for compliant usage behavior and as low as possible for non-compliant usage behavior, thereby achieving self-optimization that improves accuracy with use.
[0019] In some implementations, a confidence decision function and an auxiliary agent adjust the environmental dimension weights w1, semantic dimension weights w2, and conditional dimension weights w3 based on stored evidence records using an optimization algorithm. This includes: the confidence decision function and the auxiliary agent obtaining multiple historical behavior verification records from the stored evidence records; each historical behavior verification record including a comprehensive confidence score and an audit feedback label for the corresponding behavior; the confidence decision function and the auxiliary agent using the weighted fusion confidence decision function formula as an unbiased linear regression model, calculating the model loss based on the comprehensive confidence score and the audit feedback label; the confidence decision function and the auxiliary agent calculating the gradients corresponding to each weight w1, w2, and w3 based on the model loss; updating the environmental dimension weights, semantic dimension weights, and conditional dimension weights according to the learning rate and the gradients corresponding to each weight w1, w2, and w3; and normalizing the updated environmental dimension weights, semantic dimension weights, and conditional dimension weights, using the normalized weights as the new dimension weights. In this way, the importance weight of each dimension (environment, semantics, conditions) in the final decision can be adjusted automatically and continuously, so that the overall confidence score corresponding to compliant behavior tends to increase, and the overall confidence score corresponding to non-compliant behavior tends to decrease.
[0020] In some implementations, a confidence decision function and an auxiliary agent adjust the second preset high threshold and the second preset low threshold based on the stored evidence records using an optimization algorithm. This includes: the confidence decision function and the auxiliary agent obtaining multiple historical behavior verification records from the stored evidence records; each historical behavior verification record including a comprehensive confidence score and an audit feedback label for the corresponding behavior; the confidence decision function and the auxiliary agent sorting the comprehensive confidence scores of the multiple historical behavior verification records from high to low, and using each comprehensive confidence score as a candidate threshold value; the confidence decision function and the auxiliary agent traversing multiple candidate threshold values in descending order, calculating the decision accuracy corresponding to each candidate threshold value as the second preset high threshold based on the allowed number of compliant records and the allowed total number of records; and selecting the smallest candidate threshold value among all candidate threshold values that meet the preset accuracy target as the new second preset high threshold. Wherein, the allowed compliant records... The number of compliant records refers to the total number of historical behavior verification records with an audit feedback label of the first value among those with a comprehensive confidence score greater than or equal to the second preset high threshold. The total number of allowed records refers to the total number of historical behavior verification records with a comprehensive confidence score greater than or equal to the second preset high threshold. The confidence decision function and the auxiliary agent traverse multiple threshold candidate values in ascending order. Based on the number of rejected violation records and the total number of violation records, the recall rate of violation behavior is calculated when each threshold candidate value is used as the second preset low threshold. Under the premise of satisfying the preset false positive rate, the threshold candidate value that maximizes the recall rate of violation behavior is selected as the new second preset low threshold. Among them, the number of rejected violation records refers to the total number of historical behavior verification records with an audit feedback label of the second value among those with a comprehensive confidence score less than the second preset low threshold; the total number of violation records refers to the total number of historical behavior verification records with an audit feedback label of the second value. In this way, it can ensure that the "allowed" behavior is truly compliant, avoiding the risk of being mistakenly allowed, and also ensure that more violation behaviors are "rejected", avoiding the risk of compliant behavior being mistakenly rejected.
[0021] Secondly, this application also provides a multi-agent collaborative behavior verification device applied to a data user connector. The device includes: a digital contract acquisition module for acquiring digital contracts signed by a data provider and a data user; a contract policy parsing module for parsing the digital contracts through a policy parsing agent to generate static compliance confidence, policy semantic vectors, and a list of executable micro-instructions; and a behavior verification module for collaboratively verifying the runtime context of the data user based on the policy semantic vectors and the list of executable micro-instructions through an environment-aware agent and a behavior audit agent, outputting a dynamic context anomaly score, semantic matching confidence, and condition verification completeness. The dynamic context anomaly score refers to multiple runtime monitoring indicators corresponding to the data usage behavior. The degree of deviation from its historical normal baseline; semantic matching confidence refers to the degree of consistency between the semantics of the current operation behavior and the semantics of the contract strategy; condition verification completeness refers to the proportion of conditions that have successfully passed verification among all the constraints declared in the digital contract that require dynamic verification; the fusion calculation module is used to calculate the comprehensive confidence score by fusing static compliance confidence, dynamic context anomaly score, semantic matching confidence, and condition verification completeness through the confidence decision function and auxiliary intelligent agent; the verification result feedback module is used to output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and the preset threshold through the confidence decision function and auxiliary intelligent agent. The decision includes any one of the following: allow decision, reject decision, and conditionally allow decision.
[0022] Thirdly, this application also provides an electronic device, including: a processor and a memory, the memory storing program instructions, which, when executed by the processor, cause the electronic device to perform the multi-agent cooperative assistance behavior verification method provided in the first aspect and any implementation thereof.
[0023] Fourthly, this application also provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the multi-agent cooperative assistance behavior verification method provided in the first aspect and any of its implementations.
[0024] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute a multi-agent collaborative assisted behavior verification method as provided in the first aspect and any of its implementations.
[0025] Understandably, the multi-agent collaborative assistance behavior verification devices, electronic devices, computer-readable storage media, and computer program products provided in the above aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description
[0026] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a scenario architecture diagram of signing digital contracts based on a trusted data space, provided in an embodiment of this application. Figure 2 This is a system architecture diagram of the behavior verification method for multi-agent cooperative assistance provided in the embodiments of this application; Figure 3 This is an overall data flow diagram of the behavior verification method for multi-agent cooperative assistance provided in the embodiments of this application; Figure 4 This is a flowchart illustrating the behavior verification method for multi-agent collaborative assistance provided in an embodiment of this application; Figure 5 This is a schematic diagram of the digital contract parsing process provided in the embodiments of this application; Figure 6 This is a data flow diagram of the collaborative verification between the environmental perception agent and the behavior audit agent provided in the embodiments of this application; Figure 7 This is a schematic diagram illustrating the collaborative verification process between an environmental perception agent and a behavior auditing agent, as provided in an embodiment of this application. Figure 8 This is a schematic diagram of the process for calculating dynamic context anomaly scores provided in an embodiment of this application; Figure 9 This is a flowchart illustrating the calculation condition verification completeness provided in the embodiments of this application; Figure 10 This is a schematic diagram of the process for calculating semantic matching confidence provided in an embodiment of this application; Figure 11 This is a flowchart illustrating the execution of remedial measures under conditions where decision-making is permitted, provided in an embodiment of this application. Figure 12 This is another flowchart illustrating the behavior verification method for multi-agent cooperative assistance provided in this application embodiment; Figure 13 This is a schematic diagram of the weight adjustment process provided in an embodiment of this application; Figure 14 This is a schematic diagram of the threshold adjustment process provided in an embodiment of this application; Figure 15 This is a schematic diagram of the structure of the behavior verification device for multi-agent collaborative assistance provided in the embodiments of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are all within the protection scope of this application.
[0029] In the description of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more.
[0030] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0031] The following explanations of the technical terms mentioned in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0032] Trusted Data Space: Trusted Data Space is a data circulation and utilization infrastructure based on consensus rules, connecting multiple stakeholders to achieve data resource sharing and utilization. It is an application ecosystem for the co-creation of data element value and an important carrier supporting the construction of a nationwide integrated data market. Physically, Trusted Data Space consists of two core components: the Trusted Data Space Service Platform and the Access Connectors. The Trusted Data Space Service Platform is typically centrally deployed by the operator in the cloud or data center, serving as the "central dispatch center" and "rule enforcement platform" for the entire space. It provides core public services such as identity management, directory services, digital contract management, global policy distribution, and evidence storage and traceability. The Access Connectors are deployed in the local environment or private network of each participating party (data provider, data user), responsible for productizing local data, executing control policies issued by the platform, and ensuring data security during transmission and use.
[0033] Digital contracts are machine-readable agreements between data providers and users regarding how data is used. The core function of digital contracts is to transform business-level data usage agreements into rules that can be automatically parsed, verified, and executed by technical systems. Digital contracts are the carriers of "policies" in a trusted data space, including allow / prohibit policies, constraints, and obligation policies. Digital contracts function to define usage rules, serve as verification criteria, and enable fine-grained control.
[0034] Data Provider Connector: This is a technical component / agent for data providers, used to encapsulate data and attach digital contract strategies, releasing "data + contract" as a complete product into a trusted data space. It serves as the exit point and enforcement starting point for the provider's data governance rules.
[0035] Data User Connector: This is a technical component / agent on the data user side, used to perform real-time auditing and verification of data usage as it is actually used, ensuring compliance with digital contracts. The multi-agent collaborative verification system described in this application primarily operates within the data user connector.
[0036] The application scenarios of the embodiments of this application will be described below first.
[0037] Figure 1 This is a scenario architecture diagram of signing digital contracts based on a trusted data space, provided in an embodiment of this application.
[0038] like Figure 1 As shown, the data user connector includes modules for digital contract management and data usage control. The user's digital contract management module is used to discover, review, negotiate, and ultimately sign digital contracts; the user's data usage control module is used to perform dynamic behavior verification throughout the entire lifecycle of data usage.
[0039] The data provider connector includes modules for digital contract management, data usage control, and data delivery. The provider's digital contract management module creates, defines, and publishes usage policies (allow, prohibit, and obligation policies) and constraints for data products, forming machine-readable digital contracts. The provider's data usage control module is used for attaching policies and providing lightweight control to digital contracts before publication. The data delivery module securely transmits data products to the data user connector via a trusted channel, ensuring the confidentiality and integrity of the data during transmission.
[0040] The digital contract signing phase includes: Step S01. The data provider connector generates a digital contract for the data to be shared through the digital contract management module and publishes the data product and its digital contract catalog to the Trusted Data Space. Step S02. The data user discovers the data product in the Trusted Data Space and views its digital contract details through the digital contract management module of their data user connector. Step S03. After both data parties reach an agreement, they complete the digital signing online through their respective digital contract management modules, and the service platform distributes the digital contract to both parties' access connectors. The data provider and data user can complete the negotiation and signing of the digital contract through the Trusted Data Space service platform, or they can directly negotiate and form a digital contract.
[0041] The data delivery phase includes: Step S04. The data user initiates a data usage operation on their own connector, requesting data from the provider. The operation information includes the data product, usage method, user information, etc. Simultaneously, a copy of the corresponding digital contract is synchronized to the user's connector's data usage control module. Step S05. After receiving the request and verifying its legitimacy, the provider's data delivery module transmits the data product to the data user's connector through a secure channel.
[0042] The data usage phase includes: Step S06. After receiving the data, the data user connector parses the digital contract to obtain the data product and corresponding policy rules, etc. On the data user connector, users or applications manipulate the data within the data usage environment, such as calling APIs or running models.
[0043] To ensure that data usage strictly adheres to the terms of the digital contract, the data user connector immediately initiates monitoring when the data user operates on the data in their local environment to verify the behavior of the operation.
[0044] Currently, existing solutions typically employ static contract strategy parsing and linear repetitive behavior verification. This approach relies heavily on pre-defined static rules, predefined contextual identities, and state parsing, resulting in the following drawbacks: (i) Static and rigid strategy parsing: The "executable format" generated after strategy parsing lacks dynamic adaptability to runtime context and cannot be deeply integrated with the classification (permitted, prohibited, and obligatory) and structure of digital contract strategies, leading to rigid strategy execution. (ii) Behavior verification relies on pre-defined information: The contextual information (such as environment, identity, and operation type) relied upon during the verification process is mostly static or pre-configured, making it difficult to cope with complex and ever-changing real-world usage scenarios, such as difficulty in identifying "illegal operations by legitimate users." When a contract stipulates that "data is only used for model inference," but the user uses this data for model training within a sandbox, traditional identity-based and static rule-based verification (such as algorithm hashing) is completely ineffective. (iii) Lack of semantic consistency verification guarantee: There is a lack of runtime semantic consistency verification between the "operational behavior" agreed upon in the strategy and the actual algorithm / model / application, posing a risk of execution deviation. For example, strategies in digital contracts use natural or structured language to describe "operational behaviors" (such as "joint development" and "reasoning") and "constraints" (such as "use-and-destroy" and "specify execution environment"). These descriptions are clear at the business level, but are ambiguous at the technical execution level. (iv) Lack of adaptive capability: The decision-making process is black and white, lacks quantitative confidence assessment, cannot implement remedial measures in uncertain scenarios, and lacks self-optimization capability.
[0045] It is evident that existing solutions struggle to accurately, interpretably, and adaptively assess and make decisions regarding the compliance of complex operational intentions in open and dynamic data usage environments. The flexibility and reliability of behavior verification are both poor, resulting in low accuracy of the verification results. Consequently, existing trusted data spaces suffer from "static, passive, and short-sighted" issues in data usage control and behavior verification, failing to meet the requirements of trusted data spaces for "high precision, high intelligence, and high reliability" in data usage control.
[0046] To address the aforementioned issues, this application provides a behavior verification method with multi-agent collaborative assistance. By combining a multi-agent collaborative assistance framework with a comprehensive confidence decision model, it can achieve dynamic, intelligent, and closed-loop data usage control within a trusted data space through more flexible behavior verification. This allows for dynamic perception of behavioral intent, understanding of policy semantics, and making quantitative confidence decisions, while also possessing closed-loop self-optimization capabilities, thus achieving a leap from "static compliance" to "dynamic trustworthiness."
[0047] Figure 2 This is a system architecture diagram of the behavior verification method for multi-agent collaborative assistance provided in the embodiments of this application.
[0048] like Figure 2 As shown, in some embodiments, the data usage control module of the data user connector may include a control policy execution unit, a data usage environment unit, and a usage evidence storage unit. The control policy execution unit coordinates subordinate components, receives runtime information, executes policy rules, performs dynamic verification, and makes a final control decision (allow / deny / conditionally allow). The data usage environment unit is a "secure sandbox" or "controlled environment" where data is actually manipulated and computed, providing a runtime environment for different applications (such as data analysis tools and model training platforms). In this environment, all access to and operations on data products are monitored by the data acquisition probe system and strictly constrained by the control policy execution unit. The usage evidence storage unit is used to automatically record key events, operational behaviors, environmental states, decision results, and evidence throughout the entire process from contract signing to data usage, providing a data foundation for post-audit, dispute arbitration, and "self-optimization" of confidence level decisions.
[0049] The user's control policy execution unit may include a policy control engine, a control policy parsing component, and an information providing component. The control policy parsing component reads the signed digital contract and parses it from structured language into executable micro-instructions and verification rules; the information providing component collects real-time runtime context information, including operational behavior, environmental indicators, and constraint compliance; the policy control engine receives policy parsing results from the control policy parsing component and real-time data from the information providing component, and performs comprehensive behavior verification.
[0050] When a data user requests data from a data provider, and the data user connector receives the data, the control policy parsing component parses the digital contract and injects the policy parsing result into the use policy control engine. When a user or application operates on the data in the data use environment unit, the use policy engine retrieves one or more data use control policies (hereinafter referred to as "policies") corresponding to the currently requested data product from the control policy parsing component.
[0051] During the data usage behavior verification phase, the data user connector verifies the constraints and operational behaviors in the strategy: a) It uses the control strategy engine to collect necessary contextual information (such as environmental information, operator identity, connector identity, operation type, time, location, application, etc.) from the data usage environment and information providing components, and judges the constraints in the strategy; b) It uses the strategy control engine to track and verify the data usage behavior based on digital contract strategy parsing through a multi-agent collaborative assistance framework and a comprehensive confidence decision model, and provides the verification results. For example, the control strategy engine should verify all relevant algorithms / models / applications used in data processing to ensure that they are consistent with the operational behaviors in the usage strategy.
[0052] The multi-agent collaborative assistance framework and comprehensive confidence decision model include: a policy parsing agent, an environment-aware agent, a behavior auditing agent, a confidence decision function, and an auxiliary agent. The policy parsing agent assists the policy parsing component in interpreting digital contracts, converting natural language or structured policies into executable micro-instructions. The environment-aware agent and behavior auditing agent assist the information provision component, monitoring and collecting data during runtime, and performing dynamic perception and deep semantic analysis of behavioral intentions. The confidence decision function and auxiliary agent assist the policy control engine, fusing multi-agent output information (confidence or scores, etc.), calculating a comprehensive confidence score, and making one of three decisions: "allow," "conditionally allow," or "reject," while also possessing self-optimization capabilities.
[0053] The data user connector synchronizes the verification results and process information of the usage strategy to the data provider. The data provider's data usage control module verifies the authenticity and completeness of the verification results. Depending on the data provider's requirements, the verification process information may include environmental information, time and other contextual information, and algorithm / model / application information, which the data provider can verify locally. The data provider connector's data usage control module may include a control strategy execution unit, a data usage environment unit, and a usage evidence storage unit. The control strategy execution unit associates the contract rules of the digital contract management module with the data product and verifies the strategy execution. The data usage environment unit securely stores and manages the data to be shared. The usage evidence storage unit records all key events and operations related to data sharing, such as data publishing, contract management, and data delivery events.
[0054] In this embodiment, during the data transmission and sharing phase after the data supply and demand connectors sign a digital contract, the data user connector tracks and verifies data usage behavior based on digital contract policy parsing and provides verification results. During the data usage behavior verification process, a deep understanding of data usage intent and behavioral essence is achieved through trusted data space policy parsing and multi-agent collaborative assistance. By constructing a usage control system that dynamically perceives behavioral intent, understands policy semantics, and can perform quantitative confidence decisions and closed-loop self-optimization, the flexibility and credibility of the verification results can be enhanced, thus addressing the "static, passive, and short-sighted" problems existing in data usage control and behavior verification within the current trusted data space.
[0055] Figure 3 This is an overall data flow diagram of the behavior verification method for multi-agent cooperative assistance provided in the embodiments of this application; Figure 4 This is a flowchart illustrating the behavior verification method for multi-agent collaborative assistance provided in this application embodiment.
[0056] like Figure 3 and Figure 4 As shown, in some embodiments, the multi-agent collaborative assistance behavior verification method provided in this application is applied to a data user connector, and the method may include the following steps S100 to S500: Step S100: Obtain the digital contract signed between the data provider and the data user.
[0057] During the data transmission and sharing phase after the data supply and demand connectors sign a digital contract, the data user connector obtains the digital contract it signed with the data user. When the data corresponding to the digital contract runs in the data user connector's data sandbox, the data user connector executes the behavior verification method.
[0058] Step S200: The digital contract is parsed by the policy parsing agent to generate static compliance confidence, policy semantic vector and list of executable micro-instructions.
[0059] The data user connector uses a lightweight language model (SLM) fine-tuned with domain instructions in the data space to build a policy parsing agent, which assists the policy parsing component in performing accurate information parsing.
[0060] Static compliance confidence refers to the quantified value of the degree to which static, hard constraint rules in a digital contract (which can usually be determined before the action occurs) are met. Static compliance confidence serves as the basis for confidence decisions and a "veto" item, ensuring the most basic compliance baseline. Policy semantic vector refers to a fixed-dimensional numerical vector converted from the natural language description of behavioral intentions and constraints in a digital contract using an embedding model. Executable microinstruction list refers to the specific task list output by the policy parsing agent, guiding subsequent verification steps. It is used to "translate" high-level policies into atomic operation commands that can be directly executed by the environment-aware and behavior-auditing agents.
[0061] It should be noted that this method can generate static compliance confidence, policy semantic vector, and executable microinstruction list through processing by a policy parsing agent. Alternatively, the static compliance confidence and policy semantic vector can be generated by a control policy parsing component, and the executable microinstruction list can be generated by the policy parsing agent. This application does not limit the specific entity generating the static compliance confidence, policy semantic vector, and executable microinstruction list.
[0062] Figure 5 This is a schematic diagram of the digital contract parsing process provided in the embodiments of this application; Figure 6 This is a data flow diagram of the collaborative verification between the environmental perception agent and the behavior audit agent provided in the embodiments of this application.
[0063] like Figure 5 and Figure 6 As shown, in some embodiments, step S200 may include the following steps S201 to S204: Step S201: Parse the static constraint rules and dynamic verification information from the digital contract.
[0064] Static constraint rules are hard rules in digital contracts that must be met before or at the beginning of data usage and do not change with the runtime context. They are used to set the basic access conditions for data usage. The content of static constraint rules is usually related to inherent attributes such as identity, permissions, and environment access. For example, identity authentication is used to determine whether the visitor's digital certificate or token is valid; environment whitelisting is used to determine whether the access request comes from a pre-authorized IP address; basic security requirements are used to determine whether the transmission channel needs to be encrypted, etc.
[0065] Dynamic verification information (C_dynamic) refers to the rules and context information in digital contracts that need to be verified in real time or periodically based on the runtime state during data usage. It specifies the behavioral norms that data must adhere to during use. Dynamic verification information includes: restrictions and descriptions regarding the purpose, method, output, and resource usage of operations. For example, operation behavior definitions: specific technical descriptions of abstract behaviors such as "model inference" and "data query," such as "data is only used for visualization analysis"; dynamic context constraints: such as "CPU utilization must not continuously exceed 80%" and "each query returns no more than 1000 rows"; semantic intent descriptions: such as "the purpose of the operation should be one-time predictive analysis, not iterative parameter learning" and "processing results must be stored encrypted," etc.
[0066] Step S202: Perform reachability checks on the static constraint rules and generate static compliance confidence scores.
[0067] The reachability check refers to the process of verifying static constraint rules (such as Boolean judgments) to determine whether they are satisfied. Based on the reachability check results, a corresponding static compliance confidence score (C_static) is generated.
[0068] The static compliance confidence level takes the value [0, 1], where 1 indicates that all static rules are fully met and 0 indicates that the static rules are not met. For example, the identity authentication (whether it is an authorized user) result is 1 (passed) or 0 (failed); the IP whitelist check result is 1 (in the list) or 0 (not in the list), etc.
[0069] Step S203: Based on the predefined description text template, the dynamic verification information is converted into a first natural language description, and the first natural language description is converted into a policy semantic vector using an embedding model.
[0070] The description text template refers to a predefined, structured text framework, such as a "behavior-environment-constraint" description text template. This template is used to transform structured dynamic validation information into a coherent, fluent, and complete natural language description, eliminating the arbitrariness and ambiguity of the original contract description. The "behavior-environment-constraint" description text template includes: behavior fields (describing "what is being done," such as operation type and API name), environment fields (describing "under what environment," such as CPU utilization and memory usage), and constraint fields (describing "related constraint states," such as encryption status and access count).
[0071] The first natural language description (S_policy) is used as the direct input text for generating the policy semantic vector. For example, "The operation behavior is model inference; the constraint condition is 'use-and-burn'".
[0072] Embedding models refer to natural language processing models, such as domain-specific text-fine-tuned embedding models, which map text (words, sentences, paragraphs) to fixed-dimensional vectors in a high-dimensional vector space, making semantically similar texts closer together in the vector space.
[0073] The Embedding model is used to perform semantic role labeling and dependency parsing on action verbs, constraint adverbs, and environment description nouns in the first natural language description (S_policy), and then transform them into structured policy semantic vectors (V_policy). By generating policy semantic vectors, precise "anchor points" are provided for subsequent deep semantic matching, elevating the "syntactic" verification of the policy to the "semantic" understanding level, and laying the foundation for identifying intention-level violations.
[0074] Step S204: Decompose the first natural language description into a list of executable microinstructions.
[0075] Leveraging the instruction understanding capabilities of the policy parsing agent, natural language descriptions are broken down into a list of specific, executable micro-ops. This list of executable micro-ops includes monitoring weight suggestions and a condition verification checklist.
[0076] The monitoring weight recommendations are used to indicate the importance of different monitoring metrics in assessing behavioral anomalies during runtime. These metrics include environmental status metrics (such as CPU utilization, memory usage, and GPU memory usage), data operation behavior metrics (such as the number of rows returned and access frequency), and composite behavior metrics (such as operation repetition rate and I / O network linkage ratio). For example, the recommended monitoring weight for "API call frequency" is 0.7, for "CPU utilization" it is 0.5, and for "number of rows returned" it is 0.9. The monitoring weight recommendations also allow for dynamic adaptation of monitoring strategies. Different data usage scenarios have different risk patterns and require different monitoring focuses. For example, when a digital contract specifies "model inference" as the operation, it is recommended to increase the monitoring weight for "regularity of memory access patterns" and "GPU memory fluctuations," while decreasing the weight for "network egress traffic." These monitoring weight recommendations make anomaly detection more targeted and improve detection efficiency.
[0077] The condition verification checklist includes dynamic constraints that need to be verified during the behavior verification phase. It is used to task-oriented and checklist the dynamic constraints in digital contracts, ensuring that all agreed terms are actively checked by the system. For example, the condition verification checklist includes usage limit (such as verifying whether "the cumulative number of calls in the day has exceeded 9990"), output processing obligations (such as verifying whether "the output file has been marked with a specified watermark"), and runtime environment constraints (such as verifying whether "the current number of sandbox vCPU cores is greater than or equal to 4").
[0078] In this way, the policy parsing agent decomposes the first natural language description into a list of executable micro-instructions, transforming the static contract terms into a dynamic checklist of conditions and monitoring weight suggestions that can guide subsequent monitoring and verification, thereby realizing the operability and dynamic adaptation of the policy.
[0079] Step S300: Based on the policy semantic vector and the list of executable micro-instructions, the environment-aware agent and the behavior audit agent jointly verify the running context of the data user, and output the dynamic context anomaly score, semantic matching confidence and condition verification completeness.
[0080] The data user connector constructs an environment-aware intelligent agent and a behavior-auditing intelligent agent. The environment-aware intelligent agent is responsible for real-time monitoring and quantitative evaluation of the runtime environment and behavior. The behavior-auditing intelligent agent is activated under specific conditions and is responsible for deep semantic analysis of behavioral intentions. For example, when the environment-aware intelligent agent detects an anomaly, the behavior-auditing intelligent agent further analyzes whether the behavior violates the contractual agreement at the semantic level and performs precise logical assertion verification.
[0081] Figure 7 This is a schematic diagram illustrating the collaborative verification process between the environmental perception agent and the behavior audit agent provided in this application embodiment.
[0082] like Figure 6 and Figure 7 As shown, in some embodiments, step S300 may include steps S301 to S302: Step S301: Based on the list of executable micro-instructions, calculate the dynamic context anomaly score and condition verification completeness through the environment-aware agent.
[0083] The Dynamic Context Anomaly Score (C_anomaly) refers to the degree to which multiple runtime metrics monitored by the environment-aware agent deviate from their historical normal baseline. It is used to quantitatively indicate the degree of "abnormality" or "suspicion" of the current operational behavior pattern. The Dynamic Context Anomaly Score is a numerical evaluation of behavior verification from the environmental dimension, with values ranging from [0,1], where 0 represents completely normal and 1 represents extreme abnormality. For example, if the "API call frequency" is 3 times the standard deviation of the usual average, the score is 0.8; if the CPU and memory usage patterns are highly consistent with the historical baseline, the score is 0.1. C_anomaly is calculated using a weighted geometric mean of the Z-Scores of multiple metrics, which will be discussed in detail later.
[0084] Condition validation completeness (C_condition) refers to the proportion of all constraints declared in the strategy that require dynamic validation during the behavior validation phase that have successfully passed validation. Condition validation completeness (C_condition) is a metric for evaluating behavior validation from the condition dimension. The specific calculation process for condition validation completeness will be discussed later and will not be elaborated here.
[0085] Step S302: When the triggering condition is met, activate the behavior audit agent and calculate the semantic matching confidence based on the policy semantic vector through the behavior audit agent.
[0086] The triggering conditions include: the dynamic context anomaly score exceeding a first preset threshold; the confidence decision function and the auxiliary agent returning a conditionally permissive decision in the previous behavior verification; or the current operation being marked as a high-risk instruction in the list of executable micro-instructions. These multiple triggering conditions ensure the rigor of the behavior verification logic.
[0087] Semantic matching confidence (C_semantic) refers to the degree of consistency between the semantics of the current operational behavior and the semantics of the contract policy, calculated by the behavior auditing agent. It is used to assess whether the "intent" of the behavior is compliant and can identify high-level, covert violations (such as fraudulent intent). Semantic matching confidence is a numerical evaluation of behavior verification from the semantic dimension, and its value ranges from [0,1]. The higher the value, the more consistent the semantics.
[0088] In this way, during the behavior verification phase, the data user connector constructs a two-layer verification mechanism. The first layer (environment-aware agent) quickly screens for obvious anomalies, while the second layer (behavior audit agent) performs in-depth analysis of suspicious behaviors, forming an effective defense depth. The behavior audit agent is only activated to perform deep semantic analysis when specific triggering conditions are met, avoiding unnecessary waste of computing resources. Through the collaborative work of the environment-aware agent and the behavior audit agent, system performance is greatly optimized while ensuring verification depth.
[0089] Figure 8 This is a schematic diagram of the process for calculating dynamic context anomaly scores provided in an embodiment of this application.
[0090] like Figure 6 and Figure 8 As shown, in some embodiments, during the process of calculating the dynamic context anomaly score through the environment-aware agent, step S301 includes the following steps S3011 to S3013: In step S3011, the environmental perception agent configures the monitoring weights of the data acquisition probe system based on the monitoring weight suggestions in the list of executable micro-instructions. The data acquisition probe system is used to collect the current observation values of multiple monitoring indicators based on the monitoring weights.
[0091] Among them, the data acquisition probe system is deployed in the data usage environment (sandbox) or information providing component. It is a set of software components used to collect various runtime indicators in real time, so as to provide raw observation data for environmental perception intelligent agents.
[0092] The current observation value refers to the real-time measurement value obtained for the i-th monitored runtime indicator at the moment of anomaly score calculation, i.e., the specific value of each monitoring indicator reported by the data acquisition probe system. The observation value includes specific values from multiple dimensions such as behavior, environment, and constraints. These dimensions specifically include: actual operational behavior, actual environmental configuration, and actual constraint compliance.
[0093] Actual operational behavior refers to the specific actions performed by data users on data products. Actual operational behavior includes API calls, database operations, algorithm execution, file downloads, read and write operations, etc. For example, if the data collection probe system collects data showing "25 API calls in the past 5 seconds," then the current observation value of the monitoring indicator "API calls" is determined to be 25.
[0094] Actual environment configuration refers to the hardware and software environment state during operation and is crucial for determining whether environmental constraints are met. Actual environment configuration includes runtime environment CPU / memory / IO monitoring, operating system, container / sandbox type, etc. For example, if the data collected by the data acquisition probe system is "number of rows returned by this SQL query: 150 rows", then the current observed value of the monitoring metric "data memory utilization" is 65%.
[0095] Actual constraint compliance refers to the observable state of satisfaction of certain dynamic constraints at the time the action occurs, providing partial verification result information. Actual constraint compliance includes the encryption involved in this operation, the number of transactions, the data scale, etc. For example, if the data collected by the data acquisition probe system is "the number of data rows returned by this SQL query is 150 rows", then the current observation value of the monitoring indicator "number of data rows" is 150 rows.
[0096] Step S3012: The environmental perception agent calculates the standardized deviation of the current observation values of multiple monitoring indicators relative to the historical normal baseline mean.
[0097] The historical normal baseline mean refers to the statistical average of a certain monitoring indicator's observed values over a historical period during which the system is operating normally (without violations). It serves as a reference point for determining whether the current observed value is abnormal. Standardized deviation represents the difference between a data point and the dataset mean, and how many times it is a multiple of the dataset's standard deviation. The larger the absolute value of the standardized deviation, the more significant the deviation.
[0098] For example, the process of calculating standardized deviation includes: establishing a normal baseline: for each monitoring metric (such as CPU utilization, memory usage, network traffic, calls, etc.), calculate its mean and standard deviation (μ_i, σ_i) over a time window, where μ_i is the average level of the monitoring metric during historical normal periods; and σ_i is the fluctuation range of the monitoring metric during historical normal periods. The formula for calculating the standardized deviation Z_i of the current observation value x_i of the current i-th metric is: Z_i = (x_i – μ_i) / σ_i, taking the absolute value |Z_i|.
[0099] For example, if the current query frequency is 20 times / minute, the baseline mean is 10, and the standard deviation is 2, then Z_i = (20-10) / 2 = 5. This indicates that the current query frequency is 5 standard deviations above the baseline mean, which is highly abnormal.
[0100] In step S3013, the environmental perception agent performs a weighted summation of the absolute values of the standardized deviations of multiple monitoring indicators, and processes the weighted summation result through a preset exponential mapping function to obtain a dynamic context anomaly score.
[0101] The weighted summation formula is: S=Σ(w_i×|Z_i|), where S is the result of the weighted summation, and w_i is the weight of the i-th monitoring indicator, which is obtained from the monitoring weight suggestions in the list of executable microinstructions.
[0102] The exponential mapping function is a monotonically increasing function that maps the sum of the weighted summation of the absolute values of standardized deviations (|Z_i|) to the interval [0,1). The exponential mapping function is used to normalize the degree of anomaly to a fixed, easily understood score interval. The formula for the exponential mapping function is: C_anomaly = 1 - exp(-S) = 1 - exp(-Σ(w_i × |Z_i|)), which yields the dynamic context anomaly score (C_anomaly).
[0103] The closer the dynamic context anomaly score (C_anomaly) is to 1, the more abnormal the behavior pattern. (1-C_anomaly) is used to represent the confidence level of normal behavior. The dynamic context anomaly score C_anomaly is used to determine whether to activate deep semantic verification. When C_anomaly is greater than the threshold θ_trigger, activation is required, and deep semantic matching similarity calculation is performed through the behavior auditing agent.
[0104] In this way, the environmentally aware agent normalizes complex, multi-indicator runtime behavior deviations into a unified, interpretable dynamic context anomaly score through weighted summation and exponential mapping, achieving quantitative perception of abnormal behavior patterns from an environmental perspective. The dynamic context anomaly score can sensitively capture statistical pattern anomalies (such as high-frequency, regular calls) that deviate from the "normal" baseline. This score can be used as a basis for triggering deep semantic verification, enabling timely initiation of the deep semantic verification process and improving the accuracy of detecting potential malicious or illegal behavior.
[0105] Figure 9 This is a flowchart illustrating the calculation condition verification of completeness provided in the embodiments of this application.
[0106] like Figure 9 As shown, in some embodiments, during the process of verifying the completeness of conditions through the environmentally aware agent, step S301 includes the following steps S3014 to S3015: In step S3014, the environmental perception agent verifies the dynamic constraints of the data operation one by one according to the condition verification list in the list of executable micro-instructions.
[0107] The condition verification list includes constraints that require dynamic verification. These are constraints that cannot be statically determined before the action occurs, but must be judged based on the actual context during data execution. Examples include output file size not exceeding 10MB, output file being encrypted, and the number of rows queried being ≤100.
[0108] In step S3015, the environmental perception agent records the number of successfully verified dynamic constraints as the number of verified and passed conditions, and calculates the condition verification completeness based on the ratio of the number of verified and passed conditions to the total number of constraints that need to be dynamically verified in the condition verification list.
[0109] The environmentally aware agent checks each dynamic constraint condition one by one during runtime, based on the condition checklist in the executable microinstruction list. If the check result for a dynamic constraint condition is "satisfied" or "passed", the check logic returns a Boolean value True and accumulates the number of verified and passed conditions; if the check result for a dynamic constraint condition is "not satisfied" or "failed", the check logic returns a Boolean value False.
[0110] The condition verification completeness C_condition is calculated according to the formula: C_condition = number of verified and passed conditions / total number of conditions.
[0111] The condition verification completeness value ranges from [0,1], where 1 indicates that all conditions requiring dynamic verification have been checked and passed, and 0 indicates that they have failed or have not been verified. For example, if three conditions need to be verified (such as encryption, number of lines, and time), and all have passed, the completeness is 1.0; if two conditions need to be verified, and one has passed, the completeness is 0.5; if one condition needs to be verified but has not yet been checked (such as a secondary verification after the conditions are met), the completeness is 0.
[0112] In this way, by using an environmentally aware agent, the question of "whether all agreed conditions have been checked" is transformed into a quantifiable confidence dimension (C_condition), which avoids affecting the accuracy of behavior verification due to omissions in checking certain constraints (such as usage frequency, output processing obligations) and improves the accuracy of behavior verification in the condition dimension.
[0113] Figure 10 This is a schematic diagram of the process for calculating semantic matching confidence provided in an embodiment of this application.
[0114] like Figure 6 and Figure 10 As shown, in some embodiments, during the process of calculating the semantic matching confidence based on the policy semantic vector by the behavior auditing agent, step S302 includes the following steps S3021 to S3025: Step S3021: The behavior auditing agent obtains the original operation data of the data user during the data usage process.
[0115] Raw operational data refers to the lowest-level data records directly collected by the data acquisition probe system during the data operation process, which are unprocessed or only preliminarily processed (without multiple aggregation steps or natural language descriptions). Raw operational data includes raw materials used to construct behavioral descriptions and perform logical assertion verification, such as data from multiple dimensions including actual operational behavior, actual environmental configuration, and actual constraint compliance.
[0116] In step S3022, the behavior auditing agent extracts runtime context information and previous K-step operation history information from the original operation data, constructs an enhanced behavior description, and uses an embedding model to transform the enhanced behavior description into a behavior semantic vector.
[0117] Runtime context information refers to structured information extracted from raw operation data that describes the instantaneous state and behavior of the current operation. Previous K-step operation history information refers to a series of historical operation records preceding the current operation.
[0118] Among them, the enhanced behavior description (S_behavior_enhanced) refers to the natural language text used to describe a continuous sequence of behaviors, which is formed by concatenating the "runtime context information" and the "preceding K-step operation history information" according to a predetermined format.
[0119] In some embodiments, step S3022, during the construction of the enhanced behavior description, includes steps S30221 to S30223: Step S30221: The behavior auditing agent extracts the runtime context information corresponding to the current moment and the previous K-step operation history information from the original operation data.
[0120] The behavior auditing agent assembles the raw operation data, such as the actual operation behavior, actual environment configuration, and actual constraint compliance at the current moment, into a structured comprehensive snapshot, and obtains runtime context information that describes the overall situation when a data operation occurs.
[0121] The preceding K-step operation history information contains a list of K entries, each of which is a "runtime context information" of a historical moment. The K entries are ordered in chronological order to provide the temporal context of the behavior, help understand the behavior pattern and intent, and determine whether the current single operation is a potential violation.
[0122] In step S30222, the behavior auditing agent converts runtime context information into a second natural language description based on a predefined descriptive text template.
[0123] Among them, the predefined descriptive text templates include the "behavior-environment-constraint" descriptive text template.
[0124] The behavior auditing agent populates runtime context information into the “behavior-environment-constraint” description text template to generate a coherent second natural language description S_behavior.
[0125] In step S30223, the behavior auditing agent concatenates the second natural language description and the previous K-step operation history information to construct an enhanced behavior description.
[0126] The behavior auditing agent concatenates the second natural language description S_behavior and the previous K-step operation history information according to a predetermined format to construct a complete narrative containing time-series information, namely the enhanced behavior description S_behavior_enhanced.
[0127] An embedding model is used to transform the enhanced behavior description S_behavior_enhanced into a behavior semantic vector V_behavior. The embedding model includes an embedding model; the behavior semantic vector refers to the fixed-dimensional numerical vector that transforms the enhanced behavior description text into a single vector using the embedding model. The behavior semantic vector V_behavior contains comprehensive semantic information about current and historical behaviors, and is used for similarity comparison with the policy semantic vector.
[0128] Step S3023: The behavior auditing agent calculates the cosine similarity between the policy semantic vector and the behavior semantic vector to obtain the original semantic similarity.
[0129] The raw semantic similarity C_semantic_raw measures the similarity between the policy semantic vector and the behavior semantic vector. The closer this value is to 1, the more semantically consistent they are. The formula for calculating the cosine similarity is as follows: C_semantic_raw=cosine_similarity(V_policy,V_behavior)=(V_policy×V_behavior) / (||V_policy||×||V_behavior||).
[0130] The behavior auditing agent calculates the raw semantic similarity C_semantic_raw between the policy semantic vector V_policy and the behavior semantic vector V_behavior in the spatial direction according to the above formula. For example, if both the policy semantic vector and the behavior semantic vector represent "reasoning", the similarity is high; if both the policy semantic vector and the behavior semantic vector represent "statistical analysis", the similarity is low.
[0131] In step S3024, the behavior auditing agent verifies the original operation data based on the logical assertions in the list of executable microinstructions. If the verification fails, a penalty factor is calculated based on the severity level of the violation of the logical assertion.
[0132] Logical assertions, in particular, refer to Boolean judgment rules extracted from digital contracts that can be precisely verified. They are used to perform deterministic, black-and-white ("yes / no") rule checks on raw operational data to detect any clearly prohibited actions. Logical assertions include prohibitive operation assertions, data security assertions, and query security assertions, providing precise, syntax / keyword-based violation detection. They can identify behaviors that may be semantically ambiguous but are logically explicitly prohibited.
[0133] The penalty factor is a weight between 0 and 1, used to reduce the original semantic similarity when logical assertion verification fails. It quantifies the severity of logical violations as a negative impact on semantic confidence. Different values are preset for the penalty factor based on the severity level of the violated assertion, such as high-level violation = 0.1, medium-level = 0.5, and low-level = 0.8.
[0134] The behavior auditing agent performs logical consistency checks on the original operational data based on logical assertions. For example, it checks operational data that is "only used for model inference, each query must have a valid WHERE condition, and gradient saving is prohibited." If the check passes, the behavior auditing agent outputs Logic_Consistent as True; otherwise, it outputs False. After outputting False, it determines the penalty factor Penalty_Factor. When True is output, the penalty factor Penalty_Factor is 1.
[0135] For example, consider the technical scenario where a "legitimate user performs an illegal operation" (e.g., a user with query privileges maliciously crawls data) activates a behavior auditing agent to perform logical consistency checks: (a) The enhanced behavior is described as: "The user has executed 3 full table scan queries in the past 5 seconds without using a WHERE condition."
[0136] Note: This process indicates patterned behavior and malicious intent, and may involve systematic data crawling or probing.
[0137] (b) The current operation is SELECT FROM patients WHERE 1=1 returns 2000 rows.
[0138] Note: This behavioral data is the real-time raw operation data details collected by the data acquisition probe system, used for logical assertion verification.
[0139] (c)ASSERT_001 (WHERE validity): The validator parses the SQL and finds that the WHERE clause is always true, 1=fail.
[0140] Note: This process performs the first logical assertion check to verify the validity of the WHERE clause, such as checking whether the WHERE clause of the SQL statement is a valid and non-deceptive filtering condition. If the check fails, it means that the behavior violates the strategy that "the query must have a valid WHERE condition".
[0141] (d)ASSERT_003 (row limit): The actual number of rows returned is 2000 > 1000 → fail.
[0142] Note: This process performs a second logical assertion check to verify the row count limit, such as checking whether the number of rows returned by a single query exceeds the limit. If the check fails, it means that the behavior violates the strategy of "the number of rows returned by a single query ≤ 1000".
[0143] (e)ASSERT_002 (gradient storage): The current operation is not model-dependent → not_applicable.
[0144] Note: This process performs a third logical assertion check to verify gradient storage, such as checking for gradient saving behavior during model training. If the result is "not applicable," it means that this logical assertion is not applicable to the current operating scenario, and is neither passed nor violated.
[0145] (f) Output result: faiLogic_Consistent=False exists, violating assertions: ASSERT_001 (severity=high) and ASSERT_003 (severity=medium).
[0146] Note: This process summarizes the results of all logical assertion checks and forms a final judgment on "logical consistency", as well as detailed evidence of violations, such as the severity of the violation of "WHERE validity" being high and the severity of the violation of "line count limit" being medium.
[0147] (g) By the severity level of violating different assertions, a penalty factor (Penalty_Factor) can be calculated. For example, high corresponds to Penalty_Factor=0.1, and medium corresponds to Penalty_Factor=0.5.
[0148] Step S3025: The behavior auditing agent calculates the semantic matching confidence based on the original semantic similarity and the penalty factor.
[0149] Semantic matching confidence is used to measure the consistency between actual actions and policy intentions in the semantic space. The higher the semantic matching confidence value, the more the behavior conforms to the essence of the policy description.
[0150] The final semantic matching confidence C_semantic (behavior) is calculated using the formula: C_semantic = C_semantic_raw × Penalty_Factor.
[0151] For example, if the original semantic similarity is 0.8, but the logical assertion of "prohibiting full table scan" is violated, the penalty factor is 0.5, then the semantic matching confidence is 0.4.
[0152] In this way, the data user connector activates the behavior auditing agent when the environment-aware agent detects an anomaly (C_anomaly exceeds the threshold), and performs deep semantic verification to improve the efficiency and depth of behavior validation in the semantic dimension. Deep semantic verification uses enhanced behavior descriptions for semantic comparison and combines logical assertion verification for logical review, enabling more accurate judgment of behavior patterns and intentions. The use of a penalty factor mechanism directly and quantitatively reflects explicit logical violations (such as violations of prohibitive assertions) in the semantic matching confidence score, enhancing the accuracy and interpretability of behavior validation.
[0153] Step S400: Through the confidence decision function and the auxiliary agent, the static compliance confidence, dynamic context anomaly score, semantic matching confidence, and condition verification completeness are integrated to calculate the comprehensive confidence score.
[0154] The confidence decision function and auxiliary intelligent agent refer to the mathematical function and its management components that integrate multi-dimensional confidence information to make a final decision, created by the data user connector. The confidence decision function and auxiliary intelligent agent include a confidence decision function and a confidence decision intelligent agent. The confidence decision function performs decision calculations, integrating confidence scores from four dimensions—static compliance, dynamic anomaly, semantic matching, and conditional completeness—into a comprehensive confidence score. The confidence decision intelligent agent makes a three-state decision based on this score and a threshold, and performs adaptive optimization.
[0155] The overall confidence score is a single quantitative value that represents the overall credibility of current data usage behavior.
[0156] The confidence decision function uses a weighted fusion formula to calculate the overall confidence score: Overall confidence score = Static compliance confidence score × [w1 × (1 - Dynamic context anomaly score) + w2 × Semantic matching confidence score + w3 × Condition verification completeness].
[0157] Where w1 is the environmental dimension weight, w2 is the semantic dimension weight, and w3 is the conditional dimension weight, and w1 + w2 + w3 = 1. The environmental dimension weight (w1) is the weight coefficient assigned to "normality of behavioral patterns" (i.e., 1 - C_anomaly), used to control the importance of statistical behavioral pattern anomalies in the final decision. The semantic dimension weight (w2) is the weight coefficient assigned to "semantic match confidence" (C_semantic), used to control the importance of deep semantic analysis in the final decision. The conditional dimension weight (w3) is the weight coefficient assigned to "conditional validation completeness" (C_condition), used to control the degree of emphasis placed on the completeness of the agreed-upon constraints.
[0158] The above calculation formula indicates that, assuming the static compliance confidence level passes, a comprehensive assessment is conducted across three dimensions: "whether the behavior is normal," "whether the intent is consistent," and "whether all conditions have been verified," resulting in a final confidence score between 0 and 1. The static compliance confidence level has a veto power: C_static acts as a multiplier. If the static compliance check fails (i.e., C_static = 0), regardless of the other dimensions' high scores, the final overall confidence score will be 0, resulting in a rejection decision to ensure a safety baseline. The calculation process of (1-C_anomaly) transforms "anomaly scores" into "normal scores," aligning this dimension with the other two confidence dimensions (C_semantic and C_condition) (higher values indicate greater confidence).
[0159] In some embodiments, during the verification result feedback phase, the confidence decision function and the auxiliary agent load initial parameters (weights, thresholds, decay factors, etc.) and receive C_static (static compliance confidence), C_anomaly (dynamic context anomaly score), C_semantic (semantic matching confidence), and C_condition (condition verification completeness) output in real time from the three upstream agents. The confidence decision function is used to perform confidence fusion calculation, unifying the results of traditional verification, dynamic context, semantic enhancement, and condition into a comprehensive confidence score.
[0160] Step S500: Using a confidence decision function and an auxiliary agent, output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and a preset threshold.
[0161] The preset thresholds include a second preset high threshold (θ_high) and a second preset low threshold (θ_low). The relationship between the overall confidence score and the preset thresholds serves as the sole, refined basis for the "allow," "conditionally allow," and "reject" three-state decision-making process.
[0162] The confidence decision function and the confidence decision agent in the auxiliary agent compare the comprehensive confidence score with the second preset high threshold (θ_high) and the second preset low threshold (θ_low), and make a precise and quantifiable decision, as follows: If the overall confidence score is greater than or equal to the second preset high threshold, and the conditional completeness is 1, then a permission decision is made. A permission decision means that the verification passes, allowing the data to continue its operation without any additional conditions.
[0163] If the overall confidence score is less than the second preset low threshold, a rejection decision is made. A rejection decision means that the verification fails, and data usage is immediately blocked.
[0164] If the overall confidence score falls between the second preset high threshold and the second preset low threshold (i.e., greater than or equal to the second preset low threshold and less than the second preset high threshold), a conditional allowance decision is made. A conditional allowance decision means that the verification is in an uncertain state, allowing the operation to continue provided that specific additional conditions are met or remedial measures are implemented. A "conditional allowance" decision indicates that secondary authentication needs to be triggered.
[0165] For example, for decision iteration 1, static condition check: passed; dynamic context anomaly score: 0.15 (normal); semantic matching degree: 0.82 (good); condition verification completeness: 0.75 (two preconditions are missing); decision: conditionally allowed. Execute preconditions: add watermark, perform secondary authentication; precondition execution: successful.
[0166] For decision iteration 2, static condition check: passed; dynamic context anomaly score: 0.12 (normal); semantic matching degree: 0.85 (good); condition verification completeness: 1 (all completed); decision: allow data operation.
[0167] For example, the overall confidence score ranges from [0,1], with higher values indicating more credible behavior. For instance, suppose the second preset high threshold θ_high = 0.85 and the second preset low threshold θ_low = 0.60. If the overall confidence score = 0.92 and C_condition = 1.0, then the output is an allowed decision; if the overall confidence score = 0.45, then the output is a disallowed decision; if the overall confidence score = 0.75 and C_condition = 0.8, then the output is a conditionally allowed decision.
[0168] In this way, the data user connector uses a confidence decision function and an auxiliary intelligent agent to weight and fuse the confidence scores of four different dimensions—static compliance, behavioral normality, semantic consistency, and conditional completeness—into a continuous and quantifiable comprehensive confidence score. Combined with a preset threshold, it outputs a three-state decision, which not only improves the consistency and auditability of decisions but also solves the problem of rigid policy execution in "uncertain" scenarios in existing methods, thereby enhancing the system's practicality and user experience.
[0169] In some embodiments, when the dynamic context anomaly score is less than or equal to a first preset threshold, the confidence decision function and the confidence decision agent in the auxiliary agent adjust the semantic dimension weight w2 based on the decay factor, and adjust the environment dimension weight w1 and the condition dimension weight w3 based on the preset allocation ratio.
[0170] The attenuation factor is used to reduce the semantic dimension weight w2 under specific conditions (C_anomaly is below a threshold) to quantify the reduction in the influence of semantic matching confidence on the final decision. The preset allocation ratio determines how the weights deducted from the attenuated w2 are distributed to w1 and w3. For example, after reducing the semantic dimension weight w2, the environmental dimension weight w1 and the conditional dimension weight w3 are adaptively increased.
[0171] In some embodiments, when the dynamic context anomaly score C_anomaly ≤ θ_trigger, the semantic matching confidence C_semantic is not recalculated. When the confidence decision function and the auxiliary agent calculate the comprehensive confidence score, C_semantic is directly assigned the valid value of the previous semantic check (if the system has just started and there are no historical values, the default value of 1.0 is assigned).
[0172] The multi-agent collaborative behavior verification method provided in this application constructs an intelligent verification system capable of dynamically perceiving behavioral intent and understanding policy semantics through the collaborative assistance of multiple agents, including policy parsing, environmental perception, behavior auditing, and confidence decision-making, via a data user connector. This method departs from traditional static rule-based binary (pass / reject) verification, instead employing a dynamic, intelligent, and refined behavior understanding and decision-making process. This effectively addresses the shortcomings of existing solutions, such as rigid policy parsing, reliance on preset information for behavior verification, lack of semantic consistency guarantees, and non-adaptiveness, thereby accurately identifying complex scenarios such as "illegal operations by legitimate users."
[0173] Figure 11 This is a flowchart illustrating the process of implementing remedial measures when a decision is conditionally permissible, as provided in an embodiment of this application.
[0174] like Figure 11 As shown, in some embodiments, when the confidence decision function and the auxiliary agent make conditionally permissible decisions, the method may further include the following steps S601 to S603: Step S601: Under the condition that the confidence decision function and the auxiliary agent make a conditionally permissible decision, the environmental perception agent executes the unverified constraints or preset remedial measures.
[0175] Unverified constraints refer to dynamic constraints in the condition verification list that were not verified or whose verification status was unknown in the previous round of verification (such as step S3014). For example, in the "conditionally allowed" state, a certain check may not have been completed because it requires user interaction (such as encrypting a file).
[0176] The pre-defined remedial measures refer to a series of risk mitigation or verification measures that the system can take when the dynamic context anomaly score (C_anomaly) is insufficient but not yet reaches the level of direct rejection. For example, some conditions may not be verifiable due to insufficient current context information, or require additional steps (such as secondary authentication) for verification, allowing the unverified conditions to continue execution. Implementing remedial measures is used to reduce risk and increase confidence. A remedial measure library is established, including secondary authentication, adding watermarks, and triggering manual review. For example, a pop-up interface may require users to perform secondary authentication; an invisible digital watermark may be automatically added to the output data; and a manual review process may be triggered, sending the operation record to the administrator for approval.
[0177] Step S602: After all unverified constraints have been verified or remedial measures have been implemented, obtain the updated runtime context information, and recalculate at least one of the following through the environment-aware agent and the behavior audit agent: condition verification completeness, dynamic context anomaly score, and semantic matching confidence.
[0178] The updated runtime context information refers to the latest state information of the data usage environment after performing unverified condition checks or remedial measures.
[0179] The environmental awareness agent and the behavior audit agent recalculate at least one of the following based on the updated information: condition verification completeness, dynamic context anomaly score, and semantic matching confidence, to reflect the new state after remedial measures are implemented. Since the static conditions do not change, the static compliance confidence does not need to be rechecked.
[0180] Step S603: By fusing the static compliance confidence score with the confidence decision function and the auxiliary agent, as well as the recalculated condition verification completeness, dynamic context anomaly score and semantic matching confidence score, a new round of behavior verification is performed.
[0181] The data user connector recalculates the overall confidence score based on the new conditional verification completeness, dynamic context anomaly score, semantic matching confidence, and the original static compliance confidence score using the confidence decision function. The data user connector then performs a new round of behavioral verification based on the new overall confidence score through the confidence decision agent.
[0182] For example, during the initial behavior verification, the overall confidence score is 0.7 (conditionally allowed), and C_condition is 0.5 ("output encryption" not checked). A remedial action is taken by the environment-aware agent: a dialog box pops up asking the user to confirm the encrypted output file. After the user completes encryption, the system obtains the updated context (e.g., the file is now encrypted). The environment-aware agent recalculates C_condition to 1.0. Since C_anomaly and C_semantic may change over time and with new operations, they may also be recalculated. If the confidence decision function and the recalculated overall confidence score by the auxiliary agent are both 0.9, and C_condition is 1.0, the decision becomes "allow".
[0183] In this way, by creating a buffer and remedial interval between the "allow" and "reject" decisions, such as the "conditionally allow" state, the system can take remedial measures such as adding watermarks and secondary authentication and re-evaluate when faced with uncertainty or partial failure to meet certain conditions. This can not only improve the system's usability and user experience, but also make the entire verification process form a feedback and correctable management loop.
[0184] It should be noted that, to avoid infinite loops, the data user connector sets a maximum number of retries when the confidence decision function and the auxiliary agent output conditionally allowable decisions. After the environment-aware agent and the behavior-auditing agent recalculate any one of the conditional verification completeness, dynamic context anomaly score, and semantic matching confidence, the confidence decision function and the auxiliary agent each perform a comprehensive confidence score calculation and a three-state decision judgment process. If the number of recalculations by the confidence decision function and the auxiliary agent exceeds the maximum number of retries, and the recalculated comprehensive confidence score still does not meet the "allow" or "reject" criteria, a forced rejection is initiated and an anomaly is recorded.
[0185] In some embodiments, the confidence decision agent can also provide scores and explanations for each dimension of data (C_anomaly, C_semantic, C_condition) in the output results to improve auditability; and perform adaptive optimization based on the various operational data in the behavior verification process to adjust weights and thresholds to optimize decision accuracy, so that the overall confidence score is as high as possible for compliant usage behavior and as low as possible for non-compliant usage behavior, thereby achieving self-optimization that becomes more accurate with use.
[0186] Figure 12 This is another flowchart illustrating the behavior verification method for multi-agent collaborative assistance provided in this application embodiment.
[0187] like Figure 12 As shown, in some embodiments, the behavior verification method for multi-agent cooperative assistance may further include the following steps S701 to S702: Step S701: The behavior auditing agent records the decision results of historical behavior verification, static compliance confidence, dynamic context anomaly score, semantic matching confidence, condition verification completeness, and audit feedback label to obtain evidence records.
[0188] In this context, the evidence storage record refers to the collection of all relevant information recorded during a complete data usage verification process. The evidence storage record serves as a source of training data for subsequent auditing, traceability, and model self-optimization. The evidence storage record can be stored in the usage evidence storage unit of the data user connector.
[0189] Audit feedback labels refer to the final compliance assessment of a data usage behavior after the fact (such as through manual auditing or independent log analysis), used as the "true value" or "label" for model optimization. Audit feedback labels typically include Boolean values or categorical labels. For example, the audit feedback label for compliant behavior is the first value (label 1), and the audit feedback label for non-compliant behavior is the second value (label 0).
[0190] Step S702: Based on the evidence records, the confidence decision function and the auxiliary agent, the environment dimension weight w1, semantic dimension weight w2, condition dimension weight w3, and / or the second preset high threshold and the second preset low threshold are adjusted by using an optimization algorithm.
[0191] The optimization algorithm can be executed by the confidence decision function and the confidence decision agent in the auxiliary agent. The optimization algorithm is a mathematical method used to automatically adjust the model parameters (weights, thresholds) to approximate the optimization objective, realizing adaptive adjustment of parameters so that the comprehensive confidence score corresponding to compliant behavior tends to increase, and the comprehensive confidence score corresponding to non-compliant behavior tends to decrease.
[0192] Figure 13 This is a schematic diagram of the weight adjustment process provided in the embodiments of this application.
[0193] like Figure 13 As shown, in some embodiments, when adjusting the weights, step S702 may include steps S7021 to S7025: Step S7021: The confidence decision function and the auxiliary agent obtain multiple historical behavior verification records from the evidence storage records. Each historical behavior verification record includes a comprehensive confidence score and an audit feedback label for the corresponding behavior.
[0194] The overall confidence score is denoted as Score, and the audit feedback label is denoted as y, where y=1 indicates compliant behavior and y=0 indicates non-compliant behavior.
[0195] Step S7022: The confidence decision function and the auxiliary agent use the weighted fusion confidence decision function formula as an unbiased linear regression model, and calculate the model loss based on the comprehensive confidence score and audit feedback label.
[0196] The confidence decision agent maintains a small linear model trainer, treating the weighted fusion calculation formula of the comprehensive confidence score as an unbiased linear regression model. The linear regression model can achieve the highest possible score for compliant behavior (y=1) and the lowest possible score for non-compliant behavior (y=0).
[0197] For the formula: Score=w1×(1-C_anomaly)+w2×C_semantic+w3×C_condition, using the mean squared error (MSE) as the loss function, we obtain the model loss: Loss=(Score-y)^2.
[0198] For example, if an action is actually compliant (y=1), but the score output by the confidence decision agent is very low, the loss will be large, indicating that the model "underestimated this compliant action," and the weight needs to be increased to improve the score. Conversely, if an action is actually non-compliant (y=0), but the score output by the confidence decision agent is very high, the loss will also be large, indicating that the model "overestimated this non-compliant action," and the weight needs to be decreased to reduce the score.
[0199] In step S7023, the confidence decision function and the auxiliary agent calculate the gradient corresponding to each weight w1, w2, and w3 based on the model loss.
[0200] The model loss (Loss) is calculated by taking the partial derivatives (gradients) with respect to each weight w. Loss / w is used to determine the direction and magnitude in which each weight should be adjusted to reduce error.
[0201] The gradient formula for w1 is: Loss / w1=2×(Score-y)×(1-C_anomaly).
[0202] The gradient formula for w2 is: Loss / w2=2×(Score-y)×C_semantic.
[0203] The gradient formula for w3 is: Loss / w3=2×(Score-y)×C_condition.
[0204] In step S7024, the confidence decision function and the auxiliary agent update the environment dimension weights, semantic dimension weights, and condition dimension weights according to the learning rate and the gradients corresponding to each weight w1, w2, and w3.
[0205] The learning rate α is used to control the step size of each adjustment and is a preset hyperparameter, such as 0.01.
[0206] The gradient update formula for w1 is: w1_new = w1_old - α × Loss / w1.
[0207] The gradient update formula for w2 is: w2_new = w2_old - α × Loss / w2.
[0208] The gradient update formula for w3 is: w3_new = w3_old - α × Loss / w3.
[0209] Where w1_new is the updated environment dimension weight, and w1_old is the original environment dimension weight; w2_new is the updated semantic dimension weight, and w2_old is the original semantic dimension weight; w3_new is the updated condition dimension weight, and w3_old is the original condition dimension weight.
[0210] For example, taking the update of weight w1 as an example, for compliant behavior (y=1), if the Score is low (Score-y<0), the gradient is negative. According to the update formula w1_new=w1_old-α×negative value, the value of w1 increases, thereby increasing the Score in similar future cases. For non-compliant behavior (y=0), if the Score is high (Score-y>0), the gradient is positive, and the value of w1 decreases after the update, thereby decreasing the Score in similar future cases.
[0211] Step S7025: The confidence decision function and the auxiliary agent normalize the updated environmental dimension weights, semantic dimension weights and condition dimension weights, and use the normalized weights as the new dimension weights.
[0212] The normalization process is to make w1 + w2 + w3 = 1.
[0213] After updating w1, w2, and w3 respectively, the confidence decision agent renormalizes them and uses the normalized weights as the new adjusted environmental dimension weights, semantic dimension weights, and conditional dimension weights.
[0214] In this way, by utilizing the confidence decision function and the adaptive optimization capability of the auxiliary agent, and by treating the confidence weighted fusion formula as a trainable linear regression model, and using historical decision results (audit feedback labels) as supervision signals, the importance weights of each dimension (environment, semantics, and conditions) in the final decision can be automatically and continuously adjusted, so that the comprehensive confidence score corresponding to compliant behavior tends to increase, and the comprehensive confidence score corresponding to non-compliant behavior tends to decrease.
[0215] In some embodiments, the confidence-based decision-making agent adjusts the thresholds (the second preset high threshold (θ_high) and the second preset low threshold (θ_low)) using a periodic batch adjustment method. It periodically (e.g., daily) utilizes accumulated labeled historical data to find the optimal thresholds through ROC curves or precision-recall curves. θ_high determines the "allow" boundary, aiming for high precision in "allow" decisions, meaning that the vast majority of actions that continue are compliant. θ_low determines the "reject" boundary, aiming for high recall in "reject" decisions, meaning that the vast majority of non-compliant actions are blocked.
[0216] Figure 14 This is a schematic diagram of the threshold adjustment process provided in the embodiments of this application.
[0217] like Figure 14 As shown, in some embodiments, when adjusting the threshold, step S702 may include steps S7026 to S7029: Step S7026: The confidence decision function and the auxiliary agent obtain multiple historical behavior verification records from the evidence storage records. Each historical behavior verification record includes a comprehensive confidence score and an audit feedback label for the corresponding behavior.
[0218] The data user connector obtains evidence records from the evidence storage unit, and the confidence decision-making agent can periodically obtain multiple historical behavior verification records from the evidence storage records. These multiple historical behavior verification records can be the most recent N records, such as 1000 records.
[0219] In step S7027, the confidence decision function and the auxiliary agent sort the comprehensive confidence scores of multiple historical behavior verification records from high to low, and use each comprehensive confidence score as a candidate threshold value.
[0220] The confidence decision agent sorts multiple comprehensive confidence scores to form an ordered Score axis. θ_high and θ_low are regarded as two dividing points on the Score axis, which facilitates the subsequent stable and repeatable calculation of precision / recall, so as to efficiently determine new θ_high and θ_low.
[0221] If records with the same overall confidence score exist, merge them to ensure that the scores on the Score axis are unique. Use all overall confidence scores as candidate threshold values.
[0222] Step S7028: The confidence decision function and the auxiliary agent traverse multiple threshold candidate values in descending order. Based on the number of allowed compliant records and the total number of allowed records, the decision accuracy corresponding to each threshold candidate value as the second preset high threshold is calculated. The smallest value among all threshold candidate values that meet the preset accuracy target is selected as the new second preset high threshold.
[0223] The allowed number of compliant records refers to the total number of historical behavior verification records with an overall confidence score ≥ the second preset high threshold (θ_high) and whose audit feedback label is the first value (y=1). The allowed total number of records refers to the total number of historical behavior verification records with an overall confidence score ≥ θ_high.
[0224] Decision accuracy, also known as decision precision rate, refers to the proportion of compliant actions among all historical actions deemed "allowable" (i.e., Score ≥ θ_high) by the confidence-based decision agent. The formula is: Accuracy = Number of compliant records / Total number of allowed records. The preset accuracy target requirement refers to a target accuracy threshold, such as 95%.
[0225] The confidence decision agent iterates through the overall confidence scores from high to low, searching for θ_high (allowable boundary) to find the lowest score value that satisfies accuracy ≥ 95% as the new θ_high.
[0226] In this way, by traversing the candidate values from high to low, and with the accuracy showing a monotonically decreasing trend, once the accuracy is lower than the target requirement, the previous candidate value is the optimal solution, and there is no need to continue traversing.
[0227] Step S7029: The confidence decision function and the auxiliary agent traverse multiple threshold candidate values in ascending order. Based on the number of rejected violation records and the total number of violation records, the violation recall rate is calculated when each threshold candidate value is used as the second preset low threshold. Under the premise of satisfying the preset false alarm rate, the threshold candidate value that maximizes the violation recall rate is selected as the new second preset low threshold.
[0228] The number of rejected violation records refers to the total number of historical behavior verification records with an audit feedback label of the second value (y=0) among those records where the overall confidence score is less than the second preset low threshold. The total number of violation records refers to the total number of historical behavior verification records with an audit feedback label of the second value (y=0).
[0229] Among them, the violation recall rate refers to the proportion of behaviors that were successfully rejected (i.e., Score < θ_low) out of all actual violations (y=0) in the historical behaviors. The calculation formula is: Violation recall rate = Number of rejected violation records / Total number of violation records.
[0230] The false positive rate refers to the proportion of all historical behaviors that are actually compliant (y=1) but are incorrectly rejected by the system (Score<θ_low), such as 5%. The calculation formula is: False positive rate = Number of rejected compliant records / Total number of compliant records. The total number of compliant records refers to the total number of historical behavior verification records with the audit feedback label set to the first value (y=1).
[0231] There is a positive correlation between violation recall rate and false positive rate. As the threshold candidate value increases, the violation recall rate increases, leading to more compliant behaviors being incorrectly identified as "incorrect" decisions, i.e., the false positive rate also increases. Data user connectors need to detect as many violations as possible during data usage, i.e., pursue a high recall rate, while also controlling the proportion of false positives (compliant behaviors being rejected). Therefore, when adjusting the second preset low threshold, the optimization objective is to maximize the violation recall rate within an acceptable false positive rate range, thereby determining a reasonable θ_low.
[0232] The confidence-based decision-making agent iterates through the data in ascending order of overall confidence scores, searching for θ_low (rejection boundary). As the threshold increases, the number of rejected violation records increases, leading to a rise in both the violation recall rate and the false positive rate. The iteration stops when the false positive rate exceeds a preset threshold. This ensures that the violation recall rate is maximized under the constraint of the false positive rate; specifically, it maximizes the violation recall rate while maintaining a false positive rate of ≤5%, using the candidate threshold value corresponding to the highest violation recall rate as the new θ_low.
[0233] In this way, the confidence-based decision-making agent periodically adjusts the second preset high threshold (θ_high) and the second preset low threshold (θ_low) using accumulated evidence records. This ensures that "allowed" behaviors are truly compliant, avoiding the risk of being mistakenly allowed, while also ensuring that more non-compliant behaviors are "rejected," avoiding the risk of compliant behaviors being mistakenly rejected. This optimizes the accuracy of the confidence-based decision-making agent's output decisions, making the overall confidence level as high as possible for compliant uses and as low as possible for non-compliant uses, thus achieving self-optimization that becomes more accurate with use.
[0234] The following example illustrates the behavior verification method for multi-agent collaborative assistance provided in this application embodiment, using specific application scenarios during the data transmission and sharing phase as examples.
[0235] Application Scenario 1: Contract Terms: Permitted Policy; Action = "Process"; Constraints = ("Purpose", eq, "Model Inference"). Legitimate User's Illegal Operation: A user starts a compliant model file in the data sandbox, but by adjusting hyperparameters and loops, makes it perform a model training task.
[0236] Correspondingly, the process of behavior verification using the method provided in this application includes: An environmentally aware agent: It monitors the periodic, high-memory-occupancy backpropagation computation characteristics during runtime, the IO mode exhibits multiple full data traversals, and it detects write operations to the model weight file. These characteristics are clearly inconsistent with the one-time forward computation and low memory fluctuation pattern of "inference"; semantic verification is determined after real-time calculation of C_anomaly. A behavior auditing agent: It traces back the previous K steps of operation, combines logical assertions to output penalty factors, and the policy parsing agent points to "one-time predictive analysis"; while the audit result points to "iterative parameter learning". Confidence decision function and auxiliary agent: C_semantic (semantic similarity) is extremely low, and C_anomaly (abnormal behavior pattern) is high. Although C_static (model file hash verification) may pass, the overall confidence score is below the threshold. System action: It determines that the intent violates the rules, executes remedial measures of the "prohibition policy" (such as immediately terminating the task and notifying the data provider), and stores detailed abnormal behavior characteristics and semantic deviation evidence in the evidence storage record.
[0237] As can be seen, in this embodiment of the application, a paradigm shift from "static rules" to "dynamic intelligence" can be achieved: the data user connector, through a multi-agent collaborative mechanism, can achieve a deep understanding of the intent and nature of data usage, and can accurately identify the "illegal operations" of "legitimate users".
[0238] Application Scenario 2: Contract Terms: Permitted Policy: Operation Behavior = "Access", "Read"; Constraints = ("Number of Times", lteq, 10000 times / day). Legitimate User's Illegal Operation: A user, using legitimate API credentials, writes a script to call the interface at extremely high frequency and regularly, intending to crawl the entire dataset.
[0239] Correspondingly, the process of behavior verification using the method provided in this application includes: An environmentally aware agent: It monitors a sharp increase in API call frequency within a short period, exhibiting machine automation characteristics in its temporal pattern (e.g., constant intervals) and lacking logical changes in queries (e.g., simple parameter increments), unlike the random and low-frequency patterns of human interactive analysis. A behavior auditing agent: The policy parsing agent implicitly includes "interactive, exploratory analysis"; the behavior semantics point to "systematic, exhaustive data crawling." A confidence decision function and auxiliary agent: C_anomaly surges due to abnormal call patterns. The system may trigger intervention before reaching the maximum number of calls by detecting crawling intent. System action: Initiating a "conditional permission" process, such as inserting stronger human-machine verification or requiring secondary approval, or downgrading the user session to a rate-limited mode.
[0240] As can be seen, in this embodiment, the data user connector can optimize a simple "pass / reject" decision into a continuous comprehensive confidence score by constructing a closed-loop, adaptive intelligent decision-making agent, providing a scientific basis for refined decision-making. The system has a "conditionally allowed" state, which can automatically identify and execute missing preconditions (such as adding watermarks or secondary authentication) and then re-verify, forming an intelligent closed loop. It can also collect historical data, optimize weights and thresholds, and fine-tune the semantic model, possessing continuous evolution capabilities and improving model accuracy.
[0241] As can be seen from the above technical solutions, the multi-agent collaborative behavior verification method provided in this application, through the cooperation of a policy parsing agent, an environment-aware agent, and a behavior auditing agent with memory and backtracking capabilities, forms a dynamic behavior understanding and evidence collection capability, realizing the proactive identification and evidence collection of "transgressive semantic behavior under legitimate identity". Simultaneously, by combining semantic vectorization and similarity matching, it focuses more on the functional intent and behavioral essence of the algorithm / model, upgrading from simple "syntactic matching" to "semantic consistency"; and its integration with the national standard's requirements for digital contract strategy classification and structure is more profound. Through a closed-loop feedback and policy optimization confidence decision function and auxiliary agent, the confidence levels of four dimensions—static compliance, dynamic anomaly, semantic consistency, and conditional completeness—are weighted and fused to output a quantifiable comprehensive confidence score, achieving automated and refined output of three-state decisions (allow, conditionally allow, and reject). Furthermore, the "conditionally permissible" status automatically triggers remedial measures (such as secondary authentication) and reassessments, forming a management closed loop. The system records historical decisions and final audit feedback, adjusting weights (w1, w2, w3) and thresholds in reverse to achieve higher scores for compliant behaviors and lower scores for non-compliant behaviors, thus enabling the decision-making model to continuously evolve. Therefore, this method can address the "staticity," "passivity," and "short-sightedness" issues in the existing trusted data space technology strategy analysis and behavior verification processes.
[0242] The above primarily describes the solutions provided in this application from the perspective of the data user connector. It is understood that, to achieve the aforementioned functions, the data user connector includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that the steps of the multi-agent collaborative assisted behavior verification method described in conjunction with the embodiments disclosed in this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by electronic device software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0243] This application embodiment can divide the data user connector into functional modules or functional units according to the above method example. For example, each function can be divided into a separate functional module or functional unit, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or in software functional modules or functional units. The module or unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0244] Figure 15 This is a schematic diagram of the structure of the behavior verification device for multi-agent collaborative assistance provided in the embodiments of this application.
[0245] like Figure 15 As shown, in some embodiments, this application also provides a multi-agent collaborative behavior verification device 100, applied to a data user connector. The device includes: a digital contract acquisition module 101, used to acquire digital contracts signed by a data provider and a data user; a contract policy parsing module 102, used to parse the digital contracts through a policy parsing agent, generating static compliance confidence, policy semantic vectors, and a list of executable micro-instructions; and a behavior verification module 103, used to perform collaborative verification of the data user's operating context based on the policy semantic vectors and the list of executable micro-instructions, through an environment-aware agent and a behavior audit agent, outputting a dynamic context anomaly score, semantic matching confidence, and condition verification completeness. The dynamic context anomaly score refers to the multi-agent collaborative behavior corresponding to the data usage behavior. The degree to which each runtime monitoring metric deviates from its historical normal baseline; semantic matching confidence refers to the degree of consistency between the semantics of the current operation behavior and the semantics of the contract strategy; condition verification completeness refers to the proportion of conditions that have successfully passed verification among all constraints declared in the digital contract that require dynamic verification; the fusion calculation module 104 is used to calculate the comprehensive confidence score by fusing static compliance confidence, dynamic context anomaly score, semantic matching confidence, and condition verification completeness through a confidence decision function and an auxiliary intelligent agent; the verification result feedback module 105 is used to output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and a preset threshold through a confidence decision function and an auxiliary intelligent agent. The decision includes any one of the following: allow decision, reject decision, and conditionally allow decision.
[0246] The multi-agent collaborative behavior verification device provided in this application constructs an intelligent verification system capable of dynamically perceiving behavioral intent and understanding policy semantics through the collaborative assistance of multiple agents in policy parsing, environmental perception, behavior auditing, and confidence decision-making. This method no longer relies on traditional static rule-based binary (pass / reject) verification, but instead employs a dynamic, intelligent, and refined behavior understanding and decision-making process. This effectively addresses the shortcomings of existing solutions, such as rigid policy parsing, reliance on preset information for behavior verification, lack of semantic consistency guarantees, and non-adaptiveness, thereby accurately identifying complex scenarios such as "illegal operations by legitimate users."
[0247] In some embodiments, the contract strategy parsing module 102 is further configured to: parse static constraint rules and dynamic verification information from the digital contract; perform reachability checks on the static constraint rules to generate static compliance confidence; based on a predefined description text template, convert the dynamic verification information into a first natural language description, and use an embedding model to convert the first natural language description into a strategy semantic vector; decompose the first natural language description into a list of executable micro-instructions, the list of executable micro-instructions including monitoring weight suggestions and a condition verification list, the monitoring weight suggestions being used to indicate the importance of different monitoring indicators during runtime, and the condition verification list including dynamic constraint conditions that need to be verified during the behavior verification phase.
[0248] In some embodiments, the behavior verification module 103 is further configured to: calculate a dynamic context anomaly score and condition verification completeness using an environment-aware agent based on an executable microinstruction list; activate a behavior audit agent when a triggering condition is met, and calculate a semantic matching confidence score based on a policy semantic vector using the behavior audit agent, wherein the triggering condition includes a dynamic context anomaly score greater than a first preset threshold, a confidence decision function and an auxiliary agent returning a conditionally permissive decision in the previous behavior verification, or the current operation being marked as a high-risk instruction in the executable microinstruction list.
[0249] In some embodiments, the behavior verification module 103 is further configured to: configure the monitoring weights of the data acquisition probe system based on the monitoring weight suggestions in the executable microinstruction list; the data acquisition probe system is configured to collect the current observation values of multiple monitoring indicators based on the monitoring weights; the environmental perception agent calculates the standardized deviation of the current observation values of multiple monitoring indicators relative to the historical normal baseline mean; the environmental perception agent performs a weighted summation of the absolute values of the standardized deviations of multiple monitoring indicators, and processes the weighted summation result through a preset exponential mapping function to obtain a dynamic context anomaly score.
[0250] In some embodiments, the behavior verification module 103 is further configured to: verify the dynamic constraints during data operation one by one according to the condition verification list in the executable microinstruction list; the environmental perception agent records the number of successfully verified dynamic constraints as the number of verified and passed conditions, and calculates the condition verification completeness based on the ratio of the number of verified and passed conditions to the total number of constraints that need to be dynamically verified in the condition verification list.
[0251] In some embodiments, the behavior verification module 103 is further configured to: obtain the original operation data of the data user during the data usage process; extract runtime context information and previous K-step operation history information from the original operation data, construct an enhanced behavior description, and use an embedding model to convert the enhanced behavior description into a behavior semantic vector; calculate the cosine similarity between the policy semantic vector and the behavior semantic vector to obtain the original semantic similarity; verify the original operation data based on the logical assertions in the executable microinstruction list, and if the verification fails, calculate the penalty factor based on the severity level of the violation of the logical assertion; and calculate the semantic matching confidence based on the original semantic similarity and the penalty factor.
[0252] In some embodiments, the behavior verification module 103 is further configured to: extract runtime context information corresponding to the current moment and the previous K-step operation history information from the original operation data; the runtime context information includes the actual operation behavior, the actual environment configuration, and the actual constraint compliance; the behavior audit agent converts the runtime context information into a second natural language description based on a predefined description text template; and the behavior audit agent concatenates the second natural language description and the previous K-step operation history information to construct an enhanced behavior description.
[0253] In some embodiments, the confidence decision function and the auxiliary agent calculate the comprehensive confidence score using the following weighted fusion confidence decision function formula: Comprehensive confidence score = static compliance confidence score × [w1 × (1 - dynamic context anomaly score) + w2 × semantic matching confidence score + w3 × condition verification completeness]; where w1 is the environmental dimension weight, w2 is the semantic dimension weight, w3 is the condition dimension weight, and w1 + w2 + w3 = 1.
[0254] In some embodiments, the verification result feedback module 105 is further configured to: adjust the semantic dimension weight w2 based on the decay factor when the dynamic context anomaly score is less than or equal to a first preset threshold, and adjust the environment dimension weight w1 and the condition dimension weight w3 based on a preset allocation ratio.
[0255] In some embodiments, the verification result feedback module 105 is further configured to: compare the comprehensive confidence score with the second preset high threshold and the second preset low threshold using the confidence decision function and the auxiliary agent; if the comprehensive confidence score is greater than or equal to the second preset high threshold and the conditional verification completeness is 1, then make an allow decision; if the comprehensive confidence score is less than the second preset low threshold, then make a rejection decision; if the comprehensive confidence score is between the second preset high threshold and the second preset low threshold, then make a conditional allow decision.
[0256] In some embodiments, the verification result feedback module 105 is further configured to: execute unverified constraints or preset remedial measures through the environment-aware agent when the confidence decision function and the auxiliary agent make a conditionally permissible decision; after all unverified constraints have been verified or remedial measures have been executed, obtain updated runtime context information, and recalculate at least one of the condition verification completeness, dynamic context anomaly score, and semantic matching confidence through the environment-aware agent and the behavior audit agent; and recalculate the comprehensive confidence score by fusing the static compliance confidence and the recalculated condition verification completeness, dynamic context anomaly score, and semantic matching confidence through the confidence decision function and the auxiliary agent, so as to conduct a new round of behavior verification.
[0257] In some embodiments, the verification result feedback module 105 is further configured to: record the decision results of historical behavior verification, static compliance confidence, dynamic context anomaly score, semantic matching confidence, condition verification completeness, and audit feedback label through the behavior auditing agent to obtain evidence storage records; wherein, the audit feedback label corresponding to compliant behavior is a first value, and the audit feedback label corresponding to non-compliant behavior is a second value; and adjust the second preset high threshold and the second preset low threshold by using the confidence decision function and the auxiliary agent based on the evidence storage records and by using an optimization algorithm to adjust the environmental dimension weight w1, semantic dimension weight w2, condition dimension weight w3, and / or the second preset high threshold and the second preset low threshold.
[0258] In some embodiments, the verification result feedback module 105 is further configured to: obtain multiple historical behavior verification records from the evidence storage records, each historical behavior verification record including a comprehensive confidence score and an audit feedback label for the corresponding behavior; use the weighted fusion confidence decision function formula as an unbiased linear regression model, and calculate the model loss based on the comprehensive confidence score and the audit feedback label; calculate the gradient corresponding to each weight w1, w2, and w3 based on the model loss; update the environment dimension weights, semantic dimension weights, and condition dimension weights according to the learning rate and the gradients corresponding to each weight w1, w2, and w3; and normalize the updated environment dimension weights, semantic dimension weights, and condition dimension weights, and use the normalized weights as new dimension weights.
[0259] In some embodiments, the verification result feedback module 105 is further configured to: obtain multiple historical behavior verification records from the evidence storage records, each historical behavior verification record including a comprehensive confidence score and an audit feedback label for the corresponding behavior; sort the comprehensive confidence scores of the multiple historical behavior verification records from high to low, and use each comprehensive confidence score as a threshold candidate value; traverse multiple threshold candidate values in descending order, and calculate the decision accuracy corresponding to each threshold candidate value as a second preset high threshold based on the number of allowed compliant records and the total number of allowed records; select the smallest value among all threshold candidate values that meet the preset accuracy target as the new second preset high threshold; wherein, the number of allowed compliant records refers to a comprehensive confidence score greater than or equal to... In the historical behavior verification records of the second preset high threshold, the total number of records with the audit feedback label of the first value is included; the total allowed number of records refers to the total number of historical behavior verification records with a comprehensive confidence score greater than or equal to the second preset high threshold; the confidence decision function and the auxiliary agent traverse multiple threshold candidate values in ascending order, and calculate the violation behavior recall rate when each threshold candidate value is used as the second preset low threshold based on the number of rejected violation records and the total number of violation records; under the premise of satisfying the preset false positive rate, the threshold candidate value that maximizes the violation behavior recall rate is selected as the new second preset low threshold; where the number of rejected violation records refers to the total number of historical behavior verification records with the audit feedback label of the second value in the comprehensive confidence score less than the second preset low threshold; the total number of violation records refers to the total number of historical behavior verification records with the audit feedback label of the second value.
[0260] This application also provides an electronic device, which includes a processor and a memory coupled together. The memory stores program instructions, and when the program instructions are executed by the processor, the electronic device performs the various functions or steps as described in the above method embodiments.
[0261] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
[0262] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
[0263] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0264] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0265] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A behavior verification method for multi-agent collaborative assistance, characterized in that, Applied to a data user connector, the method includes: Obtain digital contracts signed between data providers and data users; The digital contract is parsed by a policy parsing agent to generate a static compliance confidence score, a policy semantic vector, and a list of executable micro-instructions. This includes: parsing static constraint rules and dynamic verification information from the digital contract; performing reachability checks on the static constraint rules to generate a static compliance confidence score; converting the dynamic verification information into a first natural language description based on a predefined descriptive text template, and then using an embedding model to convert the first natural language description into the policy semantic vector; and decomposing the first natural language description into the list of executable micro-instructions, which includes monitoring weight suggestions and a condition verification list. The monitoring weight suggestions indicate the importance of different monitoring metrics during runtime, and the condition verification list includes dynamic constraints that need to be verified during the behavior verification phase. Based on the policy semantic vector and the list of executable microinstructions, an environment-aware agent and a behavior auditing agent collaboratively verify the running context of the data user, outputting a dynamic context anomaly score, semantic matching confidence, and condition verification completeness. The dynamic context anomaly score refers to the degree to which multiple runtime monitoring indicators corresponding to the data usage behavior deviate from their historical normal baseline. The semantic matching confidence refers to the degree of consistency between the semantics of the current operation behavior and the semantics of the contract policy. The condition verification completeness refers to the proportion of conditions that have successfully passed verification among all constraints declared in the digital contract that require dynamic verification. The environment-aware agent is used to monitor and quantitatively evaluate the running environment and behavior of the data user in real time, and the behavior auditing agent is used to perform deep semantic analysis on the behavioral intent of the data user. By integrating the static compliance confidence, dynamic context anomaly score, semantic matching confidence, and condition verification completeness through the confidence decision function and the auxiliary intelligent agent, a comprehensive confidence score is calculated. The confidence decision function and the auxiliary agent output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and a preset threshold. The confidence decision function and the auxiliary agent assist the policy control engine in making an allow decision, a conditional allow decision, or a denial decision based on the relationship between the comprehensive confidence score and the preset threshold. The preset threshold includes a second preset high threshold and a second preset low threshold, where the second preset high threshold is greater than the second preset low threshold. If the comprehensive confidence score is greater than or equal to the second preset high threshold and the conditional completeness is 1, an allow decision is made. If the comprehensive confidence score is less than the second preset low threshold, a denial decision is made. If the comprehensive confidence score is greater than or equal to the second preset low threshold and less than the second preset high threshold, a conditional allow decision is made.
2. The method according to claim 1, characterized in that, Based on the policy semantic vector and the list of executable micro-instructions, the runtime context of the data user is collaboratively verified by an environment-aware agent and a behavior-auditing agent, outputting a dynamic context anomaly score, semantic matching confidence, and condition verification completeness, including: Based on the list of executable micro-instructions, the dynamic context anomaly score and condition verification completeness are calculated by the environment-aware agent. When the triggering condition is met, the behavior auditing agent is activated, and the behavior auditing agent calculates the semantic matching confidence based on the policy semantic vector. The triggering condition includes the dynamic context anomaly score being greater than a first preset threshold, the confidence decision function and the auxiliary agent returning a conditionally allowed decision in the previous behavior verification, or the current operation being marked as a high-risk instruction in the list of executable micro-instructions.
3. The method according to claim 2, characterized in that, The calculation of dynamic context anomaly scores through the environment-aware agent includes: The environmental perception agent configures the monitoring weights of the data acquisition probe system based on the monitoring weight suggestions in the executable microinstruction list. The data acquisition probe system is used to collect the current observation values of multiple monitoring indicators based on the monitoring weights. The environmental sensing agent calculates the standardized deviation of the current observation value of multiple monitoring indicators relative to the historical normal baseline mean. The environmental perception agent performs a weighted summation of the absolute values of the standardized deviations of multiple monitoring indicators, and processes the result of the weighted summation through a preset exponential mapping function to obtain the dynamic context anomaly score. The exponential mapping function is a monotonically increasing function that maps the result of the weighted summation, S, to the interval [0,1). The exponential mapping function is: C_anomaly=1-exp(-S)=1-exp(-Σ(w_i×|Z_i|)); where C_anomaly is the dynamic context anomaly score, S is the result of the weighted summation, w_i is the weight of the i-th monitoring indicator, and Z_i is the standardized deviation of the current observation value of the i-th monitoring indicator relative to the historical normal baseline mean.
4. The method according to claim 2, characterized in that, The completeness verification through the environmentally perceptive agent includes: The environmental sensing agent verifies the dynamic constraints of the data runtime one by one according to the condition verification list in the executable micro-instruction list. The environmental perception agent records the number of successfully verified dynamic constraints as the number of verified and passed conditions, and calculates the condition verification completeness based on the ratio of the number of verified and passed conditions to the total number of constraints that need to be dynamically verified in the condition verification list.
5. The method according to claim 2, characterized in that, The step of calculating the semantic matching confidence score based on the policy semantic vector by the behavior auditing agent includes: The behavior auditing agent acquires the original operation data of the data user during the data usage process; The behavior auditing agent extracts runtime context information and previous K-step operation history information from the original operation data, constructs an enhanced behavior description, and uses an embedding model to transform the enhanced behavior description into a behavior semantic vector. The enhanced behavior description is natural language text formed by concatenating the runtime context information and the previous K-step operation history information. The behavior auditing agent calculates the cosine similarity between the policy semantic vector and the behavior semantic vector to obtain the original semantic similarity. The behavior auditing agent verifies the original operation data based on the logical assertions in the executable microinstruction list. The logical assertions are Boolean judgment rules extracted from the digital contract for precise logical verification. If the verification fails, a penalty factor is calculated based on the severity level of the violation of the logical assertion. The behavior auditing agent calculates the semantic matching confidence level based on the original semantic similarity and the penalty factor.
6. The method according to claim 5, characterized in that, The enhanced behavior description is constructed by extracting runtime context information and previous K-step operation history information from the original operation data through the behavior auditing agent, including: The behavior auditing agent extracts the runtime context information corresponding to the current moment and the previous K-step operation history information from the original operation data. The runtime context information includes the actual operation behavior, the actual environment configuration, and the actual constraint compliance. The behavior auditing agent converts the runtime context information into a second natural language description based on a predefined descriptive text template. The behavior auditing agent concatenates the second natural language description and the previous K-step operation history information to construct an enhanced behavior description.
7. The method according to claim 1, characterized in that, The confidence decision function and the auxiliary agent calculate the comprehensive confidence score using the following weighted fusion confidence decision function formula: Overall confidence score = static compliance confidence score × [w1 × (1 - dynamic context anomaly score) + w2 × semantic matching confidence score + w3 × condition verification completeness]; Where w1 is the environmental dimension weight, w2 is the semantic dimension weight, w3 is the conditional dimension weight, and w1+w2+w3=1.
8. The method according to claim 7, characterized in that, Also includes: When the dynamic context anomaly score is less than or equal to a first preset threshold, the confidence decision function and the auxiliary agent adjust the semantic dimension weight w2 based on the decay factor, and adjust the environment dimension weight w1 and the condition dimension weight w3 based on the preset allocation ratio.
9. The method according to claim 1, characterized in that, Also includes: When the confidence decision function and the auxiliary agent make the conditionally permissible decision, the environmental perception agent executes unverified constraints or preset remedial measures. After all unverified constraints have been verified or the remedial measures have been implemented, the updated runtime context information is obtained, and at least one of the following is recalculated through the environment-aware agent and the behavior audit agent: the condition verification completeness, the dynamic context anomaly score, and the semantic matching confidence. By fusing the static compliance confidence score with the confidence decision function and the auxiliary agent, and recalculating the condition verification completeness, the dynamic context anomaly score, and the semantic matching confidence score, a new round of behavior verification is performed.
10. The method according to claim 7, characterized in that, Also includes: The behavior auditing agent records the decision results of historical behavior verification, the static compliance confidence level, the dynamic context anomaly score, the semantic matching confidence level, the condition verification completeness, and the audit feedback label to obtain evidence records; wherein, the audit feedback label corresponding to compliant behavior is a first value, and the audit feedback label corresponding to non-compliant behavior is a second value. Based on the evidence records, the confidence decision function and the auxiliary agent use an optimization algorithm to adjust the environmental dimension weight w1, the semantic dimension weight w2, the condition dimension weight w3, and / or adjust the second preset high threshold and the second preset low threshold.
11. The method according to claim 10, characterized in that, The step of adjusting the environmental dimension weight w1, the semantic dimension weight w2, and the conditional dimension weight w3 based on the stored evidence using the confidence decision function and the auxiliary agent and an optimization algorithm includes: The confidence decision function and the auxiliary agent obtain multiple historical behavior verification records from the evidence storage records. Each historical behavior verification record includes the comprehensive confidence score and the audit feedback label of the corresponding behavior. The confidence decision function and the auxiliary agent use the weighted fusion confidence decision function formula as an unbiased linear regression model, and calculate the model loss based on the comprehensive confidence score and the audit feedback label; The confidence decision function and the auxiliary agent calculate the gradient corresponding to each weight w1, w2, and w3 based on the model loss. The confidence decision function and the auxiliary agent update the environment dimension weights, the semantic dimension weights, and the condition dimension weights according to the learning rate and the gradients corresponding to each weight w1, w2, and w3. The confidence decision function and the auxiliary agent normalize the updated environmental dimension weights, semantic dimension weights, and conditional dimension weights, and use the normalized weights as the new dimension weights.
12. The method according to claim 10, characterized in that, The step of adjusting the second preset high threshold and the second preset low threshold based on the stored evidence using the confidence decision function and the auxiliary agent and an optimization algorithm includes: The confidence decision function and the auxiliary agent obtain multiple historical behavior verification records from the evidence storage records. Each historical behavior verification record includes the comprehensive confidence score and the audit feedback label of the corresponding behavior. The confidence decision function and the auxiliary agent sort the comprehensive confidence scores of multiple historical behavior verification records from high to low, and use each comprehensive confidence score as a threshold candidate value. The confidence decision function and the auxiliary agent traverse multiple threshold candidate values in descending order. Based on the allowed number of compliant records and the allowed total number of records, they calculate the decision accuracy corresponding to each threshold candidate value as the second preset high threshold. The smallest value among all the threshold candidate values that satisfy the preset accuracy target is selected as the new second preset high threshold. The allowed number of compliant records refers to the total number of historical behavior verification records with an audit feedback label of the first value whose overall confidence score is greater than or equal to the second preset high threshold. The allowed total number of records refers to the total number of historical behavior verification records with an overall confidence score greater than or equal to the second preset high threshold. The confidence decision function and the auxiliary agent traverse multiple threshold candidate values in ascending order. Based on the number of rejected violation records and the total number of violation records, they calculate the violation recall rate when each threshold candidate value is used as the second preset low threshold. Under the premise of satisfying the preset false positive rate, the threshold candidate value that maximizes the violation recall rate is selected as the new second preset low threshold. The number of rejected violation records refers to the total number of historical behavior verification records with the audit feedback label set to the second value among those with a comprehensive confidence score less than the second preset low threshold. The total number of violation records refers to the total number of historical behavior verification records with the audit feedback label set to the second value.
13. A behavior verification device with multi-agent collaborative assistance, characterized in that, The device, applied to a data user connector, includes: The digital contract acquisition module is used to acquire digital contracts signed between data providers and data users. The contract strategy parsing module is used to parse the digital contract through a strategy parsing agent, generating a static compliance confidence score, a strategy semantic vector, and an executable micro-instruction list. This includes: parsing static constraint rules and dynamic verification information from the digital contract; performing reachability checks on the static constraint rules to generate a static compliance confidence score; converting the dynamic verification information into a first natural language description based on a predefined description text template, and using an embedding model to convert the first natural language description into the strategy semantic vector; and decomposing the first natural language description into the executable micro-instruction list, which includes monitoring weight suggestions and a condition verification list. The monitoring weight suggestions indicate the importance of different monitoring metrics during runtime, and the condition verification list includes dynamic constraint conditions that need to be verified during the behavior verification phase. The behavior verification module is used to perform collaborative verification of the data user's runtime context based on the policy semantic vector and the executable microinstruction list, through an environment-aware intelligent agent and a behavior auditing intelligent agent. It outputs a dynamic context anomaly score, semantic matching confidence, and condition verification completeness. The dynamic context anomaly score refers to the degree to which multiple runtime monitoring indicators corresponding to the data usage behavior deviate from their historical normal baseline. The semantic matching confidence refers to the degree of consistency between the current operation behavior semantics and the contract policy semantics. The condition verification completeness refers to the proportion of all constraints declared in the digital contract that require dynamic verification and have successfully passed verification. The environment-aware intelligent agent is used to monitor and quantitatively evaluate the data user's runtime environment and behavior in real time, while the behavior auditing intelligent agent is used to perform deep semantic analysis of the data user's behavioral intent. The fusion computing module is used to calculate a comprehensive confidence score by fusing the static compliance confidence, the dynamic context anomaly score, the semantic matching confidence, and the condition verification completeness through a confidence decision function and an auxiliary intelligent agent. The verification result feedback module is used to output a decision corresponding to the current data usage behavior based on the relationship between the comprehensive confidence score and a preset threshold, using the confidence decision function and the auxiliary agent. The confidence decision function and the auxiliary agent assist the policy control engine in making an allow decision, a conditional allow decision, or a denial decision based on the relationship between the comprehensive confidence score and the preset threshold. The preset threshold includes a second preset high threshold and a second preset low threshold, where the second preset high threshold is greater than the second preset low threshold. If the comprehensive confidence score is greater than or equal to the second preset high threshold and the conditional verification completeness is 1, an allow decision is made. If the comprehensive confidence score is less than the second preset low threshold, a denial decision is made. If the comprehensive confidence score is greater than or equal to the second preset low threshold and less than the second preset high threshold, a conditional allow decision is made.
14. An electronic device, characterized in that, include: A processor and a memory, the memory storing program instructions that, when executed by the processor, cause the electronic device to perform the behavior verification method for multi-agent cooperative assistance as described in any one of claims 1-12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on an electronic device, cause the electronic device to perform the behavior verification method for multi-agent cooperative assistance as described in any one of claims 1-12.
Citation Information
Patent Citations
Storage information verification system based on consensus mechanism
CN120602228A
Multi-agent cooperative protocol analysis and behavior verification method for ownership intelligence
CN122137895A
Method and system for optimizing data circulation in combination with AI (Artificial Intelligence) and trusted data space
CN122310548A