Multi-agent oriented memory management method and device, equipment and medium

By dividing the memory area into multiple levels and evaluating four-dimensional attributes, the problems of privacy leakage and insufficient permission management in multi-agent memory management are solved, and a balance between fine-grained dynamic authorization and information sharing and privacy protection is achieved.

CN123030656APending Publication Date: 2026-11-03SHENZHEN BREO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611129364.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing multi-agent memory management technologies suffer from privacy risks and insufficient granularity in memory access control, failing to meet the collaborative needs of complex organizational structures.

Method used

It adopts a multi-level memory area division and four-dimensional attribute evaluation, including global sharing, group sharing, task domain temporary sharing and private memory area. It combines subject attributes, environment attributes, operation attributes and object attributes to dynamically evaluate access permissions and generate accessible memory entries through security degradation processing.

Benefits of technology

It achieves four levels of isolation in memory space, meets collaboration needs, avoids privacy leaks, and enables fine-grained dynamic authorization, ensuring a balance between information sharing and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030656A_ABST
    Figure CN123030656A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a multi-agent-oriented memory management method, device and equipment and medium, relating to the technical field of artificial intelligence, to achieve fine-grained isolation strictly synchronized with the task life cycle and balance between information sharing and privacy protection. The method comprises: receiving a memory retrieval request from a first agent, determining each candidate memory entry contained in a set of memory areas accessible to the first agent in a multi-agent memory space; based on the subject attribute, environment attribute, operation attribute of the first agent and the object attribute of each candidate memory entry, evaluating each candidate memory entry to obtain the access decision result of each candidate memory entry; performing security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed access to obtain an accessible memory entry set, and returning the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed access to the first agent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a memory management method, apparatus, device, and medium for multi-agent systems. Background Technology

[0002] With the rapid development of artificial intelligence technology, multi-agent collaborative work systems have been widely applied in fields such as intelligent customer service, automated office work, and financial risk control. In multi-agent collaborative work scenarios, different agents typically assume different roles (e.g., customer service, analysis, and auditing roles), and need to access and share memory data to achieve efficient collaboration during task execution. For example, the customer service agent needs to view users' historical orders and feedback, the analysis agent needs to aggregate statistical information, and the auditing agent needs complete operation logs.

[0003] In the prior art, the following two methods are used for memory management of multiple agents: (1) Method 1: A single shared memory pool is used, and all agents can access all shared memories without discrimination, i.e., the "all or nothing" mode; (2) Method 2: The memory is divided into two levels: private memory and shared memory, which achieves basic isolation to a certain extent.

[0004] However, using the first method, a single shared memory pool, could lead to agents reading sensitive information beyond their permissions, causing privacy risks. At the same time, memory entries from unrelated domains could also interfere with the agent's retrieval accuracy and reasoning quality. Using the second method, the simple two-level division lacks the ability to dynamically manage memory access permissions at different levels and in different task contexts, and cannot meet the fine-grained access control requirements under complex organizational structures. Summary of the Invention

[0005] This application provides a memory management method, apparatus, device, and medium for multi-agent systems, which achieves fine-grained isolation that is strictly synchronized with the task lifecycle and strikes a balance between information sharing and privacy protection.

[0006] In a first aspect, embodiments of this application provide a memory management method for multiple agents, the method comprising: Receive a memory retrieval request from the first agent. Based on the query vector carried in the memory retrieval request, determine each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent. Based on the subject attributes of the first intelligent agent, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access permissions of the first intelligent agent to each candidate memory entry are evaluated, and the access decision results for each candidate memory entry are obtained. The access decision results include: allow access, deny access, and conditionally allow access. The first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set. The accessible memory entry set and the second candidate memory entry set whose access decision result is allowed are then returned to the first intelligent agent.

[0007] In one optional embodiment, based on the query vector carried by the memory retrieval request, each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space is determined, including: Based on the role information of the first agent contained in the subject attributes, the set of memory areas accessible to the first agent is selected from each memory area in the multi-agent memory space; Based on the query vector, candidate memory entries whose semantic vectors match the query vector are selected from the memory entries stored in the memory area set.

[0008] In one optional embodiment, based on the subject attributes of the first intelligent agent, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access rights of the first intelligent agent to each candidate memory entry are evaluated to obtain the access decision results for each candidate memory entry, including: For each candidate memory entry, the following operations are performed: Based on the subject attribute, environment attribute, operation attribute, and object attribute of a candidate memory entry, combined with a preset evaluation strategy rule set, the access permission of the first agent to a candidate memory entry is evaluated to obtain the access decision result corresponding to the candidate memory entry. Each evaluation strategy rule in the preset evaluation strategy rule set is used to: indicate that when the subject attribute, object attribute, environment attribute, and operation attribute meet the preset corresponding conditions, the corresponding access decision result is generated.

[0009] In one optional embodiment, the first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set, including: Based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environmental attributes, a processing strategy for security downgrading of the first candidate memory entry set is determined. The processing strategy includes at least one of the following: field filtering, desensitization, aggregation, text summarization, and time window filtering. A processing strategy is adopted to perform security downgrade processing on the first candidate memory entry set to obtain an accessible memory entry set.

[0010] In an optional embodiment, the method further includes: Receive a memory write request from the second agent. The memory write request carries the memory content to be written and the first partition identifier. Based on the subject attributes of the second intelligent agent, the permission verification result of the second intelligent agent is determined. The permission verification result indicates whether the second intelligent agent has the permission to write to the first target memory area corresponding to the first partition identifier. Based on the sensitivity of the memory content to be written and the security level of the first target memory area, the compliance verification result of the memory content to be written is determined. The compliance verification result indicates whether the first target memory area meets the security constraints required by the memory content to be written. If both the permission verification and compliance verification results are passed, then the memory metadata of the content to be written is generated, and the content to be written and the memory metadata are added as new memory entries and written to the first target memory area.

[0011] In an optional embodiment, the method further includes: Receive a temporary delegation authorization request sent by the first intelligent agent. The temporary delegation authorization request carries the identifier of the delegated intelligent agent, the validity period, and the range of delegated memory entries in the private memory area corresponding to the first intelligent agent. Authorize the delegated intelligent agent corresponding to the delegated intelligent agent identifier so that the delegated intelligent agent is allowed to access the scope of memory entries within the validity period.

[0012] In an optional embodiment, the method further includes: After the collaborative task corresponding to the temporary shared memory area of ​​the target task domain is completed, in response to the memory transfer request from the third agent for the temporary shared memory area of ​​the target task domain, the memory transfer request carries the memory content to be transferred and the second partition identifier. If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, the memory entries to be retained in the temporary shared memory area of ​​the target task domain will be transferred to the second target memory area corresponding to the second partition identifier. The second target memory area is the private memory area of ​​the third agent or the shared memory area of ​​the group to which it belongs.

[0013] Secondly, embodiments of this application also provide a memory management device for multiple agents, the device comprising: The determination module is used to receive a memory retrieval request from the first agent, and based on the query vector carried by the memory retrieval request, determine each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent. The evaluation module is used to evaluate the access rights of the first intelligent agent to each candidate memory entry based on the agent's subjective attributes, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and to obtain the access decision results for each candidate memory entry. The access decision results include: allow access, deny access, and conditionally allow access. The generation module is used to perform security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed to obtain an accessible memory entry set, and return the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed to the first intelligent agent.

