Composite agent communication method based on relation graph constraint

By using a relation graph-based composite agent communication method, the problems of cross-domain identity fragmentation and insufficient relation mapping are solved, realizing unified identity management and business process constraints among agents, and improving the system's interoperability and resource utilization.

CN122047285APending Publication Date: 2026-05-15SHANGHAI HECHUAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI HECHUAN TECHNOLOGY CO LTD
Filing Date
2025-12-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing composite agent communication technologies suffer from problems such as cross-domain identity fragmentation, lack of effective relationship mapping mechanisms, and insufficient communication protocol compatibility, resulting in low agent registration efficiency, difficulty in access control, low collaboration efficiency, unreasonable resource allocation, and poor system maintainability.

Method used

A composite agent communication method based on relational graph constraints is adopted. The relational graph is constructed using OWL language and RDF, which supports A2A, MCP and ANP agent communication compatibility. After receiving the task request, the master agent decomposes and assigns sub-tasks, and the sub-agents perform identity verification and permission verification to achieve cross-domain unified identity management and business process constraints.

Benefits of technology

It achieves unified management and control of cross-domain identities, reduces manual synchronization operations, improves coordination success rate, enhances system interoperability and resource utilization, solves the problems of identity fragmentation and insufficient relationship mapping, and improves system adaptability and collaboration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122047285A_ABST
    Figure CN122047285A_ABST
Patent Text Reader

Abstract

The invention discloses a relation graph constraint-based composite agent communication method, which relates to the technical field of artificial intelligence, and comprises the following steps of: constructing a relation graph through an OWL language and a semantic web specification RDF; constructing and registering a composite agent group of the main control agent and the sub-agents based on the relation graph; after receiving an external task request, the main control agent completes sub-task decomposition and distribution through the sub-agents; a communication request is initiated between the sub-agents, two-way identity verification is completed through the main control agent, verification is performed based on the relation graph, and after verification is passed, the sub-agents execute sub-tasks and feed back results; and if the sub-agents fail, information is reported to the main control agent, and the main control agent allocates tasks again after identity verification. According to the method provided by the invention, the global unique identity identifier is configured for the agent node in the relation graph, so that cross-organization and cross-numeric-domain identity unified management and control are realized, and the problems of identity fragmentation and data inconsistency in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a composite agent communication method based on relational graph constraints. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent agents are increasingly being used in complex scenarios such as intelligent manufacturing, smart cities, and autonomous driving. To meet the demands of complex tasks, a single intelligent agent is no longer sufficient to fulfill functional requirements. However, existing composite intelligent agent communication technologies have many shortcomings: on the one hand, the problem of cross-domain identity fragmentation is prominent, with the same entity having multiple unrelated identity representations in different systems, resulting in low registration efficiency, inconsistent data, and the need for manual synchronization of identity information; on the other hand, there is a lack of effective relationship mapping mechanisms between intelligent agents. Existing technologies are mostly designed based on a digital native worldview, ignoring the asymmetry, hierarchical structure, and business constraints in the real world, leading to difficulties in access control, low collaboration efficiency, unreasonable resource allocation, and poor system maintainability; in addition, existing intelligent agent communication protocols lack compatibility, resulting in poor interoperability between different types of intelligent agents and difficulty in forming efficient collaboration. Therefore, this invention proposes a composite intelligent agent communication method based on relational graph constraints. Summary of the Invention

[0003] To address the aforementioned technical problems, a composite agent communication method based on relational graph constraints is provided. This technical solution solves the problems of fragmented cross-domain identities, lack of effective relational mapping mechanisms between agents, and insufficient compatibility of existing agent communication protocols.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A composite agent communication method based on relation graph constraints, comprising: S1. Construct relational graphs using the OWL language and the Semantic Web specification RDF, while also supporting communication with A2A, MCP, and ANP agents; S2. Constructing and registering a composite intelligent agent group of master and sub-intelligent agents based on relational graphs; S3. After receiving an external task request, the master control agent queries the relationship graph and completes the decomposition and allocation of sub-tasks through sub-agents. S4. When a communication request is initiated between sub-agents, the two-way authentication is first completed by the main control agent authentication core module, and then the communication permissions and collaboration logic are verified based on the relationship graph. After the verification is successful, the sub-agents execute sub-tasks and report the results. S5. If a sub-agent malfunctions, the information is reported to the master agent, which then reassigns the task after verifying the identity.

[0005] Preferably, step S1 specifically includes: Using the OWL language, a domain core ontology and a protocol adaptation ontology are constructed respectively. The core ontology initializes the basic types of the master intelligent agent class, sub-intelligent agent class, and task class in the relation graph. Based on the relation graph, its attributes, relation types, and structural constraints are defined. The attributes also include real-time health status, which is a composite index. Its value can be defined as a discrete state or a continuous health score, and a pre-set expected task spectrum. The expected task spectrum adopts the ontology form to define the task class and its required capabilities and service quality constraints. The protocol adaptation ontology imports the core ontology through the ontology import mechanism of the OWL language, and uses the equivalence class declaration and OWL property equivalence declaration axioms of the OWL language to establish the semantic equivalence relationship between the external protocol elements of A2A Action, MCP ToolCall, and ANP Message and the core ontology. Classes, attributes, and axioms are encoded using the RDF serialization standard format to generate structured machine-readable documents, forming the initial schema layer of the relational graph; Based on the generated readable RDF document, an RDF triple database supporting OWL inference is loaded. The database has a built-in semantic inference engine, loads semantic patterns, constraint rules and protocol mapping, constructs semantics, and automatically performs logical deduction on the input query data. Configure the SPARQL query endpoint and data update transaction interface based on the RDF database, perform an initial query on the graph, and confirm that the number of nodes and relations in the query result is 0. The preset business logic constraints and inference rules have all been activated and are in a ready state.

