Blockchain-based method and device for storing and auditing behavior of intelligent agent
By creating agent identities and generating credential fingerprints for decision-making credentials on the blockchain, the problems of easily tampered and difficult-to-audit agent behavior data are solved, thereby improving security, completeness, and traceability.
Patent Information
- Application Number
- CN202611416106.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-24
Smart Images

Figure CN123158698A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to blockchain technology and artificial intelligence technology, and in particular to a blockchain-based method, auditing method, and apparatus for storing evidence of intelligent agent behavior. Background Technology
[0002] Intelligent agents typically refer to artificial intelligence entities that make autonomous decisions based on artificial intelligence models or algorithms to achieve specific goals. With the rapid development of artificial intelligence technology, intelligent agents have been widely applied in scenarios such as financial transactions, data access, and automated decision-making.
[0003] During operation, intelligent agents generate corresponding behavioral data, such as operational data and output data. The process of recording intelligent agent behavioral data is called intelligent agent behavior notarization, which is the foundation for intelligent agent behavior auditing, security traceability, and liability determination.
[0004] In related technologies, agent behavior is recorded and documented through logs or centralized databases. However, logs or centralized databases are easily tampered with, resulting in insufficient security and reliability of agent behavior data. Furthermore, different operation records in logs or centralized databases are independent of each other, significantly increasing the difficulty of subsequent agent auditing, security tracing, and liability determination. Summary of the Invention
[0005] This disclosure provides a blockchain-based method, auditing method, and apparatus for storing evidence of intelligent agent behavior.
[0006] According to the first aspect of this disclosure, a blockchain-based method for storing evidence of intelligent agent behavior is provided, comprising: Create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain; The preset operation executed by the target intelligent agent is detected, and the decision context of the preset operation is obtained; The decision credential for the preset operation is generated based on the credential identifier, the decision context, and the credential fingerprint of the preceding decision credential. Generate the credential fingerprint of the decision credential; Verify whether the blockchain contains the credential fingerprint of the preceding decision credential included in the decision credential; If so, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
[0007] According to a second aspect of this disclosure, a blockchain-based intelligent agent behavior auditing method is provided, comprising: In response to a behavior audit request for the target intelligent agent, obtain the identity identifier of the target intelligent agent; Based on the identity identifier, read the credential fingerprint associated with the identity identifier stored in the blockchain; Obtain the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes a credential identifier, a decision context, and the credential fingerprint of the preceding decision credential; Audit verification is performed based on the decision voucher and the voucher fingerprint of the decision voucher, and audit results are generated.
[0008] According to a third aspect of this disclosure, a blockchain-based intelligent agent behavior evidence storage device is provided, comprising: The identity creation module is used to create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain. The context acquisition module is used to monitor the preset operation performed by the target agent and acquire the decision context of the preset operation; The voucher generation module is used to generate the decision voucher for the preset operation based on the voucher identifier, the decision context, and the voucher fingerprint of the preceding decision voucher. The fingerprint generation module is used to generate the credential fingerprint of the decision credential; The on-chain module is used to verify whether the blockchain contains the credential fingerprint of the preceding decision credential included in the decision credential; if so, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
[0009] According to the fourth aspect of this disclosure, a blockchain-based intelligent agent behavior auditing device is provided, comprising: The identity acquisition module is used to acquire the identity identifier of the target intelligent agent in response to a behavior audit request for the target intelligent agent; The fingerprint reading module is used to read the credential fingerprint associated with the identity identifier from the blockchain based on the identity identifier; The credential acquisition module is used to acquire the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes a credential identifier, a decision context, and the credential fingerprint of the preceding decision credential; The audit module is used to perform audit verification based on the decision voucher and the voucher fingerprint of the decision voucher, and generate audit results.
[0010] According to the fifth aspect of this disclosure, a blockchain-based intelligent agent behavior auditing system is provided, comprising: The aforementioned blockchain-based intelligent agent behavior evidence storage device, the aforementioned blockchain-based intelligent agent behavior auditing device, and blockchain.
[0011] According to a sixth aspect of this disclosure, an electronic device is provided, comprising: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the aforementioned blockchain-based intelligent agent behavior evidence storage method and / or the aforementioned blockchain-based intelligent agent behavior auditing method.
[0012] According to the seventh aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-described blockchain-based intelligent agent behavior evidence storage method, and / or implements the above-described blockchain-based intelligent agent behavior auditing method.
[0013] According to the eighth aspect of this disclosure, a computer program product is provided, including computer program instructions that, when executed by a processor, implement the aforementioned blockchain-based intelligent agent behavior evidence storage method, and / or implement the aforementioned blockchain-based intelligent agent behavior auditing method.
[0014] Based on the embodiments of this disclosure, the credential fingerprint of the decision credential for the preset operation of the target intelligent agent is associated with the identity identifier and stored in the blockchain, ensuring the security and immutability of the target intelligent agent's behavioral data. Moreover, the decision credential is generated based on the decision context, providing complete intelligent agent behavioral data for subsequent auditing, ensuring the completeness of audit data and the traceability of intelligent agent behavior. Furthermore, the decision credential also embeds the credential fingerprint of the preceding decision credential, which can be used to link the behavior of the target intelligent agent in the same session into a complete trajectory chain, improving the completeness of intelligent agent behavioral data and reducing the difficulty of auditing and tracing. In addition, storing the credential fingerprint in the blockchain can reduce the blockchain storage overhead and the cost of evidence preservation.
[0015] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0017] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein: Figure 1 A schematic flowchart of a blockchain-based method for storing evidence of intelligent agent behavior is shown in an embodiment of this disclosure. Figure 2 A flowchart illustrating a blockchain-based intelligent agent behavior anomaly detection method provided in an embodiment of this disclosure is shown. Figure 3 A flowchart illustrating a blockchain-based intelligent agent behavior anomaly handling method provided in an embodiment of this disclosure is shown. Figure 4A flowchart illustrating a blockchain-based intelligent agent behavior auditing method provided in an embodiment of this disclosure is shown. Figure 5 A schematic diagram of the structure of a blockchain-based intelligent agent behavior evidence storage device provided in an embodiment of this disclosure is shown. Figure 6 A schematic diagram of the structure of a blockchain-based intelligent agent behavior auditing device provided in an embodiment of this disclosure is shown. Figure 7 A schematic diagram of the structure of a blockchain-based intelligent agent behavior auditing system provided in an embodiment of this disclosure is shown. Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0018] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0019] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.
[0020] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.
[0021] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.
[0022] Furthermore, the term "and / or" in this disclosure 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 existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.
[0023] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.
[0024] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0025] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0026] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0027] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0028] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.
[0029] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0030] Figure 1 The illustration shows a flowchart of a blockchain-based method for storing evidence of intelligent agent behavior provided in an embodiment of this disclosure.
[0031] like Figure 1 As shown, the method specifically includes the following steps: Step S101: Create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain.
[0032] The target intelligent agent is the intelligent agent whose behavior is to be recorded. This disclosure does not limit the deployment scenarios (e.g., including but not limited to: financial transaction systems, enterprise internal data platforms, medical information platforms, government approval systems, operation and maintenance platforms, and cross-institutional collaboration platforms), presentation forms (e.g., including but not limited to: user-facing interactive applications, backend services, and embedded intelligent systems mounted on robots or IoT devices), or functions (e.g., including but not limited to: automated transaction execution, data query and analysis, file reading and writing and management, interface calls, dialogue interaction, task planning, and resource scheduling).
[0033] Create an identity identifier for the target intelligent agent. This identity identifier is globally unique, thereby assigning a globally unique digital identity to the target intelligent agent. All data related to the target intelligent agent will be associated with this identity identifier.
[0034] In one optional implementation, the identity identifier is specifically a decentralized identifier (DID). This DID is not only globally unique, but it can also be generated by the operating environment of the agent, thus achieving decentralization without relying on any centralized authority for issuance and authorization. Furthermore, the DID is generated based on a public-private key algorithm, allowing control permissions to be verified using the private key.
[0035] Furthermore, the identity of the target intelligent agent is registered to the blockchain. Specifically, the identity and the associated information of the target intelligent agent (such as the corresponding public key, service access address, etc.) are written into the global state of the blockchain as an immutable record, thereby realizing the registration of the identity on the blockchain.
[0036] Step S102: Detect the preset operation performed by the target agent and obtain the decision context of the preset operation.
[0037] Preset operations are critical operations that need to be verified. Specifically, a configurable operation rule base is pre-generated, which contains at least one operation identification rule for a preset operation. If an executed operation satisfies any operation identification rule in the operation rule base, the executed operation is regarded as a preset operation.
[0038] In one optional implementation, the operation rule base includes, but is not limited to: preset operation types, preset risk levels, compliance requirements, preset fields, and preset scope of operation objects. For example, preset operation types may include, but are not limited to: data read / write, fund transactions, permission changes, API calls, and / or decision outputs. If the executed operation belongs to a preset operation type, then the executed operation will be considered a preset operation. Similarly, preset risk levels may include, but are not limited to: high risk, medium risk, etc. If the risk level corresponding to the executed operation belongs to a preset risk level, then the executed operation will be considered a preset operation. Furthermore, compliance requirements may include, but are not limited to: financial industry audit compliance requirements, medical industry privacy protection compliance requirements, government system security compliance requirements, and / or cross-border data transmission compliance requirements. If the executed operation meets such a compliance requirement, then the executed operation will be considered a preset operation. Preset fields may include, but are not limited to: preset sensitive identifier fields, and / or tags requiring audit tracking. If the executed operation contains preset fields, then the executed operation will be considered a preset operation. Finally, preset scope operation objects may include, but are not limited to: preset database tables, preset fund accounts, preset user roles, and / or preset business systems. If the operation object targeted by the executed operation is consistent with the operation object within the preset scope, then the executed operation will be considered a preset operation.
[0039] If the target agent is detected to be performing a preset operation, the decision context of that preset operation is obtained. This decision context is a set of information generated around the preset operation by the target agent, reflecting the complete background of the operation.
[0040] In one alternative implementation, the decision context may include, but is not limited to, at least one of the following: basic operational information, input information, model identity information, inference process information, output information, and confidence level.
[0041] Basic operation information may include, but is not limited to: operation execution time, operation type (such as data reading, API call, transaction initiation, etc.), operation object information (such as the name or identifier of the object targeted by the operation), and the session information to which the operation belongs (such as the session identifier to which the operation belongs). Basic operation information can be used to determine the time of the operation and the relevant business process.
[0042] The input information specifically refers to information related to the input data of the target intelligent agent corresponding to the preset operation. This input information may include an input snapshot and / or an input fingerprint. For example, for input data with high data security requirements (such as personal privacy data, trade secret data, etc.), the hash value or other input fingerprint of the input data can be obtained; for input data with low data security requirements, the input data can be obtained directly. It should be understood that all user-related information involved in the embodiments of this disclosure is obtained with the user's authorization, and the user is provided with corresponding options to choose whether to agree to or disagree with authorization.
[0043] Model identity information refers to the information of the machine learning model used by the target agent to perform the preset operation, such as model name and model version number.
[0044] The reasoning process information refers to the information related to the intermediate reasoning performed by the target agent during the processing of the preset operation. For example, the reasoning process information may include a reasoning summary of at least one intermediate reasoning step, as well as reasoning integrity verification information. Optionally, if the target agent supports thought chain output, the reasoning summary of the intermediate reasoning steps (such as a brief information with a length not exceeding 256 characters) is obtained; if the target agent does not support thought chain output, it is not necessary to obtain the reasoning summary; the reasoning integrity verification information may be the hash value of the sequence composed of each intermediate reasoning step. For example, each intermediate reasoning step is generated into a corresponding sequence according to the reasoning order, and the hash value obtained by performing a hash operation (such as SHA-256 hash operation) on the sequence is used as the reasoning integrity verification information.
[0045] The output information includes the result information output by the target intelligent agent after performing the preset operation. For example, the output information can be the output fingerprint (such as the hash value of the output result), thereby saving storage and subsequent computing resources and further ensuring data security.
[0046] The confidence score is specifically the confidence score of the target agent in performing the preset operation. This confidence score can reflect the target agent's own degree of trust in the output result.
[0047] In one alternative implementation, the decision context can be obtained through a constructed interceptor. Specifically, this step is performed after a preset operation is detected and before the target agent returns the output result to the user, thereby facilitating timely interception of abnormal operations.
[0048] Step S103: Generate a decision credential for a preset operation based on the credential identifier, decision context, and credential fingerprint of the preceding decision credential.
[0049] Each preset operation has a corresponding decision credential, which is generated based on three types of information: credential identifier, decision context, and credential fingerprint of the preceding decision credential.
[0050] The voucher identifier is a unique number for the decision voucher, and there is a one-to-one correspondence between the decision voucher and the voucher identifier. For example, the voucher identifier may contain information about the time when the decision voucher was generated.
[0051] The decision context is obtained in step S102. A decision credential is generated based on the decision context, which can include specific information about the current preset operation. Optionally, the decision context can be structured data, such as JSON data.
[0052] The preceding decision credential refers to the previous decision credential generated by the target agent before executing the current preset operation within the same session. If the current preset operation is the first operation in the session, the preceding decision credential is empty; if the current preset operation is not the first operation in the session, the preceding decision credential is the previous decision credential. The credential fingerprint of the preceding decision credential is the fingerprint information of the previous decision credential. The generation process of the credential fingerprint of the preceding decision credential can be referred to the description in subsequent step S104, and will not be repeated here.
[0053] Therefore, the decision credentials for this preset operation can not only fully reflect the key information of the target intelligent agent in processing this preset operation through the decision context, but also establish a connection with the previous operation through the credential fingerprint of the previous decision credentials, which is convenient for forming a complete and verifiable behavioral trajectory chain.
[0054] Step S104: Generate the credential fingerprint of the decision credential for the preset operation.
[0055] After generating the decision credential for this preset operation, a credential fingerprint is further generated. The credential fingerprint is a unique identifier calculated based on the overall content of the decision credential. When any changes occur to the content of the decision credential, its credential fingerprint changes accordingly. Therefore, by comparing the credential fingerprint, it can be verified whether the decision credential has been tampered with since its generation.
[0056] In one optional implementation, the credential fingerprint is generated as follows: a hash value is obtained by performing a hash operation on the decision credential, and this hash value is used as the credential fingerprint. Specifically, the entire content of the decision credential is used as input, a preset hash function is called to perform the calculation, and a fixed-length hash value is output as the credential fingerprint of the decision credential. The hash function includes, but is not limited to, at least one of the following: SHA-256, SHA-384, SHA-512, etc.
[0057] In one optional implementation, the credential fingerprint can be generated as follows: Obtain the private key corresponding to the target agent; use the private key to digitally sign the decision credential to obtain the signed decision credential; perform a hash operation on the signed decision credential to obtain the credential fingerprint of the decision credential. Specifically, the target agent has a corresponding private key, which can be stored in a secure environment. This step retrieves the private key from the secure environment during execution and uses it to digitally sign the decision credential to further ensure the authenticity of the credential's source and the integrity of its content.
[0058] Step S105: Associate the credential fingerprint of the decision credential with the identity identifier and store it in the blockchain.
[0059] The decision credential's fingerprint is associated with the identity identifier, and the fingerprint is stored on the blockchain. Specifically, a pre-deployed notarization contract on the blockchain can be invoked to construct a blockchain transaction between the fingerprint of the decision credential for this preset operation and the identity identifier of the target agent. This associates the fingerprint of the decision credential with the identity identifier and stores it on the blockchain, achieving on-chain notarization of this preset operation. Optionally, this step can be executed by a notarization smart contract deployed on the blockchain.
[0060] In one optional implementation, before storing the credential fingerprint of the decision credential associated with the identity identifier in the blockchain, a pre-ingestion verification is performed. Only if the verification passes is the credential fingerprint of the decision credential associated with the identity identifier stored in the blockchain. In this embodiment, "ingestion" specifically refers to storing data in the blockchain. The pre-ingestion verification may include, but is not limited to, at least one of the following verification methods: Verification Method 1: Obtain the public key corresponding to the target intelligent agent, and use the public key to verify the signature of the signed decision credential. If the signature verification is successful, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain. Specifically, the target intelligent agent has a corresponding public key and private key. In step S104, the private key is used to digitally sign the decision credential to obtain the signed decision credential. Before the credential fingerprint is entered into the blockchain, the public key corresponding to the target intelligent agent is used to verify the signature of the signed decision credential. If the signature verification is successful, it indicates that the current decision credential is accurate and has not been tampered with, so the pre-entry verification is successful, and the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain. If the signature verification fails, it indicates that the decision credential did not originate from the target intelligent agent or that the decision credential was tampered with during transmission after generation, so the pre-entry verification fails, and the credential fingerprint of this decision credential is rejected from being written into the blockchain. This verification method can ensure the authenticity of the source of the credential fingerprint written into the blockchain.
[0061] Verification Method Two: Verify whether the blockchain contains the credential fingerprint of the preceding decision credential included in the current decision credential. If so, associate the credential fingerprint of the decision credential with the identity identifier and store it in the blockchain. Specifically, compare the credential fingerprint already stored in the blockchain with the credential fingerprint of the preceding decision credential in the current decision credential. If a credential fingerprint matching the preceding decision credential exists in the blockchain, it indicates that the target intelligent agent's operation trajectory is normal, and the on-chain verification is successful. The credential fingerprint of the decision credential is then associated with the identity identifier and stored in the blockchain. If no credential fingerprint matching the preceding decision credential exists in the blockchain, it indicates that the target intelligent agent's operation trajectory is broken, and the on-chain verification fails. Therefore, the credential fingerprint of this decision credential is rejected from being written to the blockchain. Specifically, the notarization contract can generate an index table with the session identifier as the key. Each key in this index table records the notarized credential fingerprints under that session identifier. Therefore, during the on-chain verification process, searching this index table can quickly and accurately determine whether the credential fingerprint of the preceding decision credential exists in the blockchain. In other words, if the credential fingerprint of the preceding decision credential in the current decision credential is not empty, and the credential fingerprint of the preceding decision credential exists in the index table, then the credential fingerprint of the current decision credential is allowed to be added to the blockchain. This verification method ensures the integrity and authenticity of the target agent's behavioral trajectory stored in the blockchain.
[0062] Verification Method 3: If the signature verification of the signed decision credential using the public key is successful, and the credential fingerprint of the preceding decision credential contained in the decision credential exists in the blockchain, it indicates that the source of the decision credential is correct and the target agent's behavioral trajectory is complete. Therefore, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain. This verification method ensures both the authenticity of the credential fingerprint written to the blockchain and the integrity and authenticity of the target agent's behavioral trajectory stored in the blockchain.
[0063] In one optional implementation, the credential fingerprint of the decision credential is associated with and stored on the blockchain along with the index metadata of the current preset operation. This index metadata includes at least the identity identifier of the target agent. Furthermore, the index metadata may also include at least one of the following: session information, operation type, and timestamp range, etc.
[0064] Optionally, at least one index mapping table is generated. For any given index mapping table, the key can be an identity identifier, session information, operation type, or timestamp range, and the value can be any set of decision credential information (such as credential fingerprints or credential identifiers) belonging to the corresponding key. For example, the key of an index mapping table can be each identity identifier, and the value corresponding to each identity identifier in the index mapping table can be any set of credential fingerprints or credential identifiers belonging to that identity identifier. Thus, this index mapping table can quickly satisfy retrieval needs in at least one dimension, and can also quickly perform cross-dimensional retrieval. When the credential fingerprints and identity identifiers stored on the blockchain change, the index mapping table is updated synchronously to ensure the accuracy of the retrieval results.
[0065] In one optional implementation, the decision credential or signed decision credential is stored on a storage device outside the blockchain, specifically on a decentralized storage network such as the InterPlanetary File System (IPFS). The storage address (e.g., content addressing identifier) of the decision credential or signed decision credential is obtained, and the credential fingerprint, storage address, and index metadata of the decision credential are associated and stored on the blockchain. Using this method, the decision credential or signed decision credential can be accurately obtained through the storage address, thereby reducing the storage cost on the blockchain while ensuring the verifiability of the decision credential.
[0066] In one optional implementation, at least one of the following credential fingerprinting methods can be used for blockchain entry: Method 1 for adding data to the blockchain: Single credential fingerprint addition method, which means that each time a credential fingerprint is generated, the credential fingerprint is stored in the blockchain, thereby improving the efficiency of evidence storage.
[0067] Method 2: Batch on-chain storage of multiple credential fingerprints. This method stores multiple credential fingerprints generated within the same time window onto the blockchain in batches, thereby saving blockchain access overhead. Optionally, multiple credential fingerprints generated within the same time window can be mapped to a single combined fingerprint. This single combined fingerprint integrates the features of the multiple credential fingerprints and is then associated with an identity identifier and stored on the blockchain. For example, multiple credential fingerprints generated within the same time window can be used as leaf nodes. A Merkle tree (also known as a hash tree, a tree-like data structure widely used in cryptography and computer science) can then be constructed based on these leaf nodes. The root hash value of this Merkle tree can be used as the combined fingerprint, and this root hash value can then be stored on the blockchain, thereby reducing on-chain storage costs and increasing evidence storage throughput.
[0068] Therefore, the blockchain-based intelligent agent behavior evidence storage method provided in this disclosure stores the credential fingerprint of the decision credential of the target intelligent agent's preset operation along with its identity identifier in the blockchain, ensuring the security and immutability of the target intelligent agent's behavior data. Furthermore, the decision credential is generated based on the decision context, providing complete intelligent agent behavior data for subsequent auditing, ensuring the completeness of audit data and the traceability of intelligent agent behavior. Moreover, the decision credential also embeds the credential fingerprint of the preceding decision credential, which allows the target intelligent agent's behavior in the same session to be linked into a complete trajectory chain, improving the completeness of intelligent agent behavior data and reducing the difficulty of auditing and tracing. Finally, storing the credential fingerprint in the blockchain reduces blockchain storage overhead and evidence storage costs.
[0069] Figure 2 This illustration shows a flowchart of a blockchain-based intelligent agent behavior anomaly detection method provided in an embodiment of this disclosure. The intelligent agent behavior anomaly detection method provided in this embodiment is based on... Figure 1 The method for storing evidence of agent behavior in the embodiment is executed.
[0070] Specifically, such as Figure 2 As shown, the method includes the following steps: Step S201: Associate the credential fingerprint with the identity identifier and store it in the blockchain.
[0071] Step S202: Obtain the detection context for the target intelligent agent to perform a preset operation based on the identity identifier.
[0072] Whenever a credential fingerprint is detected being stored on the blockchain, step S202 is triggered. In practice, an anomaly detection contract and a notarization contract can be deployed on the blockchain. After the notarization contract stores the credential fingerprint on the blockchain, the anomaly detection contract detects the credential fingerprint being added to the chain and triggers the subsequent anomaly detection process.
[0073] During anomaly detection, the detection context of the target agent's pre-defined operation is first obtained based on its identity. The detection context is a set of multi-dimensional background information surrounding the current pre-defined operation, required to detect whether it is an anomalous operation. Optionally, the detection context may include at least one of the following: authorization scope information, historical behavior information, confidence level information, and security compliance information.
[0074] Authorization scope information describes the permission boundaries of a target intelligent agent, specifying which operations it is allowed to perform and which resources it is allowed to access. Authorization scope information may include, but is not limited to, at least one of the following: authorized operation type, authorized resource scope, authorized interface, authorized time limit, authorized frequency limit, authorized cost limit, and authorized session and / or environment restrictions, etc. Specifically, the authorized operation type is the set of operation types the target intelligent agent is allowed to perform; the authorized resource scope is the range of resources / objects the target intelligent agent is allowed to access; the authorized interface is the set of interfaces the target intelligent agent is allowed to access; the authorized time limit is the time window within which the target intelligent agent is allowed to perform operations; the authorized frequency limit is the maximum number of operations the target intelligent agent is allowed to perform per unit of time; the authorized cost limit is the range of costs the target intelligent agent is allowed to incur; and the authorized session and / or environment restrictions are the set of sessions or environmental restrictions the target intelligent agent is allowed to operate on. Optionally, the target intelligent agent's authorization scope information can be stored in the blockchain in association with its identity identifier, and an authorization detection contract can be deployed in the blockchain. This authorization detection contract can retrieve the latest authorization scope information of the target intelligent agent from the blockchain based on the identity identifier, or in combination with auxiliary information such as session identifiers.
[0075] Historical behavior information is a real-time aggregated statistical feature of the recorded behaviors of the target agent within a preset time window. Historical behavior information may include, but is not limited to, at least one of the following: operation frequency, number of consecutive failures, operation sequence pattern, confidence sequence, sensitive data access records, high-risk operation frequency, and previous operation sequence in the same session. Among them, operation frequency is the total number of times the target agent performs operations within a preset time window; operation type distribution is the number of times each type of operation is executed within the preset time window, such as 10 data reads, 4 API (Application Programming Interface) calls, and 1 fund transaction; consecutive failure count is the number of times the target agent fails to execute operations consecutively within the preset time window; operation timing pattern is the time distribution characteristics of the target agent's operations within the preset time window; confidence sequence is the confidence score sequence of each operation of the target agent within the preset time window, such as [92, 88, 95, 45, 52, 48]; sensitive data access record is the list of sensitive data sources accessed by the target agent within the preset time window; high-risk operation frequency is the number of times the target agent performs high-risk operations within the preset time window; and the preceding operation sequence in the same session is the record of preceding operations executed before the current operation in the same session. Optionally, a behavior detection contract can be deployed in the blockchain. This behavior detection contract extracts various types of evidence data associated with the identity from the blockchain, obtains the original evidence based on the storage address in the blockchain, and then uses the corresponding statistical algorithm to obtain the required historical behavior information.
[0076] Confidence information is a quantitative representation of the target agent's self-assessed confidence in the current decision. Confidence information may include, but is not limited to, at least one of the following: current confidence score, previous confidence score, and consecutive low confidence count. The current confidence score is the confidence score corresponding to the current preset operation; the previous confidence score is the confidence score corresponding to the previous preset operation in the same session; the consecutive low confidence count is the number of operations executed consecutively within a preset time window whose confidence scores are all lower than a preset confidence threshold. Optionally, based on the identity identifier, the credential fingerprint of the current decision credential and the credential fingerprint of the previous decision credential can be obtained. Based on the credential fingerprint, the corresponding credential text can be obtained from the decentralized storage network on the blockchain, and the confidence field can be extracted from the credential text to obtain the confidence information.
[0077] Security and compliance information refers to the status data of whether a target intelligent agent meets various compliance requirements when performing a preset operation. This security and compliance information may include, but is not limited to, at least one of the following: approval credential status, compliance credential validity status, and operation compliance flag. Specifically, the approval credential status indicates whether the current preset operation is associated with a valid approval credential number, and whether the approval credential number is stored in the on-chain approval contract and is valid; the compliance credential validity status indicates whether the target intelligent agent's verifiable credential (VC) is valid; and the operation compliance flag indicates whether the current preset operation carries the necessary fields or tags required for compliance.
[0078] Step S203: Determine whether the preset operation is an abnormal operation based on the detection context; if so, proceed to step S204.
[0079] Specifically, the information in each dimension of the detection context is matched with the anomaly detection rules in the preset anomaly detection set, and the anomaly of the preset operation is determined based on the matching results. For example, if the information in the detection context matches one or more anomaly detection rules, the preset operation is determined to be an anomalous operation; if the detection context does not match any of the anomaly detection rules, the predicted operation is determined to be a normal operation, and the anomaly detection process of this embodiment ends. Optionally, the addition, deletion, and modification of anomaly detection rules are governed by multi-signature of the regulatory node and the platform operator, and the modification record of each rule is stored on the blockchain for notarization, thereby ensuring the traceability of the evolution of anomaly detection rules.
[0080] Optionally, this step can be executed by an anomaly detection contract deployed on the blockchain to ensure timely detection of abnormal operations; alternatively, it can be jointly executed by an on-chain anomaly detection contract and an off-chain rule engine (such as one deployed in an off-chain trusted execution environment). For example, the anomaly detection contract can deploy lightweight anomaly detection rules (such as simple threshold comparison, boundary detection, frequency over-limit detection, etc.) to ensure timely detection of corresponding abnormal operations, while the rule engine can deploy complex and time-consuming anomaly detection rules (such as long-term behavioral deviation detection requiring long-term analysis and model analysis, deviation from historical baseline, correlation analysis between confidence fluctuations and task types, data leakage path reasoning, and approval process anomaly mining). (e.g., mining), the anomaly detection results of the off-chain rule engine are returned to the blockchain for storage; or, if the current blockchain does not support complex smart contracts (such as some consortium chains or lightweight public chains that do not support complex smart contracts), this step can be performed by the rule engine deployed in the off-chain trusted execution environment. That is, the blockchain only performs simple notarization and does not perform anomaly detection. Since the off-chain rule engine is deployed in a trusted execution environment, it can ensure the immutability and integrity of the anomaly detection results. The data processed by the rule engine is returned to the blockchain for notarization. This method can lower the deployment threshold of the blockchain platform and can be applied to scenarios where the requirements for real-time response are not high, but compatibility with existing infrastructure is required.
[0081] In one alternative implementation, the anomaly detection rules may include, but are not limited to, at least one of the following: unauthorized access detection, frequency anomaly detection, confidence anomaly detection, data security detection, and compliance failure detection.
[0082] Unauthorized access detection determines whether a preset operation exceeds the authorized boundaries of the target agent based on the authorization scope information in the detection context. For example, a preset operation is considered abnormal if at least one of the following conditions is met: the operation type of the preset operation does not belong to the authorized operation type set; the resource accessed by the operation does not belong to the authorized resource range; the interface called does not belong to the authorized interface set; the operation time does not meet the authorized time limit; and the operation frequency exceeds the authorized frequency limit.
[0083] Frequency anomaly detection is based on historical behavior information in the detection context to determine whether the total number of operations performed by the target agent within a preset time window exceeds a preset frequency threshold when the preset operation occurs; and / or, whether the number of consecutive failed operations performed by the target agent within the preset time window exceeds a preset failure threshold, etc. If either determination result is yes, the preset operation is determined to be an anomalous operation.
[0084] Anomaly detection of confidence involves performing at least one of the following determinations based on confidence information in the detection context: continuous low confidence determination, which involves obtaining the confidence scores of the target agent's most recent N operations (N being an integer greater than 1). If the confidence scores of the most recent N operations are all lower than a preset confidence threshold, the preset operation is determined to be an anomalous operation; sudden change in confidence determination, which involves obtaining the confidence score of the current preset operation and the confidence score of the previous preset operation, calculating the difference between the two, and if the difference exceeds a preset difference threshold, the preset operation is determined to be an anomalous operation.
[0085] Data security detection involves performing at least one of the following determinations based on historical behavior information and / or authorized scope information within the detection context: Multi-source data access determination, which involves acquiring information about the target resources accessed by the preset operation, combining this information with sensitive data access records from historical behavior information to determine the number of different data sources accessed by the target agent within a preset time window. If this number exceeds a preset threshold, the preset operation is determined to be an abnormal operation. Access pattern deviation determination, which involves acquiring the historical data access pattern baseline of the target agent, comparing the access pattern of the current preset operation with the historical baseline to obtain the deviation degree between the current preset operation's access pattern and the historical baseline. If the deviation degree exceeds a preset deviation threshold, the preset operation is determined to be an abnormal operation.
[0086] Compliance deficiency detection involves performing at least one of the following judgments based on the security and compliance information in the detection context: Approval credential deficiency judgment: If the current preset operation belongs to a preset sensitive operation type, check the approval credential status in the security and compliance information. If the preset operation is not associated with an approval credential number or the approval credential number is invalid after on-chain verification, the preset operation is determined to be an abnormal operation; Compliance validity period judgment: Obtain the validity period information of the target agent's verifiable compliance credential and obtain the operation timestamp of the current preset operation. If the operation timestamp exceeds the validity period of the compliance credential, the preset operation is determined to be an abnormal operation; Operation compliance tag deficiency judgment: Check whether the input parameters of the preset operation contain the necessary fields or tags required for compliance. If they are missing, the preset operation is determined to be an abnormal operation.
[0087] Anomaly detection rules typically include corresponding thresholds, such as preset difference thresholds and preset confidence thresholds. These thresholds can be fixed or dynamically adjusted based on historical data. For example, if a target agent operates more frequently during peak business periods, its frequency threshold can be automatically increased to reduce false alarms. Threshold adjustment records can be stored in a blockchain for easy traceability.
[0088] If any of the above rules are matched and the preset operation is determined to be an abnormal operation, then step S204 is executed; if none of the rules are matched, then the preset operation is determined to be a normal operation, and the current anomaly detection process ends.
[0089] Step S204: Identify the anomaly level of the preset operation and execute an anomaly response that matches the anomaly level.
[0090] If step S203 identifies the preset operation as an abnormal operation, this step further identifies the abnormality level of the preset operation. Different abnormality levels correspond to different degrees of severity. These abnormality levels may include, but are not limited to, warning level, severe level, and critical level.
[0091] In this embodiment, anomaly level determination rules can be pre-configured, and the anomaly level can be obtained by processing the detection context using the anomaly level determination rules. This disclosure does not limit the specific anomaly level determination rules.
[0092] Furthermore, the mapping relationship between pre-generated exception levels and exception responses is found, and the exception response that matches the current exception level is executed.
[0093] For example, if the anomaly level is warning (e.g., slightly exceeding the normal frequency range), the corresponding anomaly response is: send an on-chain alarm notification to the monitoring node, record the anomaly log, and temporarily refrain from intervening. Thus, only an alarm is issued, and no other pre-defined actions are taken.
[0094] If the anomaly level is severe (such as continuous low-confidence operations, unauthorized access, etc.), the corresponding anomaly response is: automatically reduce the target agent's operation permissions (e.g., downgrade operation permissions from read-write to read-only), suspend the execution permissions of high-risk operation types, and / or send a severe alarm notification to the monitoring node.
[0095] If the anomaly level is critical (data leakage, malicious operation, invalid compliance credentials, etc.), the corresponding anomaly response is: immediately terminate the current session of the target agent, revoke all authorization tokens of the target agent, directly reset the trust score of the target agent to zero, and / or send an emergency alarm notification to the regulatory node.
[0096] In this embodiment of the present disclosure, relevant data generated during the anomaly detection process, such as the detection result of whether a preset operation is an abnormal operation, the anomaly level of the preset operation, and the anomaly response data used, can all be integrated into anomaly detection records, and the anomaly detection records can be further stored in the blockchain.
[0097] Therefore, the blockchain-based intelligent agent behavior anomaly detection method provided in this disclosure realizes a real-time security monitoring mechanism that triggers anomaly detection upon evidence storage by binding anomaly detection with evidence storage process events, thereby reducing anomaly detection latency; moreover, it adopts an anomaly response that matches the preset anomaly level, thereby achieving a precise match between the handling intensity and the anomaly level.
[0098] Figure 3This illustration shows a flowchart of a blockchain-based intelligent agent behavior anomaly handling method provided in an embodiment of this disclosure. The intelligent agent behavior anomaly detection method provided in this embodiment is based on... Figure 1 and / or Figure 2 The method for storing evidence of agent behavior in the embodiment is executed.
[0099] Specifically, such as Figure 3 As shown, the method includes the following steps: Step S301: Create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain.
[0100] Step S302: Store the initial value of the trust score of the target intelligent agent in the blockchain.
[0101] Specifically, the trust management contract deployed on the blockchain is invoked to create a dedicated trust record table for the target intelligent agent. The initial trust score (such as setting it to a baseline value of 60 points or an initial score determined based on the identity authentication level) is bound to the identity identifier of the target intelligent agent and written into the contract storage area in the form of key-value pairs. At the same time, the timestamp and transaction hash of this initialization operation are stored on the blockchain for evidence.
[0102] Step S303: Detect the preset operation performed by the target intelligent agent, generate the decision credential and corresponding credential fingerprint of the preset operation, and associate the credential fingerprint of the decision credential with the identity identifier and store it in the blockchain.
[0103] Step S304: Determine whether the preset operation is an abnormal operation; if so, proceed to step S305.
[0104] Step S305: Update the trust score of the target agent.
[0105] Based on preset deduction rules (such as deducting points according to the severity of the anomaly type, or dynamically calculating the penalty coefficient based on the frequency of anomalies), a new trust score is calculated, generating a record containing the latest score, the reason for the update (corresponding to the type of anomaly), the score before the change, and the change timestamp. This record is stored in the blockchain (without overwriting the original value), ensuring that the history of each trust score change is fully traceable. Furthermore, the updated trust score can be synchronously updated in the record field corresponding to the smart agent in the trust management contract.
[0106] For example, the trust score can be updated based on the predefined level of abnormality of the operation. For instance, a warning level deducts 5-10 points from the trust score; a severe level deducts 10-25 points; and a critical level resets the trust score to zero.
[0107] Step S306: Update the authorization scope information of the target agent based on the trust score value.
[0108] Read the updated trust score value from step S305 and compare it with the preset authorization level threshold table (e.g., score ≥80 indicates high privilege, 60~79 indicates medium privilege, <60 indicates low privilege or frozen). Based on the matching result, modify the authorization policy of the smart agent in the blockchain's permission management contract.
[0109] The updated authorization scope information may include, but is not limited to, at least one of the following: a list of callable contract methods, a single transaction limit, and operation frequency restrictions.
[0110] For example, if the updated trust score is below 60, high-risk operations are restricted; if the updated trust score is below 40, only read-only operations are allowed until the appeal is successful or the observation period ends and the score is restored to the initial value.
[0111] Optionally, this authorization scope information change operation is stored in the blockchain as a record. This record may include the authorization scope information before and after the change, the reason for the change (which may be associated with the trust score update record in step S305), thereby ensuring the traceability of the causal relationship between the authorization scope adjustment and the trust score change.
[0112] In one optional implementation, after the trust score and / or authorization scope information are updated, a corresponding reminder message can be generated and sent to the operations and maintenance (O&M) end. O&M users can provide appeal data on the O&M end within a defined time window. This appeal data is processed by at least one arbitration node, and a multi-signature voting method can be used to generate the appeal result, which can be stored in the blockchain. If the appeal result is successful, it is determined that there was a misjudgment in the update of the current trust score and / or authorization scope information, and the trust score and / or authorization scope information are restored based on the appeal result. If the appeal result is unsuccessful, the current trust score and / or authorization scope information are maintained, or additional penalties are imposed.
[0113] Therefore, the blockchain-based intelligent agent behavior anomaly handling method provided in this disclosure stores the trust score of the target intelligent agent in the blockchain. After a preset operation is identified as an abnormal operation, the value of the trust score is updated, and the update process is recorded in the blockchain to ensure the traceability of the trust score evolution. Moreover, based on the value of the trust score, the authorization scope information of the target intelligent agent is adjusted to realize the dynamic linkage between permissions and trust. After an anomaly is detected, the operational capabilities of the target intelligent agent are adjusted in a timely manner to ensure data security.
[0114] Figure 4 A flowchart illustrating a blockchain-based intelligent agent behavior auditing method provided in an embodiment of this disclosure is shown.
[0115] Specifically, such as Figure 4 As shown, the method includes the following steps: Step S401: In response to the behavior audit request for the target intelligent agent, obtain the identity identifier of the target intelligent agent.
[0116] Audit users can initiate behavior audit requests for target intelligent agents through the auditing terminal, and the audit request carries the identity identifier of the target intelligent agent.
[0117] In one optional implementation, the audit request may also include the audit scope and audit conditions. The audit scope may include: the time interval of the recorded behavior to be audited (e.g., auditing operations within the last 30 days), the operation type (e.g., auditing only transaction-related operations or only data access-related operations), the session dimension (e.g., specifying the identifier of a complete dialogue session), or a quantity range (e.g., the most recent M operation records, where M is an integer greater than 0). The audit conditions are specifically record filtering rules, such as auditing only records marked as abnormal, auditing only operations involving sensitive data, or auditing only the behavior of agents with trust scores below a specific threshold.
[0118] In one optional implementation, the auditing platform provides a universal audit template, which is a structured configuration parameter package uniformly packaged according to the audit requirements of different industries (such as finance, government affairs, and healthcare). This universal audit template includes at least one of the following configuration items: audit extension fields (such as industry-specific record fields, such as the financial industry requiring the recording of transaction amounts and counterparty identifiers), audit detection rules (such as a list of industry-specific inspection rules, such as anti-money laundering rules), report format (such as report chapter structure and visualization style), retention policy (such as the legal retention period for behavior records), and permission configuration (such as field filtering rules for different audit levels). The differences between templates for different industries are only reflected in the values of the configuration items, thereby enabling the use of the same audit template to audit the behavior of intelligent agents in different industries, reducing the customization costs and time required for cross-industry deployment.
[0119] Optionally, the generated generic audit template can be published on the blockchain by relevant parties (such as regulatory agencies or industry standards organizations) through a template registration contract, obtaining a globally unique template number and version number. Before initiating an audit request, the auditing end selects a template number in the blockchain according to its own needs, thereby establishing an on-chain binding relationship between the agent's identity and the template number, and writing it into the blockchain for evidence storage. Subsequent parameters related to the audit process for the agent (such as agent behavior records, anomaly detection rules, audit report generation, etc.) are obtained from the audit template corresponding to that template number. In addition, relevant parameters related to the audit scope and audit conditions can also be obtained from the audit template.
[0120] Step S402: Based on the identity identifier, read the credential fingerprint stored in association with the identity identifier from the blockchain.
[0121] Read the credential fingerprint associated with the identity from the blockchain. Optionally, you can further obtain index metadata, anomaly detection records, trust score records, authorization scope records, etc., containing the identity.
[0122] In one alternative implementation, the credential fingerprints read from the blockchain can be filtered according to the audit scope and audit conditions, i.e., only credential fingerprints that meet the audit scope and audit conditions are read.
[0123] Step S403: Obtain the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes the credential identifier, the decision context, and the credential fingerprint of the preceding decision credential.
[0124] For any given credential fingerprint, query the storage location identifier associated with each credential fingerprint. If the decision credential is stored on the blockchain, it is read directly from the blockchain; if the decision credential is stored in decentralized storage off-chain, the original decision credential is retrieved from off-chain based on the storage location identifier; if the decision credential uses a hybrid storage model (e.g., core structured data is stored on the blockchain, while extended fields are stored off-chain), it is retrieved from different data sources based on index metadata and then merged to reconstruct a complete decision credential. A decision credential includes a credential identifier, decision context, and the credential fingerprint of the preceding decision credential.
[0125] In one optional implementation, the access permissions of audit users are determined, and decision credentials and other records in the blockchain are obtained based on these permissions. Specifically, corresponding access permissions can be assigned to different audit user roles and / or audit levels. For example, regulatory audit level typically corresponds to statutory regulatory agencies and compliance audit departments, and its access permissions can be: the complete original text of decision trajectory credentials (such as original inputs, complete reasoning paths, and / or output results, etc.), thereby facilitating in-depth investigation and evidence collection; operational audit level typically corresponds to platform operators and intelligent agent operation and maintenance organizations, and its access permissions can be: anonymized behavioral summaries (such as hash values of inputs or outputs, and / or reasoning summaries, etc.) and statistical indicators (such as success rate, response time, and / or anomaly summaries, etc.), thereby used for daily operation and maintenance monitoring; user audit level typically corresponds to end users and owners of collaborating intelligent agents, and its access permissions can be: summaries of interaction records related to itself (such as timestamps, operation types, and / or processing results, etc.). Further, alternatively, different audit users can access the system using different methods. For example, regulatory audit-level users can access the system by presenting zero-knowledge authorization proofs to demonstrate their regulatory authority without revealing the specific investigation target; operational audit-level users can access the system based on the agent's identity and operational authorization credentials; and user audit-level users can access the system after verifying the agent's identity and session ownership. Optionally, access verification can be performed by an identity verification contract deployed in the blockchain.
[0126] Optionally, the decision credentials can be stored using a tiered privacy protection mechanism based on attribute-based encryption (ABE). That is, after generating the decision credentials for a preset operation, the system does not directly store the original credential text. Instead, it encrypts the original credential text using an attribute-based encryption algorithm and stores the encrypted ciphertext in a blockchain or off-chain decentralized storage. A corresponding attribute access policy is set for this ciphertext, defining which fields of the ciphertext can be decrypted by audit users with specific attributes. For example, the supervisory level holds a "supervisory + full" attribute key, and can decrypt the complete original credential text after the attribute access policy matches; the operational level holds an "operation + anonymized" attribute key, and can only decrypt the anonymized behavioral summary and statistical indicators after the attribute access policy matches; the user level holds a "user + current session" attribute key, and can only decrypt the summary of interaction records related to themselves after the attribute access policy matches.
[0127] Optionally, record filtering rules can be determined based on access permissions, and the correspondence between these rules and access permissions can be pre-configured. In practice, record filtering rules matching the current access permissions are determined based on the configuration data, and then decision credentials are obtained from the blockchain using these rules. These decision credentials can be obtained by an audit server.
[0128] Step S404: Perform audit verification based on the decision voucher and the voucher fingerprint of the decision voucher, and generate audit results.
[0129] Audit verification is the process of verifying the authenticity, completeness, and continuity of decision vouchers; audit results are the output data of audit verification, such as the verification status (pass or fail) of each decision voucher, the classification of failure reasons, and anomaly markers found during the verification process, etc.
[0130] In one alternative implementation, audit verification includes one or more of the following verifications: Credential integrity verification: The hash value of the obtained decision credential is recalculated and compared with the corresponding credential fingerprint stored in the blockchain. If the two match, it is confirmed that the decision credential has not been tampered with since it was generated and uploaded to the chain, and the credential integrity verification is passed. If the two do not match, the credential is marked as credential integrity verification failure, the credential identifier and the reason for failure are recorded, and the subsequent verification of the credential is terminated.
[0131] Digital signature verification: Verifying the validity of the digital signature attached to the decision credential. Specifically, the signed decision credential is decrypted using the target agent's public key and compared with the hash value of the credential content. The comparison includes, but is not limited to, at least one of the following: the signature was indeed generated by the signer holding the corresponding private key (such as the agent performing the operation or its authorized agent); the signature has not been revoked within its validity period; and the content of the credential corresponding to the signature has not been tampered with. If any of the above conditions are not met, the digital signature verification is determined to have failed, the credential is further marked as having an invalid signature or forged identity, the reason for the failure is recorded (such as public key mismatch, signature expiration, certificate revocation, etc.), and subsequent verification of the credential is terminated.
[0132] Behavioral trajectory chain continuity verification: The verification process sequentially checks whether the credential fingerprint of each preceding credential recorded in each decision credential matches the credential fingerprint of the previous decision credential. Specifically, for any decision credential, if the credential fingerprint of the preceding credential in this decision credential does not match the credential fingerprint of the previous decision credential, this decision credential is marked as a trajectory breakpoint. The location of the breakpoint (such as the credential identifier corresponding to the breakpoint), the expected credential fingerprint of the preceding decision credential, and the actual credential fingerprint of the preceding decision credential are recorded, and subsequent verification of this credential is terminated.
[0133] Industry-Specific Inspection Rule Verification: If the target intelligent agent has industry-specific inspection rules (such as anti-money laundering rules in the financial industry requiring mandatory review and marking of transactions exceeding a certain amount, or privacy access rules in the medical industry requiring authorization credentials for each access to sensitive data), this step additionally performs industry-specific inspection rule verification. For example, it checks whether the extended fields of the decision credential contain the mandatory fields required by the template (such as "transaction amount" and "counterparty identifier" required by the financial industry template); and verifies whether the values of the mandatory fields comply with industry rule constraints (such as whether the amount exceeds the threshold to trigger mandatory review and marking). If the industry-specific inspection verification fails, the credential is marked as "industry compliance verification failed," and the corresponding industry rule identifier and failure details are recorded.
[0134] The audit results are then aggregated to obtain the final audit report. This report can be presented as an audit report. Specifically, the audit report may include at least one of the following: the total number of audited vouchers (e.g., the total number of decision vouchers involved in this audit), a list of verified vouchers (e.g., a list of verified voucher fingerprints), a list of failed vouchers (e.g., a list of voucher fingerprints that failed any verification), a description of the reason for the failure, information on the location of the failure (e.g., the voucher identifiers before and after the breakpoint), and a comprehensive verification conclusion. Optionally, the generated audit results and audit timestamp can be written to the blockchain to ensure the audit results are tamper-proof.
[0135] Therefore, the blockchain-based intelligent agent behavior auditing method provided in this disclosure audits based on credential fingerprints and corresponding decision credentials in the blockchain, thereby improving the authenticity of the audit results. Moreover, the decision credentials contain decision context, which enables the auditing of complete contextual information during the execution of preset operations, enhancing the audit depth and interpretability of intelligent agent behavior auditing. Furthermore, the decision credentials also include credential fingerprints of preceding decision credentials, which enables the auditing of the integrity and authenticity of the target intelligent agent behavior chain and facilitates the location of abnormal positions.
[0136] Figure 5 A schematic diagram of a blockchain-based intelligent agent behavior evidence storage device provided in an embodiment of this disclosure is shown. Figure 5 As shown, the device 500 includes: an identity creation module 510, a context acquisition module 520, a credential generation module 530, a fingerprint generation module 540, and an on-chain module 550.
[0137] The identity creation module 510 is used to create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain. The context acquisition module 520 is used to monitor the preset operation performed by the target intelligent agent and acquire the decision context of the preset operation; The voucher generation module 530 is used to generate the decision voucher for the preset operation based on the voucher identifier, the decision context, and the voucher fingerprint of the preceding decision voucher. Fingerprint generation module 540 is used to generate the credential fingerprint of the decision credential; The blockchain module 550 is used to associate the credential fingerprint of the decision credential with the identity identifier and store it in the blockchain.
[0138] In one optional implementation, the on-chain module 550 is used to: verify whether there is a credential fingerprint of the preceding decision credential contained in the decision credential in the blockchain; If so, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
[0139] In one optional implementation, the fingerprint generation module 540 is used to: obtain the private key corresponding to the target intelligent agent; The decision credential is digitally signed using the private key to obtain a signed decision credential. A hash operation is performed on the signed decision credential to obtain the credential fingerprint of the decision credential.
[0140] In one optional implementation, the on-chain module 550 is used to: obtain the public key corresponding to the target intelligent agent, and use the public key to perform signature verification on the signed decision credential; If the signature verification is successful, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
[0141] In an optional implementation, the device further includes: an anomaly detection module (not shown in the figure), used to obtain the detection context of the target intelligent agent performing the preset operation based on the identity identifier; Based on the detection context, determine whether the preset operation is an abnormal operation; The detection context includes at least one of the following: authorization scope information, historical behavior information, confidence level information, and security compliance information.
[0142] In one optional implementation, the anomaly detection module is used to: if the preset operation is determined to be an abnormal operation, identify the anomaly level of the preset operation; Execute an exception response that matches the exception level.
[0143] In an alternative implementation, the on-chain module 550 is further configured to: store the initial value of the trust score of the target intelligent agent in the blockchain; The device also includes an update module (not shown in the figure) for updating the trust score of the target agent.
[0144] In one alternative implementation, the update module is used to: update the authorization scope information of the target agent based on the value of the trust score.
[0145] In one alternative implementation, the decision context includes at least one of the following: Basic operational information, input information, model identity information, inference process information, output information, and confidence level.
[0146] The blockchain-based intelligent agent behavior evidence storage device of this disclosure corresponds to the aforementioned blockchain-based intelligent agent behavior evidence storage method, and related content can be referred to each other, which will not be repeated here. The beneficial technical effects of the blockchain-based intelligent agent behavior evidence storage device of this disclosure can be found in the corresponding beneficial technical effects of the aforementioned blockchain-based intelligent agent behavior evidence storage method, which will not be repeated here.
[0147] Figure 6 A schematic diagram of the structure of a blockchain-based intelligent agent behavior auditing device provided in an embodiment of this disclosure is shown. Figure 6 As shown, the device 600 includes: an identity acquisition module 610, a fingerprint reading module 620, a credential acquisition module 630, and an auditing module 640.
[0148] The identity acquisition module 610 is used to acquire the identity identifier of the target intelligent agent in response to a behavior audit request for the target intelligent agent; The fingerprint reading module 620 is used to read the credential fingerprint associated with the identity identifier from the blockchain based on the identity identifier; The credential acquisition module 630 is used to acquire the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes a credential identifier, a decision context, and the credential fingerprint of the preceding decision credential; The audit module 640 is used to perform audit verification based on the decision voucher and the voucher fingerprint of the decision voucher, and generate audit results.
[0149] The blockchain-based intelligent agent behavior auditing device of this disclosure corresponds to the embodiments of the blockchain-based intelligent agent behavior auditing method described above, and the relevant content can be referred to each other, which will not be repeated here. The beneficial technical effects of the blockchain-based intelligent agent behavior auditing device of this disclosure can be referred to the corresponding beneficial technical effects of the blockchain-based intelligent agent behavior auditing method described above, which will not be repeated here.
[0150] Figure 7 A schematic diagram of the structure of a blockchain-based intelligent agent behavior auditing system provided in an embodiment of this disclosure is shown.
[0151] like Figure 7 As shown, the system 700 includes: a blockchain-based intelligent agent behavior evidence storage device 500, a blockchain-based intelligent agent behavior auditing device 600, and a blockchain 710. The blockchain-based intelligent agent behavior evidence storage device 500 and the blockchain-based intelligent agent behavior auditing device 600 are respectively connected to the blockchain 710.
[0152] In addition, this disclosure also provides an electronic device, including: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the blockchain-based intelligent agent behavior evidence storage method and / or blockchain-based intelligent agent behavior auditing method described in any of the above embodiments of this disclosure.
[0153] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure is shown. Below, reference is made to... Figure 8 This describes an electronic device according to embodiments of the present disclosure. The electronic device may be either or both of a first device and a second device, or a standalone device independent of them, which may communicate with the first device and the second device to receive acquired input signals from them.
[0154] like Figure 8 As shown, the electronic device includes one or more processors and memory.
[0155] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.
[0156] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the blockchain-based intelligent agent behavior evidence storage method and / or blockchain-based intelligent agent behavior auditing method and / or other desired functions described in the various embodiments of this disclosure above.
[0157] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0158] In addition, the input device may include, for example, a keyboard, a mouse, etc.
[0159] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0160] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.
[0161] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products, comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based intelligent agent behavior evidence storage method and / or blockchain-based intelligent agent behavior auditing method according to various embodiments of this disclosure as described in the foregoing portions of this specification.
[0162] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this disclosure. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0163] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the blockchain-based intelligent agent behavior evidence storage method and / or blockchain-based intelligent agent behavior auditing method according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0164] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0165] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0166] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0167] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0168] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0169] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.
[0170] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.
[0171] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0172] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A blockchain-based method for storing evidence of intelligent agent behavior, characterized in that, include: Create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain; The preset operation executed by the target intelligent agent is detected, and the decision context of the preset operation is obtained; The decision credential for the preset operation is generated based on the credential identifier, the decision context, and the credential fingerprint of the preceding decision credential. Generate the credential fingerprint of the decision credential; Verify whether the blockchain contains the credential fingerprint of the preceding decision credential included in the decision credential; If so, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
2. The method according to claim 1, characterized in that, The credential fingerprint used to generate the decision credential includes: Obtain the private key corresponding to the target intelligent agent; The decision credential is digitally signed using the private key to obtain a signed decision credential. A hash operation is performed on the signed decision credential to obtain the credential fingerprint of the decision credential.
3. The method according to claim 2, characterized in that, The step of associating the credential fingerprint of the decision credential with the identity identifier and storing it in the blockchain includes: Obtain the public key corresponding to the target intelligent agent, and use the public key to verify the signature of the signed decision credential; If the signature verification is successful, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
4. The method according to any one of claims 1-3, characterized in that, After associating the credential fingerprint of the decision credential with the identity identifier and storing it in the blockchain, the method further includes: Based on the identity identifier, obtain the detection context for the target intelligent agent to perform the preset operation; Based on the detection context, determine whether the preset operation is an abnormal operation; The detection context includes at least one of the following: authorization scope information, historical behavior information, confidence level information, and security compliance information.
5. The method according to claim 4, characterized in that, The method further includes: If the preset operation is determined to be an abnormal operation, the abnormality level of the preset operation is identified; Execute an exception response that matches the exception level.
6. The method according to claim 4, characterized in that, After registering the identity identifier to the blockchain, the method further includes: storing the initial value of the trust score of the target intelligent agent in the blockchain; After determining that the preset operation is an abnormal operation, the method further includes: updating the value of the trust score of the target agent.
7. The method according to claim 6, characterized in that, After updating the trust score of the target agent, the method further includes updating the authorization scope information of the target agent based on the trust score.
8. The method according to any one of claims 1-3, characterized in that, The decision context includes at least one of the following: Basic operational information, input information, model identity information, inference process information, output information, and confidence level.
9. A blockchain-based method for auditing the behavior of intelligent agents, characterized in that, include: In response to a behavior audit request for the target intelligent agent, obtain the identity identifier of the target intelligent agent; Based on the identity identifier, read the credential fingerprint associated with the identity identifier stored in the blockchain; Obtain the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes a credential identifier, a decision context, and the credential fingerprint of the preceding decision credential; Audit verification is performed based on the decision voucher and the voucher fingerprint of the decision voucher, and audit results are generated.
10. A blockchain-based device for storing evidence of intelligent agent behavior, characterized in that, include: The identity creation module is used to create an identity identifier for the target intelligent agent and register the identity identifier to the blockchain. The context acquisition module is used to monitor the preset operation performed by the target agent and acquire the decision context of the preset operation; The voucher generation module is used to generate the decision voucher for the preset operation based on the voucher identifier, the decision context, and the voucher fingerprint of the preceding decision voucher. The fingerprint generation module is used to generate the credential fingerprint of the decision credential; The on-chain module is used to verify whether the blockchain contains the credential fingerprint of the preceding decision credential included in the decision credential; if so, the credential fingerprint of the decision credential is associated with the identity identifier and stored in the blockchain.
11. A blockchain-based intelligent agent behavior auditing device, characterized in that, include: The identity acquisition module is used to acquire the identity identifier of the target intelligent agent in response to a behavior audit request for the target intelligent agent; The fingerprint reading module is used to read the credential fingerprint associated with the identity identifier from the blockchain based on the identity identifier; The credential acquisition module is used to acquire the decision credential corresponding to the credential fingerprint; wherein, the decision credential includes a credential identifier, a decision context, and the credential fingerprint of the preceding decision credential; The audit module is used to perform audit verification based on the decision voucher and the voucher fingerprint of the decision voucher, and generate audit results.
12. A blockchain-based intelligent agent behavior auditing system, characterized in that, include: The blockchain-based intelligent agent behavior evidence storage device as described in claim 10, the blockchain-based intelligent agent behavior auditing device as described in claim 11, and the blockchain.
13. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the blockchain-based intelligent agent behavior evidence storage method according to any one of claims 1-8, and / or implements the blockchain-based intelligent agent behavior auditing method according to claim 9.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the blockchain-based intelligent agent behavior evidence storage method according to any one of claims 1-8, and / or implements the blockchain-based intelligent agent behavior auditing method according to claim 9.
15. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, they implement the blockchain-based intelligent agent behavior evidence storage method according to any one of claims 1-8, and / or implement the blockchain-based intelligent agent behavior auditing method according to claim 9.
