Session sealing method for agent point-to-point collaboration and electronic device

CN122601397APending Publication Date: 2026-08-18LOVE AVATAR TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611097843.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

智能体身份表达机制存在根本性不足,传统鉴权方案过度依赖单一维度的用户、应用或服务账号主体,无法有效承载智能体模板身份、运行实例身份、任务会话身份、终端身份及授权委派链身份等多维度复合身份信息

Benefits of technology

[0013] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described session sealing method for intelligent agent point-to-point collaboration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601397A_ABST
    Figure CN122601397A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of information security, and discloses a session sealing method for agent point-to-point cooperation and an electronic device. The method comprises the following steps: a first agent and a second agent perform identity authentication in a task context; after the identity authentication is passed, the first agent establishes a sealed session between the first agent and the second agent; the first agent performs minimum processing on a context load to be sent according to capability information and data domain permission information of the second agent, and generates a minimized load; the first agent encrypts the minimized load into a sealed message and sends the sealed message to the second agent through the sealed session, and receives an acknowledgement message returned by the second agent, which represents that the sealed message has been received and processed. The embodiment of the application can enhance the security of agent point-to-point cooperative communication, and ensure the comprehensiveness of identity authentication and the reliability of session management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a session sealing method and electronic device for point-to-point collaboration of intelligent agents. Background Technology

[0002] In the practice of peer-to-peer collaborative communication between intelligent agents, existing technologies have revealed deep-seated structural flaws. The identity representation mechanism for intelligent agents is fundamentally inadequate. Traditional authentication schemes rely excessively on single-dimensional user, application, or service account entities, failing to effectively accommodate multi-dimensional composite identity information such as agent template identity, runtime instance identity, task session identity, terminal identity, and authorization delegation chain identity. This deficiency is particularly pronounced in dynamic collaborative environments. When an intelligent agent executes a task, its permission configuration, capability scope, context boundaries, terminal state, and collaborative stage may all evolve in real time, making it difficult to accurately verify the true identity and permission status of participants. This exposes security credentials to the risk of misuse across tasks; the same credential may be illegally migrated to unrelated task flows, causing task execution chain breaks, context pollution, and data integrity corruption, ultimately weakening the overall system's security protection capabilities and business continuity assurance. Summary of the Invention

[0003] The purpose of this application is to provide a session sealing method and electronic device for agent-to-agent point-to-point collaboration, which can enhance the security of agent-to-agent point-to-point collaborative communication and ensure the comprehensiveness of authentication and the reliability of session management.

[0004] This application provides a session sealing method for agent-to-agent peer-to-peer collaboration, applied to a first agent. The session sealing method for agent-to-agent peer-to-peer collaboration includes: The system requests authentication with the second intelligent agent; the authentication is used to verify the first intelligent agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information. After the identity authentication is successful, a sealed session is established with the second intelligent agent; Based on the capability information and data domain permission information of the second intelligent agent, the context payload to be sent is minimized to generate a minimized payload; The minimized payload is encrypted and sealed using the session encryption key of the sealed session, and the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number of the minimized payload are bound to the sealed payload to generate a sealed message; The sealing message is sent to the second agent through the sealing session; Receive an acknowledgment message from the second agent; the acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent and is associated with the session acknowledgment key.

[0005] In some embodiments, the request for authentication with the second intelligent agent includes: Send a collaboration request message to the second intelligent agent; the collaboration request message carries a first random number generated by the first intelligent agent, running instance information, task session information, terminal identity information, capability information and collaboration intent information; The system receives a collaborative response message from the second intelligent agent to confirm that the identity authentication is successful. The collaborative response message carries a second random number returned by the second intelligent agent, task authorization information, capability information, data domain permission information, authorization delegation chain information, and protocol suite information.

[0006] In some embodiments, establishing a sealed session with the second intelligent agent includes: The session identifier is generated based on the task session information, the terminal identity information, the first random number negotiated with the second intelligent agent, the second random number, and the protocol suite information. Based on the basic key material and the session identifier, the session encryption key and the session confirmation key are derived respectively through the key derivation function; The session identifier, the session encryption key, and the session confirmation key are saved as the session state of the sealed session.

[0007] In some embodiments, prior to generating the session identifier, the method further includes: Based on the protocol suite information of the first intelligent agent and the second intelligent agent, determine the common supported protocol suites of the first intelligent agent and the second intelligent agent. Determine whether the supported protocol suite meets the preset minimum security requirements; If it does not meet the requirements, the sealed session will be refused.

[0008] In some embodiments, generating the session identifier based on the task session information, the terminal identity information, a first random number negotiated with the second intelligent agent, a second random number, and protocol suite information includes: Hash operations are performed on the task session information, the terminal identity information, the first random number, the second random number, and the protocol suite information respectively to obtain the corresponding field hash values; Obtain the authorization delegation chain information of the first intelligent agent; The hash values ​​of the fields are concatenated in a dynamic order associated with the current task stage, and the hash value of the previous field is used as the salt value input for the hash value of the next field. Then, they are merged with the authorization delegation chain information to generate session material. Using the session material as the initial input, multiple hash calculations are performed iteratively, with the output of each iteration serving as the input for the next iteration, and the hash output of the last iteration serving as the session identifier.

[0009] In some embodiments, minimizing the context payload to be sent based on the capability information and data domain permission information of the second intelligent agent includes: Based on the capability information of the second intelligent agent, determine the data fields or data types that the second intelligent agent supports; Based on the data domain permission information of the second intelligent agent, determine the accessible data domains of the second intelligent agent; Based on the supported data fields or the supported data types and the accessible data fields, the context payload is pruned, anonymized, or filtered by type to obtain the minimized payload.

[0010] In some embodiments, the session sealing method for agent-to-agent peer-to-peer collaboration further includes: Obtain the current task stage information associated with the second intelligent agent and the task session identifier; When the current task stage information changes, a permission adjustment request message is sent to the second intelligent agent; the permission adjustment request message carries the updated data field permission information. In response to the permission adjustment confirmation message returned by the second agent, it is determined that subsequent minimization processing will be implemented based on the capability information of the second agent and the updated data domain permission information.

[0011] In some embodiments, the session sealing method for agent-to-agent peer-to-peer collaboration further includes: Obtain audit digest information of the preceding session associated with the task session identifier; the preceding session is another sealed session in which the first agent or the second agent participated; When generating the session identifier or deriving the session confirmation key, the audit digest information of the preceding session is used as one of the input parameters; The audit summary information of the current sealed session is associated with the audit summary information of the preceding session to form an audit trail chain.

[0012] This application also provides a session sealing method for agent-to-agent peer-to-peer collaboration, applied to a second agent. The session sealing method for agent-to-agent peer-to-peer collaboration includes: In response to a request from a first intelligent agent, the first intelligent agent is authenticated; the authentication is used to verify the first intelligent agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information. After successful identity authentication, a sealed session is established with the first intelligent agent; The sealed message is received from the first agent through the sealed session; the sealed message is generated by encrypting and sealing the minimized payload using the session encryption key of the sealed session, and is bound with the session identifier of the sealed session, the terminal identifier of the first agent and the message sequence number of the minimized payload. The minimized payload is obtained by minimizing the context payload to be sent based on the capability information and data domain permission information of the second agent. The sealed message is desealed using the session encryption key of the sealed session; Integrity verification and replay protection verification are performed based on the session confirmation key and the session identifier, terminal identifier, and message sequence number bound in the sealed message; After successful verification, an acknowledgment message is returned to the first agent; the acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent and is associated with the session confirmation key.