[0006] Preferably, step S2 specifically includes: Instantiate and start the master control agent, which integrates an identity verification core module and an internal coordination and scheduling module; after starting, connect to the constructed relational graph database to complete identity binding and protocol handshake. When any sub-agent that joins the cluster starts up, it proactively sends an access request to the master agent, which includes an identity credential conforming to the cluster security specifications and a capability description file that details its functional interfaces, performance parameters, and cooperation protocols. When the master intelligent agent receives an authentication request, it performs dual verification of credentials and graph node matching. If the verification is successful, it assigns a globally unique identifier to the sub-intelligent agent in its internal registry, initiates a transaction request to the relational graph database, creates a new node with the unique identifier as the index, and writes the intelligent agent's capability attributes and initial state as node attributes. After successful registration, the identity verification and key distribution core module distributes a unique communication encryption key to each sub-agent. After receiving and loading the key, the sub-agent establishes a secure communication link based on asymmetric encryption with the master agent. The internal coordination and scheduling module then initiates a full lifecycle status monitoring and health assessment mechanism for the sub-agent. Through the secure communication link, the module continuously collects signals such as the sub-agent's computing resource utilization, task queue backlog status, and abnormal log frequency. Based on the pre-configured health assessment mechanism, the module performs real-time analysis and weighted calculation on the above signals, dynamically generates a quantitative health score, and comprehensively determines its operating status as ready, busy, overloaded, or abnormal. The status information and health score are synchronized in real time to the attribute set of the corresponding sub-agent node in the system relationship graph, supporting global coordination and dynamic scheduling decisions. After the sub-agents complete registration, the master agent performs a cluster readiness self-check.

[0007] Preferred steps for cluster-ready self-check: The master agent retrieves the relation graph using the SPARQL query language to obtain the set of sub-agent nodes and their capability attributes in the graph; it obtains the list of currently registered and online sub-agents from the internal coordination and scheduling module; it compares the two, and if the actual online set is a subset or the entire set of the graph's preset set, and all key capability nodes are online, then it triggers subsequent analysis. The cluster functional coverage analysis is the functional description and capability level attributes of the set of sub-agent nodes connected to the node relationship edge. It is aggregated and analyzed by the internal coordination and scheduling module to generate a structured global cluster capability matrix report. The capability matrix is ​​matched with the preset expected task spectrum to identify key capability gaps or single-point dependency risks. The master control agent performs simulated queries and reasoning based on the business rules and high-frequency task types defined in the relationship graph, pre-calculates the preferred collaborative path and candidate sub-agent set for the high-frequency task type, and verifies that all business rules and reasoning logic in the relationship graph are in an active state that can be executed correctly. The self-check process was executed successfully, and no disruptive anomalies were found. In the internal coordination and scheduling module, the overall status of the cluster was marked as ready. A cluster ready timestamp and running attributes were updated to the master control agent node in the relationship graph. A notification signal indicating that the cluster self-check was completed and ready was sent to the external interface.

[0008] Preferably, step S3 specifically includes: The main control agent parses external task requests, extracts task type, functional requirements, accuracy and time limit requirements, and forms a task requirement vector. Based on the task requirement vector, a SPARQL query statement is constructed to retrieve sub-agent nodes with matching functional attributes and active status in the relationship graph, forming a candidate set. The master control agent obtains real-time load data of each candidate node based on the internal coordination and scheduling module, calculates the load balancing coefficient of each node through a weighted balancing algorithm, and selects the node with the lowest coefficient that meets the estimated resource requirements as the task executor. Select a node to send a subtask instruction and submit a SPARQL update operation to the relation graph in a transactional manner: create a subtask node, establish a relation edge between the node and the executor node, and update the load and status attributes of the executor.

[0009] Preferably, the specific steps of the weight balance algorithm are as follows: Based on the real-time query of the relational graph, the internal coordination and scheduling module is used to construct a multi-dimensional load state vector for each candidate sub-agent node i, including CPU utilization, memory usage, current task queue length, and power consumption status. Each load state vector is normalized and mapped to the [0,1] interval; Define a weight vector corresponding to the relative importance of each load metric; the weighted load coefficient of node i. The core formula for calculation is: ; In the formula, Let j be the strategy weight for the j-th load dimension metric. This is the normalized measurement of candidate sub-agent node i on the j-th load metric; this value is obtained through normalization processing performed on each load state vector. Based on calculation The scoring results are based on the health check in the relationship graph. If any key indicator attribute of any node is abnormal, a penalty factor is applied to the final score of that node to reduce the probability of it being selected. An ascending sort table is generated based on the weighted load coefficients of candidate nodes. The node with the smallest coefficient value has the best overall performance in terms of load and resource availability. The algorithm outputs a globally unique identifier for this node, which is used as the target for task allocation.

[0010] Preferably, step S4 specifically includes: Sub-agent A initiates a communication request to sub-agent B to complete the task. The sending sub-agent A encapsulates the communication request with the globally unique identifiers of the sender and receiver, the unique transaction ID of the request, the timestamp, the communication type of the request, the task context, the identity credentials, and the temporary token. After encapsulation, the communication request is sent to the communication interface of the master agent. The authentication core module of the main control agent intercepts and processes communication requests, verifying the legitimacy of sender A's identity and the validity of the session through the identity credentials and temporary token in the communication request; and verifying the legitimacy of communication request B's identity and whether it is currently in a responsive state; If both parties' identities are valid and verified, otherwise, generate a failure response with a specific reason for failure, return to sender A, and update the abnormal status to the relationship graph; The verification is successful. The master control agent sends a query using SPARQL based on the relation graph, and the relation graph inference engine continues to run, returning a logical deduction conclusion. Preferably, the logical deduction conclusion specifically includes: Based on the logical deduction, if any verification fails, the master control agent generates a semantic-level failure response, feeds it back to sender A and records it. If the verification passes, the master control agent's identity verification core module generates a one-time session encryption key and distributes it to sub-agents A and B. The master control agent sends the other party's secure connection address and session key identifier communication permission instruction to both parties. The master control agent acts as a security agent, enabling both parties to establish an end-to-end encrypted direct communication link. Sub-agent B executes the sub-task allocation logic based on the communication content. After execution, sub-agent B returns the sub-task execution result to the internal coordination and scheduling module of the master agent through a secure link. The internal coordination and scheduling module synchronously updates the task progress, result status, and communication completion event triggered by this communication to the corresponding task node, agent node, and their relationship edges in the relationship graph.