[0014] In an optional embodiment, when determining each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space based on the query vector carried by the memory retrieval request, the determining module is further configured to: Based on the role information of the first agent contained in the subject attributes, the set of memory areas accessible to the first agent is selected from each memory area in the multi-agent memory space; Based on the query vector, candidate memory entries whose semantic vectors match the query vector are selected from the memory entries stored in the memory area set.

[0015] In an optional embodiment, when evaluating the access rights of the first intelligent agent to each candidate memory entry based on the agent's subjective attributes, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and obtaining the access decision results for each candidate memory entry, the evaluation module is further configured to: For each candidate memory entry, the following operations are performed: Based on the subject attribute, environment attribute, operation attribute, and object attribute of a candidate memory entry, combined with a preset evaluation strategy rule set, the access permission of the first agent to a candidate memory entry is evaluated to obtain the access decision result corresponding to the candidate memory entry. Each evaluation strategy rule in the preset evaluation strategy rule set is used to: indicate that when the subject attribute, object attribute, environment attribute, and operation attribute meet the preset corresponding conditions, the corresponding access decision result is generated.

[0016] In an optional embodiment, when the first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set, the generation module is further configured to: Based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environmental attributes, a processing strategy for security downgrading of the first candidate memory entry set is determined. The processing strategy includes at least one of the following: field filtering, desensitization, aggregation, text summarization, and time window filtering. A processing strategy is adopted to perform security downgrade processing on the first candidate memory entry set to obtain an accessible memory entry set.

[0017] In an optional embodiment, the apparatus further includes a writing module, which is used to: Receive a memory write request from the second agent. The memory write request carries the memory content to be written and the first partition identifier. Based on the subject attributes of the second intelligent agent, the permission verification result of the second intelligent agent is determined. The permission verification result indicates whether the second intelligent agent has the permission to write to the first target memory area corresponding to the first partition identifier. Based on the sensitivity of the memory content to be written and the security level of the first target memory area, the compliance verification result of the memory content to be written is determined. The compliance verification result indicates whether the first target memory area meets the security constraints required by the memory content to be written. If both the permission verification and compliance verification results are passed, then the memory metadata of the content to be written is generated, and the content to be written and the memory metadata are added as new memory entries and written to the first target memory area.

[0018] In an optional embodiment, the apparatus further includes a delegation and authorization module, which is used for: Receive a temporary delegation authorization request sent by the first intelligent agent. The temporary delegation authorization request carries the identifier of the delegated intelligent agent, the validity period, and the range of delegated memory entries in the private memory area corresponding to the first intelligent agent. Authorize the delegated intelligent agent corresponding to the delegated intelligent agent identifier so that the delegated intelligent agent is allowed to access the scope of memory entries within the validity period.

[0019] In an optional embodiment, the device further includes a memory transfer module, which is used for: After the collaborative task corresponding to the temporary shared memory area of ​​the target task domain is completed, in response to the memory transfer request from the third agent for the temporary shared memory area of ​​the target task domain, the memory transfer request carries the memory content to be transferred and the second partition identifier. If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, the memory entries to be retained in the temporary shared memory area of ​​the target task domain will be transferred to the second target memory area corresponding to the second partition identifier. The second target memory area is the private memory area of ​​the third agent or the shared memory area of ​​the group to which it belongs.

[0020] Thirdly, embodiments of this application also provide an electronic device, including: Processor; and Stored program memory, The program includes computer instructions that, when executed by a processor, cause the processor to perform the multi-agent memory management method as described in the first aspect.

[0021] Fourthly, embodiments of this application also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the multi-agent memory management method as described in the first aspect.

[0022] Fifthly, this application provides a computer program product that, when invoked by a computer, causes the computer to execute the steps of the multi-agent memory management method as described in the first aspect.

[0023] The beneficial effects of this application are as follows: In the multi-agent memory management method provided in this application embodiment, a memory retrieval request from a first agent is first received. The method then determines the candidate memory entries contained in the set of memory regions accessible to the first agent within the multi-agent memory space. The multi-agent memory space includes a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to all participating agents involved in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries temporarily generated to complete the corresponding collaborative task and requiring exchange between participating agents. Then, based on the first agent's subject attributes, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access permissions of the first agent to each candidate memory entry are evaluated, resulting in access decision results for each candidate memory entry. Finally, the first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set. The accessible memory entry set and the second candidate memory entry set whose access decision result is allowed are returned to the first agent. In this way, by dividing the multi-agent memory space into a global shared memory area, a group shared memory area, a task-domain temporary shared memory area, and a private memory area, four levels of isolation of the memory space are achieved. This enables fine-grained isolation that is strictly synchronized with the task lifecycle, satisfying the needs of collaboration while avoiding the security risks associated with persistent memory storage. Simultaneously, four-dimensional attributes (subject attributes, object attributes, environmental attributes, and operational attributes) are used to evaluate the access permissions of each candidate memory entry in real time, enabling dynamic authorization of agents under different tasks and environments, avoiding the problem of excessively large or small static role permissions. Furthermore, for memory entries that are conditionally permissible, they are not directly rejected or allowed, but rather accessible memory entries are generated through security downgrading. This allows agents with lower permissions to still obtain the information needed to complete the task even without access to the original data. It also allows different agents to obtain different memory return results that conform to their permissions and task requirements when viewing the same memory area, achieving a balance between information sharing and privacy protection.

[0024] Furthermore, other features and advantages of this application will be set forth in the following description and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described herein are used to provide a further understanding of this application, constitute a part of this application, and do not constitute an improper limitation of this application. In the accompanying drawings: Figure 1 This is a schematic diagram of an optional system architecture applicable to the embodiments of this application.

[0026] Figure 2 This is a schematic diagram illustrating the implementation process of a memory management method for multiple agents provided in an embodiment of this application.

[0027] Figure 3 This is a logical diagram illustrating the lifecycle management of a temporary shared memory area in a task domain, as provided in an embodiment of this application.

[0028] Figure 4 This is a logical diagram illustrating memory retrieval and view generation provided in an embodiment of this application.

[0029] Figure 5 This is a schematic diagram of a memory entry writing process provided in an embodiment of this application.

[0030] Figure 6 This is a schematic diagram of a memory management device for multiple agents provided in an embodiment of this application.

[0031] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0033] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0034] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0035] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of this application are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0037] The design concept of the embodiments of this application is briefly introduced below: With the rapid development of artificial intelligence technology, multi-agent collaborative work systems have been widely applied in fields such as intelligent customer service, automated office work, and financial risk control. In multi-agent collaborative work scenarios, different agents typically assume different roles (e.g., customer service, analysis, and auditing roles), and need to access and share memory data during task execution to achieve efficient collaboration. For example, the customer service agent needs to view users' historical orders and feedback, the analysis agent needs to aggregate statistical information, and the auditing agent needs complete operation logs. However, existing technical solutions have significant shortcomings in terms of multi-agent memory sharing and isolation.

[0038] In the prior art, the following two methods are used for memory management of multiple agents: (1) Method 1: A single shared memory pool is used, and all agents can access all shared memories without discrimination, i.e., the "all or nothing" mode; (2) Method 2: The memory is divided into two levels: private memory and shared memory, which achieves basic isolation to a certain extent.

[0039] However, using the first method, a single shared memory pool, could lead to agents reading sensitive information beyond their permissions, causing privacy risks. At the same time, memory entries from unrelated domains could also interfere with the agent's retrieval accuracy and reasoning quality. Using the second method, the simple two-level division lacks the ability to dynamically manage memory access permissions at different levels and in different task contexts, and cannot meet the fine-grained permission management needs of complex organizational structures.