[0013] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described session sealing method for intelligent agent point-to-point collaboration.

[0014] The beneficial effects of this application are as follows: By comprehensively verifying the runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information of the first intelligent agent during the identity authentication stage, the authenticity, permissions, and intent of the intelligent agent in a specific task session can be more accurately identified and verified. Through the sealed session established after successful identity authentication, the generation of its session identifier is closely related to the task session information and terminal identity information. When generating a sealed message, the session identifier of the sealed session, the terminal identifier of the first intelligent agent, and the message sequence number are bound to the encrypted minimized payload, ensuring that each communication message is strictly associated with a specific task, session, and intelligent agent instance. Based on the capability information and data domain permission information of the second intelligent agent, the context payload to be sent is minimized, allowing for fine-grained control of data transmission granularity, reducing the risk of data leakage, and optimizing communication efficiency. Therefore, by introducing multi-dimensional identity authentication, deeply context-bound sealed sessions, fine-grained payload minimization, and a strongly correlated confirmation mechanism, a comprehensive, secure, and efficient intelligent agent point-to-point collaborative communication framework is constructed, significantly improving the security, reliability, and controllability of intelligent agent collaboration. Attached Figure Description

[0015] Figure 1 This is an application environment diagram of the session sealing method for point-to-point collaboration of intelligent agents provided in the embodiments of this application.

[0016] Figure 2 This is a flowchart of a session sealing method for point-to-point collaboration of intelligent agents provided in the first embodiment of this application.

[0017] Figure 3 This is a flowchart of a method for requesting and authenticating the identity of a second intelligent agent, as provided in an embodiment of this application.

[0018] Figure 4 This is a flowchart of a method for establishing a sealed session with a second intelligent agent, as provided in an embodiment of this application.

[0019] Figure 5 This is a flowchart of a method for minimizing the context payload to be transmitted, provided in an embodiment of this application.

[0020] Figure 6 This is a flowchart of a session sealing method for point-to-point collaboration of intelligent agents provided in the second embodiment of this application.

[0021] Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0023] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and drawings are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application. Furthermore, the information, data, and signals involved in the embodiments of this application are all authorized by relevant parties or have been fully authorized by all parties, and the collection, use, and processing of related data comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0025] In peer-to-peer collaborative communication between intelligent agents, existing technologies suffer from insufficient representation of agent identities. Traditional interface authentication mechanisms, based primarily on user, application, or service accounts, fail to effectively express composite identity information such as agent template identity, agent instance identity, task session identity, terminal identity, and authorization delegation chain identity. This makes it difficult to accurately verify the authenticity and permission status of participating agent instances in dynamic collaboration scenarios, especially when permissions, capabilities, context scope, terminal status, and collaboration stages change dynamically. It fails to meet the complex authorization requirements of whether a specific agent instance has the right to receive specific context fragments and execute specific task steps within a specific task session, specific terminal source, and specific data domain boundary. Furthermore, the binding between sessions and task contexts is insufficient. Traditional communication protocols only focus on connection security, lacking binding to task identifiers, context summaries, business data domains, and collaboration stages. This allows the same credentials to be misused for unrelated tasks, compromising task integrity and security. For example, in a financial transaction processing system, when a transaction initiating agent sends a transaction request to a risk control agent, the risk control agent cannot express the identity of the running instance and the current task session ID. Therefore, it can only verify based on application-level credentials and cannot confirm whether the request originates from a specific instance within a legitimate session. Simultaneously, the context payload is not bound to the task stage, potentially causing the risk control agent to receive expired data from historical sessions or incorrectly use current session data for other tasks. When the transaction enters the settlement stage, the settlement agent, unable to verify data domain permissions, may receive customer privacy fields beyond its authorized scope. Furthermore, the lack of terminal identity information prevents the system from recognizing the trusted status of the requesting device, and the absence of collaborative intent information in the authentication process prevents the agent from determining whether the current interaction aligns with the preset task objectives.

[0026] In such scenarios, if the aforementioned issues are not addressed, intelligent agent collaborative systems will face the risk of identity theft. Unauthorized entities may impersonate legitimate intelligent agent instances to participate in collaboration, leading to unauthorized access to sensitive data. Decoupling task context from sessions will cause data obfuscation, causing intelligent agents to process data unrelated to their tasks and disrupting business logic consistency. Furthermore, the lack of a dynamic permission verification mechanism will prevent the system from adapting to real-time changes in permissions during collaboration, increasing the exposure surface of security vulnerabilities and ultimately affecting the reliability and trustworthiness of the entire collaborative network.

[0027] Based on this, embodiments of this application provide a session sealing method and electronic device for peer-to-peer collaboration of intelligent agents. By introducing a multi-dimensional identity authentication mechanism, a dynamic session identifier generation method, and a minimum payload processing based on capabilities and permissions, it effectively solves the problems of insufficient identity expression mechanism and lack of session management correlation in the prior art. It enhances the security of peer-to-peer collaborative communication of intelligent agents and ensures the comprehensiveness of identity verification and the reliability of session management.

[0028] Figure 1 This diagram illustrates the application environment of the session sealing method for point-to-point collaboration among intelligent agents provided in this embodiment. (See also...) Figure 1 This method is applied to a session sealing system for agent-to-agent collaboration. The system includes a first agent 101 and a second agent 102. The first agent 101 and the second agent 102 are connected via a network. The first agent 101 requests authentication with the second agent 102. After successful authentication, a sealed session is established between the first agent 101 and the second agent 102. Based on the capabilities and data domain permission information of the second agent 102, the first agent 101 minimizes the context payload to be sent, generating a minimized payload. The minimized payload is then encrypted and sealed using the session encryption key of the sealed session. The session identifier of the sealed session, the terminal identifier of the first agent 101, and the message sequence number of the minimized payload are bound to the sealed payload to generate a sealed message. This sealed message is sent to the second agent 102 through the sealed session, and an acknowledgment message is received from the second agent 102. Authentication verifies the first agent 101's runtime instance information, task session information, terminal identity information, capabilities, and collaboration intent information. The acknowledgment message indicates that the sealed message has been received and processed by the second agent 102 and is associated with the session acknowledgment key. The second intelligent agent 102 is used to respond to the request of the first intelligent agent 101, authenticate the identity of the first intelligent agent 101, establish a sealed session with the first intelligent agent 101 after successful authentication, receive sealed messages from the first intelligent agent 101 through the sealed session, deseal the sealed messages using the session encryption key of the sealed session, perform integrity verification and replay protection verification based on the session confirmation key and the session identifier, terminal identifier and message sequence number bound in the sealed message, and return an acknowledgment message to the first intelligent agent 101 after successful verification.

[0029] See Figure 2 In one embodiment, a session sealing method for agent-to-agent collaboration is provided, wherein the execution subject of the method is a first agent, including but not limited to steps S201 to S206.

[0030] Step S201: Request identity authentication with the second intelligent agent.

[0031] Identity authentication is used to verify the runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information of the first intelligent agent. It can be understood that identity authentication refers to the process of verifying the authenticity and permissions of the intelligent agent's identity. In this embodiment, identity authentication not only includes traditional terminal identity verification but also extends to the verification of composite identity elements such as the intelligent agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information, to support more granular authorization and collaboration.

[0032] Runtime instance information refers to the specific state and configuration information of an agent at a specific point in time, such as its current software version, hardware resource usage, process ID, etc.