[0011] Preferably, step S5 specifically includes: The fault information includes the globally unique identifier of the faulty sub-agent, the fault type, and the last known state. A path is generated through the relation edges defined in the relation graph and reported to the master agent. The internal coordination and scheduling module of the master control agent receives the information and initiates an active state inquiry to the faulty sub-agent; After the master control agent confirms the fault, it initiates a transactional graph update, marks the faulty node, and removes its task association. Perform a retrieval of alternative sub-agents; After verifying the identity of the substitute, the master intelligent agent pushes the task context and authorization token; Once the verification is successful, the master agent pushes the complete context information of the original task, the necessary intermediate data, and a temporary authorization token for taking over the task to the replacement sub-agent through an encrypted link; the master agent then establishes a new relationship edge in the relationship graph, pointing from the replacement sub-agent node to the original task node. The substitute sub-agent receives the task context and authorization token, and formally takes over the task by sending a confirmation message to the master agent. The substitute sub-agent starts executing the task from the task interruption point. The master agent updates the task acceptance status of the substitute sub-agent to the relationship graph and continuously monitors its execution progress.

[0012] Preferably, the specific process of intelligent alternative retrieval is as follows: Based on the functional requirements and execution constraints of the original task, the master control agent constructs and executes a SPARQL query oriented towards the relation graph to retrieve candidate sub-agent nodes that are qualified to undertake the task. The query contains multiple constraints to perform precise screening within the graph space. First, the query requires that the functional attributes and capability levels of the candidate nodes match the requirements of the original task. Second, the query requires that the candidate nodes be verified and active. Third, the query, combined with real-time data provided by the internal coordination and scheduling module, requires that the real-time load index of the candidate nodes be lower than a preset threshold. Finally, as a key constraint to ensure the continuity of collaboration, the query requires that the candidate nodes have a connected path in the graph with other collaborative sub-agent nodes currently associated with the original task through one or more defined collaboration relationship types. By executing this SPARQL query, the master agent obtains a set of candidate sub-agent nodes that satisfy all the aforementioned conditions.

[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a composite agent communication method based on relational graph constraints. By configuring globally unique identifiers for agent nodes in the relational graph and combining this with a multi-stage graph construction process, it achieves unified identity management across organizations and digital domains, solving the problems of identity fragmentation and data inconsistency in existing technologies. This reduces manual synchronization operations, lowers system complexity and maintenance costs, and improves coordination success rates. Based on the explicit modeling of hierarchical and collaborative relationships between agents using the relational graph, the method performs task decomposition and communication verification, enabling visualization and reasoning of business process constraints and addressing the lack of relationship mapping between agents. It is compatible with mainstream agent communication protocols, improving system interoperability and adaptability, and expanding application scope. Furthermore, it guides resource scheduling based on the relational graph, ensuring allocation aligns with business logic and improving resource utilization. Attached Figure Description

[0014] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0015] The following description is intended to disclose the invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art.

[0016] Reference Figure 1 As shown, a composite agent communication method based on relational graph constraints includes: S1. Construct relational graphs using the OWL language and the Semantic Web specification RDF, while also supporting communication with A2A, MCP, and ANP agents; Step S1 specifically includes: Using the OWL language, a domain core ontology and a protocol adaptation ontology are constructed respectively. The core ontology initializes the basic types of the master intelligent agent class, sub-intelligent agent class, and task class in the relation graph. Based on the relation graph, its attributes, relation types, and structural constraints are defined. The attributes also include real-time health status, which is a composite index. Its value can be defined as a discrete state or a continuous health score, and a pre-set expected task spectrum. The expected task spectrum adopts the ontology form to define the task class and its required capabilities and service quality constraints. The protocol adaptation ontology imports the core ontology through the ontology import mechanism of the OWL language, and uses the equivalence class declaration and OWL property equivalence declaration axioms of the OWL language to establish the semantic equivalence relationship between the external protocol elements of A2A Action, MCP ToolCall, and ANP Message and the core ontology. Classes, attributes, and axioms are encoded using the RDF serialization standard format to generate structured machine-readable documents, forming the initial schema layer of the relational graph; Based on the generated readable RDF document, an RDF triple database supporting OWL inference is loaded. The database has a built-in semantic inference engine, loads semantic patterns, constraint rules and protocol mapping, constructs semantics, and automatically performs logical deduction on the input query data. Configure the SPARQL query endpoint and data update transaction interface based on the RDF database, perform an initial query on the graph, and confirm that the number of nodes and relations in the query result is 0. The preset business logic constraints and inference rules have all been activated and are in a ready state.

[0017] The serialized ontology documents are loaded into a triple repository that supports OWL inference. The system's built-in semantic inference mechanism loads and applies all axioms defined in these schema layers (including class structures, attribute constraints, and cross-protocol equivalence relations) in real time to automatically deduce the logic of dynamically added and deleted instance data (i.e., RDF triples). This transforms the relation graph from a static schema database into an intelligent constraint hub with deep semantic understanding and dynamic inference capabilities, directly supporting graph-based agent communication permission verification, task semantic matching, and seamless interoperability across multiple protocols.