[0040] Furthermore, existing technologies generally lack the ability to dynamically transform memory content. When different agents access the same shared memory entry, they can only obtain the exact same original content, unable to perform data transformation based on the agent's identity and current task. This poses challenges to data security and privacy compliance. At the same time, existing solutions also lack a complete audit and traceability mechanism, making it difficult to meet enterprise-level compliance requirements.

[0041] In one optional implementation, this application proposes a multi-agent memory management method, which may specifically include: firstly, receiving a memory retrieval request from a first agent; and based on the query vector carried in the memory retrieval request, determining each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent in the corresponding collaborative task, and each task domain temporary shared memory region is used to: store information for completing the corresponding collaboration. Intermediate memory entries are temporarily generated for the task and need to be exchanged between participating agents. Then, based on the subject attributes of the first agent, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access permissions of the first agent to each candidate memory entry are evaluated to obtain the access decision results for each candidate memory entry. The access decision results include: allow access, deny access, and conditionally allow access. Finally, the first candidate memory entry set with the access decision result of conditionally allowing access is subjected to security downgrade processing to obtain the accessible memory entry set. The accessible memory entry set and the second candidate memory entry set with the access decision result of allowing access are returned to the first agent.

[0042] By employing the above approach, the multi-agent memory space is divided into a global shared memory area, a group shared memory area, a task-domain temporary shared memory area, and a private memory area, achieving four levels of isolation in the memory space. This provides fine-grained isolation that is strictly synchronized with the task lifecycle, satisfying collaboration needs while avoiding the security risks associated with persistent memory storage. Simultaneously, four-dimensional attributes (subject attributes, object attributes, environmental attributes, and operational attributes) are used to evaluate the access permissions of each candidate memory entry in real time, enabling dynamic authorization of agents under different tasks and environments, avoiding the problem of excessively large or small static role permissions. Furthermore, for memory entries that are permissible, accessibility is not directly denied or granted; instead, it is generated through security downgrading. This allows agents with lower permissions to obtain the information needed to complete tasks even without access to the original data. Different agents viewing the same memory area can obtain different memory return results that conform to their permissions and task requirements, achieving a balance between information sharing and privacy protection.

[0043] In particular, the preferred embodiments of this application will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0044] See Figure 1 As shown, it is a schematic diagram of an optional system architecture applicable to the embodiments of this application. The system architecture may include: a terminal device 101 and multiple intelligent agents 102.

[0045] For example, terminal device 101 may include, but is not limited to: mobile phone, tablet computer, laptop computer, handheld computer, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal device in industrial control, wireless terminal device in autonomous driving, wireless terminal device in smart grid, wireless terminal device in transportation safety, wireless terminal device in smart city, or wireless terminal device in smart home, etc.

[0046] In addition, a related client can be installed on the terminal device 101. The client can be software, such as an application (APP), browser, short video software, or webpage, mini-program, etc.

[0047] In some embodiments, each of the multiple intelligent agents 102 is deployed on a server. Optionally, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0048] Optionally, the multiple agents 102 are N agents, including agent 1, agent 2, ... agent N, where N is an integer greater than 1.

[0049] It should be noted that the embodiments of this application do not limit the hardware devices corresponding to the intelligent agents, that is, each intelligent agent in the multiple intelligent agents 102 can also be deployed in the terminal, and the protection scope of the embodiments of this application is not limited thereto.

[0050] Optionally, the system also includes a multi-agent memory space 103. The multi-agent memory space 103 includes: a global shared memory area, at least one group shared memory area, at least one task-domain temporary shared memory area, and multiple private memory areas. Each task-domain temporary shared memory area is visible to all participating agents involved in the corresponding collaborative task. Each task-domain temporary shared memory area is used to store intermediate memory entries temporarily generated to complete the corresponding collaborative task and needing to be exchanged between the participating agents. For example, if the participating agents in collaborative task A include agent 1, agent 2, and agent 3, then the task-domain temporary shared memory area A corresponding to collaborative task A is visible to agent 1, agent 2, and agent 3.

[0051] The following describes the multi-agent memory management method provided by the exemplary embodiments of this application in conjunction with the above-described system architecture and with reference to the accompanying drawings. It should be noted that the above-described system architecture is only shown for the purpose of understanding the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0052] See Figure 2 The diagram shown illustrates the implementation flow of a memory management method for multiple agents provided in this application. The specific implementation flow of this method is as follows: S20: Receive a memory retrieval request from the first agent, and based on the query vector carried in the memory retrieval request, determine each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space.

[0053] The multi-agent memory space includes: a global shared memory area, at least one group shared memory area, at least one task domain temporary shared memory area, and multiple private memory areas. Each task domain temporary shared memory area is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory area is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent.

[0054] In this embodiment, the multi-agent memory space refers to the memory space corresponding to multiple agents owned by the target tenant, and the first agent is any one of the multiple agents under the target tenant. Each tenant maintains an independent multi-agent memory space. Optionally, memory sharing (writing or retrieving) across tenants needs to go through a security gateway, and differential privacy technology is used to ensure that the original data is not leaked.

[0055] In this embodiment, the multi-agent memory space is divided into multiple isolated partitions, which include four levels: a global shared memory area, a group shared memory area, a task domain temporary shared memory area, and a private memory area. Each isolated partition stores memory entries used to record memory content. The following describes the level, visibility range, lifecycle, and stored content of each isolated partition: (1) Global shared memory area: The level of the global shared memory area is L0; the visible range of the global shared memory area is: all agents under the target tenant; the life cycle of the global shared memory area is: persistent; the global shared memory area is used to store the common basic memory entries that all agents under the target tenant need to access.

[0056] For example, public basic memory entries include: a global knowledge base of the storage system, a publicly available glossary of business terms, globally available compliance terms, and publicly available statistical data that do not involve any sensitive information.

[0057] (2) Group shared memory area: The level of the group shared memory area is L1; the visible range of the group shared memory area is: each agent in the corresponding group (specific department or functional team) under the target tenant; the life cycle of the group shared memory area is: the period during which the group exists; the group shared memory area is used to store collaborative data shared within the corresponding group.

[0058] For example, collaborative data shared within a group might include: frequently asked questions templates shared by the customer service team, API documentation shared by the technical team, and a dedicated rule base within a specific business line. This data is only visible to agents within the group, and access is automatically revoked when the group is disbanded or a member leaves.

[0059] (3) Task Domain Temporary Shared Memory Area: The task domain temporary shared memory area is at level L2; its visibility is visible to all participating agents involved in the corresponding collaborative task; its lifecycle is from task creation to task completion and the end of the grace period; the task domain temporary shared memory area is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between participating agents. Intermediate memory entries are those necessary to complete the corresponding collaborative task and have no long-term retention value after the task ends.

[0060] For example, intermediate memory entries include: records of multiple rounds of negotiation / discussion during the corresponding collaborative task, intermediate inference results (such as step-by-step calculation results) shared by participating agents to complete the corresponding collaborative task, temporarily exchanged data to be verified (such as draft user feedback collected by customer service agents for immediate processing by analysis agents), and snapshots of the context state specific to the corresponding collaborative task.

[0061] (4) Private memory area: The level of the private memory area is L3; the visibility range of the private memory area is: visible to the corresponding single agent; the life cycle of the private memory area is: the life cycle of the corresponding single agent; the private memory area is used to store personal memory entries that are unique to the corresponding single agent and do not need to be shared with other agents.