[0033] Task session information refers to information related to the logical session established between agents to complete a specific task, including the task's unique identifier, task type, task stage, and task objective.

[0034] Terminal identity information refers to the unique identification information of the physical or logical terminal device operated by the intelligent agent, such as the device's MAC address, serial number, IP address, or digital certificate.

[0035] Capability information refers to the description of the functions, services, or processing capabilities possessed by an intelligent agent, such as the data formats it supports, algorithm types, and executable operations.

[0036] Collaboration intent information refers to the willingness and expected goals of an agent to cooperate when initiating a collaboration request, such as the type of task it hopes to participate in, the expected collaborative effect, and its needs from other agents.

[0037] In one implementation, the first agent can send an authentication request to the second agent containing its basic identity credentials (such as a pre-registered ID and password). Upon receiving the request, the second agent verifies the validity of these credentials by querying its internal database, including the first agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information. In another implementation, the first agent can send a digital certificate, and the second agent completes authentication by verifying the validity of the digital certificate.

[0038] Step S202: After successful identity authentication, establish a sealed session with the second intelligent agent.

[0039] A sealed session is a secure and protected communication channel established between two intelligent agents after successful authentication. This session ensures the confidentiality, integrity, and non-repudiation of the communication content through the use of a session encryption key and a session acknowledgment key, and is bound to a specific task and context.

[0040] After successful authentication, the first agent establishes a sealed session with the second agent. This sealed session forms the basis for secure communication between the two agents. In one implementation, after successful authentication, the first and second agents can negotiate a preset session ID and use a pre-shared symmetric key as both the session encryption and confirmation key. In another implementation, the two parties can generate a shared key using a Diffie-Hellman key exchange protocol and use it directly as the session key.

[0041] Step S203: Based on the capability information and data domain permission information of the second intelligent agent, the context payload to be sent is minimized to generate a minimized payload.

[0042] Context payload refers to the business data and related context information that an agent needs to transmit during cooperative communication. This payload may contain sensitive data or information that is not entirely relevant to the current task.

[0043] Minimization refers to the process of simplifying and filtering the original context payload based on the capabilities and permissions of the receiving agent. This process aims to ensure that only the data that the receiving agent needs and has the right to access is transmitted, thereby reducing the risk of data leakage and improving communication efficiency.

[0044] Minimized payload refers to the context payload after it has been minimized. This payload is a subset of the original context payload and contains only the information that the receiving agent needs and has the right to access.

[0045] In one implementation, the first agent can select the data fields to be sent based on a pre-declared list of general capabilities of the second agent. For example, if the second agent is declared to process only text data, the first agent will remove image data from the payload. In another implementation, the first agent can perform coarse-grained filtering of the context payload based on the department or role to which the second agent belongs. For example, if the second agent belongs to the "non-sensitive data processing" department, all data fields marked as "sensitive" will be removed.

[0046] Step S204: Encrypt and seal the minimized payload using the session encryption key of the sealed session, and bind the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number of the minimized payload to the sealed payload to generate a sealed message.

[0047] A session encryption key is a symmetric key used to encrypt and decrypt data within a sealed session. This key ensures the confidentiality of communication content and prevents unauthorized third-party eavesdropping.

[0048] A session identifier is a string or number used to uniquely identify a sealed session. This identifier is generated when the session is established and is used for the identification and association of subsequent session messages.

[0049] A terminal identifier is an identifier used to uniquely identify the terminal device running by the sending agent. This identifier is associated with the terminal identity information of the first agent.

[0050] A message sequence number is an incrementing number used to identify the order in which each message is sent within a sealed session. This sequence number helps in verifying message integrity and protecting against replay attacks.

[0051] A sealed message is a complete message packet that has been encrypted and sealed, containing a minimized encrypted payload as well as the bound session identifier, terminal identifier, and message sequence number.

[0052] In one implementation, the first agent can symmetrically encrypt the minimized payload using a session encryption key derived when establishing the sealed session, and then simply concatenate the encrypted payload with the session identifier, terminal identifier, and message sequence number to form a sealed message. In another implementation, this metadata can be used as input to the additional authentication data (AAD) of the encryption algorithm.

[0053] Step S205: Send a sealing message to the second agent through a sealing session.

[0054] In one implementation, sealed messages can be transmitted via the standard TCP / IP protocol stack, with additional transport security provided by the underlying transport layer's TLS / SSL protocol. In another implementation, sealed messages can be sent directly via UDP, relying on upper-layer application protocols to handle message reliability and ordering.

[0055] Step S206: Receive an acknowledgment message from the second intelligent agent.

[0056] The acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent, and is associated with the session acknowledgment key. In essence, the acknowledgment message is the confirmation information returned by the receiving agent to the sending agent after successfully receiving and processing the sealed message. This message informs the sender that the message has been delivered and effectively processed, and is associated with the session acknowledgment key.

[0057] A session acknowledgment key is a key used to generate and verify acknowledgment messages. This key ensures the authenticity and integrity of the acknowledgment message, prevents forgery or tampering, and is derived from the session encryption key for session integrity verification and replay protection.

[0058] In one implementation, after receiving and decrypting the sealed message, the second agent can generate an "ACK" string as an acknowledgment message and send it to the first agent. In another implementation, the second agent can calculate a hash value for the received message content and send that hash value as an acknowledgment message.

[0059] The following example will provide a more detailed explanation of the above technical solution: In a smart factory environment, there exists an agent responsible for environmental monitoring and data analysis, designated as Agent 1. Simultaneously, there exists an agent responsible for controlling specific actuators within the factory (e.g., the ventilation system), designated as Agent 2. Agent 1 needs to send environmental parameter adjustment commands to Agent 2 in response to real-time detected anomalies.

[0060] First, the first intelligent agent needs to authenticate with the second intelligent agent. Traditionally, the first intelligent agent might only use its preset ID and password to authenticate with the second intelligent agent. However, in this embodiment, when requesting authentication, the first intelligent agent sends its current running instance information (e.g., the running software version, the process ID of the current task), task session information (e.g., the unique identifier of this environmental parameter adjustment task), terminal identity information (e.g., the MAC address of the sensor gateway), capability information (e.g., the types and precision of sensor data it can handle), and collaborative intent information (e.g., expecting the second intelligent agent to perform ventilation system adjustment operations) to the second intelligent agent. Upon receiving this information, the second intelligent agent performs a comprehensive verification to ensure that the first intelligent agent is an authorized, correctly operating participant whose intent aligns with the current collaborative task. For example, if the first intelligent agent's task session information does not match the task currently being executed by the second intelligent agent, or if its capability information is insufficient to support this collaboration, authentication may be rejected. This multi-dimensional authentication mechanism solves the problem of insufficient agent identity expression in existing technologies, enabling the second intelligent agent to accurately identify and verify the authenticity and permissions of the first intelligent agent.

[0061] After successful authentication, a sealed session will be established between the first and second agents. This session is not merely a simple encrypted channel, but is closely linked to the aforementioned multi-dimensional identity information. For example, the generation of the session identifier comprehensively considers task session information, terminal identity information, and a randomly generated number negotiated by both parties, ensuring that the session is specific to a particular task and agent instance. Therefore, all subsequent messages transmitted through this session will be bound to that specific task and agent instance, avoiding the risk of the same credentials being misused for unrelated tasks.