[0018] S2. Constructing and registering a composite intelligent agent group of master and sub-intelligent agents based on relational graphs; Step S2 specifically includes: Instantiate and start the master control agent, which integrates an identity verification core module and an internal coordination and scheduling module; after starting, connect to the constructed relational graph database to complete identity binding and protocol handshake. When any sub-agent that joins the cluster starts up, it proactively sends an access request to the master agent, which includes an identity credential conforming to the cluster security specifications and a capability description file that details its functional interfaces, performance parameters, and cooperation protocols. When the master intelligent agent receives an authentication request, it performs dual verification of credentials and graph node matching. If the verification is successful, it assigns a globally unique identifier to the sub-intelligent agent in its internal registry, initiates a transaction request to the relational graph database, creates a new node with the unique identifier as the index, and writes the intelligent agent's capability attributes and initial state as node attributes. After successful registration, the identity verification and key distribution core module distributes a unique communication encryption key to each sub-agent. After receiving and loading the key, the sub-agent establishes a secure communication link based on asymmetric encryption with the master agent. The internal coordination and scheduling module then initiates a full lifecycle status monitoring and health assessment mechanism for the sub-agent. Through the secure communication link, the module continuously collects signals such as the sub-agent's computing resource utilization, task queue backlog status, and abnormal log frequency. Based on the pre-configured health assessment mechanism, the module performs real-time analysis and weighted calculation on the above signals, dynamically generates a quantitative health score, and comprehensively determines its operating status as ready, busy, overloaded, or abnormal. The status information and health score are synchronized in real time to the attribute set of the corresponding sub-agent node in the system relationship graph, supporting global coordination and dynamic scheduling decisions. After the sub-agents complete registration, the master agent performs a cluster readiness self-check.

[0019] The specific steps of the cluster readiness self-test are as follows: The master agent retrieves the relation graph using the SPARQL query language to obtain the set of sub-agent nodes and their capability attributes in the graph; it obtains the list of currently registered and online sub-agents from the internal coordination and scheduling module; it compares the two, and if the actual online set is a subset or the entire set of the graph's preset set, and all key capability nodes are online, then it triggers subsequent analysis. The cluster functional coverage analysis is the functional description and capability level attributes of the set of sub-agent nodes connected to the node relationship edge. It is aggregated and analyzed by the internal coordination and scheduling module to generate a structured global cluster capability matrix report. The capability matrix is ​​matched with the preset expected task spectrum to identify key capability gaps or single-point dependency risks. The master control agent performs simulated queries and reasoning based on the business rules and high-frequency task types defined in the relationship graph, pre-calculates the preferred collaborative path and candidate sub-agent set for the high-frequency task type, and verifies that all business rules and reasoning logic in the relationship graph are in an active state that can be executed correctly. The self-check process was executed successfully, and no disruptive anomalies were found. In the internal coordination and scheduling module, the overall status of the cluster was marked as ready. A cluster ready timestamp and running attributes were updated to the master control agent node in the relationship graph. A notification signal indicating that the cluster self-check was completed and ready was sent to the external interface.

[0020] The following scenario illustrates a specific example of SPARQL querying and inference. During the task decomposition and allocation phase, the master agent needs to search the relation graph for sub-agents capable of performing specific types of tasks. For example, when an external request is made for a "high-precision image classification" task, the system first parses the request and extracts the core requirements: the task type is "image classification," and the required accuracy is no less than 0.95. Based on this, the master agent constructs a semantic query. The core logic of this query is: to find all nodes in the relation graph that are of type "sub-agent," and these nodes are associated with a "capability" node through a "capability" relationship; this "capability" node itself must be of the "image processing capability" class or any subclass thereof (e.g., "image classification capability," "object detection capability"), and its "accuracy" attribute value must be greater than or equal to 0.95. By submitting this query to the relation graph database, the system can directly return a list of all candidate agents with matching functions. This process utilizes the class hierarchy defined in the ontology for reasoning. For example, even if an agent's ability is explicitly labeled as "image classification ability" rather than the higher-level "image processing ability", the inference engine can automatically identify it as a qualified candidate based on the axiom that "image classification ability is a subclass of image processing ability".