[0062] In this way, by using four levels of isolation partitions (global / group / task domain / private), and especially by introducing a temporary shared area for task domains, fine-grained isolation that is strictly synchronized with the task lifecycle is achieved, which not only meets the needs of collaboration, but also avoids the security risks caused by the co-storage of persistent memory.

[0063] Additionally, it is worth noting that in this embodiment, the temporary shared area of ​​the task domain is automatically created by the task scheduling module when a collaborative task is created, and the task duration plus the corresponding buffer time of the grace period is set as the partition expiration time. During the execution of the collaborative task, when an agent joins the collaborative task, it dynamically obtains read and write permissions for this partition, and the permissions are immediately revoked when it exits the collaborative task. After the collaborative task ends normally or abnormally, the temporary shared area of ​​the task domain is marked as "pending cleanup," and after a configurable grace period (e.g., 24 hours), all memory entries are physically deleted. During the grace period, participating agents are allowed to actively transfer the memories they need to retain to their private memory area or group shared memory area. Optionally, in this embodiment, a possible implementation method for memory transfer for the temporary shared memory area of ​​the task domain is provided, specifically by performing the following operations: SA1: After the collaborative task corresponding to the temporary shared memory area of ​​the target task domain is completed, respond to the memory transfer request from the third agent for the temporary shared memory area of ​​the target task domain.

[0064] The memory transfer request carries the memory content to be transferred and the second partition identifier.

[0065] In this embodiment, the target task domain temporary shared memory area is any one of the at least one task domain temporary shared memory areas in the multi-agent memory space; the third agent is any one of the multiple agents participating in the collaborative task corresponding to the target task domain temporary shared memory area; the end of the collaborative task refers to the normal completion or abnormal termination of the collaborative task.

[0066] SA2: If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, then the memory entries to be retained in the temporary shared memory area of ​​the target task domain will be transferred to the second target memory area corresponding to the second partition identifier.

[0067] The second target memory area is either the private memory area of ​​the third agent or the shared memory area of ​​its group; the memory entries to be retained are the memory entries that the third agent needs to retain.

[0068] In this embodiment of the application, it is determined whether the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain. If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, the memory entries to be retained in the temporary shared memory area of ​​the target task domain are transferred to the second target memory area corresponding to the second partition identifier.

[0069] For example, assuming the grace period corresponding to the temporary shared memory area of ​​the target task domain is 24 hours, the current time is the 6th hour after the end of the collaborative task corresponding to the temporary shared memory area of ​​the target task domain, and the second target memory area corresponding to the second partition identifier is the private memory area of ​​the third agent, then the memory entries that the third agent needs to retain contained in the temporary shared memory area of ​​the target task domain will be transferred to the private memory area of ​​the third agent.

[0070] SA3: If the grace period corresponding to the temporary shared memory area of ​​the target task domain expires, all memory entries in the temporary shared memory area of ​​the target task domain will be physically deleted.

[0071] In this way, since the temporary shared memory area of ​​the task domain should be destroyed after the corresponding task ends, but some intermediate results may have long-term value (such as analysis conclusions and negotiation records), the transfer mechanism during the grace period allows participating agents to migrate valuable memories to the private memory area or the group shared memory area, so as to avoid the loss of valuable data when the task is destroyed.

[0072] See Figure 3The diagram illustrates the logic of lifecycle management for the temporary shared memory area of ​​the task domain in this embodiment. When a collaborative task is created, a corresponding temporary shared memory area is created, the identifier of the temporary shared memory area is set to the identifier of the corresponding collaborative task, and it is associated with the list of participating agents, as well as a corresponding grace period. When a collaborative task is being executed, if a new agent joins the task, the new agent is dynamically granted read and write permissions to the temporary shared memory area of ​​the task domain. If an old agent leaves the task, the old agent's permissions to the temporary shared memory area of ​​the task domain are revoked, and the old agent is allowed to copy memory entries written before the old agent's exit time from the temporary shared memory area of ​​the task domain to the old agent within a preset buffer time after leaving the task. The task domain temporary shared memory area is either the agent's private memory area or the group's shared memory area. When the collaborative task ends, the task domain temporary shared memory area is marked as "pending cleanup". Participating agents are notified that they can back up their memories (e.g., participating agents can be those who have not yet left the collaborative task or those who have left the collaborative task midway. The backup writing time of participating agents belongs to the memory entries from the time they joined the collaborative task to the time they left the collaborative task). A configurable grace period is initiated. During the grace period, participating agents perform transfer operations to transfer to their private memory area or the group's shared memory area. When the grace period ends, all memory entries in the task domain temporary shared memory area are physically deleted, and a lifecycle audit report of the task domain temporary shared memory area is generated.

[0073] Optionally, in this embodiment of the application, a possible implementation is provided for determining each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space based on the query vector carried by the memory retrieval request. Specifically, the following operations are performed: S200: Based on the role information of the first agent contained in the subject attributes, select the set of memory regions accessible to the first agent from each memory region in the multi-agent memory space.

[0074] The role of the first intelligent agent can be customer service, analyst, or auditor, and this application embodiment does not impose any restrictions on this.

[0075] In this embodiment of the application, an association relationship is established between roles and a set of accessible memory regions. The set of accessible memory regions associated with the role information of the first intelligent agent is used as the set of accessible memory regions of the first intelligent agent.

[0076] The relationship between a role and the set of accessible memory regions can be a relationship between a role and the accessible partition level. For example, if the accessible partition level of the role "Analyst" is L0~L3, then the global shared memory region, the group shared memory region to which the first agent belongs, the task domain temporary shared memory region to which the first agent belongs, and the private memory region of the first agent are considered as the set of memory regions accessible to the first agent.

[0077] Optionally, in this embodiment of the application, access permission information of the first intelligent agent can also be obtained, and at least one memory region contained in the access permission information can be directly used as the set of memory regions accessible to the first intelligent agent.

[0078] S201: Based on the query vector, select candidate memory entries whose semantic vectors match the query vector from the memory entries stored in the memory area set.

[0079] In this embodiment, the memory retrieval request carries a query vector, the identity identifier of the first agent, and the task context. The query vector is the result of vector processing the query input, and the task context refers to the specific task scenario information in which the first agent initiates the memory retrieval request.

[0080] In this embodiment of the application, the semantic vector of each memory entry stored in the memory area set is compared with the query vector to calculate the vector similarity, and the memory entries whose vector similarity satisfies the similarity condition are selected as candidate memory entries.

[0081] The similarity condition can be to select the top M memory entries with vector similarity from high to low as each candidate memory entry, where M is an integer greater than 1; or the similarity condition can be to select memory entries with vector similarity greater than a similarity threshold as each candidate memory entry. This application does not impose any restrictions on this.

[0082] In this way, coarse-grained role-based filtering quickly eliminates entire partitions that the agent has no access to, significantly narrowing the scope of subsequent semantic retrieval. Then, vector similarity matching is performed within this narrowed scope, avoiding blind searching through millions of memories and preventing performance waste and irrelevant information interference caused by full scanning, thus significantly improving retrieval efficiency. Furthermore, role filtering ensures permission compliance, and semantic matching ensures that each candidate memory entry is relevant to the current memory retrieval task. The combination of these two stages makes candidate memory entries both "visible" and "useful," improving the quality of the agent's reasoning.

[0083] S21: Based on the subject attributes of the first intelligent agent, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, evaluate the access rights of the first intelligent agent to each candidate memory entry, and obtain the access decision results for each candidate memory entry.

