Blockchain-based multi-agent collaborative communication method and device, equipment and storage medium
By using blockchain technology to maintain the node information list and reliability scoring mechanism, the problems of unreliability and insufficient permission management across systems in multi-agent collaborative communication are solved, and trusted collaboration and secure communication between agents across systems are realized.
Patent Information
- Application Number
- CN202411981436.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Existing multi-agent collaborative communication technologies suffer from unreliability and insufficient access control in cross-system collaboration, resulting in untrustworthy communication and difficulty in achieving reliable cross-platform collaboration.
By maintaining a list of node information using blockchain technology, providing trusted communication addresses and a reliability scoring mechanism, a peer-to-peer trusted communication network is established, enabling trusted collaboration between cross-system agents.
It improves the robustness and security of multi-agent collaborative communication, supports the independent development and trusted collaboration of cross-system agents, and breaks down communication barriers between cross systems.
Smart Images

Figure CN119788681B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and blockchain technology, in particular to a multi-agent collaborative communication method and device based on blockchain, equipment and computer readable storage medium. BACKGROUND
[0002] With the rapid development of artificial intelligence technology, large language model technology has penetrated into human social life, and general large language models such as ChatGPT, ziya and baichuan have become useful auxiliary tools in various industries, and have shown great potential in realizing human-level intelligence. Artificial intelligence agents (AI Agents) provide convenient auxiliary services for users by perceiving the environment, making decisions and performing actions.
[0003] Currently, BabyAGI, AutoGPT and other large language models use large language model technology to realize self-driven single agents, which can create, organize and execute tasks according to predefined tools to achieve goals, bringing great convenience to human social life. Thanks to the development of single agents, multi-agent technology based on large language models has attracted widespread attention. Unlike single agents that mainly interact with the environment and tools, multi-agents emphasize more on the collaboration and interaction between agents. Research has found that communication between multi-agents is mainly limited to the same system environment, without considering cross-system collaboration and cooperation. The communication mechanism designed only considers reliable environment and even communication and cooperation between agents within the same system, lacking security and cross-platform considerations. SUMMARY
[0004] To solve the above technical problems, embodiments of the present application provide a multi-agent collaborative communication method based on blockchain, a multi-agent collaborative communication device based on blockchain, a multi-agent collaborative communication equipment based on blockchain, a computer readable storage medium, and a multi-agent collaborative communication system based on blockchain.
[0005] According to an aspect of an embodiment of the present application, a multi-agent collaborative communication method based on blockchain is provided, applied to a source agent, comprising: sending a communication request to a blockchain, the communication request comprising index information of a target agent; obtaining first response information returned by the blockchain, the first response information comprising a communication address of the target agent, the communication address being obtained by the blockchain based on the index information to search a node information list; and establishing trusted communication with the target agent through the communication address.
[0006] According to an aspect of an embodiment of the present application, there is provided a blockchain-based multi-agent collaborative communication device, applied to a source agent, comprising: a sending module configured to send a communication request to a blockchain, the communication request comprising index information of a target agent; a receiving module configured to obtain first response information returned by the blockchain, the first response information comprising a communication address of the target agent, the communication address being obtained by the blockchain based on the index information by searching a node information list; and a communication module configured to establish trusted communication with the target agent through the communication address.
[0007] According to an aspect of an embodiment of the present application, there is provided a blockchain-based multi-agent collaborative communication system, comprising a source agent, a target agent and a blockchain, wherein the source agent is configured to send a communication request to the blockchain, the communication request comprising index information of a target agent; the blockchain is configured to obtain a communication address of the target agent based on the index information by searching a node information list, and return first response information to the source agent, the first response information comprising the communication address of the target agent; the source agent is further configured to send a connection establishment request to the target agent through the communication address; and the target agent is configured to return second response information to the source agent, and establish trusted communication with the source agent.
[0008] According to an aspect of an embodiment of the present application, there is provided a blockchain-based multi-agent collaborative communication device, comprising: one or more processors; and a storage device configured to store one or more programs, which, when executed by the one or more processors, cause the blockchain-based multi-agent collaborative communication device to implement the blockchain-based multi-agent collaborative communication method as described above.
[0009] According to an aspect of an embodiment of the present application, there is provided a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor of a computer, cause the computer to perform the blockchain-based multi-agent collaborative communication method as described above.
[0010] According to an aspect of an embodiment of the present application, there is also provided a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the blockchain-based multi-agent collaborative communication method as described above.
[0011] In the technical solution provided in the embodiments of the present application, the related information and communication addresses of each Agent are maintained through the node information list in the blockchain, so that when the source Agent has a cross-platform multi-agent collaboration requirement, the communication address of the target Agent can be obtained from the blockchain through the index information of the target Agent, and then the point-to-point trusted communication with the target Agent is established.
[0012] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0013] The drawings incorporated into the specification and forming a part thereof, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the application. It is clear that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor. In the drawings:
[0014] Figure 1 is a blockchain-based multi-Agent collaborative communication architecture diagram shown by an exemplary embodiment of the present application;
[0015] Figure 2 is a flowchart of a blockchain-based multi-Agent collaborative communication method shown by an exemplary embodiment of the present application;
[0016] Figure 3 is a communication request schematic diagram shown by an exemplary embodiment of the present application;
[0017] Figure 4 is a connection request schematic diagram shown by an exemplary embodiment of the present application;
[0018] Figure 5 is a reliability verification process schematic diagram shown by an exemplary embodiment of the present application;
[0019] Figure 6 is a connection establishment schematic diagram shown by an exemplary embodiment of the present application;
[0020] Figure 7 is a data transmission process schematic diagram shown by an exemplary embodiment of the present application;
[0021] Figure 8 is a flowchart of a blockchain-based multi-Agent collaborative communication method shown by another exemplary embodiment of the present application;
[0022] Figure 9 is a flowchart of a blockchain-based multi-Agent collaborative communication method shown by another exemplary embodiment of the present application;
[0023] Figure 10 is a block diagram of a blockchain-based multi-agent collaborative communication device according to an example embodiment of the present application;
[0024] Figure 11 shows a structural schematic diagram of a computer system of a blockchain-based multi-agent collaborative communication device suitable for implementing embodiments of the present application. DETAILED DESCRIPTION
[0025] The example embodiments will be described in detail below with reference to the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following example embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0026] The block diagrams shown in the drawings are merely functional entities, and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0027] The flowcharts shown in the drawings are merely illustrative, and do not necessarily include all contents and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to the actual situation.
[0028] In the present application, "multiple" refers to two or more. The association between the associated objects described by "and / or" represents that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0029] First of all, it needs to be pointed out that the present application relates to artificial intelligence and blockchain technology, and the following will briefly introduce the related technologies:
[0030] LLM-based AI Agent: a system driven by a large language model as a brain, with the ability to autonomously understand, perceive, plan, remember and use tools, a system capable of automatically completing complex tasks, referred to in the present application as Agent.
[0031] Multi-Agent collaboration / cooperation: refers to the process of multiple intelligent agents with autonomy and intelligence in a shared environment to achieve common goals through information interaction and other cooperation, the essence of which is data interaction, that is, through cross-platform data interaction, the purpose of multi-agent collaboration / cooperation can be achieved.
[0032] Blockchain information sharing: refers to trusted message sharing based on blockchain technology, which provides a trusted peer-to-peer information interaction environment for each party participating in sharing.
[0033] Collaborative communication technology is a technology that enables effective collaboration and communication among multiple participants based on a communication network. The goal is to achieve information sharing, task allocation, and optimized resource utilization through collaboration and information exchange. The main technical principles of collaborative communication technology include distributed architecture, intelligent routing, data management, protocol design, and other components. The existing multi-agent collaborative communication mainly relies on increasing relay management nodes and building shared message pools to achieve this. These solutions have the following problems in cross-system Agent collaboration:
[0034] 1) Relay nodes are unreliable or single-point failures, leading to untrusted cross-system collaborative communication;
[0035] 2) Shared message pool lacks a rigorous permission management mechanism, which also increases the coupling between systems and makes it difficult to implement subsequent system expansion.
[0036] Therefore, to achieve trusted collaboration of cross-platform intelligent agents, the present patent proposes a collaborative communication method based on blockchain, forming a peer-to-peer intelligent agent trusted communication network based on blockchain information sharing, improving the robustness of collaboration, and supporting cross-system Agent trusted collaboration while allowing multiple systems to develop independently.
[0037] Figure 1 is an example of a blockchain-based multi-agent collaborative communication architecture shown in an example embodiment of the present application. As Figure 1As shown, the blockchain and each agent (Agent) together constitute a multi-agent collaborative network based on blockchain. In this architecture, all agents are in an equal communication state and can achieve point-to-point information communication. The blockchain maintains a list of node information (such as Agent routing list), and can update or return list information according to Agent access requirements. The blockchain, as an entity supporting information sharing, is responsible for interacting with each agent (Agent), providing a "communication address", and assisting Agent in "establishing trusted communication"; for example, after receiving the communication request of the source Agent, the target Agent can obtain the reliability score of the source Agent from the blockchain to decide whether to agree to establish trusted communication with the source Agent. The blockchain interacts with the Agent node mainly includes 3 types of functions: Agent registration, Agent access address query, and Agent exit.
[0038] The blockchain can be a public chain, a private chain or an alliance chain. In the information sharing network based on the public chain, the related information of the Agent node will be disclosed to all nodes, which is suitable for nodes with global sharing needs to participate. A public chain including Ethereum and the like can be used as the underlying blockchain. In the information sharing network based on the alliance chain or the private chain, the Agent node information is only announced within the alliance chain or the private chain network, which is suitable for nodes with information protection needs to participate, and the alliance chain or the private chain needs to be constructed by itself. The information stored on the chain at least includes: Agent access information (such as IP address, access port, etc.), Agent identity information (such as Agent identity, Agent public key, etc.). Optional information can include: Agent attribute information (service type, service capability, service requirement, etc.), Agent permission information, etc. The Agent can obtain the collaboration record data related to itself in the blockchain at any time to support the optimization and adjustment of its own collaboration strategy. For example, the Agent can determine the next collaboration target based on the collaboration record data related to itself in the blockchain to avoid repeated collaboration.
[0039] In one embodiment, each Agent in the multi-agent collaborative network based on blockchain needs to configure a blockchain light node function in addition to the basic ability of the agent, that is, to have the ability to access the blockchain network and access the blockchain ledger information (without the functions of participating in consensus, storing ledger, etc.), and to have a public-private key pair. In addition, each Agent has the ability of blockchain service self-discovery, and when it needs to collaborate with other Agents to perform a certain task, the Agent can find a nearby blockchain network through broadcast message to access the information sharing blockchain.
[0040] Figure 1Any two Agents (as a source Agent and a target Agent respectively) and a blockchain can constitute a blockchain-based multi-Agent collaborative communication system. The source Agent is configured to send a communication request to the blockchain, the communication request comprising index information of the target Agent. The blockchain is configured to search a node information list based on the index information to obtain a communication address of the target Agent, and return first response information to the source Agent, the first response information comprising the communication address of the target Agent. The source Agent is further configured to send a connection establishment request to the target Agent through the communication address. The target Agent is configured to return second response information to the source Agent, and establish trusted communication with the source Agent.
[0041] Figure 2 is a flowchart of a blockchain-based multi-Agent collaborative communication method according to an example embodiment of the present application. The method can be specifically executed by a server or a terminal device, for example, a smartphone, a computer, a notebook computer, etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), and big data and artificial intelligence platform, etc. The specific execution subject of the method is not limited in the present embodiment.
[0042] As shown in Figure 2 , in an example embodiment, the method comprises steps S210-S230, which are described in detail as follows:
[0043] S210, sending a communication request to the blockchain.
[0044] The communication request comprises index information of the target Agent. The communication request is configured to request an access address of the target Agent from the blockchain.
[0045] Figure 3 is a schematic diagram of a communication request according to an example embodiment of the present application. As shown in Figure 3As shown, the communication request can include a task information field, an identity public key field, an identity information field, a message form field, a communication mode field, and a function field. Among them, the task information field is used to indicate the information interaction target (i.e., the communication intention). The identity public key field is used to indicate the public key of the target Agent, and this field is an optional field, which can be empty (such as in the service capability-based communication mode). The identity information field is used to indicate the identity of the target Agent, and in the service capability-based communication mode, this field is the service capability requirement of the target Agent (i.e., taking the service capability as the retrieval condition of the Agent). The message form field is used to indicate the data encryption mode when communicating with the target Agent. The communication mode is used to indicate the access mode of the target Agent. The function field is used to indicate the type of access.
[0046] In one embodiment, the access mode includes access address-based communication, identity information-based communication, and service capability-based communication. Among them, the access address-based communication requires that the Agent can obtain the access address of the target Agent through the access blockchain; or, through the target Agent access address, the related information of the target Agent is obtained; the identity information-based communication requires that the Agent can obtain the access address of the Agent corresponding to the identity information (such as the identification, description information, etc. of the target Agent) in the blockchain; the service capability-based communication requires that the blockchain can call the smart contract to match the target Agent that meets the service requirement for the Agent and return the access address.
[0047] Table 1 is a communication request shown in an exemplary embodiment of the present application.
[0048] Table 1
[0049]
[0050] As shown in Table 1, “com_mode” in the communication request is the communication mode field, “identity_info” is the identity information field, “identity_pubkey” is the identity public key field, and “remark” can be used to note other description information, such as capability requirements, connection intentions, etc.
[0051] S220, obtaining the first response information returned by the blockchain, the first response information including the communication address of the target Agent, which is obtained by the blockchain based on the index information to search the node information list.
[0052] The index information can be the identification, identity information, etc. of the target Agent, which can uniquely determine the access address of the target Agent, or can be a screening condition such as a capability requirement.
[0053] In an embodiment, the identity, identity information, access address, description information (such as service capability description) of each Agent in the blockchain are stored in the node information list and are periodically updated and maintained (such as updating the service capability of the Agent, adding a new Agent, etc.). That is, the node information list is used to maintain the relevant information of each Agent in the network, and can provide query / filtering services.
[0054] If the index information is the identity of the target Agent or the identity information of the target Agent, the blockchain can directly retrieve the node information list based on the index information, that is, the access address of the target Agent can be obtained. Then, the first response information is generated based on the access address of the target Agent and is returned to the source Agent. Referring to Figure 3 , the first response information can include a response identifier (such as a proof that the first response information is provided by the blockchain) and a task reply (such as the access address of the target Agent).
[0055] If the index information is a service capability requirement, the blockchain takes the service capability requirement as a filtering condition, (such as through an embedded smart contract) filters the candidate Agents contained in the node information list, and obtains one or more target Agents that meet the filtering condition.
[0056] In an embodiment, the index information of the target Agent is a service capability requirement; the service capability requirement includes a service type, an attribute, a performance index, and a distance index; the service type and the attribute of the target Agent respectively match the service type and the attribute indicated by the service capability requirement, and the index deviation corresponding to the target Agent is the smallest among the candidate Agents; the index deviation is obtained by weighted sum of a first index difference and a second index difference, the first index difference is calculated based on the actual performance of the target Agent and the performance index; the second index difference is calculated based on the distance between the target Agent and the source Agent and the distance index.
[0057] The service capability requirement proposed by the source Agent can be specifically expressed as: (T, C, L, Des); wherein T is a service type requirement (for example: computing support, storage support, map retrieval support, software development support, etc.); C is a support intensity requirement, that is, a performance index (for example, the computing power calculation ability per unit time under computing support, the software requirement analysis ability score under software development support, etc.); L is an Agent geographic distance limit, that is, an example index; Des is a natural language description of Agent attribute capability, which supports mutual understanding between Agent nodes.
[0058] Further, based on the service capability requirement proposed by the source Agent, the blockchain can first select a target candidate Agent from the candidate Agents that meet the requirements in service type and attribute, and then calculate the index deviation based on the difference between the actual performance and the performance index of each target candidate Agent, and the difference between the actual distance and the distance index between each target candidate Agent (and the source Agent), and determine the target candidate Agent with the smallest index deviation as the target Agent. The calculation formula of the index deviation can be specifically represented as:
[0059]
[0060] wherein w1 and w2 are weights, and w1+w2=1, w1>0, w2>0. L dis is the actual distance between the source Agent and the target candidate Agent, and L is the distance index. now is the actual performance of the target candidate Agent, and C is the performance index. Po is the distance deviating from the target requirement.
[0061] S230, establishing trusted communication with the target Agent through the communication address.
[0062] Figure 4 is a connection request schematic diagram shown by an exemplary embodiment of the present application. As shown in Figure 4 , the source Agent can establish trusted communication with the target Agent by sending a connection establishment request to the communication address. The connection establishment request can specifically include: the public key of the source Agent, the service access request, the service requirement description (regularization and natural language description), and the information signature (to ensure the reliability of the information).
[0063] In an embodiment, the source Agent sends a connection establishment request to the target Agent through the communication address, and the connection establishment request includes the public key of the source Agent and the intention description information; wherein the intention description information is used to describe the purpose of establishing the connection, and specifically can include the expected data for interaction, etc.
[0064] Figure 5 is a reliability verification process schematic diagram shown by an exemplary embodiment of the present application. As shown in Figure 5As shown, after obtaining the connection establishment request sent by the source Agent, the target Agent can perform access reliability confirmation on the blockchain. Specifically, the target Agent can provide the public key of the source Agent to the blockchain, so that the blockchain performs reliability scoring on the source Agent. After obtaining the public key of the source Agent, the blockchain can query the historical cooperation record (and communication information) of the source Agent in the network, and obtain the reliability score of the source Agent based on the historical cooperation record (and communication information) of the source Agent. The specific scoring rules can be dynamically adjusted based on actual conditions, and the present application does not limit this. The blockchain returns an access reliability response (including the reliability score of the source Agent) to the target Agent. If the reliability score of the source Agent is greater than the score threshold, the target Agent returns second response information to the source Agent. That is, the second response information is returned by the target Agent when the reliability score of the source Agent is greater than the score threshold, the reliability score is obtained by the blockchain based on the historical cooperation record (and communication information) of the source Agent, the historical cooperation record of the source Agent is obtained by searching the blockchain with the public key of the source Agent as the index, and the public key of the source Agent can be provided by the target Agent to the blockchain.
[0065] It should be noted that the reliability analysis can be completed by the blockchain or by the target Agent, and the present application does not limit this. Compared with being completed by the target Agent, the blockchain has higher security (without leaking data of the source Agent).
[0066] Figure 6 is a connection establishment schematic diagram shown by an exemplary embodiment of the present application. As shown in Figure 6 The source Agent obtains the second response information (i.e., the response information of the connection establishment request), and performs data interaction with the target Agent to optimize its own service capability. The data interaction process can use plaintext data or ciphertext data. Compared with using plaintext data, using ciphertext data has higher security.
[0067] In one embodiment, the source Agent signs the target data through its own public key, obtains a digest of the target data, and sends the target data and the digest of the target data to the target Agent. Correspondingly, after obtaining the target data and the digest of the target data, the target Agent can detect the target data through the digest of the target data to prevent the target data from being tampered with.
[0068] Figure 7 is a data transmission process schematic diagram shown by an exemplary embodiment of the present application. As shown in Figure 7As shown, the source Agent encrypts the target data through the public key of the target Agent, obtains the ciphertext corresponding to the target data, and signs the ciphertext of the target data through the public key of the source Agent, obtains the digest of the ciphertext, and then sends the ciphertext and the digest of the ciphertext to the target Agent. Correspondingly, after obtaining the ciphertext and the digest of the ciphertext, the target Agent can detect tampering of the ciphertext through the digest of the ciphertext, and if it is determined that the ciphertext has not been tampered with, the ciphertext is decrypted through the private key of the target Agent to obtain the target data.
[0069] Further, after obtaining the target data, the target Agent can extract key information, use its task understanding and decision-making ability, execute the task and complete the task, and then return the execution result to the source Agent.
[0070] It can be understood that according to the above method, the collaborative communication between three or more Agents can also be established; that is, the multi-Agent collaborative communication method based on the blockchain provided by the present application is also applicable to the establishment of collaborative communication between three or more Agents; wherein the method for establishing collaborative communication between any two Agents can refer to the above method, which will not be described here.
[0071] In the embodiment, the communication request is sent to the blockchain, the communication request includes the index information of the target Agent, the first response information returned by the blockchain is obtained, the first response information includes the communication address of the target Agent, the communication address is obtained by the blockchain based on the index information to search the node information list, and the trusted communication is established with the target Agent through the communication address. As can be seen, the node information list in the blockchain is used to maintain the related information and communication address of each Agent, so that when the source Agent has a cross-platform multi-agent collaboration requirement, the communication address of the target Agent can be obtained from the blockchain through the index information of the target Agent, and then the point-to-point trusted communication with the target Agent is established. In the process of establishing point-to-point trusted communication, the interaction between the target Agent and the blockchain is supported, the cross-system Agent trusted mutual authentication is realized, and the reliable communication between Agents is ensured.
[0072] Figure 8 is a flowchart of the multi-Agent collaborative communication method based on the blockchain according to another exemplary embodiment of the present application, which is further proposed based on the embodiment shown in Figure 2 As shown in the embodiment, the exemplary multi-Agent collaborative communication method based on the blockchain further includes steps S810 and S820 before step S210, which are described in detail as follows: Figure 8
[0073] Step S810, broadcast a block chain access request to obtain an access interface of the block chain.
[0074] In the initial stage, each Agent (node) participating in the collaboration needs to register shared information in the block chain, and the block chain generates a node information list based on the registration information of each Agent and maintains the node information list.
[0075] In an embodiment, the Agent has a block chain self-discovery capability, and when the Agent needs to perform a certain task in collaboration with other Agents, it can find a nearby block chain through a broadcast message to access the block chain for information sharing. For example, the Agent can broadcast a block chain interface access request and access the block chain based on the block chain interface returned by other nodes.
[0076] For a registered Agent, step S210 can be directly executed; for an unregistered Agent, step S820 is continued to be executed.
[0077] Step S820, send node registration information through the access interface of the block chain to update the node information list based on the node registration information.
[0078] In an embodiment, the source Agent selects a shared information block chain type (such as a public chain, a private chain, an alliance chain, etc.), and initiates a service information registration transaction (authentication information needs to be provided for the alliance chain and the private chain to ensure successful joining). The service registration information includes at least one of the following: a functional description of the source Agent (a natural language description or a specific numbered description form), a self-communication address, a collaboration requirement, and other content that needs to be described. An Agent that completes the registration will obtain a unique service identifier to support subsequent Agent access address information acquisition. An example of the service identifier is as follows:
[0079] [service number-service type-service capability evaluation-random placeholder]
[0080] In the embodiments of the application, in the initial stage, each Agent registers shared information in the block chain to obtain a node information list, and the block chain maintains the node information list, which includes Agent access addresses, identity information, etc., to support cross-system multi-Agent collaboration and mutual discovery, and effectively obtain corresponding Agent access addresses, break the barriers between cross-system Agents, and establish a trusted connection.
[0081] Figure 9 is a flowchart of a multi-Agent collaborative communication method based on a block chain according to another exemplary embodiment of the application. The multi-Agent collaborative communication method based on a block chain is further proposed on the basis of the embodiment shown in Figure 2 As shown in the embodiment,Figure 9 As shown in the figure, the exemplary blockchain-based multi-Agent collaborative communication method further includes steps S910-S930 after step S230, which are described in detail as follows:
[0082] Step S910, in response to completing data interaction, a communication release request is sent to the target Agent.
[0083] The communication release request is used to disconnect the trusted communication between the source Agent and the target Agent. If the target Agent passes the communication release request, step S920 is continued.
[0084] Step S920, in response to the target Agent passing the communication release request, the trusted communication with the target Agent is released, and the state of the source Agent is updated to a collaborative preparation state.
[0085] The collaborative preparation state is used to indicate that the source Agent can currently establish trusted communication with other Agents. Accordingly, if the source Agent is in a non-collaborative preparation state (e.g., is in trusted communication with the target Agent), it indicates that the source Agent cannot currently establish trusted communication with other Agents.
[0086] Step S930, a collaborative optimization record corresponding to the current communication is sent to the blockchain, so that the blockchain updates the state of the source Agent according to the state update request.
[0087] The collaborative optimization record can record the content of the current collaborative optimization, so that the source Agent obtains the collaborative optimization information related to itself in the blockchain and realizes the service optimization of itself. The state of the source Agent can include but is not limited to: update of the service capability of the source Agent, update of the collaborative preparation state, update of the description information, and update of the version.
[0088] It should be noted that step S930 can be executed before step S920 or synchronously with step S920, and the present application does not limit this.
[0089] As can be seen from the above, the blockchain-based multi-Agent collaborative communication method provided by the present application includes a three-stage communication process of "connection establishment-information transmission-connection release". A reliable connection is established under the support of the blockchain, and the asymmetric encryption technology is used to realize secure information transmission, so as to guarantee the information security in the Agent collaboration process without human intervention.
[0090] Figure 10 is a block diagram of a blockchain-based multi-Agent collaborative communication device according to an exemplary embodiment of the present application. As shown in the figure, the device includes: Figure 10
[0091] The sending module 1010 is configured to send a communication request to a blockchain, the communication request comprising index information of a target agent; the receiving module 1020 is configured to obtain first response information returned by the blockchain, the first response information comprising a communication address of the target agent, the communication address being obtained by the blockchain based on the index information to search a node information list; and the communication module 1030 is configured to establish trusted communication with the target agent through the communication address.
[0092] In another exemplary embodiment, the communication module 1030 comprises a sending unit and a receiving unit.
[0093] The sending unit is configured to send a connection establishment request to the target agent through the communication address, the connection establishment request comprising a public key of the source agent and intention description information.
[0094] The receiving unit is configured to obtain second response information and perform data interaction with the target agent to optimize service capability of the source agent.
[0095] The second response information is returned by the target agent when a reliability score of the source agent is greater than a score threshold, the reliability score being obtained by the blockchain based on historical communication records of the source agent, the historical communication records of the source agent being obtained by searching the source agent's public key as an index, and the source agent's public key being provided by the target agent to the blockchain.
[0096] In another exemplary embodiment, the receiving unit, in a specific embodiment of performing data interaction with the target agent, is configured to:
[0097] sign target data by using a public key of the source agent, obtain a digest of the target data, and send the target data and the digest of the target data to the target agent; or
[0098] encrypt target data by using a public key of the target agent, sign a ciphertext of the target data by using a public key of the source agent, obtain a digest of the ciphertext, and send the ciphertext and the digest of the ciphertext to the target agent.
[0099] In another exemplary embodiment, the apparatus further comprises:
[0100] The sending module 1010 is configured to send a communication release request to the target agent in response to completing data interaction, the communication release request being used to disconnect trusted communication with the target agent.
[0101] The communication module 1030 is configured to release the trusted communication with the target Agent and update the state of the source Agent to a cooperative preparation state in response to the target Agent releasing the communication by the communication release request.
[0102] The sending module 1010 is configured to send the cooperative optimization record corresponding to the current communication to the blockchain, so that the blockchain updates the state of the source Agent according to the state update request.
[0103] In another exemplary embodiment, the index information of the target Agent is a service capability requirement; the service capability requirement includes a service type, an attribute, a performance index and a distance index; the service type and the attribute of the target Agent are matched with the service type and the attribute indicated by the service capability requirement respectively, and the index deviation of the target Agent is the smallest among the candidate Agents; the index deviation is obtained by weighted sum of a first index difference and a second index difference, the first index difference is calculated based on the actual performance of the target Agent and the performance index; and the second index difference is calculated based on the distance between the target Agent and the source Agent and the distance index.
[0104] In another exemplary embodiment, the apparatus further includes:
[0105] The sending module 1010 is configured to broadcast a blockchain access request to obtain an access interface of the blockchain.
[0106] The sending module 1010 is configured to send node registration information through the access interface of the blockchain, so that the blockchain updates the node information list based on the node registration information.
[0107] The node registration information includes at least one of the following: Agent identifier, communication address, communication permission, and function description information.
[0108] It should be noted that the blockchain-based multi-Agent cooperative communication apparatus provided in the above embodiments and the blockchain-based multi-Agent cooperative communication method provided in the above embodiments belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be repeated here. The blockchain-based multi-Agent cooperative communication apparatus provided in the above embodiments can allocate the above functions to different functional modules according to the needs in actual application, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above, and this is not limited herein.
[0109] The embodiments of the present application also provide a blockchain-based multi-agent collaborative communication device, comprising: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the blockchain-based multi-agent collaborative communication device to implement the blockchain-based multi-agent collaborative communication method provided in each of the above embodiments.
[0110] Figure 11 A structural schematic diagram of a computer system of a blockchain-based multi-agent collaborative communication device suitable for implementing the embodiments of the present application is shown. It should be noted that, Figure 11 The computer system 1100 of the blockchain-based multi-agent collaborative communication device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0111] As Figure 11 shown, the computer system 1100 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1102 or loaded from a storage portion 1108 into a random access memory (RAM) 1103, such as performing the methods described in the above embodiments. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0112] The following components are connected to the I / O interface 1105: an input portion 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage portion 1108 including a hard disk, and the like; and a communication portion 1109 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. The communication portion 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as necessary. A removable recording medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 1110 as necessary, so that a computer program read therefrom is installed in the storage portion 1108 as necessary.
[0113] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing computer programs for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1109, and / or installed from the detachable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, various functions defined in the system of the present application are executed.
[0114] It should be noted that the computer readable medium shown in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable signal medium can include a data signal propagated in a baseband or as a carrier wave in a propagated data signal, in which the computer readable computer program is carried. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium that can send, propagate or transfer the program for use by or in connection with the instruction execution system, apparatus or device. The computer program contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.
[0115] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowcharts, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0116] The units described in the embodiments of the present application can be implemented by software, or by hardware, or by a combination of software and hardware. The units described may
[0117] Another aspect of the present application provides a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the method for multi-agent collaborative communication based on blockchain as described above. The computer readable storage medium can be included in the multi-agent collaborative communication device based on blockchain described in the above embodiments, or can exist separately and not be assembled into the multi-agent collaborative communication device based on blockchain.
[0118] Another aspect of the present application provides a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for multi-agent collaborative communication based on blockchain provided in each of the above embodiments.
[0119] The above is only the preferred exemplary embodiments of the present application, and is not intended to limit the implementation of the present application. Those skilled in the art can easily make corresponding modifications or variations according to the main idea and spirit of the present application, and therefore the protection scope of the present application should be subject to the protection scope required by the claims.
Claims
1. A blockchain-based multi-agent collaborative communication method, characterized in that, Applied to the source Agent, the method includes: A communication request is sent to the blockchain, the communication request including the index information of the target agent; the index information of the target agent is the service capability requirement; the service capability requirement includes service type, attribute, performance index and distance index; the service type and attribute of the target agent match the service type and attribute indicated by the service capability requirement, and the index deviation of the target agent is the smallest among the candidate agents; Obtain the first response information returned by the blockchain, the first response information including the communication address of the target Agent, the communication address being obtained by the blockchain from the node information list based on the index information; A connection establishment request is sent to the target Agent via the communication address. The connection establishment request includes the public key of the source Agent and intent description information. Obtain the second response information and interact with the target Agent to optimize its own service capabilities.
2. The method as described in claim 1, characterized in that, The second response information is returned by the target agent when the reliability score of the source agent is greater than the score threshold. The reliability score is obtained by the blockchain based on the historical communication records of the source agent. The historical communication records of the source agent are obtained by retrieving the public key of the source agent as an index. The public key of the source agent is provided to the blockchain by the target agent.
3. The method as described in claim 2, characterized in that, The data interaction with the target Agent includes: The target data is signed using its own public key to obtain a digest of the target data, and then the target data and its digest are sent to the target Agent; or... The target data is encrypted using the public key of the target Agent, and the ciphertext of the target data is signed using its own public key to obtain a digest of the ciphertext. The ciphertext and the digest of the ciphertext are then sent to the target Agent.
4. The method as described in claim 1, characterized in that, The method further includes: In response to the completion of data interaction, a communication release request is sent to the target Agent, the communication release request being used to disconnect trusted communication with the target Agent; In response to the target agent's communication release request, the trusted communication with the target agent is released, and the self-state is updated to the cooperative ready state; Send the collaborative optimization record corresponding to this communication to the blockchain so that the blockchain updates the state of the source agent according to the state update request.
5. The method as described in claim 1, characterized in that, The deviation of the indicator is obtained by weighted summation of the difference between the first indicator and the difference between the second indicator, wherein the first indicator difference is calculated based on the actual performance of the target agent and the performance indicator; The second indicator difference is calculated based on the distance between the target agent and the source agent and the distance indicator.
6. The method as described in claim 1, characterized in that, The method further includes: Broadcast a blockchain access request to obtain the blockchain access interface; Node registration information is sent through the blockchain's access interface so that the blockchain updates the node information list based on the node registration information; The node registration information includes at least one of the following: Agent identifier, communication address, communication permissions, and function description information.
7. A blockchain-based multi-agent collaborative communication system, characterized in that, The blockchain-based multi-agent collaborative communication system includes: a source agent, a target agent, and a blockchain; The source agent is used to send a communication request to the blockchain. The communication request includes the index information of the target agent. The index information of the target agent is a service capability requirement. The service capability requirement includes service type, attributes, performance indicators, and distance indicators. The service type and attributes of the target agent match the service type and attributes indicated by the service capability requirements, and the indicator deviation of the target agent is the smallest among the candidate agents. The blockchain is used to retrieve the communication address of the target agent from the node information list based on the index information, and return first response information to the source agent, wherein the first response information includes the communication address of the target agent; The source agent is further configured to send a connection establishment request to the target agent via the communication address, the connection establishment request including the source agent's public key and intent description information; The target agent is used to return a second response information to the source agent and establish trusted communication with the source agent; The source agent is also used to obtain the second response information and interact with the target agent to optimize its own service capabilities.
8. A blockchain-based multi-agent collaborative communication device, characterized in that, Applied to the source agent, the device includes: A sending module is used to send a communication request to the blockchain. The communication request includes index information of a target agent. The index information of the target agent is a service capability requirement. The service capability requirement includes service type, attributes, performance indicators, and distance indicators. The service type and attributes of the target agent match the service type and attributes indicated by the service capability requirements, and the indicator deviation of the target agent is the smallest among the candidate agents. A receiving module is configured to obtain first response information returned by the blockchain, the first response information including the communication address of the target Agent, the communication address being obtained by the blockchain from the node information list based on the index information; The communication module is used to send a connection establishment request to the target agent through the communication address. The connection establishment request includes the public key of the source agent and intent description information. It also obtains second response information and interacts with the target agent to optimize its own service capabilities.
9. A blockchain-based multi-agent collaborative communication device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the blockchain-based multi-Agent collaborative communication device to implement the blockchain-based multi-Agent collaborative communication method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, It stores computer-readable instructions, which, when executed by the computer's processor, cause the computer to perform the blockchain-based multi-agent collaborative communication method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Block chain-based trusted service scheduling method and device, equipment and storage medium
CN113347212A
Offshore distributed multi-source heterogeneous spatio-temporal data query method and system
CN117290617A