[0021] During the communication permission verification phase, when sub-agent A requests to send data to sub-agent B, the system needs to verify whether the operation is permitted. To do this, the master agent initiates a query to the graph to confirm whether a "collaborative" relationship edge exists between nodes A and B. More importantly, the query extracts the "permitted interaction type" attribute defined on this relationship edge. For example, this attribute might list "status reporting," "data request," and "result synchronization." The system compares the communication type requested by A (let's say "data request") with this list. Permission verification is considered successful only if the request type is included in the permitted list and the relationship edge itself is in a valid state. This query directly utilizes the explicitly stored relationships and attributes in the graph for logical judgment.

[0022] In the fault recovery and replacement retrieval phase, when a sub-agent fails and a replacement needs to be found, the query conditions become more complex. The master agent needs to construct a query with multiple filtering conditions. First, the query needs to find other agent nodes with the same capabilities as the original task requirements. Second, these nodes must be "verified and active." Third, real-time load data needs to be used to filter out nodes whose current load is below a preset threshold. Finally, and most importantly, the query requires that candidate nodes in the relationship graph be connected to the remaining collaborating sub-agent nodes in the original task through one or more defined collaborative relationship paths. For example, if the original task was completed collaboratively by agents A, B, and C, and B fails, finding a replacement for B requires not only that its capabilities match B's, but also that it has an established or potential collaborative path with A and C that can be deduced from the existing relationship network. This complex combination of conditions is submitted to the graph database through a structured query. The inference engine will integrate all ontology rules and instance data to return a list of the most suitable replacement nodes that fully satisfy all constraints. This process fully demonstrates the semantic retrieval and logical reasoning capabilities based on relational graphs, integrating functional matching, state filtering, and collaborative continuity verification into a unified query.

[0023] S3. After receiving an external task request, the master control agent queries the relationship graph and completes the decomposition and allocation of sub-tasks through sub-agents. Step S3 specifically includes: The main control agent parses external task requests, extracts task type, functional requirements, accuracy and time limit requirements, and forms a task requirement vector. Based on the task requirement vector, a SPARQL query statement is constructed to retrieve sub-agent nodes with matching functional attributes and active status in the relationship graph, forming a candidate set. The master control agent obtains real-time load data of each candidate node based on the internal coordination and scheduling module, calculates the load balancing coefficient of each node through a weighted balancing algorithm, and selects the node with the lowest coefficient that meets the estimated resource requirements as the task executor. Select a node to send a subtask instruction and submit a SPARQL update operation to the relation graph in a transactional manner: create a subtask node, establish a relation edge between the node and the executor node, and update the load and status attributes of the executor.

[0024] The specific steps of the weight balance algorithm are as follows: Based on the real-time query of the relational graph, the internal coordination and scheduling module is used to construct a multi-dimensional load state vector for each candidate sub-agent node i, including CPU utilization, memory usage, current task queue length, and power consumption status. Each load state vector is normalized and mapped to the [0,1] interval; Define a weight vector corresponding to the relative importance of each load metric; the weighted load coefficient of node i. The core formula for calculation is:

[0025] In the formula, Let j be the strategy weight for the j-th load dimension metric. This is the normalized measurement of candidate sub-agent node i on the j-th load metric; this value is obtained through normalization processing performed on each load state vector. Based on calculation The scoring results are based on the health check in the relationship graph. If any key indicator attribute of any node is abnormal, a penalty factor is applied to the final score of that node to reduce the probability of it being selected. Based on the weighted load coefficients calculated from the candidate nodes, an ascending sort table is generated. The node with the smallest value is the node with the lighter overall load and better resource availability. The algorithm outputs a globally unique identifier for this node as the target for task allocation.

[0026] S4. When a communication request is initiated between sub-agents, the two-way authentication is first completed by the main control agent authentication core module, and then the communication permissions and collaboration logic are verified based on the relationship graph. After the verification is successful, the sub-agents execute sub-tasks and report the results. Step S4 specifically includes: Sub-agent A initiates a communication request to sub-agent B to complete the task. The sending sub-agent A encapsulates the communication request with the globally unique identifiers of the sender and receiver, the unique transaction ID of the request, the timestamp, the communication type of the request, the task context, the identity credentials, and the temporary token. After encapsulation, the communication request is sent to the communication interface of the master agent. The authentication core module of the main control agent intercepts and processes communication requests, verifying the legitimacy of sender A's identity and the validity of the session through the identity credentials and temporary token in the communication request; and verifying the legitimacy of communication request B's identity and whether it is currently in a responsive state; If both parties' identities are valid and verified, otherwise, generate a failure response with a specific reason for failure, return to sender A, and update the abnormal status to the relationship graph; The verification passed. The master control agent sends a query using SPARQL based on the relation graph, and the inference engine based on the relation graph continues to run, returning a logical deduction conclusion.

[0027] The logical derivation conclusions specifically include: Based on the logical deduction, if any verification fails, the master control agent generates a semantic-level failure response, feeds it back to sender A and records it. If the verification passes, the master control agent's identity verification core module generates a one-time session encryption key and distributes it to sub-agents A and B. The master control agent sends the other party's secure connection address and session key identifier communication permission instruction to both parties. The master control agent acts as a security agent, enabling both parties to establish an end-to-end encrypted direct communication link. Sub-agent B executes the sub-task allocation logic based on the communication content. After execution, sub-agent B returns the sub-task execution result to the internal coordination and scheduling module of the master agent through a secure link. The internal coordination and scheduling module synchronously updates the task progress, result status, and communication completion event triggered by this communication to the corresponding task node, agent node, and their relationship edges in the relationship graph.

[0028] The specific process for key distribution in the core authentication module is as follows: When a sub-agent registers, it obtains a digital identity certificate from the master agent. This certificate contains its unique identifier, asymmetric encryption public key, and validity period, and is signed by the master agent. Before initiating communication, the master agent generates a one-time temporary token for the session. The token contains the session identifier, validity period, and authorization scope, and is accompanied by a signature. When sub-agent A needs to communicate with sub-agent B, the complete two-way authentication process is initiated sequentially. First, the sending sub-agent A submits a request to the communication arbitration interface of the master agent. This request message must encapsulate the following core elements: A's digital identity certificate, a digital signature generated using A's private key for the key information of this request, and a currently valid temporary session token. Upon receiving the request, the master agent's authentication core module performs the first layer of verification. The verification includes: verifying the signature validity and expiration date of the temporary session token; using the public key in A's certificate to verify the authenticity of the digital signature in the request message to confirm that the request indeed comes from A and has not been tampered with; and simultaneously, immediately querying the relationship graph to confirm that node A's identity status attribute is "verified" and its running status is "active." After successful sender verification, the master agent immediately initiates an active challenge to the designated receiver sub-agent B to complete two-way verification. The challenge message includes a random number generated by the master agent and the identity identifier of the communication initiator A. Sub-agent B must sign the random number and the current timestamp using its private key and return the generated signature along with its own digital identity certificate to the master agent. The master agent then performs receiver verification: it verifies the authenticity of the returned signature using the public key in B's certificate and confirms the validity of the random number and timestamp to prevent replay attacks; simultaneously, it queries the relationship graph to confirm that the status of node B is also "verified - active". After all verification steps are successful, the master control agent makes the final decision. This decision is based not only on the cryptographic verification results but also on business logic judgments using the relationship graph, specifically checking whether a valid collaborative path exists between node A and node B within the current task context. The master control agent only determines that the two-way authentication is successful if both cryptographic authentication and graph business relationship verification are successful. After successful verification, the system immediately enters the key distribution and secure link establishment phase. The authentication core module of the master agent generates a high-strength one-time symmetric session key, dedicated to this communication between A and B. The distribution of this key employs a dual encryption mechanism based on public key infrastructure to ensure security. Specifically, the master agent uses the public keys registered in the certificates of sub-agents A and B respectively to encrypt the symmetric session key, generating two independent ciphertexts. Subsequently, these two ciphertexts are sent to sub-agents A and B respectively through their independent secure control channels. Upon receiving the ciphertexts, A and B decrypt them using their own private keys to securely obtain the same shared session key. Simultaneously with distributing the key, the controlling agent sends a formal communication authorization instruction to both communicating parties. This instruction explicitly informs both parties that they are authorized to communicate and includes a temporary communication endpoint address assigned or agreed upon by the system, an identifier used to identify this session, and the authorized communication validity period. Afterward, sub-agents A and B can use the shared symmetric session key to establish an end-to-end encrypted direct communication channel on the designated endpoint for data exchange required for task collaboration. The controlling agent typically no longer relays business data after this point but instead focuses on monitoring the communication status. The system has a clear handling mechanism for potential anomalies during the process. If authentication fails at any stage, the master agent will immediately terminate the entire process and return a structured error message to the initiator A, clearly indicating the reason for the failure. Simultaneously, this authentication failure event will be recorded in the security audit log and synchronously updated to the attributes of the relevant agent nodes in the relationship graph. For successfully established communication sessions, both the key and the link are subject to strict lifecycle management. The validity period of the session key is strictly bound to the authorized time window in the communication license instruction, and it automatically expires afterward. If the collaborative task is not completed, a complete authentication and key distribution process must be re-initiated to ensure forward security. Building upon the basic processes, the system design allows for security enhancements. For example, the private keys of sub-agents can be stored in a hardware security module, and all signature operations are performed within this hardware-secure environment to prevent private key leakage. In scenarios with even higher security requirements, a key negotiation protocol with forward secrecy can be employed. The master agent coordinates the communication between the two parties to generate a temporary session key, ensuring that even if the long-term private key of a sub-agent is later leaked, historical communication content cannot be decrypted. Furthermore, the system architecture supports pre-configured post-quantum cryptography algorithms as an alternative to address future quantum computing threats.

[0029] S5. If a sub-agent malfunctions, the information is reported to the master agent, which then reassigns the task after verifying the identity.

[0030] Step S5 specifically includes: The fault information includes the globally unique identifier of the faulty sub-agent, the fault type, and the last known state. A path is generated through the relation edges defined in the relation graph and reported to the master agent. The internal coordination and scheduling module of the master control agent receives the information and initiates an active state inquiry to the faulty sub-agent; After the master control agent confirms the fault, it initiates a transactional graph update, marks the faulty node, and removes its task association. Perform a retrieval of alternative sub-agents; After verifying the identity of the substitute, the master intelligent agent pushes the task context and authorization token; Once the verification is successful, the master agent pushes the complete context information of the original task, the necessary intermediate data, and a temporary authorization token for taking over the task to the replacement sub-agent through an encrypted link; the master agent then establishes a new relationship edge in the relationship graph, pointing from the replacement sub-agent node to the original task node. The substitute sub-agent receives the task context and authorization token, and formally takes over the task by sending a confirmation message to the master agent. The substitute sub-agent starts executing the task from the task interruption point. The master agent updates the task acceptance status of the substitute sub-agent to the relationship graph and continuously monitors its execution progress.

[0031] The specific process of intelligent retrieval of alternatives: Based on the functional requirements and execution constraints of the original task, the master control agent constructs and executes a SPARQL query oriented towards the relation graph to retrieve candidate sub-agent nodes that are qualified to undertake the task. The query contains multiple constraints to perform precise screening within the graph space. First, the query requires that the functional attributes and capability levels of the candidate nodes match the requirements of the original task. Second, the query requires that the candidate nodes be verified and active. Third, the query, combined with real-time data provided by the internal coordination and scheduling module, requires that the real-time load index of the candidate nodes be lower than a preset threshold. Finally, as a key constraint to ensure the continuity of collaboration, the query requires that the candidate nodes have a connected path in the graph with other collaborative sub-agent nodes currently associated with the original task through one or more defined collaboration relationship types. By executing this SPARQL query, the master agent obtains a set of candidate sub-agent nodes that satisfy all the aforementioned conditions.

[0032] Based on the above, the specific implementation method is as follows: The smart city traffic management platform submits a real-time task to the composite intelligent agent cluster: "Analyze the monitoring video of the main road during the morning rush hour and generate a congestion report." The master intelligent agent receives the request through a new transaction interface and decomposes and enhances it into four standardized sub-tasks: "video decoding," "traffic flow detection," "event recognition," and "report generation" through a semantic parsing module. Subsequently, the master intelligent agent performs semantic queries and reasoning based on the relationship graph, matching candidate sub-intelligent agents with matching functions for each sub-task. Combining real-time load and health data provided by the internal coordination and scheduling module, it selects the optimal executor through a weighted balancing algorithm (e.g., selecting sub-intelligent agent A to be responsible for traffic flow detection and sub-intelligent agent B to be responsible for report generation). After the task allocation instruction is issued, the master intelligent agent synchronously updates the relationship graph through the data update transaction interface using atomic operations, creating task nodes, establishing allocation relationships, and changing the states of relevant sub-intelligent agents. The inference engine then deduces that the overall task has entered the "in execution" state.

[0033] During execution, after completing the detection, sub-agent A needs to send intermediate results to sub-agent B. After the master agent's authentication core module completes two-way authentication and graph-based collaborative permission verification, both parties obtain a one-time session key and establish an end-to-end encrypted channel for secure data transmission. After sub-agent B generates the final report and submits it, the master agent updates the graph task status to "completed" and releases the sub-agent resources, then pushes the report to the external platform asynchronously.

[0034] If sub-agent A experiences a sudden failure during execution, health monitoring will trigger an alarm. The master agent immediately marks it as "failed" in the graph and retrieves an alternative sub-agent C based on the graph, which has matching functionality, healthy status, meets load requirements, and has a collaborative path with sub-agent B. After identity verification, the task context and data are securely transferred to sub-agent C, which resumes execution from the breakpoint, ensuring the final completion of the task. This embodiment fully demonstrates the entire process from task access, intelligent decomposition, secure collaboration to fault self-healing, verifying the feasibility and advancement of the method that uses a relationship graph as the central hub to achieve secure, efficient, and robust collaboration.

[0035] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A composite agent communication method based on relational graph constraints, characterized in that, include: S1. Construct relational graphs using the OWL language and the Semantic Web specification RDF, while also supporting communication with A2A, MCP, and ANP agents; S2. Constructing and registering a composite intelligent agent group of master and sub-intelligent agents based on relational graphs; S3. After receiving an external task request, the master control agent queries the relationship graph and completes the decomposition and allocation of sub-tasks through sub-agents. S4. When a communication request is initiated between sub-agents, the two-way authentication is first completed by the main control agent authentication core module, and then the communication permissions and collaboration logic are verified based on the relationship graph. After the verification is successful, the sub-agents execute sub-tasks and report the results. S5. If a sub-agent malfunctions, the information is reported to the master agent, which then reassigns the task after verifying the identity.

2. The composite agent communication method based on relational graph constraints according to claim 1, characterized in that, Step S1 specifically includes: Using the OWL language, a domain core ontology and a protocol adaptation ontology are constructed respectively. The core ontology initializes the basic types of the master intelligent agent class, sub-intelligent agent class, and task class in the relation graph. Based on the relation graph, its attributes, relation types, and structural constraints are defined. The attributes also include real-time health status, which is a composite index. Its value can be defined as a discrete state or a continuous health score, and a pre-set expected task spectrum. The expected task spectrum adopts the ontology form to define the task class and its required capabilities and service quality constraints. The protocol adaptation ontology imports the core ontology through the ontology import mechanism of the OWL language, and uses the equivalence class declaration and OWL property equivalence declaration axioms of the OWL language to establish the semantic equivalence relationship between the external protocol elements of A2A Action, MCP ToolCall, and ANP Message and the core ontology. Classes, attributes, and axioms are encoded using the RDF serialization standard format to generate structured machine-readable documents, forming the initial schema layer of the relational graph; Based on the generated readable RDF document, an RDF triple database supporting OWL inference is loaded. The database has a built-in semantic inference engine, loads semantic patterns, constraint rules and protocol mapping, constructs semantics, and automatically performs logical deduction on the input query data. Configure the SPARQL query endpoint and data update transaction interface based on the RDF database, perform an initial query on the graph, and confirm that the number of nodes and relations in the query result is 0. The preset business logic constraints and inference rules have all been activated and are in a ready state.

3. The composite agent communication method based on relational graph constraints according to claim 1, characterized in that, Step S2 specifically includes: Instantiate and start the master control agent, which integrates an identity verification core module and an internal coordination and scheduling module; after starting, connect to the constructed relational graph database to complete identity binding and protocol handshake. When any sub-agent that joins the cluster starts up, it proactively sends an access request to the master agent, which includes an identity credential conforming to the cluster security specifications and a capability description file that details its functional interfaces, performance parameters, and cooperation protocols. When the master intelligent agent receives an authentication request, it performs dual verification of credentials and graph node matching. If the verification is successful, it assigns a globally unique identifier to the sub-intelligent agent in its internal registry, initiates a transaction request to the relational graph database, creates a new node with the unique identifier as the index, and writes the intelligent agent's capability attributes and initial state as node attributes. After successful registration, the identity verification and key distribution core module distributes a unique communication encryption key to each sub-agent. After receiving and loading the key, the sub-agent establishes a secure communication link based on asymmetric encryption with the master agent. The internal coordination and scheduling module then initiates a full lifecycle status monitoring and health assessment mechanism for the sub-agent. Through the secure communication link, the module continuously collects signals such as the sub-agent's computing resource utilization, task queue backlog status, and abnormal log frequency. Based on the pre-configured health assessment mechanism, the module performs real-time analysis and weighted calculation on the above signals, dynamically generates a quantitative health score, and comprehensively determines its operating status as ready, busy, overloaded, or abnormal. The status information and health score are synchronized in real time to the attribute set of the corresponding sub-agent node in the system relationship graph, supporting global coordination and dynamic scheduling decisions. After the sub-agents complete registration, the master agent performs a cluster readiness self-check.

4. The composite agent communication method based on relational graph constraints according to claim 3, characterized in that, Specific steps for cluster-based self-check: The master agent retrieves the relation graph using the SPARQL query language to obtain the set of sub-agent nodes and their capability attributes in the graph; it obtains the list of currently registered and online sub-agents from the internal coordination and scheduling module; it compares the two, and if the actual online set is a subset or the entire set of the graph's preset set, and all key capability nodes are online, then it triggers subsequent analysis. The cluster functional coverage analysis is the functional description and capability level attributes of the set of sub-agent nodes connected to the node relationship edge. It is aggregated and analyzed through the internal coordination and scheduling module to generate a structured global cluster capability matrix report. The capability matrix is ​​matched with the pre-defined expected task spectrum to identify key capability gaps or single-point dependency risks. The master control agent performs simulated queries and reasoning based on the business rules and high-frequency task types defined in the relationship graph, pre-calculates the preferred collaborative path and candidate sub-agent set for the high-frequency task type, and verifies that all business rules and reasoning logic in the relationship graph are in an active state that can be executed correctly. The self-check process was executed successfully, and no disruptive anomalies were found. In the internal coordination and scheduling module, the overall status of the cluster was marked as ready. A cluster ready timestamp and running attributes were updated to the master control agent node in the relationship graph. A notification signal indicating that the cluster self-check was completed and ready was sent to the external interface.

5. The composite agent communication method based on relational graph constraints according to claim 1, characterized in that, Step S3 specifically includes: The main control agent parses external task requests, extracts task type, functional requirements, accuracy and time limit requirements, and forms a task requirement vector. Based on the task requirement vector, a SPARQL query statement is constructed to retrieve sub-agent nodes with matching functional attributes and active status in the relationship graph, forming a candidate set. The master control agent obtains real-time load data of each candidate node based on the internal coordination and scheduling module, calculates the load balancing coefficient of each node through a weighted balancing algorithm, and selects the node with the lowest coefficient that meets the estimated resource requirements as the task executor. Select a node to send a subtask instruction and submit a SPARQL update operation to the relation graph in a transactional manner: create a subtask node, establish a relation edge between the node and the executor node, and update the load and status attributes of the executor.

6. The composite agent communication method based on relational graph constraints according to claim 5, characterized in that, The specific steps of the weight balance algorithm are as follows: Based on the real-time query of the relational graph, the internal coordination and scheduling module is used to construct a multi-dimensional load state vector for each candidate sub-agent node i, including CPU utilization, memory usage, current task queue length, and power consumption status. Each load state vector is normalized and mapped to the [0,1] interval; Define a weight vector corresponding to the relative importance of each load metric; the weighted load coefficient of node i. The core formula for calculation is: ; In the formula, Let j be the strategy weight for the j-th load dimension metric. Let be the normalized measurement value of candidate sub-agent node i on the j-th load metric; This value is obtained through normalization processing performed on each load state vector; Based on calculation The scoring results are based on the health check in the relationship graph. If any key indicator attribute of any node is abnormal, a penalty factor is applied to the final score of that node to reduce the probability of it being selected. Based on the weighted load coefficients calculated from the candidate nodes, an ascending sort table is generated. The node with the smallest value is the node with the lighter overall load and better resource availability. The algorithm outputs a globally unique identifier for this node as the target for task allocation.

7. The composite agent communication method based on relational graph constraints according to claim 6, characterized in that, Step S4 specifically includes: Sub-agent A initiates a communication request to sub-agent B to complete the task. The sending sub-agent A encapsulates the communication request with the globally unique identifiers of the sender and receiver, the unique transaction ID of the request, the timestamp, the communication type of the request, the task context, the identity credentials, and the temporary token. After encapsulation, the communication request is sent to the communication interface of the master agent. The authentication core module of the main control agent intercepts and processes communication requests, verifying the legitimacy of sender A's identity and the validity of the session through the identity credentials and temporary token in the communication request; and verifying the legitimacy of communication request B's identity and whether it is currently in a responsive state; If both parties' identities are valid and verified, otherwise, generate a failure response with a specific reason for failure, return to sender A, and update the abnormal status to the relationship graph; The verification passed. The master control agent sends a query using SPARQL based on the relation graph, and the inference engine based on the relation graph continues to run, returning a logical deduction conclusion.

8. The composite agent communication method based on relational graph constraints according to claim 7, characterized in that, The logical derivation conclusions specifically include: Based on the logical deduction, if any verification fails, the master control agent generates a semantic-level failure response, feeds it back to sender A and records it. If the verification passes, the master control agent's identity verification core module generates a one-time session encryption key and distributes it to sub-agents A and B. The master control agent sends the other party's secure connection address and the communication permission instruction of the session key identifier to both parties. The master control agent acts as a security agent, enabling both parties to establish an end-to-end encrypted direct communication link. Sub-agent B executes the sub-task allocation logic based on the communication content. After execution, sub-agent B returns the sub-task execution result to the internal coordination and scheduling module of the master agent through a secure link. The internal coordination and scheduling module synchronously updates the task progress, result status, and communication completion event triggered by this communication to the corresponding task node, agent node, and their relationship edges in the relationship graph.

9. A composite agent communication method based on relational graph constraints according to claim 1, characterized in that, Step S5 specifically includes: The fault information includes the globally unique identifier of the faulty sub-agent, the fault type, and the last known state. A path is generated through the relation edges defined in the relation graph and reported to the master agent. The internal coordination and scheduling module of the master control agent receives the information and initiates an active state inquiry to the faulty sub-agent; After the master control agent confirms the fault, it initiates a transactional graph update, marks the faulty node, and removes its task association. Perform a retrieval of alternative sub-agents; After verifying the identity of the substitute, the master intelligent agent pushes the task context and authorization token; Once the verification is successful, the master agent pushes the complete context information of the original task, the necessary intermediate data, and a temporary authorization token for taking over the task to the replacement sub-agent through an encrypted link; the master agent then establishes a new relationship edge in the relationship graph, pointing from the replacement sub-agent node to the original task node. The substitute sub-agent receives the task context and authorization token, and formally takes over the task by sending a confirmation message to the master agent. The substitute sub-agent starts executing the task from the task interruption point. The master agent updates the task acceptance status of the substitute sub-agent to the relationship graph and continuously monitors its execution progress.

10. A composite agent communication method based on relational graph constraints according to claim 9, characterized in that, The specific process of intelligent retrieval of alternatives: Based on the functional requirements and execution constraints of the original task, the master control agent constructs and executes a SPARQL query oriented towards the relation graph to retrieve candidate sub-agent nodes that are qualified to undertake the task. The query contains multiple constraints to perform precise screening within the graph space. First, the functional attributes and capability level data of the candidate nodes to be queried must match the original task requirements; Secondly, the query requires that the candidate node's identity status be verified and active; thirdly, the query, combined with real-time data provided by the internal coordination and scheduling module, requires that the candidate node's real-time load index be lower than a preset threshold; finally, as a key constraint to ensure the continuity of collaboration, the query requires that the candidate node, in the graph, has a connected path with other collaborative sub-agent nodes currently associated with the original task through one or more defined collaboration relationship types. By executing this SPARQL query, the master agent obtains a set of candidate sub-agent nodes that satisfy all the aforementioned conditions.