[0084] The access decision results include: allow access, deny access, and conditionally allow access. An allow access result indicates that the first agent is allowed to access the corresponding candidate memory entry (i.e., the corresponding candidate memory entry already meets the return condition in its original state and can be directly returned to the first agent without any processing); a deny access result indicates that the first agent is denied access to the corresponding candidate memory entry (i.e., the corresponding candidate memory entry is not returned to the first agent regardless of whether it has been processed); a conditionally allow access result indicates that, after security degradation processing, the first agent is allowed to access the downgraded content of the corresponding candidate memory entry (i.e., the original state of the corresponding candidate memory entry cannot be returned, but it can be returned after security degradation processing).

[0085] In this embodiment, the subject attributes include, but are not limited to: role information, historical accuracy, and authentication level; environmental attributes include, but are not limited to: current task identifier, time window, security context, and task context; operation attributes include, but are not limited to: read operation, write operation, and batch size; object attributes include, but are not limited to: sensitivity level, partition affiliation, and data type of the memory entry. Historical accuracy is the performance rating of the first agent in past tasks (e.g., inference accuracy and user satisfaction), authentication level refers to the authentication strength level of the first agent (e.g., tokens, digital signatures, and hardware security modules), time window is the time range of the current memory retrieval request, security context is the security status of the current environment, task context refers to the specific task scenario information in which the agent initiates the memory retrieval request, sensitivity level is the confidentiality level classification of the memory entry, partition affiliation is the identifier of the memory area where the memory entry is located, and data type is the semantic category of the memory entry's content (e.g., personal identity information, statistical data, knowledge, logs, intermediate results, etc.).

[0086] Optionally, in this embodiment of the application, when evaluating the access rights of the first intelligent agent to each candidate memory entry based on the subject attributes of the first intelligent agent, the environmental attributes and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and obtaining the access decision results for each candidate memory entry, the following operations are performed: For each candidate memory entry, the following operations are performed respectively: Based on the subject attributes, environmental attributes, operational attributes, and the object attributes of a candidate memory entry, combined with a preset evaluation strategy rule set, the access rights of the first intelligent agent to a candidate memory entry are evaluated, and the access decision result corresponding to a candidate memory entry is obtained.

[0087] Each evaluation strategy rule in the preset evaluation strategy rule set is used to: instruct the generation of a corresponding access decision result when the subject attribute, object attribute, environmental attribute, and operational attribute meet the preset corresponding conditions. The role of the evaluation strategy rule is to define a set of matching conditions for multi-dimensional attributes, which cover at least one dimension of the subject attribute, object attribute, environmental attribute, and operational attribute.

[0088] For example, the evaluation policy rule is an attribute-based access control (ABAC) policy rule.

[0089] In this embodiment, based on the subject attribute, environment attribute, operation attribute, and object attribute of a candidate memory entry, the evaluation strategy rules are matched one by one in the preset evaluation strategy rule set, and the access decision corresponding to the matched evaluation strategy rule is used as the access decision result of the candidate memory entry.

[0090] For example, the first intelligent agent role is "customer service", a candidate memory entry contains the user's mobile phone number (sensitive field), and the evaluation policy rule is set to "customer service can read order information but cannot directly view the mobile phone number". At this time, the access decision result is "condition allowed".

[0091] In this way, traditional access control relying on fixed roles cannot cope with the changing permission requirements of agents in different tasks and time periods. However, by collecting subject attributes, object attributes, environmental attributes, and operational attributes in real time, each candidate memory entry is evaluated independently. Different memory entries in the same retrieval request may receive three different results: allowed, denied, or conditionally allowed. This granular approach protects highly sensitive entries while leaving less sensitive entries unaffected, achieving true fine-grained control. The joint matching of four-dimensional attributes avoids the problem of excessively large or small permissions for static roles. For example, the same customer service agent can read customer order details during daytime working hours, but batch export requests during nighttime non-working hours will be denied. This flexibility is something that static models cannot achieve. Furthermore, the rule set consists of multiple condition-decision pairs, and adding or modifying rules does not require changing the core system logic, making it easy to adapt to the compliance requirements of different business scenarios.

[0092] Optionally, in this embodiment of the application, when evaluating the access rights of the first intelligent agent to each candidate memory entry based on the subject attributes of the first intelligent agent, the environmental attributes and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and obtaining the access decision results for each candidate memory entry, the following operations can also be performed: For each candidate memory entry, the following operations are performed respectively: the subject attributes, environmental attributes, operational attributes, and the object attributes of a candidate memory entry are input into the access rights evaluation model, and the probabilities of allowing access, denying access, and conditionally allowing access are output to obtain the access decision results.

[0093] For example, an access permission assessment model is a classification model (e.g., random forest) that learns by using historical access records (including labels indicating whether they violated the rules) as training data.

[0094] S22: Perform security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed to obtain an accessible memory entry set, and return the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed to the first intelligent agent.

[0095] Among them, the security label level of the accessible memory entry set is lower than that of the first candidate memory entry set. The security label level is used to characterize the access constraint strength of the memory entry set. The higher the security label level, the higher the sensitivity and the narrower the access range; the lower the security label level, the lower the sensitivity and the wider the access range.

[0096] In this embodiment of the application, the first candidate memory entry set includes candidate memory entries whose access decision result is conditionally allowed, the second candidate memory entry set includes candidate memory entries whose access decision result is allowed, and the third candidate memory entry set includes candidate memory entries whose access decision result is denied. The security label level of the second candidate memory entry set is lower than that of the first candidate memory entry set, and the security label level of the first candidate memory entry set is lower than that of the third candidate memory entry set.

[0097] In this embodiment of the application, the first candidate memory entry set whose access decision result is conditionally allowed to be accessed is subjected to security downgrade processing to obtain an accessible memory entry set. The accessible memory entry set and the second candidate memory entry set whose access decision result is allowed to be accessed are then synthesized to obtain a synthesized result set, which is then returned to the first intelligent agent.

[0098] Optionally, in this embodiment of the application, a possible implementation is provided for performing security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed, to obtain an accessible memory entry set, specifically by performing the following operations: S220: Based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environmental attributes, determine the processing strategy for security downgrading of the first candidate memory entry set.

[0099] The processing strategies include at least one of the following: field filtering, desensitization, aggregation, text summarization, and time window filtering. The request intent refers to the business goal or information usage purpose that the first agent intends to achieve by initiating this memory retrieval. It determines whether to return different forms of content such as "detailed data" or "statistical data." The request intent is determined using one or more of the following methods: query semantic parsing, task context deduction, explicit specification of request parameters (with intent tags carried in the memory retrieval request), and operational attribute analysis.

[0100] In this embodiment of the application, field filtering means excluding fields or entries that are explicitly prohibited.

[0101] In this embodiment of the application, desensitization processing refers to replacing sensitive information in the memory content with desensitized tags. Specifically, based on the Named Entity Recognition (NER) model, sensitive information (such as name, phone number, ID number, address, etc.) in the memory content is identified, and corresponding replacement strategies are used to replace it.

[0102] The replacement strategies include: (1) Irreversible desensitization tags: using hash mapping (such as SHA-256) to generate fixed-length tags (such as [PII_HASH_abc123]), which cannot be reversed to restore the original value and are suitable for low-privilege agents; (2) Reversible desensitization tags: generating encrypted placeholders (such as [ENC_PERSON_1]), the mapping relationship between the original data and the placeholders is stored in an independent "desensitization mapping service", and high-privilege agents (such as auditors) can submit decryption applications through the security gateway and obtain plaintext after approval.