[0062] After the sealed session is established, the first agent prepares to send a context payload of environmental parameter adjustments to the second agent. This initial payload may contain various sensor data (e.g., temperature, humidity, PM2.5 concentration, light intensity) and some internal diagnostic information. Based on the second agent's capabilities (e.g., the second agent can only process temperature and humidity data, and its control precision requires a specific format) and data domain permission information (e.g., the second agent is only authorized to access environmental parameter data and has no right to access internal diagnostic information), the first agent will minimize the context payload to be sent. Specifically, the first agent will remove PM2.5 concentration, light intensity, and internal diagnostic information from the initial payload and convert the temperature and humidity data to a format that meets the second agent's processing requirements, thereby generating a minimized payload. This processing method ensures that only the data required and accessible to the second agent is transmitted, effectively reducing the risk of data leakage and solving the problem of excessively coarse data transmission granularity in existing technologies.

[0063] Subsequently, the first agent uses the session encryption key of the sealed session to encrypt and seal the minimized payload. Simultaneously, the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number of the minimized payload are bound to the encrypted payload to generate a sealed message. This binding mechanism ensures message integrity and non-repudiation. For example, if the session identifier or message sequence number is tampered with, the second agent will be able to detect the anomaly upon receipt. The sealed message is then securely sent to the second agent through the previously established sealed session.

[0064] Upon receiving the sealed message, the second agent decrypts it using the session encryption key of the sealed session and performs integrity and replay protection checks based on the session acknowledgment key and the session identifier, terminal identifier, and message sequence number bound to the message. For example, the second agent can verify whether the message sequence number is incrementing and unique, and verify the message's integrity using the session acknowledgment key. After all checks pass, the second agent returns an acknowledgment message to the first agent. This acknowledgment message not only simply indicates that the message has been received, but more importantly, it is associated with the session acknowledgment key, thus characterizing that the sealed message has been received and effectively processed by the second agent, and the acknowledgment message itself is non-repudiable. This mechanism further strengthens the binding between the session and the task context, ensuring the integrity and security of the task.

[0065] Based on the above examples, the session sealing method for point-to-point collaboration of intelligent agents proposed in this embodiment demonstrates a significant technical contribution in solving existing technical problems.

[0066] To address the issue of insufficient agent identity representation in existing technologies, this embodiment constructs a multi-dimensional identity verification mechanism by comprehensively verifying the first agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information during the identity authentication phase. Compared to traditional authentication methods that rely solely on user or application accounts, this method can more accurately identify and verify the authenticity, permissions, and intent of an agent in a specific task session. For example, in the aforementioned smart factory scenario, the second agent not only confirms the basic identity of the first agent but also clarifies the environmental parameter adjustment task it is performing, the sensor gateway it is using, and its data processing capabilities, thereby avoiding authorization ambiguity and security risks caused by incomplete identity information.

[0067] Furthermore, this embodiment effectively addresses the issue of insufficient binding between session and task context. Through a sealed session established after successful authentication, the generation of its session identifier is closely linked to task session information, terminal identity information, and so on. Moreover, when generating a sealed message, the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number are bound to the encrypted, minimized payload. This deep context binding mechanism ensures that each communication message is strictly associated with a specific task, session, and agent instance. This contrasts sharply with traditional communication protocols that only focus on connection security while lacking binding to task identifiers and business data domains, significantly improving task integrity and security, and effectively preventing the risk of the same credential being misused for unrelated tasks or messages being replayed.

[0068] This embodiment also introduces a step of minimizing the context payload to be sent based on the capability information and data domain permission information of the second agent. This step allows for fine-grained control over the granularity of data transmission, transmitting only the data that the receiving agent needs and has the right to access. For example, in the example of environmental parameter adjustment, the first agent only sends temperature and humidity data that the second agent can process and has the right to access, while filtering out other irrelevant or sensitive information. Compared to existing technologies that may transmit the complete context payload, this significantly reduces the risk of data leakage and optimizes communication efficiency.

[0069] Finally, an acknowledgment message is received from the second agent, and this acknowledgment message is associated with the session acknowledgment key, further enhancing the non-repudiation of the message and the integrity of the session. This mechanism provides stronger security than a simple "ACK" message, ensuring that the message reception and processing status is trustworthy and verifiable.

[0070] In summary, this embodiment constructs a comprehensive, secure, and efficient intelligent agent point-to-point collaborative communication framework by introducing multi-dimensional identity authentication, sealed sessions with deep context binding, refined payload minimization processing, and a strongly associated confirmation mechanism, which significantly improves the security, reliability, and controllability of intelligent agent collaboration.

[0071] See Figure 3 In one embodiment, the method for requesting authentication with the second intelligent agent includes, but is not limited to, steps S301 to S302.

[0072] Step S301: Send a cooperation request message to the second intelligent agent.

[0073] The collaboration request message carries a first random number generated by the first intelligent agent, running instance information, task session information, terminal identity information, capability information, and collaboration intent information.

[0074] The collaboration request message is the initial communication carrier for the first intelligent agent to initiate identity authentication and session negotiation. It can take various forms; for example, it can be a POST request based on the HTTP / HTTPS protocol, in which the message body contains the data required for authentication; or it can be a topic-specific message based on the MQTT protocol for lightweight communication in the Internet of Things environment.

[0075] The first random number is an unpredictable value generated by the first agent to increase the randomness of the session key and prevent replay attacks. This random number can be generated by a cryptographically secure pseudo-random number generator (CSPRNG) to ensure sufficient entropy and unpredictability; or it can be generated using a hardware random number generator (TRNG) to provide higher randomness guarantees.

[0076] Step S302: Receive a collaborative response message from the second intelligent agent to confirm successful identity authentication.

[0077] The collaborative response message carries the second random number returned by the second agent, task authorization information, capability information, data domain permission information, authorization delegation chain information, and protocol suite information.

[0078] The collaborative response message is the second agent's response to the collaborative request message. It is used to inform the first agent of the authentication result and return the negotiated session parameters.

[0079] The second random number is an unpredictable value generated by the second agent and is used together with the first random number to derive the session key. This random number can also be generated by a cryptographically secure pseudo-random number generator (CSPRNG) or a hardware random number generator (TRNG).

[0080] Task authorization information refers to the operational permissions granted by the second agent to the first agent in the current task session. This can be an access token, such as a JWT (JSON Web Token), which contains the authorized role and permissions of the first agent; or, an authorization credential that specifies the resources the first agent can access and the operations it can perform.

[0081] The capability information of the second agent is used to declare the functions and processing capabilities supported by the second agent. This may include a list of encryption algorithms supported by the second agent, data processing capabilities (such as data analysis and data storage), or a list of service interfaces provided by the second agent.

[0082] Data domain permission information refers to the scope and restrictions on data that a second agent is allowed a first agent to access or manipulate. For example, it can be a whitelist or blacklist of data fields, specifying which fields can be accessed or modified; it can also be an access control policy based on data sensitivity level or data type.

[0083] The delegation chain information provides the source and path of authorization obtained by the second agent, used to establish a trust chain and conduct audit trails. This can be a digital certificate chain proving the identity and source of authorization of the second agent; or, an authorization record on the blockchain that records the hierarchical delegation process of authorization.

[0084] Protocol suite information is a combination of secure communication protocols and encryption algorithms negotiated and determined by the first and second agents. For example, it can specify the use of the TLS 1.3 protocol for transport layer security, and employ AES-256-GCM as the symmetric encryption algorithm and SHA-256 as the hash algorithm.

