Blockchain-based agent interaction method, system, device, medium and product
By using a dual-chain network architecture based on blockchain technology, and leveraging distributed identifiers and anchored blockchain networks to achieve decentralized management of intelligent agents, the problems of data privacy leakage and single point of failure in the interconnection of intelligent agents are solved, enabling cross-platform trusted interconnection and efficient collaboration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA ACADEMY OF INFORMATION & COMM
- Filing Date
- 2026-01-27
- Publication Date
- 2026-07-03
Smart Images

Figure CN121579439B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to blockchain technology, and in particular to a blockchain-based intelligent agent interaction method, system, device, medium, and product. Background Technology
[0002] With the rapid development of artificial intelligence technology, intelligent agents, as hardware / software entities capable of perceiving the environment and autonomously executing tasks to achieve goals, have been widely applied in various fields such as intelligent manufacturing, the Internet of Things, and smart cities. However, the capabilities of a single intelligent agent are limited; their enormous potential lies more in the collaboration and interconnection between multiple intelligent agents, enabling them to complete more complex tasks through cross-agent cooperation. In existing technologies, intelligent agents often interconnect using centralized service platforms. Such centralized service platforms require all intelligent agents to register on the platform first, and then the platform is responsible for core aspects such as identity authentication, service discovery, task routing, and data exchange. However, this type of centralized service platform has significant shortcomings: all interactive data must flow through the centralized service platform, allowing the platform operator to easily access, monitor, and even misuse sensitive data. This results in intelligent agent owners losing sovereignty and control over their own data, facing the risk of data privacy leaks. Summary of the Invention
[0003] To address the aforementioned technical issues, this disclosure provides a blockchain-based intelligent agent interaction method, system, device, medium, and product.
[0004] One aspect of this disclosure provides a blockchain-based intelligent agent interaction method applied to a dual-chain network, the dual-chain network including an anchor blockchain network and a business blockchain network, the business blockchain network including multiple business nodes, and the anchor blockchain network including multiple anchor nodes. The method includes: in response to receiving service features of a target service sent by a first intelligent agent, a target business node determines a target service list based on the service features and a service registration list, the target service list including distributed identifiers and service description information of at least one candidate intelligent agent, the at least one candidate intelligent agent being able to provide the target service, and the target business node being one of the multiple business nodes; the first intelligent agent determines a distributed identifier of a second intelligent agent from the target service registration list; the first intelligent agent obtains a distributed document of the second intelligent agent from the anchor blockchain network based on the distributed identifier of the second intelligent agent, the distributed document including service endpoint address information of the second intelligent agent; the first intelligent agent interacts with the second intelligent agent based on the service endpoint address information to obtain the target service provided by the second intelligent agent.
[0005] Another aspect of this disclosure provides a blockchain-based intelligent agent interaction system, the system comprising: a first intelligent agent, a second intelligent agent, and a dual-chain network, the dual-chain network comprising an anchored blockchain network and a business blockchain network, the business blockchain network comprising multiple business nodes, and the anchored blockchain network comprising multiple anchor nodes; a target business node, configured to, in response to receiving service features of a target service sent by the first intelligent agent, determine a target service list based on the service features and a service registration list, the target service list comprising distributed identifiers and service description information of at least one candidate intelligent agent, the at least one candidate intelligent agent being capable of providing the target service, and the target business node being one of the multiple business nodes; the first intelligent agent, configured to generate the service features, upon receiving the target service registration list, determine the distributed identifier of the second intelligent agent in the target service registration list, obtain a distributed document of the second intelligent agent from the anchored blockchain network based on the distributed identifier of the second intelligent agent, the distributed document comprising service endpoint address information of the second intelligent agent; and interact with the second intelligent agent based on the service endpoint address information to obtain the target service provided by the second intelligent agent.
[0006] In another aspect of this disclosure, an electronic device is provided, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the method described above.
[0007] In another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method described above.
[0008] In another aspect, a computer program product is provided, including computer program instructions, wherein the computer program instructions, when executed by a processor, implement the method described above.
[0009] Based on the embodiments disclosed herein, the dual-chain network architecture effectively eliminates dependence on centralized service platforms, avoiding the single point of failure risk inherent in centralized architectures. Simultaneously, utilizing distributed identifiers as the universal identity root for the first / second intelligent agents ensures that any first / second intelligent agent can be uniquely and reliably identified and verified in any scenario. Furthermore, by leveraging an anchored blockchain network to store the distributed identifiers of candidate intelligent agents and their corresponding distributed documents, decentralized management and cross-scenario interoperability of intelligent agent identities are achieved. This breaks down identity silos between different platforms, enabling trusted interconnection and interoperability across systems, platforms, and domains, significantly improving cross-entity interoperability. In addition, the first intelligent agent interacts directly based on the service endpoint address information obtained on-chain, without needing to go through a centralized server. This ensures the privacy and sovereignty of interactive data, avoiding the risk of sensitive data being misused by the platform. The service registration list of the business blockchain network also enables transparency in service discovery, reducing intermediate intervention in the collaboration process and lowering interaction costs. At the same time, the immutability of the blockchain guarantees the credibility of service description information and the interaction process, providing technical support for fair and efficient collaboration among intelligent agents.
[0010] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0011] 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.
[0012] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:
[0013] Figure 1 A flowchart illustrating the blockchain-based smart agent interaction method in an embodiment of this disclosure is shown.
[0014] Figure 2 A flowchart illustrating step 160 in an embodiment of this disclosure is shown;
[0015] Figure 3 A flowchart illustrating a blockchain-based smart agent interaction method according to another embodiment of this disclosure is shown.
[0016] Figure 4 A flowchart illustrating a blockchain-based smart agent interaction method according to yet another embodiment of this disclosure is shown.
[0017] Figure 5 A flowchart illustrating a blockchain-based smart agent interaction method according to another embodiment of this disclosure is shown.
[0018] Figure 6 A flowchart illustrating step S160 is shown in another embodiment of this disclosure;
[0019] Figure 7 A flowchart illustrating a blockchain-based smart agent interaction method according to another embodiment of this disclosure is shown.
[0020] Figure 8 A flowchart illustrating a blockchain-based smart agent interaction method is shown in an application example of this disclosure.
[0021] Figure 9 A block diagram of a blockchain-based intelligent agent interaction system is shown in an embodiment of this disclosure;
[0022] Figure 10 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed herein. Detailed Implementation
[0023] 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.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] In the embodiments disclosed herein:
[0036] Blockchain: In a narrow sense, blockchain technology can be defined as a chain-like data structure that combines data blocks sequentially in chronological order, creating a distributed ledger that is cryptographically guaranteed to be immutable and unforgeable. In a broader sense, blockchain technology can utilize a chain-like data structure to verify and store data, node consensus algorithms to generate and update data, cryptographic methods to ensure the security of data transmission and access, and smart contracts composed of automated script code. A blockchain network consists of multiple nodes. Any node typically refers to a computer within the blockchain network; that is, any computer connected to the blockchain network (such as smartphones, servers, tablets, laptops, or desktop computers) is called a node.
[0037] The dual-chain network includes an anchor blockchain network and a business blockchain network. The business blockchain network includes multiple business nodes, and the anchor blockchain network includes multiple anchor nodes. The anchor blockchain network and the business blockchain network are each an independent blockchain network. In this embodiment, nodes in the anchor blockchain network are referred to as anchor nodes, and nodes in the business blockchain network are referred to as business nodes. Anchor nodes store blockchains containing data from the anchor blockchain network, and business nodes store blockchains containing data from the business blockchain network. Anchor nodes, business nodes, and anchor nodes communicate with each other.
[0038] Intelligent agent: An intelligent agent is an agent that perceives and takes actions in its environment to achieve its goals. An intelligent agent can be software, hardware, or a system. By perceiving changes in the environment, making judgments and decisions based on its own knowledge and algorithms, an intelligent agent can then execute actions to influence the environment or achieve predetermined goals.
[0039] A Decentralized Identifier (DID) is a new type of globally unique identifier that is autonomously created, owned, and controlled by an entity (which can be a person, organization, device, data, or artificial intelligence agent). It does not rely on any centralized registration authority, identity provider, or Certificate Authority (CA).
[0040] Figure 1 This diagram illustrates a flowchart of a blockchain-based smart agent interaction method according to an embodiment of this disclosure. This embodiment can be applied to dual-chain networks, such as... Figure 1 As shown, the blockchain-based smart agent interaction method in this embodiment includes the following steps:
[0041] In step S100, in response to receiving the service characteristics of the target service sent by the first intelligent agent, the target service node determines the target service list based on the service characteristics and the service registration list.
[0042] The target service list includes: a distributed identifier (DID) and service description information for at least one candidate agent. Each candidate agent must be capable of providing the target service; the target service node is one of multiple service nodes. The service registration list includes: distributed identifiers and service description information for multiple agents.
[0043] Both the first intelligent agent and the candidate intelligent agent can be independent intelligent agents. The first intelligent agent is the demander of the target service, and the candidate intelligent agent is the candidate provider of the target service. The target service is the service that the candidate intelligent agent can improve. For example, the candidate intelligent agent can be visual quality inspection software in a factory, the core decision-making module of an autonomous vehicle, a management program for a home energy storage battery, or an artificial intelligence (AI) assistant. The candidate intelligent agent can be software / systems or hardware that can provide services such as image recognition and road prediction, or hardware that has deployed software / systems such as image recognition and road prediction. For example, the first intelligent agent can be the decision-making module of an autonomous vehicle, which needs to acquire beyond-line-of-sight road information, and the candidate intelligent agent can be a perception fusion system deployed on a roadside unit, which can provide the service of acquiring beyond-line-of-sight road information (target service); or, the first intelligent agent is a 3D printing management program that needs quality inspection services and needs to acquire image information, and the candidate intelligent agent is a professional AI visual quality inspection system that can improve the service of acquiring image information (target service).
[0044] The distributed identifier of the candidate agent is used to identify the candidate agent. The service description information of the candidate agent describes the services it can provide, as well as related service information. The service features of the target service represent the attributes of the target service; for example, the service features of the target service could be its service type, ID, etc., and the service type could be, for example, image recognition (service type) or trajectory prediction (service type). The target business node stores a service registration list, which includes the distributed identifiers and service description information of multiple agents.
[0045] In one example, the service description information includes the service type, and the first agent and candidate agents are equipped with a Software Development Kit (SDK). The first agent can use the SDK deployed on it to send the service characteristics of the target service to the target business node. The target business node determines the agents that can provide the target service as candidate agents from its service registration list based on the service type of the target service. The candidate agents constitute the target service list, and then the target service category is sent to the first agent.
[0046] In step S120, the first agent determines the distributed identifier of the second agent from the target service registration list.
[0047] In this embodiment, the candidate agent determined by the first agent from the target service registration list is referred to as the second agent. For example, the user can use the first agent, or the first agent can automatically and randomly select a candidate agent from the candidate agents in the target service registration list as the second agent.
[0048] In step S140, the first agent obtains the distributed document of the second agent from the anchored blockchain network based on the distributed identifier of the second agent.
[0049] In this embodiment, the distributed document (DID Document) of the second agent is bound to the distributed identifier of the second agent so that the distributed document corresponds to the distributed identifier.
[0050] The distributed document for the second agent includes: the server endpoint address information of the second agent. The server endpoint address information may include, for example, the Uniform Resource Locator (URL) address of the server endpoint. The distributed document may also include the distributed identifier of the second agent.
[0051] In one example, the anchored blockchain network stores multiple distributed documents. The first agent can send the distributed identifier of the second agent to the anchored blockchain network. Based on the distributed identifier of the second agent, the anchored blockchain network determines the distributed document of the second agent and then feeds back the distributed document to the first agent.
[0052] In step S160, the first intelligent agent interacts with the second intelligent agent based on the service endpoint address information of the second intelligent agent to obtain the target service provided by the second intelligent agent.
[0053] For example, assuming the target service is image recognition, the first intelligent agent sends the image to be recognized to the second intelligent agent through the URL address of the second intelligent agent's service endpoint. The second intelligent agent can use its deployed neural network for image recognition (e.g., Convolutional Neural Network (CNN)) to recognize the image, obtain the image recognition result, and then send the image recognition result back to the first intelligent agent. Thus, through the interaction between the first and second intelligent agents, the first intelligent agent obtains the image recognition service (target service) provided by the second intelligent agent. In this embodiment of the disclosure, the dual-chain network architecture effectively eliminates the dependence on centralized service platforms, avoids the single point of failure risk under centralized architecture, and uses distributed identifiers as the universal identity root of the first / second intelligent agents, so that any first / second intelligent agent can be uniquely and reliably identified and verified in any scenario. Furthermore, by using the anchored blockchain network to store the distributed identifiers of candidate intelligent agents and their corresponding distributed documents, decentralized management and cross-scenario interoperability of intelligent agent identities are realized, breaking down identity silos between different platforms and achieving trusted interconnection and interoperability across systems, platforms, and domains, significantly improving cross-entity interoperability. Furthermore, the first intelligent agent interacts directly based on the service endpoint address information obtained on the blockchain, without the need for a centralized server. This ensures the privacy and ownership of the interaction data, avoids the risk of sensitive data being misused by the platform, and achieves transparency in service discovery through the service registration list of the business blockchain network. This reduces intermediate intervention in the collaboration process and lowers the interaction cost. At the same time, the immutability of the blockchain guarantees the credibility of service description information and the interaction process, providing technical support for fair and efficient collaboration among intelligent agents.
[0054] Figure 2 A flowchart illustrating step 160 in an embodiment of this disclosure is shown. In some alternative embodiments, such as Figure 2 As shown, step S160 may include the following steps:
[0055] In step S161, the first agent obtains the session key, encrypts the session key using the public key in the key pair of the second agent to obtain the encrypted session key, and sends the encrypted session key to the second agent based on the server endpoint address information.
[0056] The distributed document for the second intelligent agent also includes: the public key of the second intelligent agent's key pair. The key pair of the second intelligent agent includes a public key and a private key. The private key is used to encrypt (sign) data / information, and to decrypt data / information encrypted with the public key in the key pair.
[0057] For example, the second agent can use the SDK deployed on it to generate an asymmetric key pair using the national cryptographic algorithm (SM2) as the key pair of the second agent. The second agent can store the private key of its key pair in the hardware security module (HSM) of the second agent, or in the trusted execution environment (TEE) of the second agent.
[0058] In one implementation, the first intelligent agent stores a key pair, which may include a public key and a private key. The generation, operation (encryption / decryption), and storage of the key pair of the first intelligent agent are the same as those of the key pair of the second intelligent agent, and can be found in the documentation on the generation, operation, and storage of the key pair of the second intelligent agent, which will not be repeated here.
[0059] The first agent can generate a symmetric key pair as a session key based on a national cryptographic algorithm (SM4). The first agent uses its private key in the key pair to sign its distributed identifier, obtaining identity signature information. It then uses the public key in the second agent's key pair to encrypt the session key, obtaining an encrypted session key. Afterward, the first agent sends the encrypted session key, identity signature information, and its distributed identifier to the second agent through the second agent's server endpoint address information.
[0060] In step S162, the second agent uses the private key in the key pair of the second agent to decrypt the encrypted session key to obtain the session key, so that the second agent and the first agent can communicate encryptedly based on the session key.
[0061] In one implementation, the blockchain or anchor node corresponding to the anchored blockchain network stores a distributed document of the first intelligent agent. This distributed document corresponds to (is bound to) the distributed identifier of the first intelligent agent, and stores the public key of the first intelligent agent's key pair. A second intelligent agent can retrieve the first intelligent agent's distributed document from the anchored blockchain network based on the first intelligent agent's distributed identifier, obtain the public key of the first intelligent agent's key pair from the distributed document, and use this public key to verify the identity signature information. If the identity signature information passes verification, the second intelligent agent uses the private key of the key pair to decrypt the encrypted session key to obtain the session key.
[0062] For example, the first and second agents can establish a communication channel using a session key via Hypertext Transfer Protocol Secure (HTTPS) or a communication channel based on a Library Peer-to-Peer (Libp2p) encrypted stream, and can interact based on these encrypted communication channels. Specifically, taking the example in step S160, the first agent uses the session key to encrypt the image to be recognized, obtaining encrypted data, and then transmits the encrypted data to the second agent. For example, the encrypted data can be transmitted to the second agent through the aforementioned encrypted communication channel. The second agent uses the session key to decrypt the encrypted data, obtaining the image to be processed. The second agent then uses the session key to encrypt the image recognition result, obtaining an encrypted image recognition result, and then transmits the encrypted image recognition result to the first agent. The first agent uses the session key to decrypt the encrypted image recognition result, obtaining the image recognition result.
[0063] Figure 3 A flowchart illustrating a blockchain-based smart agent interaction method according to another embodiment of this disclosure is shown. In some alternative implementations, such as Figure 3 As shown, the following steps may be included before step S161:
[0064] Step S151: The first intelligent agent sends a transaction request and service fee for the target service to the target service node.
[0065] The transaction proposal includes: first signature information, obtained by signing first preset information using the private key of the first agent's key pair. The first preset information may include the distributed identifier of the first agent. For example, the transaction proposal may also include: the distributed identifier of a second agent, the name of the target service, the service characteristics of the target service, a description of the task (target service) content, and a bid. A transaction making smart contract is deployed in the dual-chain network. This smart contract is used for service transactions, such as negotiating related service transactions and creating and confirming task orders. The first agent can invoke the transaction making smart contract to send the transaction request and service fee to the target business node.
[0066] Step S152: The target business node performs signature verification on the first signature information.
[0067] When the target service node receives a transaction request and service fee, the target service node uses the public key in the key pair of the first intelligent agent to verify the first signature information. If the first signature information passes the signature verification, the target service node executes step S153; otherwise, the transaction for the target service is terminated.
[0068] Step S153: When the first signature information passes signature verification, the target business node generates an on-chain transaction event for the target service.
[0069] The on-chain transaction event includes: the distributed identifier of the second agent, the distributed identifier of the first agent, and the name of the target service.
[0070] In one example, the target business node broadcasts on-chain transaction events within the business blockchain network based on a transaction negotiation smart contract, that is, it sends them to each business node in the business blockchain network.
[0071] Step S154: In response to the second intelligent agent listening to the on-chain transaction event, send the second signature information to the target business node.
[0072] The second signature information is obtained by signing the second preset information using the private key in the key pair of the second intelligent agent. The second preset information may include, for example, the distributed identifier of the second intelligent agent.
[0073] For example, the second intelligent agent monitors the business blockchain network in real time. Specifically, when the second intelligent agent detects an on-chain transaction event generated in the target business node or the business blockchain network, it obtains the on-chain transaction event from the target business node. If it determines that the on-chain transaction event includes the second intelligent agent's distributed identifier (i.e., an on-chain transaction event related to itself has been found), the second intelligent agent processes the on-chain transaction event; otherwise, it discards the on-chain transaction event (i.e., no on-chain transaction event related to itself has been found). When it is determined that the on-chain transaction event includes the second intelligent agent's distributed identifier, the second intelligent agent uses its private key from its key pair to sign the distributed identifier, obtaining second signature information, and sends the second signature information to the target business node. Before generating the second signature information, the second intelligent agent can evaluate the on-chain transaction event to determine whether it should provide the target service. For example, it can evaluate whether the transaction amount is appropriate, evaluate the first intelligent agent's reputation information, etc. If it determines that it should provide the target service to the first intelligent agent, it generates the second signature information.
[0074] Step S155: The target business node performs signature verification on the second signature information.
[0075] In this process, the target business node uses the public key in the key pair of the second intelligent agent to verify the second signature information.
[0076] Step S156: When the second signature information passes the signature verification, the target business node generates a transaction contract for the target service and sends the transaction contract to the first intelligent agent and the second intelligent agent.
[0077] The transaction contract includes: a transaction identifier (transaction ID) for the on-chain transaction event. The transaction contract may also include relevant terms for the transaction targeting the service.
[0078] In one example, the target business node, based on a transaction negotiation smart contract, invokes a preset contract template to generate a transaction contract and sends the transaction contract to a first smart agent and a second smart agent. The first and second smart agents each use their private keys from their respective key pairs to sign the transaction contract, obtaining corresponding signed transaction contracts, which are then fed back to the target business node. The target business node verifies the signatures of both the first and second smart agents. When both signatures pass verification, the transaction event on the blockchain is marked as completed, service fees are frozen, and the transaction contract is sent back to the first and second smart agents. If the second signature fails verification, the target business node terminates the transaction operation for the target service.
[0079] In step S157, in response to receiving the transaction contract, the first agent performs the operation of obtaining the session key.
[0080] Specifically, after the first intelligent agent receives the transaction contract, the first intelligent agent executes step S161.
[0081] In some optional implementations, in this embodiment of the disclosure, the following steps may be included before step S151: the first intelligent agent obtains the verifiable credentials of the second intelligent agent, verifies the verifiable credentials, and in response to the verifiable credentials being verified, the first intelligent agent performs the operation of sending a transaction request and service fee to the target service node.
[0082] Verifiable Credentials (VCs) are digital proofs based on digital signatures and encryption technology used to verify the attributes, qualifications, or relationships of an entity (such as an individual, organization, or device). Verifiable credentials for a second agent are used to prove that the second agent can enhance the eligibility of the target service.
[0083] For example, the distributed document of the second intelligent agent also stores the hash value of the verifiable credential of the second intelligent agent. The first intelligent agent requests the verifiable credential of the second intelligent agent based on the server endpoint address information. The second intelligent agent returns its verifiable credential to the first intelligent agent. The first intelligent agent obtains the public key of the issuer of the verifiable credential and uses the public key to verify the signature in the verifiable credential. When the signature in the verifiable credential passes the signature verification, the first intelligent agent calculates the hash value of the verifiable credential. When the calculated hash value of the verifiable credential is consistent with the hash value of the second intelligent agent's verifiable credential in the distributed document, it is determined that the verifiable credential has passed verification. The first intelligent agent generates a transaction request for the target service and then executes the operation of step S151.
[0084] Figure 4 This diagram illustrates a flowchart of a blockchain-based smart agent interaction method according to yet another embodiment of this disclosure. In some alternative implementations, such as... Figure 4 As shown, the following steps may be included before step S152:
[0085] In step S200, the target service node sends an authentication request for the first intelligent agent to the target anchor node.
[0086] The target anchor node is any one of multiple anchor nodes. The authentication request includes the distributed identifier of the first agent.
[0087] In one implementation, when the target service node receives a transaction request and service fee sent by the first intelligent agent, the target service node generates an authentication request for the first intelligent agent based on the first intelligent agent's distributed identifier and sends the authentication request to the target anchor node.
[0088] Step S210: The target anchor node obtains the verifiable credentials of the first intelligent agent, verifies the identity of the first intelligent agent based on the verifiable credentials of the first intelligent agent, and obtains the identity verification result of whether the identity of the first intelligent agent has been verified.
[0089] The verifiable credentials of the first agent are used to prove the authenticity of the first agent's identity. For example, the target anchor node can request the verifiable credentials requested by the first agent, and the first agent will return the requested verifiable credentials to the target anchor node.
[0090] The authentication result includes: the first agent's authentication is successful or the first agent's authentication is unsuccessful.
[0091] The blockchain corresponding to the anchored blockchain network stores a distributed document of the first intelligent agent. This distributed document stores the hash value of the first intelligent agent's verifiable credential. The target anchor node obtains the public key of the issuer of the first intelligent agent's verifiable credential and uses this public key to verify the signature in the verifiable credential. When the signature in the verifiable credential passes the signature verification, the target anchor node calculates the hash value of the verifiable credential. If the calculated hash value of the verifiable credential matches the hash value of the first intelligent agent's verifiable credential stored in the distributed document, it is determined that the first intelligent agent has passed authentication, including the authentication result of the first intelligent agent passing authentication. Otherwise, it is determined that the first intelligent agent has failed authentication, and an authentication result including the first intelligent agent failing authentication is generated and sent to the target business node.
[0092] In step S220, in response to the authentication result indicating that the first intelligent agent has passed authentication, the target business node performs an operation to verify the first signature information.
[0093] When the authentication result indicates that the first intelligent agent has failed authentication, the target business node terminates the transaction operation for the target service.
[0094] In this embodiment, a dual verification mechanism is employed, where the target anchor node verifies the identity of the first agent based on verifiable credentials, and the target business node performs signature verification. This significantly improves the reliability and authority of the agent's identity, effectively preventing the risk of fake identities or non-compliant agents participating in interactions. Simultaneously, this layered verification method ensures the compliance of identity qualifications through verifiable credentials and guarantees the authenticity of interactive behavior through signature verification, further strengthening the security defenses of agent interactions in the dual-chain network and providing a more robust identity guarantee for cross-scenario trusted collaboration.
[0095] Figure 5 This diagram illustrates a flowchart of a blockchain-based smart agent interaction method according to another embodiment of the present disclosure. In some alternative implementations, such as... Figure 5 As shown, the embodiments of this disclosure may further include the following steps:
[0096] In step S300, in response to an anomaly in the monitored business blockchain network, the first intelligent agent sends a transaction request and service fee for the target service to the target anchor node.
[0097] For example, after step S151, after receiving the transaction request and service fee sent by the first intelligent agent, the target business node will send a response message to the first intelligent agent. If the first intelligent agent does not receive the response message from the target business node within a preset time (e.g., 2 seconds) after sending the transaction request to the target business node, it can be determined that the business blockchain network is abnormal.
[0098] The transaction request includes: first signature information, distributed identifier of the second agent, name of the target service, service characteristics of the target service, description of the task (target service) content, and bid. The first agent can invoke the transaction negotiation smart contract to send the transaction request and service fee to the target anchor node.
[0099] Step S310: The target anchor node performs signature verification on the first signature information in the transaction request.
[0100] The signature verification method of the target anchor node for the first signature information is the same as that of the target business node for the first signature information. For the signature verification method of the target anchor node for the first signature information, please refer to the signature verification method of the target business node for the first signature information, which will not be repeated here.
[0101] Step S320: When the first signature information passes signature verification, the target anchor node generates an on-chain transaction event for the target service.
[0102] The on-chain transaction event includes: the distributed identifier of the second agent, the distributed identifier of the first agent, and the name of the target service.
[0103] In one example, the target anchor node broadcasts on-chain transaction events in the anchored blockchain network based on a transaction negotiation smart contract, that is, sends on-chain transaction events to each anchor node in the anchored blockchain network.
[0104] In step S330, in response to the second intelligent agent listening to the on-chain transaction event, the second signature information is sent to the target anchor node.
[0105] For example, the second intelligent agent monitors the anchored blockchain network in real time. Specifically, when the second intelligent agent detects an on-chain transaction event generated in the target anchored node or the anchored blockchain network, it retrieves the on-chain transaction event from the target anchored node. If it determines that the on-chain transaction event includes the second intelligent agent's distributed identifier (i.e., an on-chain transaction event related to itself has been found), the second intelligent agent processes the on-chain transaction event; otherwise, it discards the on-chain transaction event (i.e., no on-chain transaction event related to itself has been found). When it determines that the on-chain transaction event includes the second intelligent agent's distributed identifier, the second intelligent agent uses its private key from its key pair to sign the distributed identifier, obtaining a second signature information, and sends the second signature information to the target anchored node.
[0106] Step S340: The target anchor node verifies the signature information of the second signature.
[0107] The signature verification method of the target anchor node for the second signature information is the same as that of the target business node for the second signature information. For the signature verification method of the target anchor node for the second signature information, please refer to the signature verification method of the target business node for the second signature information, which will not be repeated here.
[0108] In step S350, when the second signature information passes the signature verification, the target anchor node generates a transaction contract for the target service and sends the transaction contract to the first and second intelligent agents.
[0109] The transaction contract includes a transaction identifier for the on-chain transaction event. The transaction contract may also include relevant terms for the target service transaction. In one implementation, if the second signature information fails signature verification, the target anchor node terminates the transaction operation for the target service.
[0110] The method for generating transaction contracts by the target anchor node is the same as the method for generating transaction contracts by the target business node. For details on how the target anchor node generates transaction contracts, please refer to the method for generating transaction contracts by the target business node. It will not be repeated here.
[0111] In step S360, in response to receiving the transaction contract, the first agent performs the operation of obtaining the session key.
[0112] Specifically, after the first intelligent agent receives the transaction contract sent by the target anchor node, the first intelligent agent executes step S161.
[0113] In this embodiment of the disclosure, when the business blockchain network is abnormal, the target anchor node in the anchored blockchain network is relied upon to handle transaction requests and service fees. By verifying the signatures of both parties (first signature information and second signature information) and generating a transaction contract, it is ensured that the target service interaction between the first intelligent agent and the second intelligent agent is not interrupted due to the failure of the business blockchain network, thereby improving the fault tolerance and overall stability of the dual-chain network.
[0114] Figure 6 A flowchart illustrating step S160 is shown in another embodiment of this disclosure. In some alternative embodiments, such as Figure 6 As shown, step S160 may further include the following steps:
[0115] In step S163, in response to receiving the signature transaction completion message sent by the first intelligent agent, the target business node performs signature verification on the signature transaction completion message.
[0116] The signed transaction completion message is obtained by signing the transaction completion message using the private key from the first agent's key pair. The transaction completion message includes: the transaction identifier of the on-chain transaction event and transaction status information. The transaction status information indicates that the transaction for the target service has been completed.
[0117] For example, a payment settlement smart contract is also deployed in the dual-chain network. This smart contract is used to automate the process of verifying transaction performance and transferring value. After verifying the off-chain task completion certificate submitted by the smart agent, the payment settlement smart contract automatically executes the payment of fees, updates the reputation score, generates the storage data of the transaction, and synchronizes the storage data of the transaction to the corresponding blockchain.
[0118] Taking the example in step S160 as an example, after the first intelligent agent verifies that the image recognition result is correct, it generates a transaction completion message using the SDK deployed on it. Then, it uses the private key in the key pair of the first intelligent agent to sign the transaction completion information to obtain signed transaction information. After that, the signed transaction completion message is sent to the target business node. The target business node verifies the signature of the signed transaction completion message using the public key in the key pair of the first intelligent agent based on the payment settlement smart contract. When the signature verification of the signed transaction completion message passes, step S164 is executed. When the signature verification of the signed transaction completion message fails, the target business node sends a transaction failure message to the first intelligent agent.
[0119] In step S164, in response to the signature transaction completion message being verified by signature, the target business node sends the service fee to the second intelligent agent.
[0120] In this process, the target business node unfreezes the service fee based on the payment and settlement smart contract, and then transfers the service fee to the account of the second smart agent. The first smart agent and the second smart agent then complete the transaction regarding the target service.
[0121] Step S165: The target business node updates the reputation information of the second intelligent agent, generates transaction evidence information for on-chain transaction events, and stores the transaction evidence information in the blockchains corresponding to the anchor blockchain network and the business blockchain network, respectively.
[0122] The reputation information includes positive and negative credit scores. For example, the dual-chain network also deploys a reputation system smart contract, a program for automating the management and quantification of agent credibility. The reputation system smart contract automatically and immutably updates the agent's reputation information based on verifiable on-chain transaction completion records. The target business node, based on the reputation system smart contract, adds positive credit scores to the second agent to update the second agent's reputation information.
[0123] Transaction evidence storage information includes key metadata for transactions targeting the service (i.e., the on-chain transaction events mentioned above), such as: transaction identifier (transaction ID), service fee, the status of the transaction, hash value for updating reputation information, service description information, transaction contract, distributed identifier of the first agent and distributed identifier of the second agent, etc.
[0124] For example, the target business node generates transaction evidence information based on the payment and settlement smart contract. The target business node stores the transaction evidence information in the blockchain corresponding to the business blockchain network. At the same time, it synchronizes the transaction evidence information to the blockchain corresponding to the anchor blockchain network for permanent storage through cross-chain technology. For example, the target business node sends the transaction evidence information to the target anchor node, and the target anchor node stores the transaction evidence information in the blockchain corresponding to the anchor blockchain network.
[0125] In this disclosed embodiment, a collaborative architecture of "high-trust anchored blockchain network (managing identity and auditing) + high-performance business blockchain network (processing transactions for services) + off-chain peer-to-peer communication (exchanging data between intelligent agents)" is adopted. The anchored blockchain network focuses on carrying core operations requiring high trust, such as identity management, key commitments, and audit evidence storage. The business blockchain network centrally processes high-frequency transaction businesses such as service discovery, negotiation, and settlement. The actual task data exchange is completed through off-chain peer-to-peer communication. This precise business diversion not only avoids different types of operations from occupying resources, but also fully leverages the trust guarantee advantages of the anchored blockchain network and the efficient processing characteristics of the business blockchain network, significantly improving the overall system throughput and response speed, significantly reducing transaction costs, and making low-cost commercial-grade collaboration between large-scale intelligent agents possible.
[0126] In addition, all key links (evidence information) in the entire interaction process of the target service transaction are stored on the blockchain with immutable evidence hashes, which builds a clear and reliable data support channel for post-event auditing, dispute arbitration and compliance supervision. Regulators can legally intervene when necessary by virtue of their node permissions, perfectly achieving a precise balance between data privacy and regulatory auditing.
[0127] Figure 7 This diagram illustrates a flowchart of a blockchain-based smart agent interaction method according to another embodiment of the present disclosure. In some alternative implementations, such as... Figure 7 As shown, the following steps may be included before step S100:
[0128] In step S400, the target anchoring node receives the identifier generation request sent by the target intelligent agent.
[0129] The target agent is either the first agent or any agent in the service registration list. The identifier generation request includes: the public key from the target agent's key pair and the server address information. The identifier generation request may also include the hash value of the target agent's verifiable credentials and basic information about the target agent, such as the target agent's name and registration fee.
[0130] For example, before interacting, each intelligent agent recorded in the first intelligent agent and service registration list must register a distributed identifier and a distributed identifier document in the anchored blockchain network. Specifically, after generating its key pair, the target intelligent agent can generate an identifier generation request and send the identifier generation request to the target anchored node.
[0131] In step S410, the target anchor node generates a distributed identifier and a distributed document for the target agent based on the identifier generation request.
[0132] The distributed document of the target agent includes: the distributed identifier of the target agent, the public key in the key pair, the server address information, the hash value of the verifiable credentials of the target agent, and the ID, storage address, and hash value of the distributed document.
[0133] In one implementation, the target anchor node can generate a Distributed Identifier (DID) and a Distributed Document (DID Document) based on the W3C DID standard (a global DID standard specification defined by the World Wide Web Consortium (W3C)). The format of the Distributed Identifier includes a fixed prefix, a method name, and a specific string. For example, the distributed identifier of the target agent can be: did:method:example:efnVlm26MymQzBmAJcSCpSbbJMj2Z9nKq, where did: is the fixed prefix, method represents the DID method name used, and efnVlm26MymQzBmAJcSCpSbbJMj2Z9nKq is the specific string. The Distributed Document can be in JSON (JavaScript Object Notation) format and can include specific fields. For example, the Distributed Document may include: fields for the distributed identifier of the target agent, fields for the public key in the key pair, fields for server address information and fields for the hash value of the verifiable credential, as well as fields for the distributed document ID, storage address, and hash value, etc.
[0134] In step S420, the target anchor node feeds back the distributed identifier of the target agent to the target agent and stores the distributed document of the target agent in the blockchain corresponding to the anchor blockchain network.
[0135] In this process, the target anchor node binds the distributed identifier of the target agent to the distributed document to establish a correspondence between the distributed identifier and the distributed document. The target anchor node then processes the distributed document on the blockchain to store it in the blockchain corresponding to the anchor blockchain network. At the same time, the target anchor node sends the distributed identifier to the target agent, which stores the distributed identifier.
[0136] In this embodiment, the anchored blockchain network is responsible for the distributed identification and distributed generation and storage of the target intelligent agent. The immutability of the blockchain ensures the uniqueness, verifiability and credible evidence of the identity data, thus consolidating the foundation of identity trust. The business blockchain network is only responsible for the interactive business of the service and does not need to bear the additional load of identity management. This clarifies the division of business, avoids the mutual occupation of resources by identity management and service interaction, and allows the trust guarantee of the anchored blockchain network and the efficient processing of the business chain to complement each other. This achieves a precise balance between security, trustworthiness and performance optimization in the dual-chain network, further supporting the smooth interaction of intelligent agents across systems and platforms.
[0137] In some optional implementations, in this embodiment of the disclosure, before step S100, the method may further include: in response to receiving service registration information sent by the target intelligent agent, the target service node adds the distributed identifier and service description information of the target intelligent agent to the service registration list, so as to register the target intelligent agent to the service registration list.
[0138] The service registration information includes: service description information of the distributed identifier of the target intelligent agent.
[0139] For example, a Service Registry smart contract is also deployed in the dual-chain network. The Service Registry smart contract is a decentralized service directory running on the blockchain, allowing service-providing agents to register their service information (distributed identifier and service description information) in an immutable manner to the service registry list. The target agent generates service description information, which can be in a JSON file format, for example. This service description information describes the relevant information of the service provided by the target agent. The target agent uses the SDK deployed on it to generate service registration information including the target agent's service description information, distributed identifier and service endpoint address information, and the hash value of the service description information. This service registration information is sent to the target business node. The target business node uses the Service Registry smart contract to add the target agent's service description information and distributed identifier to the service registry list, thus registering the service provided by the target agent to the service registry list.
[0140] Once the service provided by the target intelligent agent is registered in the service registration list, a registration transaction is generated in the business blockchain network. The target business node generates the service information of the transaction (such as the distributed identifier of the target intelligent agent, the hash value of the service description information, etc.) and stores the service information in the blockchain corresponding to the business blockchain network.
[0141] This disclosure can be applied in IoT scenarios, supporting secure interconnection of intelligent devices such as smart homes and connected vehicles, and ensuring data privacy and reliable device collaboration. For example, Figure 8 This diagram illustrates a flowchart of a blockchain-based intelligent agent interaction method as shown in an application example of this disclosure. This example demonstrates the application of the blockchain-based intelligent agent interaction method shown in this disclosure within the Internet of Things (IoT). Figure 8As shown, agent A (first agent) is the demander of the target service, and agent B (second agent) is the provider of the target service. Both agents A and B are IoT entities (such as autonomous vehicles, roadside sensing units, and traffic signal controllers). In this example, agent A is assumed to be an autonomous vehicle, and agent B is a roadside unit (RSU). Agent A needs real-time fused perception data of the road ahead for beyond-line-of-sight decision-making, while agent B can provide real-time fused perception at the 100-meter level (target service). Agents A and B interact using a dual-chain network. The dual-chain network includes a business blockchain network (referred to as the business chain) and an anchor blockchain network (referred to as the anchor chain). The business blockchain network includes multiple business nodes, with the target business node being any one of these business nodes. The anchor blockchain network includes multiple anchor nodes, with the target anchor node being any one of these anchor nodes.
[0142] Phase 1: Identity Registration and Service Registration;
[0143] In the first stage, we will take the identity registration and service registration of agent B as an example. The method of identity registration and service registration of agent A is the same as that of agent B. Please refer to the identity registration and service registration of agent B. It will not be repeated here.
[0144] 1. SDK generates SM2 (Chinese national cryptographic) key pair: Agent B uses the SDK deployed on it to generate a key pair for the second agent using the Chinese national cryptographic algorithm (SM2) (the key pair includes the public key PK_B and the private key SK_B).
[0145] 2. Register DID identity: Agent B registers its DID identity on the anchor chain. Specifically, Agent B generates an identifier generation request and sends the identifier generation request to the anchor chain. The identifier generation request includes Agent B's DID (distributed identifier), server endpoint URL, PK_B, basic information of Agent B (such as creator name), hash value of VC, and the required registration fee.
[0146] 3. Return DID: The target anchor node generates the DID (distributed identifier) and DID document (distributed document) of agent B, and returns the DID of agent B to agent B;
[0147] 4. Service Registration: Agent B uses the SDK deployed on it to generate service registration information including Agent B's service description information, DID and service endpoint URL, as well as the hash value of the service description information. The service registration information is sent to the business chain. The target business node adds Agent B's distributed identifier and service description information to the service registration list based on the service registration smart contract, so as to register the services provided by Agent B to the service registration list.
[0148] Phase Two: Service Discovery and Validation;
[0149] 5. Query service: Agent A sends the service type (image recognition) to the business chain.
[0150] 6. Return the service list (including the DID of agent B): The target service node determines the target service list based on the service characteristics and service registration list. The target service node sends the target service list to agent A. The target service list includes: the DID of multiple candidate agents and service description information. All multiple candidate agents can provide image recognition services.
[0151] 7. Parse Agent B's DID: Agent A determines Agent B's DID in the target service registration list and sends the DID to the anchor chain. The target anchor node determines Agent B's DID document based on Agent B's DID.
[0152] 8. Return the public key / endpoint of agent B: The target anchor node sends the DID document to agent A. The DID document includes: the service endpoint URL of agent B and the public key PK_B;
[0153] Phase Three: On-Chain Contract Formation;
[0154] 9. Create a transaction proposal: Agent A calls the transaction negotiation smart contract, which sends the transaction request and service fee to the business chain. The target business node verifies the first signature information.
[0155] 10. Triggering on-chain transaction events: When the first signature information passes signature verification, the target business node generates an on-chain transaction event for the target service. When the smart agent B listens to the on-chain transaction event, it obtains the on-chain transaction event.
[0156] 11. Receive proposal (signature): Agent B sends the second signature information to the business chain (target business node);
[0157] 12. Status Update, Fund Locking: The target business node verifies the second signature information. When the second signature information passes the signature verification, the target business node generates a transaction contract, freezes the service fees, and sends the transaction contract to the first and second intelligent agents.
[0158] Phase 4: Off-chain execution;
[0159] 13. Establish a secure connection: Agent A generates a session key, encrypts the session key using the public key in Agent B's key pair to obtain an encrypted session key, and sends the encrypted session key to Agent B based on the server endpoint URL. Agent B decrypts the encrypted session key using the private key in Agent B's key pair to obtain the session key.
[0160] 14. Send encrypted task data: Agent A uses the session key to encrypt the perception data of Agent A (e.g., RGB images and 3D point clouds around Agent A, as well as Agent A's current position and speed information, etc.) to obtain encrypted data, and then transmits the encrypted data to Agent B.
[0161] 15. Perform local computation: Agent B uses the session key to decrypt the encrypted data to obtain the perception data. Then, based on the perception data, Agent B uses a fusion algorithm to generate environmental description information (perception fusion result). The environmental description information may include, for example, a list of traffic participants (e.g., vehicles, pedestrians, non-motorized vehicles) on the road ahead of Agent A, road conditions, and event data. The list of traffic participants may include each participant's ID, precise global coordinates, velocity vector, heading angle, dimensions (length, width, height), and confidence level. The road conditions information may include lane lines, curbs, traffic signs, traffic light status, drivable areas, construction zones, etc., described in semantic segmentation or vector form. The event data may include specific traffic events detected, such as traffic accidents (location), traffic congestion (starting point and length), road debris (type and location), abnormal parking, etc.
[0162] 16. Return the encrypted result: Agent B encrypts the perception fusion result using the session key to obtain the encrypted perception fusion result, and then transmits the encrypted perception fusion result to Agent A;
[0163] Phase 5: On-chain computation and evidence storage;
[0164] 17. Submission of completion proof: After verifying that the perception fusion result is correct, agent A uses its SDK to generate a transaction completion message. Then, it uses the private key in agent A's key pair to sign the transaction completion information to obtain signed transaction information. Finally, it sends the signed transaction completion message to the business chain.
[0165] 18. Signature verification and automatic resolution: The target business node verifies the signature of the completed transaction message. When the signature verification is successful, the service fee is unfrozen based on the payment settlement smart contract, and then the service fee is transferred to the account of smart agent B.
[0166] 19. Update Reputation: The target business node updates the reputation information of agent B and generates transaction evidence information;
[0167] 20. Synchronized Evidence Hash: The target business node stores the hash value of the transaction evidence information in the corresponding blockchain of the business blockchain network. Through cross-chain technology, the hash value of the transaction evidence information is synchronized to the corresponding blockchain of the anchor blockchain network for permanent evidence storage. That is, the target business node sends the hash value of the transaction evidence information to the target anchor node, and the target anchor node stores the hash value of the transaction evidence information in the corresponding blockchain of the anchor blockchain network.
[0168] Figure 9 A block diagram of a blockchain-based intelligent agent interaction system is shown in an embodiment of this disclosure. Figure 9 As shown, the blockchain-based intelligent agent interaction system of this embodiment includes: a first intelligent agent 500, a second intelligent agent 600, and a dual-chain network 700. The dual-chain network 700 includes an anchored blockchain network 710 and a business blockchain network 720. The business blockchain network 720 includes multiple business nodes, and the anchored blockchain network 710 includes multiple anchor nodes.
[0169] A target service node is used to respond to the service features of the target service sent by the first intelligent agent 500, and determine a target service list based on the service features and service registration list. The target service list includes distributed identifiers and service description information of at least one candidate intelligent agent, and the at least one candidate intelligent agent can provide the target service. The target service node is one of the multiple service nodes.
[0170] The first intelligent agent 500 is used to generate the service characteristics. Upon receiving the target service registration list, it determines the distributed identifier of the second intelligent agent 600 in the target service registration list, and obtains the distributed document of the second intelligent agent 600 from the anchored blockchain network 710 based on the distributed identifier of the second intelligent agent 600. The distributed document includes the service endpoint address information of the second intelligent agent 600. Based on the service endpoint address information, it interacts with the second intelligent agent 600 to obtain the target service provided by the second intelligent agent 600.
[0171] In some alternative implementations, the distributed document further includes the public key from the key pair of the second agent;
[0172] The first intelligent agent 500 is also used to obtain a session key, encrypt the session key using the public key in the key pair of the second intelligent agent 600 to obtain an encrypted session key, and send the encrypted session key to the second intelligent agent 600 based on the server endpoint address information.
[0173] The second intelligent agent 600 is further configured to decrypt the encrypted session key using the private key in the key pair to obtain the session key, so that the second intelligent agent 600 and the first intelligent agent 500 can perform encrypted communication based on the session key.
[0174] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0175] The first intelligent agent 500 is also configured to send a transaction request and service fee for the target service to the target service node, the transaction request including first signature information, the first signature information being obtained by signing first preset information using the private key in the key pair of the first intelligent agent; and to perform the operation of obtaining the session key when receiving the transaction contract for the target service.
[0176] The target business node is also used to verify the first signature information; when the first signature information passes the signature verification, the target business node generates an on-chain transaction event for the target service.
[0177] The second intelligent agent 600, in response to listening to the on-chain transaction event, sends second signature information to the target business node. The second signature information is obtained by signing second preset information using the private key in the key pair of the second intelligent agent.
[0178] The target business node is also used to verify the second signature information; when the second signature information passes the signature verification, the target business node generates a transaction contract for the target service and sends the transaction contract to the first smart agent and the second smart agent. The transaction contract includes the transaction identifier of the on-chain transaction event.
[0179] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0180] The first intelligent agent 500 is further configured to obtain the verifiable credentials of the second intelligent agent 600, verify the verifiable credentials, and in response to the verifiable credentials being verified, execute the operation of sending the transaction request and the service fee to the target service node.
[0181] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0182] The target business node is used to send an authentication request for the first intelligent agent 500 to the target anchor node, wherein the target anchor node is any one of the plurality of anchor nodes; and, upon the authentication result of the first intelligent agent's identity, instructs the first intelligent agent to pass the authentication and perform an operation to verify the signature information of the first signature.
[0183] The target anchor node is used to obtain the verifiable credentials of the first intelligent agent 500, and based on the verifiable credentials of the first intelligent agent 500, to verify the identity of the first intelligent agent 500 and obtain the identity verification result of whether the identity of the first intelligent agent has been verified.
[0184] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0185] A first intelligent agent 500 is configured to, in response to detecting an anomaly in the business blockchain network, send a transaction request and service fee for the target service to the target anchor node; and in response to receiving the transaction contract, the first intelligent agent performs the operation of obtaining the session key.
[0186] The target anchor node is used to verify the first signature information in the transaction request; when the first signature information passes the signature verification, an on-chain transaction event for the target service is generated.
[0187] The second intelligent agent 600 is used to send second signature information to the target anchor node when it detects the on-chain transaction event;
[0188] The target anchor node is used to verify the signature of the second signature information; when the second signature information passes the signature verification, a transaction contract for the target service is generated and the transaction contract is sent to the first intelligent agent 500 and the second intelligent agent 600.
[0189] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0190] The target business node is configured to, in response to receiving a signed transaction completion message sent by the first intelligent agent 500, verify the signature of the signed transaction completion message, wherein the signed transaction completion message is obtained by signing the transaction completion message using the private key in the key pair of the first intelligent agent, and the transaction completion message includes the transaction identifier and transaction status information; in response to the signed transaction completion message passing the signature verification, send the service fee to the second intelligent agent; update the reputation information of the second intelligent agent, generate transaction evidence information for the on-chain transaction event, and store the transaction evidence information in the blockchains corresponding to the anchored blockchain network and the business blockchain network, respectively.
[0191] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0192] The target anchor node is used to receive an identifier generation request sent by a target intelligent agent, wherein the target intelligent agent is either the first intelligent agent or any intelligent agent in the service registration list, and the identifier generation request includes the public key and server address information in the key pair of the target intelligent agent; generates a distributed identifier and a distributed document for the target intelligent agent based on the identifier generation request; feeds back the distributed identifier to the target intelligent agent, and stores the distributed document in the blockchain corresponding to the anchored blockchain network.
[0193] In some alternative implementations, within the blockchain-based smart agent interaction system of this disclosure:
[0194] The target service node is also configured to, in response to receiving service registration information sent by the target intelligent agent, add the distributed identifier and service description information of the target intelligent agent to the service registration list, so as to register the services provided by the target intelligent agent to the service registration list.
[0195] The blockchain-based intelligent agent interaction system disclosed herein corresponds to the embodiments of the blockchain-based intelligent agent interaction methods described above, and the relevant contents can be referred to each other, which will not be repeated here.
[0196] The beneficial technical effects of the exemplary embodiment of the blockchain-based intelligent agent interaction system disclosed herein can be found in the corresponding beneficial technical effects in the exemplary method section above, and will not be repeated here.
[0197] In addition, this disclosure also provides an electronic device, including:
[0198] Memory, used to store computer programs;
[0199] 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 smart agent interaction method described in any of the above embodiments of this disclosure.
[0200] Figure 10 This is a schematic diagram illustrating the structure of an application embodiment of the electronic device disclosed herein. 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.
[0201] like Figure 10 As shown, the electronic device includes one or more processors and memory.
[0202] 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.
[0203] 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 smart agent interaction methods and / or other desired functions described in the various embodiments of this disclosure above.
[0204] 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).
[0205] In addition, the input device may include, for example, a keyboard, a mouse, etc.
[0206] 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.
[0207] Of course, for the sake of simplicity, Figure 10Only 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.
[0208] 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 smart agent interaction methods according to various embodiments of this disclosure as described in the foregoing portions of this specification.
[0209] 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.
[0210] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based smart agent interaction method according to various embodiments of this disclosure as described in the foregoing portion of this specification.
[0211] 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.
[0212] 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.
[0213] 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.
[0214] 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.
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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.
[0219] 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 interaction of agents, the method comprising: Applied to a dual-chain network, the dual-chain network comprising an anchor blockchain network and a business blockchain network, the business blockchain network comprising multiple business nodes, and the anchor blockchain network comprising multiple anchor nodes, the method includes: In response to receiving the service features of the target service sent by the first intelligent agent, the target service node determines a target service list based on the service features and the service registration list. The target service list includes the distributed identifier and service description information of at least one candidate intelligent agent, the at least one candidate intelligent agent can provide the target service, and the target service node is one of the plurality of service nodes. The first agent determines the distributed identifier of the second agent from the target service list; The first intelligent agent obtains the distributed document of the second intelligent agent from the anchored blockchain network based on the distributed identifier of the second intelligent agent, and the distributed document includes the server endpoint address information of the second intelligent agent; The first intelligent agent interacts with the second intelligent agent based on the service endpoint address information to obtain the target service provided by the second intelligent agent.
2. The method of claim 1, wherein, The distributed document also includes the public key from the key pair of the second agent; The first intelligent agent interacts with the second intelligent agent based on the server endpoint address information, including: The first intelligent agent obtains the session key, encrypts the session key using the public key in the key pair of the second intelligent agent to obtain an encrypted session key, and sends the encrypted session key to the second intelligent agent based on the server endpoint address information; The second agent uses the private key in the key pair to decrypt the encrypted session key to obtain the session key, so that the second agent and the first agent can communicate encryptedly based on the session key.
3. The method according to claim 2, characterized in that, Before the first agent obtains the session key, the process also includes: The first intelligent agent sends a transaction request and service fee for the target service to the target service node. The transaction request includes first signature information, which is obtained by signing first preset information using the private key in the key pair of the first intelligent agent. The target business node performs signature verification on the first signature information; When the first signature information passes signature verification, the target business node generates an on-chain transaction event for the target service; In response to the second intelligent agent listening to the on-chain transaction event, the second intelligent agent sends a second signature information to the target business node. The second signature information is obtained by signing the second preset information using the private key in the key pair of the second intelligent agent. The target business node performs signature verification on the second signature information; When the second signature information passes signature verification, the target business node generates a transaction contract for the target service and sends the transaction contract to the first intelligent agent and the second intelligent agent. The transaction contract includes the transaction identifier of the on-chain transaction event. In response to receiving the transaction contract, the first intelligent agent performs the operation of obtaining the session key.
4. The method according to claim 3, characterized in that, Before the first intelligent agent sends a transaction request and service fee for the target service to the target service node, it also includes: The first intelligent agent obtains the verifiable credentials of the second intelligent agent and verifies the verifiable credentials; In response to the verification of the verifiable credentials, the first intelligent agent performs the operation of sending the transaction request and the service fee to the target service node.
5. The method according to claim 3, characterized in that, Before the target business node verifies the first signature information, it also includes: The target service node sends an authentication request for the first intelligent agent to the target anchor node, wherein the target anchor node is any one of the plurality of anchor nodes; The target anchor node obtains the verifiable credentials of the first intelligent agent, verifies the identity of the first intelligent agent based on the verifiable credentials of the first intelligent agent, and obtains the identity verification result of whether the identity of the first intelligent agent has been verified. In response to the authentication result indicating that the first intelligent agent has passed authentication, the target business node performs a signature verification operation on the first signature information.
6. The method according to claim 2, characterized in that, Also includes: In response to detecting an anomaly in the business blockchain network, the first intelligent agent sends a transaction request and service fee for the target service to the target anchor node; The target anchor node performs signature verification on the first signature information in the transaction request; When the first signature information passes signature verification, the target anchor node generates an on-chain transaction event for the target service; in response to the second smart agent listening to the on-chain transaction event, it sends the second signature information to the target anchor node; The target anchor node performs signature verification on the second signature information; When the second signature information passes signature verification, the target anchor node generates a transaction contract for the target service and sends the transaction contract to the first agent and the second agent; In response to receiving the transaction contract, the first smart agent performs the operation of obtaining the session key.
7. The method according to claim 2, characterized in that, The first intelligent agent interacts with the second intelligent agent based on the server endpoint address information, and further includes: In response to receiving a signed transaction completion message sent by the first intelligent agent, the target business node performs signature verification on the signed transaction completion message. The signed transaction completion message is obtained by signing the transaction completion message using the private key in the key pair of the first intelligent agent. The transaction completion message includes the transaction identifier and transaction status information of the on-chain transaction event. In response to the signature transaction completion message being verified, the target business node sends the service fee to the second intelligent agent; the target business node updates the reputation information of the second intelligent agent, generates transaction evidence information for the on-chain transaction event, and stores the transaction evidence information in the blockchains corresponding to the anchored blockchain network and the business blockchain network, respectively.
8. The method according to any one of claims 1-7, characterized in that, Also includes: The target anchor node receives an identifier generation request sent by the target intelligent agent, wherein the target intelligent agent is either the first intelligent agent or any intelligent agent in the service registration list, and the identifier generation request includes the public key and server address information in the key pair of the target intelligent agent; The target anchor node generates a distributed identifier and a distributed document for the target agent based on the identifier generation request; The target anchor node feeds back the distributed identifier to the target intelligent agent and stores the distributed document in the blockchain corresponding to the anchored blockchain network.
9. The method according to claim 8, characterized in that, Also includes: In response to receiving service registration information sent by the target intelligent agent, the target service node adds the distributed identifier and service description information of the target intelligent agent to the service registration list, so as to register the services provided by the target intelligent agent to the service registration list.
10. A blockchain-based intelligent agent interaction system, characterized in that, The system includes: a first intelligent agent, a second intelligent agent, and a dual-chain network. The dual-chain network includes an anchored blockchain network and a business blockchain network. The business blockchain network includes multiple business nodes, and the anchored blockchain network includes multiple anchor nodes. A target service node is used to respond to receiving the service features of the target service sent by the first intelligent agent, and determine a target service list based on the service features and service registration list. The target service list includes distributed identifiers and service description information of at least one candidate intelligent agent, the at least one candidate intelligent agent can provide the target service, and the target service node is one of the multiple service nodes. The first intelligent agent is used to generate the service features. Upon receiving the target service list, it determines the distributed identifier of the second intelligent agent in the target service list, obtains the distributed document of the second intelligent agent from the anchored blockchain network based on the distributed identifier of the second intelligent agent, the distributed document including the service endpoint address information of the second intelligent agent, and interacts with the second intelligent agent based on the service endpoint address information to obtain the target service provided by the second intelligent agent.
11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory, wherein when the computer program is executed, it implements the method described in any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-9.
13. A computer program product comprising computer program instructions, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1-9.