[0103] In addition, it is worth noting that in the embodiments of this application, for the same real entity (such as "Zhang San"), no matter how many different memory entries it appears in, the same desensitized tag is generated and replaced. In this way, the agent can perform cross-memory association reasoning, for example, find all operation records related to [PERSON_1], without the reasoning failing due to inconsistent tags.

[0104] In this embodiment of the application, aggregation processing refers to calculating statistics (counts, mean, distribution, etc.) on the numerical fields of multiple memory entries when the request intent is determined to be "requiring statistical information", and injecting Laplace noise or Gaussian noise that conforms to differential privacy into the statistical results to ensure that it is impossible to reverse-engineer the content of a single memory entry. This can provide the agent with an overall trend and prevent the reverse-engineering of the content of a single memory entry through differential attacks.

[0105] For example, assuming the request intent is "to calculate the average response time of last month", the numerical field of each candidate memory entry containing the response time is calculated in advance, and the mean is calculated to obtain the statistical result. Then, Laplace noise or Gaussian noise that conforms to differential privacy is injected into the statistical result to obtain the final aggregation result.

[0106] In this embodiment of the application, text summarization processing refers to using a summarization model to compress detailed memorized text into a high-level semantic summary.

[0107] In this embodiment of the application, time window filtering means retaining only the memory entries within a preset time window.

[0108] For example, consider a scenario where the processing strategy includes multiple processing steps: Suppose that the first agent's memory retrieval request is to query "performance summary of project X". The first agent is allowed to view statistical trends but not personal details. Therefore, 10 personal KPI data points (including name, sales amount, etc.) are the first candidate memory item set. The processing strategy for security downgrading of the first candidate memory item set includes: aggregation processing (calculating total sales amount, average sales amount, highest sales amount / lowest sales amount), desensitization processing (replacing the names corresponding to the highest / lowest sales amount with irreversible desensitization tags), and text summarization processing (further compressing the above statistical results into a high-level text: "Project X has good overall performance, with average sales amount increasing by 5% compared to last month. Outstanding contributors and those who need promotion have been marked").

[0109] S221: Use a processing strategy to perform security downgrade processing on the first candidate memory entry set to obtain an accessible memory entry set.

[0110] In this embodiment of the application, if the processing strategy includes multiple processes, the first candidate memory entry set is subjected to security downgrade processing in the order of execution of each process to obtain the final accessible memory entry set.

[0111] In addition, it is worth noting that, in order to ensure data security, even if the processing strategy does not include desensitization, desensitization is performed on each first candidate memory entry whose sensitivity meets the preset sensitivity conditions.

[0112] For example, taking a home robot scenario, suppose that candidate memory entry A is "The user watched a TV program last Friday afternoon" and candidate memory entry B is "User Li Hua (ID: LH_2023, mobile phone number ending in 6789) issued a voice command in the living room (coordinates (x=2.3, y=4.1)) at 14:30 on July 12: 'Turn on the TV and tune to channel 1', and then watched until 16:45". The access decision result of candidate memory entry A is allowed access, and the access decision result of candidate memory entry B is conditional access. Then, candidate memory entry B is downgraded (de-identified) to obtain the accessible memory entry C corresponding to candidate memory entry B. Accessible memory entry C is "A user issued a voice command in the living room on the afternoon of July 12: 'Turn on the TV', and then watched for a period of time". Accessible memory entry C and candidate memory entry B are returned to the first intelligent agent.

[0113] In this way, based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environmental attributes, the system dynamically determines the security downgrade process for the first candidate memory entry set. This ensures that the transformed memory view satisfies security constraints while preserving the information required for the task to the greatest extent. For highly sensitive but task-essential memory entries, the system does not reject them directly but generates an accessible version through security downgrade processing and returns it. This allows low-privilege agents to still obtain the information needed to complete the task even without accessing the original sensitive data, achieving a balance between data security and collaborative efficiency.

[0114] Optionally, in this embodiment of the application, when the access decision result is that the first candidate memory entry set is conditionally allowed to be accessed, a security downgrade process is performed to obtain an accessible memory entry set. Then, for each first candidate memory entry contained in the first candidate memory entry set, the following operations are performed respectively: based on the request intent of this memory retrieval, the role information of the first intelligent agent contained in the subject attribute, the task context contained in the environmental attribute, and the data sensitivity contained in the object attribute of a first candidate memory entry, a processing strategy for security downgrade processing of a first candidate memory entry is determined, and then the obtained processing strategy is used to perform security downgrade processing on a first candidate memory entry to obtain an accessible memory entry set.

[0115] See Figure 4The diagram illustrates the logic of memory retrieval and view generation in this embodiment. A first agent initiates a memory retrieval request, carrying a query vector, the agent's identity identifier, and task context. Based on the first agent's role information, a set of memory regions accessible to the first agent is selected from the multi-agent memory space. Based on the query vector, candidate memory entries whose semantic vectors match the query vector are selected from the memory entries stored in the memory region set. Based on the first agent's subject attributes, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access permissions of the first agent to each candidate memory entry are evaluated, resulting in access decision results for each candidate memory entry. If the access decision result is "deny access," the corresponding memory entry is discarded, and a denial log is recorded. If the access decision result is "allow access," the corresponding memory entry is directly included in the result set. If the access decision result is "conditionally allow access," security downgrade processing is performed, generating a downgraded set of accessible memory entries, which is then included in the result set. The memory view is returned to the first agent. In this way, various security degradation processing strategies such as desensitization, aggregation, and abstraction are introduced into multi-agent memory management, so that different agents can obtain different memory views that meet their permissions and task requirements when viewing the same shared memory area, thus achieving a balance between information sharing and privacy protection.

[0116] Optionally, in this embodiment, each intelligent agent can write memory entries to the memory partition it has write permissions to, see [reference]. Figure 5 The diagram shown illustrates the process of writing memory entries according to an embodiment of this application, specifically performing the following operations: S50: Receive a memory write request from the second agent.

[0117] The memory write request carries the memory content to be written and the first partition identifier.

[0118] In this embodiment, the second intelligent agent is any one of multiple intelligent agents under the target tenant. The second intelligent agent and the first intelligent agent can be the same intelligent agent or different intelligent agents; this embodiment does not impose any restrictions on this. The first partition identifier is used to indicate which partition the memory content to be written needs to be written to.

[0119] S51: Determine the permission verification result of the second agent based on the subject attributes of the second agent.

[0120] The permission verification result indicates whether the second agent has the permission to write to the first target memory area corresponding to the first partition identifier.

[0121] In this embodiment of the application, based on the role, authentication level, group, and currently participating task list in the main attributes of the second intelligent agent, it is determined whether the second intelligent agent has the permission to write to the first target memory area corresponding to the first partition identifier.

[0122] For example, if the first target memory area corresponding to the first partition identifier is a task domain temporary shared area A, verify whether the second agent is participating in the collaborative task A corresponding to the task domain temporary shared area A (i.e., whether the identifier of collaborative task A is in the active task list of the second agent). If it is participating, the permission verification result is passed.

[0123] S52: Determine the compliance verification result of the memory content to be written based on the sensitivity of the memory content to be written and the security level of the first target memory area.

[0124] The compliance verification result indicates whether the first target memory area meets the security constraints required for the memory content to be written.

[0125] For example, highly sensitive memory content to be written is not allowed to be written to the global shared memory area with a lower security level, but can only be written to memory partitions with a higher security level (such as private memory areas).

[0126] S53: Determine whether the permission verification result is passed and the compliance verification result is passed. If so, execute S54; otherwise, execute S55.

