An algebraic homomorphism-based handshake and communication method and system for agent interconnection protocol
By constructing a finite discrete capability description rule base and a partial order set to manage handshake states using an algebraic homomorphism-based approach, the deterministic and semantic compatibility issues of heterogeneous capability negotiation in agent communication are resolved, and secure and reliable agent interconnection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU HONGCHEN LINGJING DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-28
AI Technical Summary
Existing intelligent agent communication protocols lack a unified heterogeneous capability negotiation mechanism, the handshake process lacks mathematical guarantees, session isolation lacks underlying mathematical constraints, and semantic communication lacks a formal foundation, leading to communication failures, inconsistent states, deadlocks, and session conflicts.
We adopt an algebraic homomorphism-based approach, construct a rule base with finite discrete capabilities, use hash values and digital signatures to ensure the verification and mapping of handshake requests, utilize partial order sets to manage handshake states, achieve deterministic rule matching and single homomorphic binding storage, and ensure semantic compatibility and session isolation.
It achieves deterministic handshakes and semantic compatibility between agents, avoids communication failures, state inconsistencies and session conflicts, and provides anti-forgery and isolation guarantees.
Abstract
Description
I. Technical Field
[0001] This invention belongs to the field of communication protocol technology for artificial intelligence agents, specifically relating to a method and system for establishing handshakes and semantically compatible communication between heterogeneous agents based on algebraic homomorphism. II. Background Technology
[0002] With the rapid development of intelligent agent technology, secure, reliable, and interoperable communication connections need to be established between intelligent agents from different manufacturers, with different architectures, and different versions. Currently, the handshake and capability negotiation between intelligent agents face the following prominent problems:
[0003] First, there is a lack of a unified heterogeneous capability negotiation mechanism. Different agents each use their own custom private capability description formats, which cannot automatically determine semantic compatibility during initial communication, leading to communication failures or the need for manual pre-configuration. Existing mainstream agent communication protocols only provide a basic message exchange framework, and capability negotiation relies on developer-defined adapters, failing to guarantee semantic compatibility from the underlying layer.
[0004] Second, the determinism of the handshake process lacks mathematical guarantees. Existing handshake protocols mostly rely on developer-defined state management logic, which may lead to inconsistencies in state, deadlocks, or session conflicts in complex scenarios such as concurrent handshakes, out-of-order handshakes in weak networks, and mixed versions.
[0005] Third, session isolation lacks underlying mathematical constraints. Existing solutions ensure session non-conflict through unique database indexes or program logic, but lack mechanisms to prevent session crosstalk and identity forgery from a mathematical perspective.
[0006] Fourth, the determinism of semantic communication lacks a formal foundation. When two agents with different semantic systems communicate, the translation and mapping of content rely on hard-coded adapters, which cannot automatically guarantee that the semantics will not be distorted during the translation process.
[0007] The root cause of the above problems is that existing technologies are all hard-coded adaptations at the engineering layer, without underlying formal mathematical constraints, and therefore cannot fundamentally guarantee determinism, isolation, and anti-counterfeiting. III. Summary of the Invention
[0008] The technical problem to be solved by this invention is: how to provide a handshake and communication method for intelligent agent interconnection protocol that is independent of the internal implementation of intelligent agents, covers the entire handshake process, guarantees the determinism and semantic compatibility of heterogeneous capability negotiation from the mathematical level, and guarantees session isolation and anti-spoofing.
[0009] Technical solution:
[0010] This invention provides a handshake and communication method for intelligent agent interconnection protocols based on algebraic homomorphism, executed on an intelligent agent device, comprising the following steps:
[0011] Step S1. Describe all the communicable capabilities of each agent into a finite discrete capability description rule base, which is stored in the agent's local storage medium and includes a set of semantic elements, a set of operational rules, and a set of constraint relations;
[0012] Step S2. The handshake initiator constructs a handshake request message, which includes a message type identifier, an initiator identity identifier, a hash value of the initiator capability description rule base, the highest protocol version number supported by the initiator, a timestamp, and a digital signature, and sends it to the handshake responder through the communication network;
[0013] Step S3. After receiving the handshake request message, the handshake responder verifies the message signature and identity identifier, reads the hash value of the initiator's capability description rule base, and performs deterministic rule matching in the locally pre-stored finite capability description rule base space to find the mapping of maintenance operation rules and constraint relationships from the initiator's capability description rule base to the responder's capability description rule base; the finite capability description rule base space is the set of all compatible version capability description rule bases pre-stored locally by the responder.
[0014] Step S4. If the mapping exists, the capability negotiation is successful, the two parties are semantically compatible, the responder creates session resources and constructs a handshake response message, and the handshake continues; if the mapping does not exist, the responder attempts to construct a sub-mapping to be compatible with the initiator's capability subset; if even the smallest subset cannot establish a mapping, the responder returns an incompatibility error code and releases the resources occupied by this handshake; the smallest subset is a capability unit composed of a single semantic element.
[0015] Step S5. The state of the entire handshake process evolves in a finite partial order set maintained by the communication protocol stack. The partial order relationship stipulates that the initial listening occurs before the request is received, the request is received before authentication, authentication occurs before capability negotiation, and capability negotiation occurs before the session is ready. This order is irreversible and cannot be skipped. Each input event triggers a unique state transition.
[0016] Step S6. After a successful handshake, in the agent's secure storage area, the identity identifier, session identifier, encryption key, and capability description rule base version number are stored one-to-one through single homomorphic binding to ensure that the semantic operation space between different sessions does not interfere with each other.
[0017] Furthermore, the deterministic rule matching satisfies the commutativity condition: for all operations in the initiator's capability description rule base, the initiator's operation rules are first mapped to the responder before execution, which is equivalent to first mapping the initiator's elements to the responder before executing the corresponding operation rules; this condition ensures that the semantics are not distorted during the translation process.
[0018] Furthermore, the deterministic rule matching is performed within a pre-defined finite search space. If multiple valid mappings exist, the unique optimal mapping is selected as the negotiation result according to a predefined lexicographical priority rule to avoid ambiguity in multiple mappings.
[0019] Furthermore, the one-to-one correspondence property of the single homomorphic binding ensures that the encryption keys, capability description rule base version numbers, and semantic operation spaces corresponding to different session identifiers are completely isolated. Semantic operations within one session will not affect another session, thus eliminating session crosstalk.
[0020] Furthermore, version compatibility is equivalent to the set of operational rules in the capability description rule base of a lower version agent being a legitimate subset of the set of operational rules in the capability description rule base of a higher version agent, with the subsets satisfying an embedding mapping relationship to ensure semantic consistency in cross-version communication.
[0021] Furthermore, concurrent handshake conflict resolution is handled by the lexicographical priority predefined in the capability description rule base: the element identifiers of the two agents are compared in lexicographical order, and the one with the smaller order value automatically yields and becomes the responder, thus avoiding concurrent deadlock.
[0022] This invention also provides a handshake and communication system for intelligent agent interconnection protocols based on algebraic homomorphism, comprising:
[0023] The capability description rule base storage module is used to store all communicable capability descriptions of an agent in its local storage medium as a finite discrete capability description rule base, which includes a set of semantic elements, a set of operational rules, and a set of constraint relations.
[0024] The partial order state management module runs in the communication protocol stack of the agent and is used to manage the state transitions of the entire handshake process on a finite partial order set. The partial order relationship defines the timing constraints of each state, and each input event triggers a unique state transition. When the partial order state management module detects a concurrent handshake conflict, it automatically resolves the conflict by comparing the lexicographical order of the element identifiers of both parties.
[0025] The rule matching module runs in the communication protocol stack of the agent. It is used to search the finite capability description rule base space pre-stored by the responder for mappings that preserve the operation rules and constraints from the initiator's capability description rule base to the responder's capability description rule base, and to process capability subset downgrade matching. After receiving the handshake request message, the rule matching module first verifies the message signature and identity identifier, and then performs the mapping search.
[0026] The single homomorphic binding storage module runs in the secure storage area of the agent and is used to store the identity identifier, session identifier, encryption key and capability description rule base version number in a one-to-one correspondence using a single homomorphic method. When the session is disconnected or the handshake fails, the single homomorphic binding storage module automatically releases all binding resources corresponding to the session. IV. Detailed Implementation
[0027] Example 1: Normal Handshake and Capability Negotiation
[0028] Agent A and Agent B each have a capability description rule base file, stored on a local disk or secure chip. A's rule base contains three semantic elements (text generation, image recognition, and file reading) and two operational rules (text generation and image recognition can be combined into image-text generation, and file reading and text generation can be combined into summary generation). B's rule base contains four semantic elements (text generation, image recognition, file reading, and code generation) and three operational rules.
[0029] A's communication protocol stack constructs a handshake request message. The message structure includes: message type, initiator AID, rule base hash value, highest supported protocol version number, timestamp, and signature. A sends the message to B through a pre-defined communication transmission link.
[0030] After receiving the message, B's communication protocol stack first verifies the validity of the signature and AID, then extracts the hash value and version number. B's rule matching module reads the capability description content corresponding to the version of A's rule base hash value, and matches semantic elements and operation rules one by one in the local rule base space. B finds that all semantic elements of A have corresponding items in B, and all operation rules of A are consistent with the corresponding operation rules of B after being mapped, satisfying the commutativity condition. The mapping exists, and capability negotiation is successful.
[0031] B creates session resources, including allocating a session identifier, allocating a memory buffer, and starting a heartbeat timer. B constructs a handshake response message, carrying the session identifier and the negotiated encryption key, and sends it to A. After both parties complete the subsequent handshake steps, the session is established.
[0032] Both parties perform semantic encoding and decoding through a negotiated mapping. When A sends a command, the command is mapped and reaches B. B then performs the corresponding calculation according to its own rule base, and the result is consistent with A's expectations.
[0033] Example 2: Capability Incompatibility and Submapping Degradation
[0034] Agent C's rule base contains two semantic elements: speech recognition and speech synthesis. Agent D's rule base only contains text generation and file reading.
[0035] C sends a handshake request message. After receiving the message, D's rule matching module reads C's rule base and finds that none of C's semantic elements have a corresponding item in D, indicating that a complete mapping does not exist.
[0036] The rule matching module of D initiates the sub-mapping degradation process: it attempts to construct subset mappings one by one, using a single semantic element as the smallest subset. The result is that all attempts fail to establish a mapping, and the degradation fails.
[0037] D constructs an error response message, carrying an incompatible error code and a detailed description of the failure reason. D releases all temporary resources allocated for this handshake. Upon receiving the error code, C logs the handshake failure, and the handshake terminates.
[0038] Example 3: Concurrent Handshake Conflict Resolution
[0039] Agents E and F initiate handshake requests to each other almost simultaneously. When E and F receive each other's handshake request messages, they discover that they have also sent their own handshake request messages, thus detecting a concurrent conflict.
[0040] The partial order state management modules of E and F each read the local element identifiers and compare them according to predefined lexicographical priority rules. The lexicographical order of the element identifier of E is less than that of the element identifier of F.
[0041] When E's partial order state management module detects that its own identifier is small, it automatically relinquishes its initiator role, switches to a responder role, cancels the temporary state corresponding to the message it sent, and prioritizes processing the message sent by F.
[0042] F, being the larger identifier, maintains its initiator role and waits for E's handshake response message. Both parties complete the handshake according to deterministic priority, thus avoiding concurrent deadlock.
Claims
1. An algebraic homomorphism-based handshake and communication method for agent interconnection protocol, executed on an agent device, characterized in that, Includes the following steps: Each agent's total communicable capabilities are described as a finite discrete capability description rule base, which is stored in the agent's local storage medium and includes a set of semantic elements, a set of operational rules, and a set of constraint relations. The handshake initiator constructs a handshake request message, which includes a message type identifier, initiator identity identifier, hash value of the initiator capability description rule base, the highest protocol version number supported by the initiator, timestamp and digital signature, and sends it to the handshake responder through the communication network; After receiving the handshake request message, the handshake responder verifies the message signature and identity identifier, reads the hash value of the initiator's capability description rule base, performs deterministic rule matching in the locally pre-stored limited capability description rule base space, and searches for the mapping of the maintenance operation rules and constraint relationships from the initiator's capability description rule base to the responder's capability description rule base. The finite capability description rule base space is a collection of all compatible versions of capability description rule bases pre-stored locally by the responder; If the mapping exists, the capability negotiation is successful, the semantics of both parties are compatible, the responder creates session resources and constructs a handshake response message, and the handshake continues; If the mapping does not exist, the responder attempts to construct a sub-mapping compatible with a subset of the initiator's capabilities; If even the smallest subset cannot establish a mapping, the responder returns an incompatible error code and releases the resources used in this handshake. The minimum subset is a capability unit consisting of a single semantic element; The state of the entire handshake process evolves in a finite partial order set maintained by the communication protocol stack. The partial order relationship stipulates that the initial listening occurs before the request is received, the request is received before authentication, authentication occurs before capability negotiation, and capability negotiation occurs before the session is ready. This order is irreversible and cannot be skipped. Each input event triggers a unique state transition. After a successful handshake, the identity identifier, session identifier, encryption key, and capability description rule base version number are stored one-to-one in the agent's secure storage area through a single homomorphic binding.
2. The method according to claim 1, characterized in that, The deterministic rule matching satisfies the commutativity condition: for all operations in the initiator's capability description rule base, the initiator's operation rules are first mapped to the responder before execution, which is equivalent to first mapping the initiator's elements to the responder before executing the corresponding operation rules; this condition ensures that the semantics are not distorted during the translation process.
3. The method according to claim 1, characterized in that, The deterministic rule matching is performed within a predefined finite search space. If multiple valid mappings exist, the unique optimal mapping is selected as the negotiation result according to a predefined lexicographical priority rule to avoid ambiguity in multiple mappings.
4. The method according to claim 1, characterized in that, The one-to-one correspondence property of the single homomorphic binding ensures that the encryption keys, capability description rule base version numbers and semantic operation spaces corresponding to different session identifiers are completely isolated. Semantic operations within one session will not affect another session, thus eliminating session crosstalk.
5. The method according to claim 1, characterized in that, Version compatibility is equivalent to the set of operational rules in the capability description rule base of a lower version agent being a legitimate subset of the set of operational rules in the capability description rule base of a higher version agent, with the subsets satisfying an embedding mapping relationship to ensure semantic consistency in cross-version communication.
6. The method according to claim 1, characterized in that, Concurrent handshake conflict resolution is handled by the lexicographical priority predefined in the capability description rule base: the element identifiers of the two agents are compared in lexicographical order, and the one with the smaller order value automatically yields and becomes the responder, thus avoiding concurrent deadlock.
7. The method according to claim 1, characterized in that, The construction of sub-maps to be compatible with the initiator's capability subsets is a downgraded matching process in which the responder attempts to construct subset maps one by one, according to the priority order marked in the initiator's capability description, with a single semantic element as the smallest subset, when the complete map does not exist.
8. The method according to claim 1, characterized in that, The finite capability description rule base space pre-stores all compatible versions of the capability description rule base locally on the responder's local machine, supporting homomorphic search on any compatible version of the initiator's capability description rule base.
9. A handshake and communication system for intelligent agent interconnection protocols based on algebraic homomorphism, characterized in that, include: The capability description rule base storage module stores a finite discrete capability description rule base in the agent's local storage medium, containing a set of semantic elements, a set of operational rules, and a set of constraint relations. The partial order state management module runs in the agent's communication protocol stack and manages the state transitions throughout the handshake process on a finite partial order set. The partial order relation defines the temporal constraints of each state, and each input event triggers a uniquely determined state transition. When a concurrent handshake conflict is detected, the partial order state management module automatically resolves the conflict by comparing the lexicographical order of the element identifiers of both parties. The rule matching module runs in the communication protocol stack of the agent. It is used to search the finite capability description rule base space pre-stored by the responder for mappings that preserve the operation rules and constraints from the initiator's capability description rule base to the responder's capability description rule base, and to process capability subset downgrade matching. After receiving the handshake request message, the rule matching module first verifies the message signature and identity identifier, and then performs the mapping search. The single homomorphic binding storage module runs in the secure storage area of the agent and is used to store the identity identifier, session identifier, encryption key and capability description rule base version number in a one-to-one correspondence using a single homomorphic method. When the session is disconnected or the handshake fails, the single homomorphic binding storage module automatically releases all binding resources corresponding to the session.