[0085] The proposed solution, in a session sealing method for agent-to-agent collaboration, establishes a secure and reliable authentication mechanism between a first and second agent. The first agent first sends a collaboration request message to the second agent. This message contains not only the first agent's basic identity information (such as runtime instance information and terminal identity information), but also its current task context (task session information and collaboration intent information), its own capability declaration (capability information), and a first random number generated by the agent. Upon receiving this request, the second agent performs a comprehensive authentication and intent assessment of the first agent based on this information. Once authentication is successful, the second agent generates a collaboration response message, which includes its own returned second random number, task authorization information for the first agent, its own capability information, explicit data domain permission information, authorization delegation chain information for traceability, and protocol suite information agreed upon by both parties. Through this bidirectional message exchange mechanism carrying rich contextual information, the two agents not only complete mutual authentication but, more importantly, negotiate key parameters required for subsequent sealed session establishment and data processing during the authentication process. The exchange of the first and second random numbers provides a high-strength randomness input for the derivation of the subsequent session encryption key, ensuring the security of the session key. Simultaneously, the capability information and data domain permission information returned by the second agent provide a clear basis for the first agent to minimize the context payload to be sent, avoiding unnecessary data transmission and potential data leakage risks. Furthermore, task authorization information and authorization delegation chain information provide necessary access control and traceability guarantees for the entire collaborative process. This detailed authentication and negotiation process lays a solid foundation for establishing a secure, efficient, and permission-compliant sealed session.

[0086] See Figure 4 In one embodiment, the method for establishing a sealed session with the second intelligent agent includes, but is not limited to, steps S401 to S403.

[0087] Step S401: Generate a session identifier based on task session information, terminal identity information, a first random number negotiated with the second intelligent agent, a second random number, and protocol suite information.

[0088] Methods for generating session identifiers may include, but are not limited to: hashing multiple session-related parameters, or combining timestamps and random numbers to generate a globally unique identifier (UUID).

[0089] Step S402: Based on the basic key material and session identifier, the session encryption key and session confirmation key are derived respectively through the key derivation function.

[0090] The base key material is the initial secret information used to derive all session-specific keys, typically generated during the authentication or key negotiation phase via a security protocol (such as Diffie-Hellman key exchange). Besides the master key negotiated through a key exchange protocol, the base key material can also be a pre-shared symmetric key or a shared secret derived from the long-term identity keys of both parties.

[0091] A key derivation function is a cryptographic primitive used to derive multiple independent and secure keys from one or more secret inputs (such as basic key material). Its purpose is to ensure sufficient cryptographic isolation between different keys derived from a single secret source, preventing the leakage of one key from affecting the security of other keys, and enabling the derivation of keys of different lengths and uses according to different application scenarios.

[0092] Step S403: Save the session identifier, session encryption key, and session confirmation key as the session state of the sealed session.

[0093] Session state refers to a set of key information that an agent needs to maintain throughout the session lifecycle to correctly process subsequent session messages. Saving the session identifier, session encryption key, and session acknowledgment key serves as the purpose of sealing the session state. Once the session is successfully established, subsequent communication can directly utilize these predetermined security parameters, avoiding repeated negotiations, improving communication efficiency, and ensuring the consistency of security parameters throughout the entire session.

[0094] This application's scheme generates a unique session identifier by using multiple key information obtained during the authentication phase, including task session information, terminal identity information, a first random number, a second random number, and protocol suite information, as input. This combination of multiple parameters ensures the uniqueness and contextual relevance of each session identifier, effectively preventing session confusion and replay attacks. Based on this, using the basic key material negotiated or pre-set during authentication, combined with the newly generated session identifier, a cryptographically secure key derivation function is used to systematically derive the session encryption key and session confirmation key. This derivation mechanism ensures the independence of the encryption key and confirmation key; even if one key is partially leaked, it will not directly jeopardize the security of the other key, enhancing the overall cryptographic strength of the session. Finally, the generated session identifier, session encryption key, and session confirmation key are securely stored as the session state of the sealed session. These steps work together to ensure that the sealed session established after successful authentication not only has a clear identity but also strong cryptographic protection, providing a solid security foundation for subsequent context payload transmission, thus solving the problem that authentication alone cannot guarantee the security and uniqueness of the session itself.

[0095] In some embodiments, before generating a session identifier, the method further includes: determining a common supported protocol suite for both the first and second agents based on the protocol suite information of both the first agent and the second agent; determining whether the supported protocol suite meets a preset minimum security condition; and if not, refusing to establish a sealed session.

[0096] Before generating the aforementioned session identifier, the scheme in this application first determines the mutually supported protocol suites based on the protocol suite information of both the first and second agents, ensuring that the encryption algorithms and key exchange mechanisms relied upon for subsequent communication are understandable and processable by both parties. Subsequently, the first agent performs a rigorous security assessment on the determined supported protocol suites according to a preset security policy. This judgment mechanism aims to identify and exclude protocol suites known to have security flaws, insufficient encryption strength, or that do not meet the latest security standards. If the judgment result shows that the protocol suite does not meet the minimum security conditions, the first agent will refuse to establish a sealed session, thereby preventing the use of insecure communication parameters for the session. By introducing this rigorous security check in the early stage of session establishment, this scheme can filter out insecure protocol suites at the source, ensuring that only sessions that meet security standards can be established, avoiding security risks caused by inappropriate protocol selection, and significantly enhancing the security of point-to-point collaborative communication between agents.

[0097] In some embodiments, a session identifier is generated based on task session information, terminal identity information, a first random number negotiated with the second agent, a second random number, and protocol suite information. This includes: performing hash operations on the task session information, terminal identity information, the first random number, the second random number, and the protocol suite information to obtain corresponding field hash values; obtaining the authorization delegation chain information of the first agent; concatenating the field hash values ​​according to a dynamic order associated with the current task stage, using the previous field hash value as the salt value input for the next field hash value, and then merging it with the authorization delegation chain information to generate session material; using the session material as initial input, iteratively performing multiple hash calculations, using the output of each iteration as the input for the next iteration, and using the hash output of the last iteration as the session identifier.

[0098] In establishing a sealed session with the second agent, this application employs a series of sophisticated processing steps to generate a highly secure, unique session identifier tightly bound to the session context. First, hash operations are performed on key elements constituting the session's foundation—task session information, terminal identity information, a first random number, a second random number, and protocol suite information—to generate an immutable field hash value for each information fragment. This process ensures the integrity of each original input data and standardizes it into a unified digest format. Subsequently, to further enhance the complexity and attack resistance of the session identifier, these field hash values ​​are not simply concatenated but arranged in a dynamic order associated with the current task phase. Furthermore, during the concatenation process, the previous field hash value is cleverly used as the salt input for the next field hash value. This chained salting mechanism significantly increases the difficulty and unpredictability of hash calculations, making it difficult for attackers to reverse-engineer the complete session material even if they obtain partial original information. Simultaneously, the authorization delegation chain information of the first agent is also incorporated into the session material. This makes the session identifier not only include the basic attributes of the session but also incorporate the agent's authorization traceability and trust chain information, providing a deeper level of security context for the session. Finally, using this carefully constructed session material as the initial input, multiple hash calculations are iteratively performed, with the output of each calculation serving as the input for the next. This iterative process significantly increases the computational cost of generating the session identifier, making it more resistant to brute-force and pre-computation attacks. Through these interconnected steps, the generated session identifier not only uniquely and completely reflects all the key parameters and security context of the session but also possesses extremely high cryptographic strength, providing a solid foundation for the derivation of subsequent session encryption and confirmation keys, thereby ensuring the security, trustworthiness, and auditability of the entire sealed session.