[0127] S54: Generate the memory metadata of the memory content to be written, and write the memory content to be written and the memory metadata as new memory entries into the first target memory area.

[0128] The memory metadata includes: memory entry identifier, timestamp, sensitivity level, and traceability chain. Memory metadata can also be object attributes.

[0129] In this embodiment of the application, if the permission verification result is passed and the compliance verification result is passed, then the memory metadata of the memory content to be written is generated, and the memory content to be written and the memory metadata are added as new memory entries and written to the first target memory area, and the writing log is recorded in the audit log.

[0130] S55: Reject writing to the memory to be written and log the rejection to the audit log.

[0131] In this embodiment of the application, if the permission verification result is unsuccessful or the compliance verification result is unsuccessful, the writing of the memory content to be written will be refused, and the refusal log will be recorded in the audit log.

[0132] In this way, permission verification ensures that the agent can only write to the memory partition it is authorized to write to, and compliance verification ensures that highly sensitive content will not fall into the low-security-level memory partition. This double defense avoids data leakage or pollution caused by accidental writing. When writing, metadata such as partition ownership, sensitivity, and data type are generated. This metadata is used as object attributes in subsequent retrieval to participate in the evaluation, ensuring the real-time and accuracy of the evaluation. In addition, logs are recorded when writing is rejected, which facilitates auditing.

[0133] Optionally, in this embodiment, each intelligent agent supports a temporary delegation authorization mechanism. An intelligent agent can proactively delegate the read permission of a specified entry in its private memory area to another intelligent agent within a set time period. The specific execution steps are as follows: SB1: Receives a temporary delegation authorization request sent by the first intelligent agent.

[0134] The temporary delegation authorization request carries the identifier of the delegated intelligent agent, the validity period, and the range of delegated memory entries within the private memory area corresponding to the first intelligent agent.

[0135] SB2: Authorize the delegated agent corresponding to the delegated agent identifier to allow the delegated agent to access the scope of memory entries within the validity period.

[0136] In this embodiment of the application, the delegated intelligent agent corresponding to the delegated intelligent agent identifier is authorized so that the delegated intelligent agent is allowed to access the scope of memory entries during the validity period, and the permissions of the delegated intelligent agent are revoked after the validity period expires.

[0137] In this way, intelligent agents can proactively share specific memories from their private memory areas with other intelligent agents, thereby improving the agility of collaboration.

[0138] Optionally, in this embodiment, cascading delegation can also be enabled or disabled to further enhance collaboration flexibility. When cascading delegation is enabled, the specific execution steps are as follows: SC1: Receives a temporary delegation authorization request sent by the first intelligent agent.

[0139] The temporary delegation authorization request carries the identifier of the first-level delegated intelligent agent, the validity period, and the scope of delegated memory entries within the private memory area corresponding to the first intelligent agent.

[0140] SC2: Authorize the first-level delegated agent corresponding to the first-level delegated agent identifier so that, within the validity period, the first-level delegated agent is allowed to access the scope of memory entries and is allowed to forward permissions to the second-level delegated agent.

[0141] SC3: Receives temporary delegation authorization requests sent by the first-level delegated intelligent agent.

[0142] The temporary delegation authorization request carries the identifier of the second-level delegated intelligent agent, the validity period, and the scope of delegated memory entries within the private memory area corresponding to the first intelligent agent.

[0143] SC4: Authorize the second-level delegated agent corresponding to the second-level delegated agent identifier to allow the second-level delegated agent to access the scope of memory entries within the validity period.

[0144] Additionally, it is worth noting that the cascading depth of cascading delegation can be set in this embodiment. When the cascading depth is 2 levels, only the second-level delegated intelligent agent is allowed to access the memory entry range. If the cascading depth is 3 levels, a temporary delegation authorization request sent by the second-level delegated intelligent agent is further received, and authorization is granted to the third-level delegated intelligent agent corresponding to the third-level delegated intelligent agent identifier, so that the third-level delegated intelligent agent is allowed to access the memory entry range within the validity period.

[0145] Furthermore, based on the same technical concept, embodiments of this application provide a memory management device for multiple agents, which is used to implement the above-described method flow of embodiments of this application. For example, see [link to relevant documentation]. Figure 6 As shown, the multi-agent memory management device 600 may include: a determination module 601, an evaluation module 602, a generation module 603, a writing module 604, a delegation and authorization module 605, and a memory transfer module 606, wherein: The determination module 601 is used to receive a memory retrieval request from the first agent and, based on the query vector carried by the memory retrieval request, determine each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent. The evaluation module 602 is used to evaluate the access rights of the first intelligent agent to each candidate memory entry based on the subject attributes of the first intelligent agent, the environmental attributes and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and to obtain the access decision results for each candidate memory entry. The access decision results include: allow access, deny access, and conditionally allow access. The generation module 603 is used to perform security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed to obtain an accessible memory entry set, and return the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed to the first intelligent agent.

[0146] In an optional embodiment, when determining each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space based on the query vector carried by the memory retrieval request, the determining module 601 is further configured to: Based on the role information of the first agent contained in the subject attributes, the set of memory areas accessible to the first agent is selected from each memory area in the multi-agent memory space; Based on the query vector, candidate memory entries whose semantic vectors match the query vector are selected from the memory entries stored in the memory area set.

[0147] In an optional embodiment, when evaluating the access rights of the first intelligent agent to each candidate memory entry based on the agent's subjective attributes, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and obtaining the access decision results for each candidate memory entry, the evaluation module 602 is further configured to: For each candidate memory entry, the following operations are performed: Based on the subject attribute, environment attribute, operation attribute, and object attribute of a candidate memory entry, combined with a preset evaluation strategy rule set, the access permission of the first agent to a candidate memory entry is evaluated to obtain the access decision result corresponding to the candidate memory entry. Each evaluation strategy rule in the preset evaluation strategy rule set is used to: indicate that when the subject attribute, object attribute, environment attribute, and operation attribute meet the preset corresponding conditions, the corresponding access decision result is generated.

[0148] In an optional embodiment, when the first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set, the generation module 603 is further configured to: Based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environmental attributes, a processing strategy for security downgrading of the first candidate memory entry set is determined. The processing strategy includes at least one of the following: field filtering, desensitization, aggregation, text summarization, and time window filtering. A processing strategy is adopted to perform security downgrade processing on the first candidate memory entry set to obtain an accessible memory entry set.

[0149] In an optional embodiment, the writing module 604 is used to: Receive a memory write request from the second agent. The memory write request carries the memory content to be written and the first partition identifier. Based on the subject attributes of the second intelligent agent, the permission verification result of the second intelligent agent is determined. The permission verification result indicates whether the second intelligent agent has the permission to write to the first target memory area corresponding to the first partition identifier. Based on the sensitivity of the memory content to be written and the security level of the first target memory area, the compliance verification result of the memory content to be written is determined. The compliance verification result indicates whether the first target memory area meets the security constraints required by the memory content to be written. If both the permission verification and compliance verification results are passed, then the memory metadata of the content to be written is generated, and the content to be written and the memory metadata are added as new memory entries and written to the first target memory area.

[0150] In an optional embodiment, the delegation and authorization module 605 is used to: Receive a temporary delegation authorization request sent by the first intelligent agent. The temporary delegation authorization request carries the identifier of the delegated intelligent agent, the validity period, and the range of delegated memory entries in the private memory area corresponding to the first intelligent agent. Authorize the delegated intelligent agent corresponding to the delegated intelligent agent identifier so that the delegated intelligent agent is allowed to access the scope of memory entries within the validity period.