[0099] The following is a concrete example. When generating the session identifier, the SHA-256 hash algorithm can be used. First, the task session information, terminal identity information, a first random number, a second random number, and protocol suite information are input into the SHA-256 algorithm to obtain their respective 256-bit field hash values. For example, the hash value of the task session information is H1, the hash value of the terminal identity information is H2, and so on. Next, the authorization delegation chain information of the first agent is obtained. This information can be a chain composed of multiple digital certificates, each of which has been hashed and concatenated in sequence. When concatenating the field hash values, the concatenation order can be dynamically determined according to the security level of the current task stage or a preset strategy. For example, if the current task stage is at a high security level, the hash values ​​of the terminal identity information and the authorization delegation chain information are placed first. During the concatenation process, H1 is used as the salt input for H2, i.e., Hash(H2 || H1) is calculated. Then, Hash(H2 || H1) is used as the salt input for H3, and Hash(H3 || Hash(H2 || H1)) is calculated, and so on, forming a chained salted hash sequence. Finally, the result of chaining and salting all field hash values ​​is merged with the hash value of the delegation chain information to form the session material. For example, the session material can be represented as: Hash(H_protocol_suite ||Hash(H_random2 || Hash(H_random1 || Hash(H_terminal_id || Hash(H_task_session_info || H_auth_chain)))). Subsequently, using this session material as the initial input, SHA-256 hash calculations are iteratively performed, for example, 10,000 times. The output of each iteration is used as the input for the next iteration, and the final hash output serves as the session identifier for the sealed session.

[0100] See Figure 5 In one embodiment, the method for minimizing the context payload to be transmitted includes, but is not limited to, steps S501 to S503.

[0101] Step S501: Based on the capability information of the second intelligent agent, determine the data fields or data types that the second intelligent agent supports.

[0102] Step S502: Based on the data domain permission information of the second intelligent agent, determine the accessible data domains of the second intelligent agent.

[0103] Step S503: Based on the supported data fields or supported data types and accessible data domains, perform field-level trimming, desensitization, or type filtering on the context payload to obtain the minimized payload.

[0104] This application's solution ensures the efficiency, security, and compliance of data transmission by finely processing the context payload to be sent. Specifically, the first intelligent agent first uses capability information obtained from the second intelligent agent to identify the data fields or data types that the second intelligent agent can understand and process. Simultaneously, the first intelligent agent also clarifies the data scope authorized for access by the second intelligent agent based on the second intelligent agent's data domain permission information. After clarifying the second intelligent agent's "receiving capabilities" and "access permissions," the first intelligent agent can perform targeted processing on the original context payload. Based on these determined conditions, the payload is pruned at the field level, removing data fields that the second intelligent agent does not need or has no right to access, de-identifying sensitive data to protect privacy, or filtering or converting fields with mismatched data types to ensure data format compatibility. Through this multi-dimensional and fine-grained processing, a minimized payload is ultimately generated. This minimized payload is not only smaller in size, reducing transmission bandwidth and processing burden, but also contains only the information that the second intelligent agent needs and has the right to access, thereby effectively avoiding the risk of sensitive data leakage and improving communication efficiency and security. This approach significantly improves the intelligence and security of data transmission compared to the potentially crude data processing methods in basic solutions.

[0105] The following example illustrates this. Suppose a first agent needs to send a context payload containing user behavior, device status, and environmental sensor data to a second agent. First, the first agent receives the second agent's capability information, indicating that the second agent only supports processing three data fields: "Device ID," "Temperature," and "Humidity," and that the data types are limited to integers and strings. Simultaneously, the first agent also receives the second agent's data domain permission information, indicating that the second agent only has access to "Environmental Data" and not "User Behavior Data." Based on this information, the first agent minimizes the context payload to be sent. Specifically, this involves: pruning the original payload at the field level, removing fields related to "User Behavior" (such as "Click History" and "Browsing Duration"), as the second agent has no access rights; retaining the "Device ID," "Temperature," and "Humidity" fields, as they are within the second agent's capabilities and belong to the "Environmental Data" domain. If the "Temperature" field in the original payload is a floating-point number, and the second agent only supports integers, it can be converted to an integer (e.g., rounded or decremented). Ultimately, the generated minimum payload will contain only three fields: "Device ID", "Temperature" (integer) and "Humidity" (integer), and the amount of data will be significantly reduced.

[0106] In some embodiments, the session sealing method for agent-to-agent collaboration further includes: obtaining current task stage information associated with the second agent and the task session identifier; sending a permission adjustment request message to the second agent when the current task stage information changes; and, in response to a permission adjustment confirmation message returned by the second agent, determining that subsequent minimization processing will be implemented based on the second agent's capability information and the updated data domain permission information. The permission adjustment request message carries the updated data domain permission information.

[0107] This application's solution introduces a dynamic permission adjustment mechanism, enabling the first agent to perceive changes in the second agent's task stage in real time and proactively negotiate and update data domain permissions accordingly. This mechanism ensures that data minimization processing remains synchronized with the second agent's real-time needs and permissions throughout the entire task session lifecycle. When the first agent needs to send data to the second agent, it dynamically adjusts its data domain permissions based on the second agent's current task stage, thereby precisely trimming, de-identifying, or filtering the context payload to generate a minimized payload. This not only avoids unnecessary data leakage risks but also ensures that the second agent obtains all the necessary data to complete the current task, thus significantly improving the flexibility and efficiency of agent-based collaborative tasks while protecting data security and privacy.

[0108] The following is a concrete example. Suppose that a first agent and a second agent are collaboratively performing an intelligent inspection task. During the "path planning" phase of the task, the second agent may only need to access environmental map data and obstacle information. At this time, the first agent obtains the second agent's task phase information as "path planning" and sends a permission adjustment request message accordingly, which carries data domain permission information limited to "map data" and "obstacle data". When the task progresses to the "real-time perception" phase, the second agent's task phase information changes to "real-time perception", and the first agent detects this change. At this point, the first agent can, according to a preset strategy, generate updated data domain permission information that includes more detailed data domains such as "sensor data stream" and "abnormal event alarms", and encapsulate it in a permission adjustment request message and send it to the second agent. Once the second agent returns a permission adjustment confirmation message, the first agent updates its internally stored second agent data domain permission information. Subsequently, when the first agent needs to send a new context payload to the second agent, such as a payload containing real-time sensor data, it will perform field-level cropping, desensitization, or type filtering on the context payload based on the second agent's capability information and the recently updated data domain permission information containing "sensor data stream" and "abnormal event alarms," ​​ensuring that only the data required and authorized by the second agent in the current stage is sent.

[0109] In some embodiments, the session sealing method for agent-to-agent collaboration further includes: obtaining audit digest information of a preceding session associated with a task session identifier; using the audit digest information of the preceding session as one of the input parameters when generating a session identifier or a derived session confirmation key; and associating the audit digest information of the current sealed session with the audit digest information of the preceding session to form an audit trail chain. The preceding session is another sealed session in which the first agent or the second agent participated.

[0110] This application's solution proactively acquires and utilizes the audit digest information of previous sessions associated with the same task session when establishing a new sealed session, using it as a key input parameter in the generation process of the current session's session identifier or session confirmation key. This approach tightly binds the security, uniqueness, and verifiability of the current session to the state of previous sessions at the cryptographic level. Any tampering with the previous session record will result in the session identifier or key of subsequent sessions failing to be correctly verified, thus immediately exposing potential malicious behavior. Furthermore, by explicitly associating the audit digest information of the current session with the audit digest information of previous sessions, this application constructs an immutable audit trail chain. This chain structure ensures that when multiple agents collaborate to complete complex tasks, even if the task is decomposed into multiple independent sealed sessions, its entire execution history can be traced completely, continuously, and reliably. This not only enhances the security of individual sessions but, more importantly, provides end-to-end auditing capabilities and accountability mechanisms for the entire task process, greatly improving the overall trustworthiness of the agent collaborative system.

[0111] The following is a concrete example. Assume the first intelligent agent is a navigation system for an autonomous vehicle, and the second intelligent agent is a city traffic management system. The navigation system needs to interact with the traffic management system multiple times to complete a complex route planning and dynamic adjustment task. First, the navigation system (first intelligent agent) initiates an initial route planning request to the traffic management system (second intelligent agent), forming a sealed session A. After session A is completed, an audit summary (AuditSummary_A) of session A is generated, containing the key events and results of session A. Subsequently, during the vehicle's journey, due to sudden traffic congestion ahead, the navigation system needs to request dynamic route adjustments from the traffic management system. At this point, the navigation system initiates a new sealed session B. Before establishing session B, the navigation system obtains the audit summary (AuditSummary_A) of the preceding session A associated with the current task session (i.e., this trip). When generating the session identifier for session B, the navigation system uses AuditSummary_A as one of the input parameters. For example, the session identifier for session B can be generated by hashing the task session information, terminal identity information, random number, protocol suite information, and AuditSummary_A. Similarly, AuditSummary_A can be used as input to the key derivation function when deriving the session confirmation key for session B. After session B is completed, an audit digest (AuditSummary_B) is generated. The navigation system associates AuditSummary_B with AuditSummary_A, for example, by including the hash value of AuditSummary_A in AuditSummary_B, or by recording the audit digest of session B and its preceding session A in a separate audit log. In this way, if subsequent auditing of the entire trip's decision-making process is required, the history of all relevant interactions between the navigation system and the traffic management system can be completely reconstructed and verified by tracing AuditSummary_B back to AuditSummary_A, ensuring the transparency and traceability of the entire collaborative process.

[0112] See Figure 6 In one embodiment, a session sealing method for agent-to-agent collaboration is provided, wherein the execution subject of the method is a second agent, including but not limited to steps S601 to S606.

[0113] Step S601: In response to the request of the first intelligent agent, authenticate the identity of the first intelligent agent.

[0114] Identity authentication is used to verify the runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information of the first intelligent agent.

[0115] Step S602: After successful identity authentication, establish a sealed session with the first intelligent agent.

[0116] Step S603: Receive a sealing message from the first agent through a sealing session.

[0117] The sealed message is generated by encrypting and sealing the minimized payload using the session encryption key of the sealed session, and is bound with the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number of the minimized payload.

[0118] The minimized payload is obtained by minimizing the context payload to be sent based on the capability information of the second agent and the data domain permission information.

[0119] Step S604: Deseal the sealed message using the session encryption key of the sealed session.

[0120] Step S605: Perform integrity verification and replay protection verification based on the session confirmation key and the session identifier, terminal identifier and message sequence number bound in the sealed message.

[0121] Step S606: After the verification is successful, an acknowledgment message is returned to the first intelligent agent.

[0122] The acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent, and is associated with the session acknowledgment key.

[0123] This application effectively addresses the core issues of insufficient agent identity representation and insufficient binding between session and task context by combining a comprehensive verification mechanism that integrates runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information with an integrity verification and replay protection mechanism based on session confirmation keys. Specifically, by verifying multi-dimensional identity information during the identity authentication phase, the second agent can accurately identify the authenticity and dynamic permissions of the first agent in a specific task session, avoiding the authorization ambiguity caused by traditional authentication methods relying solely on a single identity subject. For example, if the first agent's task session information does not match the current collaborative task, or its capability information cannot meet the task requirements, identity authentication is rejected, thus ensuring that only agent instances that meet the context requirements can establish a session. Simultaneously, by binding session identifiers, terminal identifiers, and message sequence numbers to sealed messages and performing verification based on session confirmation keys, this application strictly associates communication content with specific tasks, terminal sources, and collaborative phases, preventing the risk of the same credential being misused for unrelated tasks or messages being replayed, thus ensuring task integrity and security.

[0124] Taking a ventilation system control scenario in a smart factory environment as an example, the second intelligent agent, acting as an actuator, receives a sealing message from the first intelligent agent, which is an environmental monitoring intelligent agent. The second intelligent agent first verifies its identity authentication information, confirming that the task session information is for adjusting current environmental parameters, the terminal identity information is for an authorized sensor gateway, and the collaborative intent information matches the ventilation control requirements. After successful authentication, a sealing session is established and the sealing message is received. After desealing the message using the session encryption key, the second intelligent agent verifies the session identifier, terminal identifier, and message sequence number based on the session confirmation key, ensuring that the message has not been tampered with and that the sequence number increments continuously. After successful verification, the agent processes a minimized load (containing only temperature and humidity data, tailored according to the second intelligent agent's capability information and data domain permission information) and returns an acknowledgment message associated with the session confirmation key to the first intelligent agent. Through the above technical solution, this application achieves precise permission control of intelligent agent instances within specific task sessions, terminal sources, and data domain boundaries, significantly improving the security and reliability of point-to-point collaborative communication.

[0125] This application also provides an electronic device. Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application. For example... Figure 7 As shown, the electronic device in this embodiment mainly includes a processor 701 and a memory 702. The memory 702 can be configured to store a program for executing the session sealing method for agent-oriented peer-to-peer collaboration in the above-described method embodiments. The processor 701 can be configured to execute the program in the memory 702, which includes, but is not limited to, a program for executing the session sealing method for agent-oriented peer-to-peer collaboration in the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of this application.

[0126] In some embodiments, the electronic device may include multiple processors 701 and multiple memories 702. The program executing the agent-oriented peer-to-peer collaboration session sealing method of the above-described method embodiments can be divided into multiple subroutines. Each subroutine can be loaded and run by a processor 701 to execute different steps of the agent-oriented peer-to-peer collaboration session sealing method of the above-described method embodiments. Specifically, each subroutine can be stored in a different memory 702, and each processor 701 can be configured to execute programs in one or more memories 702 to jointly implement the agent-oriented peer-to-peer collaboration session sealing method of the above-described method embodiments. That is, each processor 701 executes different steps of the agent-oriented peer-to-peer collaboration session sealing method of the above-described method embodiments to jointly implement the agent-oriented peer-to-peer collaboration session sealing method of the above-described method embodiments.

[0127] The aforementioned multiple processors 701 can be processors deployed on the same device. For example, the aforementioned electronic device can be a high-performance device composed of multiple processors, and the aforementioned multiple processors 701 can be processors configured on that high-performance device. Alternatively, the aforementioned multiple processors 701 can also be processors deployed on different devices. For example, the aforementioned electronic device can be a server cluster, and the aforementioned multiple processors 701 can be processors on different servers within the server cluster.

[0128] This application also provides a computer-readable storage medium. In one embodiment of the computer-readable storage medium according to this application, the computer-readable storage medium can be configured to store a program that performs the session sealing method for agent-oriented peer-to-peer collaboration described in the above-described method embodiments. This program can be loaded and run by a processor to implement the above-described session sealing method for agent-oriented peer-to-peer collaboration. For ease of explanation, only the parts related to the embodiments of this application are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of this application. The computer-readable storage medium can be a memory formed by various electronic devices. Optionally, in the embodiments of this application, the computer-readable storage medium is a non-transitory computer-readable storage medium.

[0129] The session sealing method and electronic device for agent-to-agent collaboration provided in this application, by comprehensively verifying the first agent's running instance information, task session information, terminal identity information, capability information, and collaborative intent information during the identity authentication stage, can more accurately identify and verify the authenticity, permissions, and intent of the agent in a specific task session. Through the sealed session established after successful identity authentication, the generation of its session identifier is closely related to the task session information and terminal identity information. When generating a sealed message, the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number are bound to the encrypted minimized payload, ensuring that each communication message is strictly associated with a specific task, session, and agent instance. Based on the capability information and data domain permission information of the second agent, the context payload to be sent is minimized, allowing for fine-grained control of data transmission granularity, reducing the risk of data leakage, and optimizing communication efficiency. Therefore, by introducing multi-dimensional identity authentication, deeply context-bound sealed sessions, fine-grained payload minimization, and a strongly associated confirmation mechanism, a comprehensive, secure, and efficient agent-to-agent collaborative communication framework is constructed, significantly improving the security, reliability, and controllability of agent collaboration.

[0130] Exemplary embodiments of this disclosure have been specifically shown and described above. It should be understood that this disclosure is not limited to the detailed structures, arrangements, or implementations described herein; rather, this disclosure is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.

Claims

1. A session sealing method for point-to-point collaboration among intelligent agents, applied to a first intelligent agent, characterized in that, The session sealing method for agent-to-agent collaboration includes: A request is made to authenticate with the second intelligent agent; the authentication is used to verify the first intelligent agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information. After the identity authentication is successful, a sealed session is established with the second intelligent agent; Based on the capability information and data domain permission information of the second intelligent agent, the context payload to be sent is minimized to generate a minimized payload; The minimized payload is encrypted and sealed using the session encryption key of the sealed session, and the session identifier of the sealed session, the terminal identifier of the first agent, and the message sequence number of the minimized payload are bound to the sealed payload to generate a sealed message; The sealing message is sent to the second agent through the sealing session; Receive an acknowledgment message from the second agent; the acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent and is associated with the session acknowledgment key.

2. The session sealing method for point-to-point collaboration of intelligent agents according to claim 1, characterized in that, The request involves authentication with the second intelligent agent, including: Send a collaboration request message to the second intelligent agent; the collaboration request message carries a first random number generated by the first intelligent agent, running instance information, task session information, terminal identity information, capability information and collaboration intent information; The system receives a collaborative response message from the second intelligent agent to confirm that the identity authentication is successful. The collaborative response message carries a second random number returned by the second intelligent agent, task authorization information, capability information, data domain permission information, authorization delegation chain information, and protocol suite information.

3. The session sealing method for point-to-point collaboration of intelligent agents according to claim 1, characterized in that, The establishment of a sealed session with the second intelligent agent includes: The session identifier is generated based on the task session information, the terminal identity information, the first random number negotiated with the second intelligent agent, the second random number, and the protocol suite information. Based on the basic key material and the session identifier, the session encryption key and the session confirmation key are derived respectively through the key derivation function; The session identifier, the session encryption key, and the session confirmation key are saved as the session state of the sealed session.

4. The session sealing method for point-to-point collaboration of intelligent agents according to claim 3, characterized in that, Before generating the session identifier, the method further includes: Based on the protocol suite information of the first intelligent agent and the second intelligent agent, determine the common supported protocol suites of the first intelligent agent and the second intelligent agent. Determine whether the supported protocol suite meets the preset minimum security requirements; If it does not meet the requirements, the sealed session will be refused.

5. The session sealing method for point-to-point collaboration of intelligent agents according to claim 3, characterized in that, The generation of the session identifier based on the task session information, the terminal identity information, the first random number negotiated with the second intelligent agent, the second random number, and the protocol suite information includes: Hash operations are performed on the task session information, the terminal identity information, the first random number, the second random number, and the protocol suite information respectively to obtain the corresponding field hash values; Obtain the authorization delegation chain information of the first intelligent agent; The hash values ​​of the fields are concatenated in a dynamic order associated with the current task stage, and the hash value of the previous field is used as the salt value input for the hash value of the next field. Then, they are merged with the authorization delegation chain information to generate session material. Using the session material as initial input, multiple hash calculations are performed iteratively, with the output of each iteration serving as the input for the next iteration, and the hash output of the last iteration serving as the session identifier.

6. The session sealing method for point-to-point collaboration of intelligent agents according to claim 1, characterized in that, The step of minimizing the context payload to be sent based on the capability information and data domain permission information of the second intelligent agent includes: Based on the capability information of the second intelligent agent, determine the data fields or data types that the second intelligent agent supports; Based on the data domain permission information of the second intelligent agent, determine the accessible data domains of the second intelligent agent; Based on the supported data fields or the supported data types and the accessible data fields, the context payload is pruned, anonymized, or filtered by type to obtain the minimized payload.

7. The session sealing method for point-to-point collaboration of intelligent agents according to claim 1, characterized in that, The session sealing method for agent-to-agent collaboration further includes: Obtain the current task stage information associated with the second intelligent agent and the task session identifier; When the current task stage information changes, a permission adjustment request message is sent to the second intelligent agent; the permission adjustment request message carries the updated data field permission information. In response to the permission adjustment confirmation message returned by the second agent, it is determined that subsequent minimization processing will be implemented based on the capability information of the second agent and the updated data domain permission information.

8. The session sealing method for point-to-point collaboration of intelligent agents according to claim 1, characterized in that, The session sealing method for agent-to-agent collaboration further includes: Obtain audit digest information of the preceding session associated with the task session identifier; the preceding session is another sealed session in which the first agent or the second agent participated; When generating the session identifier or deriving the session confirmation key, the audit digest information of the preceding session is used as one of the input parameters; The audit summary information of the current sealed session is associated with the audit summary information of the preceding session to form an audit trail chain.

9. A session sealing method for point-to-point collaboration among intelligent agents, applied to a second intelligent agent, characterized in that, The session sealing method for agent-to-agent collaboration includes: In response to a request from a first intelligent agent, the first intelligent agent is authenticated; the authentication is used to verify the first intelligent agent's runtime instance information, task session information, terminal identity information, capability information, and collaborative intent information. After successful identity authentication, a sealed session is established with the first intelligent agent; The sealed message is received from the first agent through the sealed session; the sealed message is generated by encrypting and sealing the minimized payload using the session encryption key of the sealed session, and is bound with the session identifier of the sealed session, the terminal identifier of the first agent and the message sequence number of the minimized payload. The minimized payload is obtained by minimizing the context payload to be sent based on the capability information and data domain permission information of the second agent. The sealed message is desealed using the session encryption key of the sealed session; Integrity verification and replay protection verification are performed based on the session confirmation key and the session identifier, terminal identifier, and message sequence number bound in the sealed message; After successful verification, an acknowledgment message is returned to the first agent; the acknowledgment message is used to indicate that the sealed message has been received and processed by the second agent and is associated with the session confirmation key.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the session sealing method for intelligent agent point-to-point collaboration as described in any one of claims 1 to 9.