[0151] In an optional embodiment, the memory transfer module 606 is used for: After the collaborative task corresponding to the temporary shared memory area of ​​the target task domain is completed, in response to the memory transfer request from the third agent for the temporary shared memory area of ​​the target task domain, the memory transfer request carries the memory content to be transferred and the second partition identifier. If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, the memory entries to be retained in the temporary shared memory area of ​​the target task domain will be transferred to the second target memory area corresponding to the second partition identifier. The second target memory area is the private memory area of ​​the third agent or the shared memory area of ​​the group to which it belongs.

[0152] Based on the description of the method and apparatus embodiments above, an exemplary embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform the method according to an embodiment of the present invention.

[0153] This application also provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0154] This application also provides a computer program product, including a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this application.

[0155] See Figure 7 The diagram shown below illustrates the structure of an electronic device 700 that can serve as a server or client in this application, and is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0156] like Figure 7 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may also store various programs and data required for the operation of the device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0157] Multiple components in electronic device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, storage unit 708, and communication unit 709. Input unit 706 can be any type of device capable of inputting information to electronic device 700. Input unit 706 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 707 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 708 may include, but is not limited to, disk and optical disk. Communication unit 709 allows electronic device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets, such as Bluetooth devices, WiFi devices, worldwide interoperability for microwave access (WiMax) devices, cellular communication devices, and / or the like.

[0158] The computing unit 701 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above. For example, in some embodiments, the above-described multi-agent memory management method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via ROM 702 and / or communication unit 709. In some embodiments, the computing unit 701 can be configured to perform the above-described multi-agent memory management method by any other suitable means (e.g., by means of firmware).

[0159] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0160] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM) or flash memory, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0161] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device, PLD) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0162] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0163] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0164] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0165] Furthermore, it should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of this invention are still within the scope of this application.

Claims

1. A memory management method for multi-agent systems, characterized in that, include: A memory retrieval request is received from a first agent. Based on the query vector carried by the memory retrieval request, each candidate memory entry in the set of memory regions accessible to the first agent in the multi-agent memory space is determined. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent. Based on the subject attributes of the first intelligent agent, the environmental and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, the access permissions of the first intelligent agent to each candidate memory entry are evaluated to obtain the access decision results for each candidate memory entry. The access decision results include: allow access, deny access, and conditionally allow access. The first candidate memory entry set whose access decision result is conditionally allowed is subjected to security downgrade processing to obtain an accessible memory entry set, and the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed are returned to the first agent.

2. The method as described in claim 1, characterized in that, The step of determining each candidate memory entry in the set of memory regions accessible to the first agent in the multi-agent memory space based on the query vector carried by the memory retrieval request includes: Based on the role information of the first agent contained in the subject attributes, a set of memory areas accessible to the first agent is selected from each memory area in the multi-agent memory space. Based on the query vector, candidate memory entries whose semantic vectors match the query vector are selected from the memory entries stored in the memory area set.

3. The method as described in claim 1, characterized in that, The method of evaluating the access rights of the first intelligent agent to each candidate memory entry based on the agent's subjective attributes, the environmental and operational attributes of the current memory retrieval, and the objective attributes of each candidate memory entry, and obtaining the access decision results for each candidate memory entry, includes: For each candidate memory entry, the following operations are performed: based on the subject attribute, the environment attribute, the operation attribute, and the object attribute of a candidate memory entry, and in conjunction with a preset evaluation strategy rule set, the access permission of the first agent to the candidate memory entry is evaluated to obtain the access decision result corresponding to the candidate memory entry. Each evaluation strategy rule in the preset evaluation strategy rule set is used to: indicate that when the subject attribute, the object attribute, the environment attribute, and the operation attribute meet preset corresponding conditions, a corresponding access decision result is generated.

4. The method as described in claim 1, characterized in that, The process of performing security downgrade on the first candidate memory entry set whose access decision result is conditionally allowed to obtain an accessible memory entry set includes: Based on the request intent of this memory retrieval, the role information of the first agent contained in the subject attributes, and the task context contained in the environment attributes, a processing strategy for security downgrading of the first candidate memory entry set is determined, wherein the processing strategy includes at least one of the following: field filtering processing, desensitization processing, aggregation processing, text summarization processing, and time window filtering processing. The first candidate memory entry set is subjected to security downgrade processing using the aforementioned processing strategy to obtain the accessible memory entry set.

5. The method as described in claim 1, characterized in that, The method further includes: Receive a memory write request from a second intelligent agent, the memory write request carrying the memory content to be written and a first partition identifier; Based on the subject attributes of the second intelligent agent, the permission verification result of the second intelligent agent is determined. The permission verification result indicates whether the second intelligent agent has the permission to write to the first target memory area corresponding to the first partition identifier. Based on the sensitivity of the memory content to be written and the security level of the first target memory area, the compliance verification result of the memory content to be written is determined, and the compliance verification result indicates whether the first target memory area meets the security constraints required by the memory content to be written. If the permission verification result is passed and the compliance verification result is passed, then the memory metadata of the memory content to be written is generated, and the memory content to be written and the memory metadata are written as new memory entries into the first target memory area.

6. The method as described in claim 1, characterized in that, The method further includes: Receive a temporary delegation authorization request sent by the first intelligent agent, the temporary delegation authorization request carrying the identifier of the delegated intelligent agent, the validity period, and the range of delegated memory entries in the private memory area corresponding to the first intelligent agent; Authorize the delegated intelligent agent corresponding to the delegated intelligent agent identifier to allow the delegated intelligent agent to access the memory entry range during the validity period.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: After the collaborative task corresponding to the temporary shared memory area of ​​the target task domain is completed, in response to a memory transfer request from a third agent for the temporary shared memory area of ​​the target task domain, the memory transfer request carries the memory content to be transferred and the second partition identifier. If the current time is within the grace period corresponding to the temporary shared memory area of ​​the target task domain, then the memory entries to be retained in the temporary shared memory area of ​​the target task domain will be transferred to the second target memory area corresponding to the second partition identifier. The second target memory area is the private memory area of ​​the third agent or the group shared memory area to which it belongs.

8. A memory management device for multiple agents, characterized in that, include: The determination module is used to receive a memory retrieval request from a first agent, and based on the query vector carried by the memory retrieval request, determine each candidate memory entry contained in the set of memory regions accessible to the first agent in the multi-agent memory space. The multi-agent memory space includes: a global shared memory region, at least one group shared memory region, at least one task domain temporary shared memory region, and multiple private memory regions. Each task domain temporary shared memory region is visible to each participating agent participating in the corresponding collaborative task. Each task domain temporary shared memory region is used to store intermediate memory entries that are temporarily generated to complete the corresponding collaborative task and need to be exchanged between each participating agent. The evaluation module is used to evaluate the access rights of the first intelligent agent to each candidate memory entry based on the subject attributes of the first intelligent agent, the environmental attributes and operational attributes of this memory retrieval, and the object attributes of each candidate memory entry, and to obtain the access decision results for each candidate memory entry. The access decision results include: allow access, deny access, and conditionally allow access. The generation module is used to perform security downgrade processing on the first candidate memory entry set whose access decision result is conditionally allowed to obtain an accessible memory entry set, and return the accessible memory entry set and the second candidate memory entry set whose access decision result is allowed to the first agent.

9. An electronic device, characterized in that, include: processor; as well as Stored program memory, The program includes computer instructions that, when executed by the processor, cause the processor to perform the method as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7.