A storage method and system for long-term memory of an intelligent agent and a solid state disk
By using a storage method that combines group identifier matching and incremental updates, the problems of duplicate information and resource consumption in the long-term memory storage of intelligent agents are solved, achieving efficient memory management and traceability.
Patent Information
- Application Number
- CN202611171232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies for long-term memory storage of intelligent agents suffer from problems such as redundant and lengthy repetitive information, increased processing costs due to repeated retrieval, and difficulty in tracing back summary information. Furthermore, processing full-scale memory data consumes a large amount of host resources, resulting in low storage efficiency.
The system employs a storage structure consisting of a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. It incrementally updates topic summary units that are matched with the same group by grouping identifiers. Memories that do not match are saved to the set to be merged. When the set meets the conditions, a new topic summary unit is generated. The association between topic summaries and original memories is maintained through an association storage area.
It achieves isolation and efficient storage of memory data, reduces storage-side computation and read/write overhead, maintains the interpretability and auditability of memory, and reduces host memory resource consumption.
Smart Images

Figure CN123030751A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, specifically to a storage method, system, and solid-state drive for long-term memory of intelligent agents. Background Technology
[0002] With the development of large language models, retrieval-enhanced generative techniques, and autonomous task execution technologies, intelligent agents have been gradually applied to scenarios such as personal assistants, enterprise process management, multi-turn dialogues, task planning, and multi-agent collaboration. During long-term operation, intelligent agents continuously generate and accumulate a large amount of historical information, such as user preferences, user commands, tool call results, environmental observations, task states, business facts, interim conclusions, and interaction records. To support subsequent retrieval, reasoning, and response generation, this historical information is typically stored as long-term memory in databases, vector libraries, object storage, or other persistent storage media.
[0003] When preserving long-term memory, a common approach is to directly store the original historical fragments and retrieve them when needed based on keywords, vector similarity, or a hybrid retrieval method. Another common approach is to summarize or compress the historical information before use. However, as the scale of long-term memory continues to grow, directly retrieving large amounts of original memory fragments can easily lead to verbose contexts, repeated retrieval of repetitive information, and semantic overlap, thereby increasing the processing cost for the agent. On the other hand, if only compressed summary information is retained, it is often difficult to trace back the corresponding original evidence when interpretation, verification, auditing, or conflict resolution are required, affecting the credibility and verifiability of the long-term memory results.
[0004] Furthermore, when summarizing or compressing historical information, the entire memory data needs to be pulled from the storage medium to the host memory to complete topic merging and summary recompression. On the one hand, batch full compression requires moving the entire memory data, consuming a large amount of bus bandwidth and host memory resources; on the other hand, this processing method has a time window, during which newly added memories cannot be promptly merged into the corresponding topics. Summary of the Invention
[0005] In view of this, this application aims to provide a storage method, device, medium and product for long-term memory of intelligent agents, so as to solve the problems existing in the storage of long-term memory of intelligent agents in traditional related technologies.
[0006] The first aspect of this application provides a storage method for long-term memory of intelligent agents, applied to a storage system, the storage system including a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area, the storage method comprising: Receive long-term memory units generated during the operation of the intelligent agent, and save the long-term memory units to the long-term memory unit storage area; Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched; In response to a successful match, the topic summary unit is incrementally updated based on the long-term memory unit and the successfully matched topic summary unit; In response to a failed match, the long-term memory unit is saved to the merge set storage area, and when the merge sets in the merge set storage area meet the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
[0007] In one possible implementation of this application, the storage system further includes an associated storage area, which stores the association relationship between topic summary units and long-term memory units, and also includes: Receive search request; Determine whether the original evidence needs to be returned based on the search request; In response to the lack of need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is invoked based on the retrieval request to generate return information; In response to the need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is called based on the retrieval request, and the corresponding long-term memory unit in the long-term memory unit storage area is called through the association relationship. Return information is generated based on the called topic summary unit and the corresponding long-term memory unit.
[0008] In one possible implementation of this application, matching the long-term memory unit with the topic summary units in the same group in the topic summary unit storage area based on the group identifier of the long-term memory unit includes: The topic summary unit in the same group in the topic summary unit storage area is called based on the group identifier of the long-term memory unit; Similarity is calculated based on the semantic representation of the long-term memory unit and the semantic representation of the topic summary unit within the same group; A match is successful if at least one of the calculated similarities is greater than or equal to a similarity threshold. If all similarities in the calculated similarity score are less than the similarity threshold, the match is unsuccessful.
[0009] In one possible implementation of this application, the storage system further includes an associated storage area, which stores the association relationship between topic summary units and long-term memory units. In response to a successful match, incremental updates of the topic summary units are performed based on the long-term memory units and the successfully matched topic summary units, including: If there are multiple successfully matched topic summary units, the target topic summary unit among the multiple topic summary units is determined based on preset selection conditions. The preset selection conditions include any one of similarity, evidence coverage, topic freshness, access frequency, business priority, or policy rules. The content and evidence of the target topic summary unit are updated based on the long-term memory unit, and the updated target topic summary unit is compressed using a preset compression strategy to generate a new topic summary unit. The evidence represents a long-term memory unit that is associated with the target topic summary unit.
[0010] In one possible implementation of this application, in response to a failed match, the long-term memory unit is saved to the mergeable set storage area, and when the mergeable sets in the mergeable set storage area meet preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area, including: In response to a failed match, based on the group identifier of the long-term memory unit, the long-term memory unit is saved to the merge set with the corresponding group identifier in the merge set storage area; In response to the set to be merged satisfying the preset merging conditions, the similarity of the semantic representations of the stored long-term memory units is analyzed to form one or more topic sets; Each topic set is compressed using a preset compression strategy to generate a new topic summary set, which is then stored in the topic summary unit storage area.
[0011] One possible implementation of this application also includes: Generate semantic representations and version information for new topic summary units, wherein the new topic summary units include incrementally updated topic summary units and new topic summary units generated when preset merging conditions are met; Generate the association between the new topic summary unit and the corresponding long-term memory unit and save it to the associated storage area; Update the processing state of the long-term memory unit; Update the semantic index and the time index. The semantic index includes a retrieval structure based on the semantic representation of the topic summary unit, and the time index includes a retrieval structure based on the update time of the topic summary unit.
[0012] In one possible implementation of this application, the group identifier includes any one or more of the following: user, intelligent agent object, business task, tenant, project, application, device, or session scope; The preset merging conditions include any one or more of the following: the number of long-term memory units in the set to be merged, the total byte size, the equivalent word size, the storage time of the first long-term memory unit, the access frequency, the semantic density, or the preset strategy priority.
[0013] A second aspect of this application also provides a storage system for long-term memory of intelligent agents, the storage system comprising a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area; The storage system also includes a controller, which is configured to: Receive long-term memory units generated during the operation of the intelligent agent, and save the long-term memory units to the long-term memory unit storage area; Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched; In response to a successful match, the topic summary unit is incrementally updated based on the long-term memory unit and the successfully matched topic summary unit; In response to a failed match, the long-term memory unit is saved to the merge set storage area, and when the merge sets in the merge set storage area meet the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
[0014] A third aspect of this application also provides an artificial intelligence-based solid-state drive, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area, and the memory also stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the storage method for long-term memory of intelligent agents according to the first aspect and possible implementations of the first aspect.
[0015] A fourth aspect of this application also provides a computer storage medium, wherein the computer-readable storage medium stores computer-executable instructions, a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area, wherein the computer-executable instructions, when executed by a processor, are used to implement a storage method for agent-oriented long-term memory as described in the first aspect and possible implementations of the first aspect.
[0016] The fifth aspect of this application provides a computer program product comprising: a computer program that, when executed by a processor, implements a storage method for agent-oriented long-term memory as described in the first aspect and possible implementations of the first aspect.
[0017] The storage method for agent-based long-term memory provided in this application stores long-term memory units generated by the agent and matches topic summary units within the same group based on group identifiers, thereby isolating memory data and avoiding semantic mismatches across groups. When a match is successful, only the corresponding topic summary unit is incrementally updated, eliminating the need for full reprocessing of all memories and topics, significantly reducing storage-side computation and read / write overhead. Memories that fail to match are saved to a set to be merged, without being directly discarded or forcibly merged into irrelevant topics, preserving the original memory information completely. Once the set meets preset conditions, a new topic summary unit is automatically generated. Simultaneously, the associated storage area persistently maintains the correspondence between topic summaries and original long-term memory units, enabling the binding and traceability of summaries and original memories, improving the interpretability and auditability of long-term memory conclusions. Furthermore, the storage of long-term memory units, the storage of topic summary units, the incremental update of summaries, and the merging process are all implemented by the storage system, reducing host memory resources and making it suitable for storage-side management scenarios for agent-based long-term memory. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a storage method for long-term memory of intelligent agents provided in an embodiment of this application.
[0020] Figure 2 This is a schematic diagram of the structure of a storage system for long-term memory of intelligent agents provided in an embodiment of this application.
[0021] Figure 3 This is a schematic diagram illustrating the data model relationship between the long-term memory unit, the topic summary unit, the original evidence record, and the traceable index provided in the embodiments of this application.
[0022] Figure 4 This is a schematic diagram illustrating the incremental semantic matching, topic merging, processing of the set to be merged, and formation of new topics provided in the embodiments of this application.
[0023] Figure 5 This is a schematic diagram of the abstract priority retrieval and original evidence backtracking process provided for embodiments of this application.
[0024] Figure 6 This is a schematic diagram of the hardware structure of an artificial intelligence-based solid-state drive provided in an embodiment of this application.
[0025] Figure 7This is a schematic diagram of an architecture including a host side and a solid-state drive, provided for an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] During long-term operation, intelligent agents continuously generate a large number of memory fragments. These fragments may be scattered across different times, sessions, or task stages, and typically need to be saved for later use. Related technologies employ either direct saving of the original memory fragments or summarizing them into themes for saving. However, directly saving the original memory fragments results in duplicate information that increases subsequent processing costs, while summarizing them into themes requires significant host memory resources and is not conducive to evidence retrieval.
[0028] To address this issue, this application provides a storage method for long-term memory of intelligent agents, applied to a storage system. This storage system comprises a three-tiered storage structure: a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. Based on the grouping identifier of the long-term memory unit, it is matched with topic summary units within the same group. Upon successful matching, the topic summary unit is incrementally updated; if matching fails, it is stored in the set to be merged, so that topic summary units can be generated again when the set meets preset merging conditions. This storage system can be implemented, for example, using an Artificial Intelligence Solid State Drive (AI SSD). As a unified carrier for long-term memory management, the storage system centrally manages the three storage areas, enabling the reception, matching, merging, and distribution of memory to be executed collaboratively under a unified storage architecture, helping to maintain data consistency and index synchronization between the storage areas.
[0029] Exemplary methods Figure 1 This is a flowchart illustrating a storage method for long-term memory of intelligent agents provided in an embodiment of this application. The executing entity in this embodiment can be a storage system. For example... Figure 1 As shown, the method includes: S101: Receive the long-term memory unit generated during the operation of the intelligent agent, and save the long-term memory unit to the long-term memory unit storage area.
[0030] Specifically, the storage medium of the storage system is equipped with a long-term memory (LCM) storage area, which is used to store LCM units. LCM units represent storage objects containing interaction records, task events, tool call results, environmental observations, user preferences, business facts, interim conclusions, or other persistently retrievable content generated during the long-term operation of the intelligent agent. For example, LCM units include dialogue interaction content between the intelligent agent and the user or other intelligent agents, node process records of the intelligent agent's task execution, relevant data from the intelligent agent's calls to external tools or databases, observation data collected by the intelligent agent regarding the external environment or system operating status, personalized user features extracted from interactions, objective business information extracted from business tasks, or interim judgments made by the intelligent agent after multiple rounds of aggregation, etc. In other words, the LCM unit can be understood as the original memory fragments generated by the intelligent agent during its operation.
[0031] In practical applications, this long-term memory unit storage area can store the content load, i.e., the complete content of the original memory fragment, or it can store references pointing to the content load, i.e., the addresses that store the original memory fragments. Thus, by providing space for the preservation of long-term memory units through the long-term memory unit storage area, a data foundation is provided for subsequent evidence retrieval or audit verification.
[0032] In this embodiment, the intelligent agent can be a conversational intelligent agent, an autonomous task intelligent agent, an enterprise process intelligent agent, a personal assistant intelligent agent, a multimodal intelligent agent, or an intelligent agent in a multi-agent system. The specific type of intelligent agent is not limited in this embodiment. During the operation of the intelligent agent, data generated by the intelligent agent can be acquired in real time and saved as long-term memory units in the long-term memory storage area. It should be noted that a long-term memory unit can be understood as an independent event, such as an output by the intelligent agent, a tool call, or a task state change. After each complete independent event is generated, the intelligent agent sends the raw event data to the storage system, which encapsulates it into a long-term memory unit and saves it in the long-term memory storage area. Therefore, the byte size or text length of each long-term memory unit may not be exactly the same.
[0033] S102: Based on the group identifier of the long-term memory unit, match the long-term memory unit with the topic summary units in the same group in the topic summary unit storage area.
[0034] Specifically, when receiving raw event data generated by the operation of an intelligent agent, this data usually also includes its corresponding descriptive information. When the storage system encapsulates this data into long-term memory units, it extracts the necessary fields from this descriptive information as metadata. For example, it extracts source identifier, role information, time information, event interval, group identifier, semantic representation, processing status, access status, and original evidence identifier as metadata.
[0035] The group identifier includes any one or more of the following: user, intelligent agent object, business task, tenant, project, application, device, or session scope.
[0036] For example, when the group identifier is "user," long-term memory units are grouped according to their respective users. Memories of the same user are matched within the same group, ensuring that the long-term memories of different users are isolated from each other, avoiding erroneous merging across users, and guaranteeing user-level memory privacy and independence. When the group identifier is "agent object," long-term memory units are grouped according to their associated agent instances, ensuring that the memories of different agent instances in a multi-agent system are independently merged, avoiding memory confusion between different agents. When the group identifier is "business task," long-term memory units are grouped according to their respective business tasks, ensuring task-level memory integrity and isolation. When the group identifier is "tenant," long-term memory units are grouped according to their respective tenants, suitable for multi-tenant scenarios, ensuring strict isolation of memory data between different tenants, and meeting the data isolation requirements in a multi-tenant environment.
[0037] When the group identifier is a project, long-term memory units are grouped according to the project they belong to, allowing memories of the same project to be consolidated and facilitating project-level knowledge accumulation and topic organization. When the group identifier is an application, long-term memory units are grouped according to the application they are associated with, allowing memories generated by different applications to be managed independently and avoiding memory confusion across application scenarios. When the group identifier is a device, long-term memory units are grouped according to the device they are associated with, suitable for multi-device scenarios, allowing memories generated on different devices to be managed in isolation according to the device dimension. When the group identifier is a session scope, long-term memory units are grouped according to the session they belong to, suitable for scenarios where sessions are the basic unit of interaction.
[0038] In other embodiments, the group identifier can also be determined by a combination of multiple dimensions, such as a combination of user and business task, or a combination of tenant and project. Multi-dimensional group identifiers provide finer grouping granularity, further narrowing the matching range and enhancing memory isolation and merging accuracy in complex business scenarios. In practical applications, the group identifier used by the storage system when storing long-term memory units can be predetermined, thus using the same group identifier in the long-term memory unit storage area, the topic summary unit storage area, and the unit to be merged storage area to ensure the accuracy of subsequent matching and merging processes.
[0039] The topic summary unit storage area of the storage system stores topic summary units. Each topic summary unit represents a compressed storage object of a set of topics. That is, each topic summary unit is obtained by obtaining a group of long-term memory units with the same grouping identifier and related to a common topic, and compressing them. Each topic summary unit includes metadata information such as topic identifier, grouping identifier, compressed summary content, topic semantic representation, set of covering evidence (i.e., the corresponding long-term memory units), number of evidence, summary version, update time, and topic status.
[0040] Each topic summary unit and the corresponding set of long-term memory units that form that topic summary unit constitute a topic set. This topic set includes long-term memory units, evidence links, topic summary units, summary version information, and index records for retrieval or updating. It should be noted that the storage system does not have a dedicated topic set storage area; instead, the content contained in the topic set is stored separately in the long-term memory unit storage area and the topic summary unit storage area.
[0041] When storing each long-term memory unit in the long-term memory unit storage area, it is necessary to retrieve topic summary units with the same grouping identifier from the topic summary unit storage area based on the grouping identifier of the long-term memory unit, as candidate topic summary units. Then, the long-term memory unit is matched one by one with the candidate topic units. Specifically, the matching can be performed semantically between the long-term memory unit and the candidate topic summary units, that is, selecting candidate topic summary units that are semantically the same as or similar to the long-term memory unit.
[0042] This embodiment limits the matching range to the same group by using group identifiers, avoiding erroneous merging across users, tasks, or business objects, improving memory isolation between different groups, and reducing the candidate set range for each match, thereby reducing the computational overhead of semantic matching.
[0043] S103: In response to a successful match, incrementally update the topic summary unit based on the long-term memory unit and the successfully matched topic summary unit.
[0044] Specifically, if a candidate topic summary unit exists that is semantically identical or similar to the long-term memory unit, a match is considered successful. In this case, the candidate topic summary unit is used as the target topic summary unit, and an incremental update is performed on the target topic summary unit based on the long-term memory unit. It should be noted that this incremental update can be understood as updating only the target topic summary unit, rather than updating the entire topic summary unit storage area. Therefore, through this incremental update mechanism, the storage system only needs to update the related topic summary units when it receives a new long-term memory unit, avoiding the high computational cost of full recompression of the entire topic summary unit storage area. This is suitable for the frequent memory write requirements in scenarios where intelligent agents operate continuously.
[0045] S104: In response to a failed match, the long-term memory unit is saved to the mergeable set storage area, and when the mergeable set in the mergeable set storage area meets the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
[0046] Specifically, the storage system also includes a mergeable set storage area, which stores sets to be merged. The mergeable set can be understood as a temporary or intermediate set used to temporarily store long-term memory units that cannot be reliably assigned to existing topic summary units. Memories in the mergeable set are not directly discarded; instead, they form new topic summary sets when preset merging conditions are met. This mergeable set storage area provides a buffer and protection mechanism for unmatched memories, avoiding evidence loss due to direct discarding and topic contamination caused by forcibly assigning them to low-confidence topics. Furthermore, by delaying merging and allowing new topics to accumulate sufficient evidence before formation, it reduces noise caused by premature topic creation.
[0047] Specifically, when no semantically identical or similar target topic summary set can be matched in the candidate topic summary unit, the long-term memory unit is first saved to the unmerged set in the unmerged set storage area. Then, when the unmerged set meets the preset merging conditions, the long-term memory units with the same grouping identifier in the unmerged set are semantically analyzed to form one or more new topic summary units, which are then stored in the topic summary unit storage area.
[0048] In this embodiment, the preset merging conditions include any one or more of the following: the number of long-term memory units in the set to be merged, the total byte size, the equivalent word size, the storage time of the first long-term memory unit, the access frequency, or the semantic density.
[0049] For example, when the preset merge condition is the number of long-term memory units (LMUs) in the set to be merged, the merge is triggered when the number of LMUs accumulated in the set reaches a preset threshold. This ensures that new topics are formed only after accumulating sufficient evidence, avoiding the creation of low-quality topics due to insufficient evidence. When the preset merge condition is the total byte size, the merge is triggered when the total byte size of all LMUs in the set reaches a preset threshold. This links the merge triggering to actual storage usage, making it suitable for scenarios with clear constraints on storage space usage.
[0050] When the preset merging condition is the equivalent token size, merging is triggered when the total number of equivalent tokens in all long-term memory units in the set to be merged reaches a preset threshold. This makes the merging triggering directly related to the context length processed by the language model, which helps control the input size within the model context window during summary generation. When the preset merging condition is the storage time of the first long-term memory unit, merging is triggered when the storage time of the earliest stored long-term memory unit in the set to be merged exceeds a preset duration. This ensures that memories in the set to be merged do not remain indefinitely, and even if the number of memories is small, they can be processed and organized in a timely manner after the timeout.
[0051] When the preset merging condition is access frequency, merging is triggered when the frequency of retrieval or access to memories in the set to be merged reaches the preset condition. This allows frequently accessed memories to be prioritized for organization into topics, improving the retrieval efficiency of high-frequency memories. When the preset merging condition is semantic density, merging is triggered when the semantic similarity distribution among long-term memory units in the set to be merged shows a clustering trend. This ensures that merging is only triggered when a clear semantic clustering structure appears among the memories to be merged, which helps to form new topics with high semantic cohesion and improves the quality of new topics.
[0052] When the preset merge condition is a preset strategy priority, the system determines whether to trigger a merge based on pre-configured strategy rules (e.g., different priority business tasks correspond to different merge trigger conditions), enabling the system to flexibly configure merge strategies according to the differentiated needs of business scenarios. In other embodiments, the preset merge condition can also be a combination of the above conditions, that is, the system can use multiple conditions simultaneously (e.g., a combination of memory unit quantity and storage time, a combination of total byte size and semantic density, etc.), and trigger a merge when any or all of the conditions are met. The multi-condition combined merge trigger mechanism provides a more flexible and robust control strategy, enabling the system to comprehensively determine the timing of the merge based on multiple dimensions such as storage scale, time constraints, and semantic structure, adapting to the needs of different operating scenarios.
[0053] In this embodiment, the preset merging conditions provide a flexible triggering mechanism for the formation of new topics in the set to be merged. This allows the system to adaptively determine the timing of new topic formation based on multiple factors such as storage scale, time aging, or business strategies. This avoids creating topics prematurely when evidence is insufficient and prevents the long-term accumulation of memories to be merged without effective organization. By semantically clustering the memories to be merged and generating new topic summary units, the unclassified memories originally scattered in the set to be merged are organized into structured topics, thereby incorporating them into the subsequent summary-priority retrieval system and reducing topic fragmentation.
[0054] As an embodiment of this application, in step S102 above, matching the long-term memory unit with the topic summary units in the same group in the topic summary unit storage area based on the group identifier of the long-term memory unit includes: S1021: Based on the group identifier of the long-term memory unit, call the topic summary unit in the same group in the topic summary unit storage area.
[0055] Specifically, based on the grouping identifier carried by the long-term memory unit, all topic summary units belonging to the same group are selected as candidate topic summary units from the topic summary unit storage area. That is, coarse screening is performed by grouping identifiers to limit candidate topic summary units to the same logical group, avoiding erroneous matching across groups, and reducing the number of candidates for subsequent semantic similarity calculation, thereby reducing computational overhead.
[0056] S1022: Calculate similarity based on the semantic representation of the long-term memory unit and the semantic representation of the topic summary unit within the same group.
[0057] Specifically, the semantic representation is used to characterize the semantic features of long-term memory units or topic summarization units, and can be composed of, for example, dense vector representation, sparse vector representation, keyword representation, graph representation, learned representation, or hybrid representation. This semantic representation can be obtained from the metadata of the long-term memory units and topic summarization units. It should be noted that this semantic representation can be sent to the storage system along with the long-term memory units, or it can be automatically generated by the storage system based on the received long-term memory units.
[0058] By using semantic representation, the contents of long-term memory units and topic summary units are mapped into a computable semantic space, enabling the system to evaluate the degree of semantic association between the two through numerical computation.
[0059] S1023: A match is successful if at least one of the calculated similarities is greater than or equal to the similarity threshold.
[0060] S1024: If all similarities in the calculated similarity score are less than the similarity threshold, the match is unsuccessful.
[0061] The similarity threshold can be, for example, a fixed threshold, a dynamic threshold, a group-specific threshold, a topic-specific threshold, a freshness-aware threshold, or a threshold determined by a classifier. By comparing the similarity between the long-term memory unit and each candidate topic summary unit with the similarity threshold, it is determined whether there exists a target topic summary unit with a similarity greater than or equal to the similarity threshold. If such a unit exists, the match is considered successful, and the long-term memory unit can be assigned to that target topic summary unit. Otherwise, the match is considered unsuccessful, and the long-term memory unit is directed to the mergeable set storage area.
[0062] Furthermore, when multiple topic summary units are successfully matched, i.e., when the similarity between the long-term memory unit and multiple topic summary units within the same group all meet the threshold condition, it is necessary to decide which target topic to assign the long-term memory unit to, to avoid confusion in evidence association or redundancy in summary content due to simultaneously assigning the memory to multiple topics. Based on this, in step S103 above, in response to a successful match, an incremental update of the topic summary unit is performed based on the long-term memory unit and the successfully matched topic summary units, including: S1031: If there are multiple successfully matched topic summary units, the target topic summary unit among the multiple topic summary units is determined based on preset selection conditions. The preset selection conditions include any one of similarity, evidence coverage, topic freshness, access frequency, business priority, or policy rules.
[0063] Specifically, when the preset selection criterion is similarity, the topic summary unit with the highest similarity to the long-term memory unit is selected as the target, so that the long-term memory unit is classified into the semantically closest topic set, which helps to maintain the semantic consistency of the topic summary unit content. When the preset selection criterion is evidence coverage, the selection is based on the number or range of evidence already covered by each candidate topic summary unit. For example, if it is determined whether there is any evidence directly related to the long-term memory unit among the covered evidence, then it is selected as the target.
[0064] When the preset selection criterion is topic freshness, the most recently updated or created topic summary units are prioritized as targets. This makes newly generated memories more likely to be categorized into recently active topics, which helps maintain the timeliness and completeness of active topic summary content. When the preset selection criterion is access frequency, topic summary units that are frequently searched or accessed are prioritized as targets. This allows topics frequently followed by users or agents to continuously accumulate the latest evidence, improving the information sufficiency of the topic summary in subsequent searches.
[0065] When the preset selection condition is business priority, the system selects topics based on the level of business importance associated with the topic summary unit. This ensures that topics related to high-priority businesses receive supplementary evidence first, guaranteeing that the summary content of key business topics remains up-to-date and complete. When the preset selection condition is strategy rules, the system selects topics based on pre-configured strategy rules (e.g., assigning topics with more evidence or those that have been recently updated). Strategy rules provide a customizable comprehensive decision-making framework for target topic selection, enabling the system to flexibly combine multiple selection conditions according to different application scenarios and adapt to different business needs.
[0066] S1032: Update the content and evidence of the target topic summary unit based on the long-term memory unit, and compress the updated target topic summary unit using a preset compression strategy to generate a new topic summary unit. The evidence represents a long-term memory unit that is associated with the target topic summary unit.
[0067] Specifically, during the update, the unique objective facts in the new long-term memory unit are added to the target topic summary unit. At the same time, outdated user preferences are corrected and the task execution stage description is updated based on the new long-term memory unit. Then, the content of the new and old evidence is compared, and text with semantic repetition is deleted or weakened. If there is a factual contradiction between the new long-term memory unit and historical evidence (i.e., long-term memory units that are related to the target topic summary unit), the conflicting evidence is marked in the summary and association mapping. At the same time, the freshness timestamp metadata of the topic is refreshed, the total number of bound evidence is accumulated, and a brand-new topic semantic representation is recalculated and generated based on all the new and old evidence.
[0068] Furthermore, after the aforementioned updates and adjustments, the updated target topic summary units can be compressed to obtain new topic summary units that meet the requirements. During compression, pre-defined compression strategies can be used to control this behavior. For example, the maximum summary length can be used to limit the upper limit of output summary terms, preventing excessively long summaries from losing their compression significance; evidence coverage can be used to balance conciseness and information completeness, ensuring that key evidence is not lost; recent memory content can be prioritized based on time freshness, while outdated historical information can be weakened or deleted; access frequency can be used to compress frequently retrieved topics more comprehensively, while compressing less frequent and less popular topics more concisely; when multiple memories conflict, high-confidence content is prioritized and low-confidence content is simplified based on confidence level; and core business topics can be compressed with fine granularity based on topic importance, while secondary and temporary topics are significantly simplified, etc.
[0069] In one embodiment of this application, in step S104 above, in response to a failed match, the long-term memory unit is saved to the mergeable set storage area, and when the mergeable sets in the mergeable set storage area meet preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area, including: S1041: In response to the failure to match, based on the group identifier of the long-term memory unit, the long-term memory unit is saved to the merge set with the corresponding group identifier in the merge set storage area.
[0070] Specifically, in the merge set storage area, the merge set is divided into multiple merge sets with different grouping identifiers based on the grouping identifiers of the long-term memory units contained within it. Therefore, when a match for a particular long-term memory unit fails, the long-term memory unit is saved to the merge set storage area with the corresponding grouping identifier, based on its grouping identifier. Thus, by storing the corresponding merge set according to the grouping identifier, semantic clustering when new topics are formed is only performed within the same group, continuing the isolation logic of matching based on grouping identifiers, avoiding erroneous clustering across groups, and reducing the size of the candidate set for each semantic analysis.
[0071] S1041: In response to the set to be merged satisfying the preset merging conditions, an analysis is performed based on the similarity of the semantic representations of the stored long-term memory units to form one or more topic sets.
[0072] Specifically, when a set to be merged meets the preset merging conditions, pairwise or many-to-many similarity calculations and clustering analyses are performed on the semantic representations of each long-term memory unit in the set to be merged. Memory units with high semantic relevance are grouped into the same topic set, forming one or more topic sets. During the formation of topic sets, long-term memory units that are not included in the newly formed topics can remain in the set to be merged, ensuring that these memories still have the opportunity to be re-evaluated and organized in subsequent merging cycles, avoiding the loss of evidence due to an unsatisfactory clustering result.
[0073] S1041: Compress each topic set using a preset compression strategy to generate a new topic summary set, which is then stored in the topic summary unit storage area. The preset compression strategy can be referred to in step S1032 above, and will not be repeated here.
[0074] In one embodiment of this application, regardless of whether the topic summary unit is generated through incremental updates or is a new topic summary unit generated when preset merging conditions are met, the system can perform the following post-processing steps after generating a new topic summary unit to ensure metadata consistency and index availability among storage areas. That is, this storage method for agent-oriented long-term memory further includes: S201: Generate the semantic representation and version information of the new topic summary unit, wherein the new topic summary unit includes the incrementally updated topic summary unit and the new topic summary unit generated when the preset merging conditions are met.
[0075] Specifically, after generating a new topic summary unit, its corresponding semantic representation needs to be generated or refreshed to facilitate matching with long-term memory units. The newly generated semantic representation can be saved to the metadata of that topic summary unit. Version information for the topic summary unit can also be generated, identifying different versions of the unit. Different versions of the topic summary unit can correspond to different merging batches and evidence sets. Version information enables the system to distinguish the content status of topic summary units at different merging stages, supports tracing the evolution of the summary, and can locate the evidence range corresponding to a specific version of the summary when needed.
[0076] S202: Generate the association between the new topic summary unit and the corresponding long-term memory unit and save it to the associated storage area.
[0077] Specifically, the storage system also includes an association storage area. This area stores the relationships between topic summary units and long-term memory units. These relationships establish a mapping between a topic summary unit and one or more original long-term memory units supporting that summary. This mapping can be represented, for example, by an evidence association table, parent-child mapping, versioned transaction logs, source citation lists, or metadata graphs. The association storage area explicitly preserves the correspondence between topic summary units and original long-term memory units, ensuring that the basis, source, and processing status of the summary content can be traced and verified. This provides a data foundation for subsequent evidence backtracking, audit review, and conflict resolution. The association relationships can include one or more of the following: source information, time information, role information, merge batch, compressed version, processing status, validity status, and whether it has been retrieved and expanded. This allows the system to provide contextual information such as the source, generation time, merge batch, and processing status of the evidence when backtracking original evidence, enhancing the interpretability and auditability of long-term memory conclusions.
[0078] Based on this, after generating a new topic summary unit, its association with the corresponding long-term memory unit is further generated and recorded in the associated storage area. The timely establishment of the association ensures that each newly generated or updated topic summary unit has a complete evidence link, enabling subsequent evidence tracing, audit verification, and conflict resolution to accurately locate the corresponding original memory unit through the association.
[0079] S203: Update the processing state of the long-term memory unit.
[0080] The processing status can include one or more of the following: pending merging, merged, compressed, archived, expired, or unfolded evidence. Upon receiving a long-term memory unit generated during the operation of an agent, after matching it with a topic summary unit, the processing status of the long-term memory unit is updated according to the matching result. For example, if the match is successful and a new topic summary unit is generated, the status of the corresponding long-term memory unit is updated to compressed; or if the match fails and it is stored in the pending merging set, its status is updated to pending merging; when the pending merging set meets the preset merging conditions and the corresponding long-term memory units are merged to generate a new topic summary unit, its status is updated to merged; if the long-term memory unit is outdated or overturned by subsequent evidence, its processing status is updated to expired; if the long-term memory unit is retrieved during a subsequent retrieval process, its processing status is updated to unfolded evidence, etc.
[0081] By processing timely updates to the status, the system can distinguish the current stage of long-term memory units in the merging process, avoiding the repeated merging or processing of the same long-term memory unit, and providing management and maintenance with visibility into the status of long-term memory units throughout their entire lifecycle.
[0082] S204: Update the semantic index and the time index, wherein the semantic index includes a retrieval structure based on the semantic representation of the topic summary unit, and the time index includes a retrieval structure based on the update time of the topic summary unit.
[0083] Specifically, updating the semantic index ensures that newly generated semantic representations of topic summary units can be correctly recalled by subsequent semantic retrieval requests, guaranteeing consistency between the index and the actual stored content. Updating the time index enables the system to support time-range-based retrieval and sorting. When a retrieval request includes time-range constraints, the system can quickly filter out updated topic summary units within a specified time period using the time index. Furthermore, a status index can be set and updated based on the processing status of long-term memory units, thereby distinguishing between states such as pending merging, merged, compressed, archived, expired, or expanded evidence.
[0084] In one embodiment of this application, the storage method for agent-oriented long-term memory further includes: S301: Receive a retrieval request. Specifically, the retrieval request includes one or more of the following: semantic query, grouping range constraint, time range, role constraint, task identifier, topic identifier, or other filtering conditions. It supports multi-dimensional filtering conditions, enabling the system to accurately locate the required results according to the specific needs of the agent or application, narrow the retrieval scope, and improve the relevance of the retrieval results.
[0085] S302: Determine whether the original evidence needs to be returned based on the search request.
[0086] Specifically, when determining whether to return original evidence, the decision can be based on whether the retrieval request explicitly specifies the need to return it. For example, if the retrieval request explicitly indicates that original evidence needs to be returned, then the original evidence will be returned along with the retrieval results; if the retrieval request explicitly indicates that original evidence does not need to be returned, then the original evidence does not need to be returned with the retrieval results. Furthermore, if the retrieval request does not explicitly indicate whether to return original evidence, the decision can be further determined based on the application scenario of the retrieval request. For example, in scenarios involving high-risk decision-making, user inquiries, audit reviews, or detected conflicts, complete information including original evidence should be returned. These scenarios can be automatically identified by the storage system, such as based on the source of the retrieval request (e.g., a retrieval request triggered by a business system audit), the specific task of the retrieval request, or whether there are contradictions between the retrieved topic summary units.
[0087] S303: In response to the lack of need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is invoked based on the retrieval request to generate return information.
[0088] Specifically, without needing to return the original evidence, the system generates return information by calling the corresponding topic summary unit in the topic summary unit storage area based on the retrieval request. In other words, the system prioritizes retrieving topic summary units and returns compressed topic-level context as the result, rather than directly returning a large number of original memory fragments. This summary-priority retrieval mechanism ensures that the agent obtains compressed topic-level information as context. Compared to directly returning a large number of original memory fragments, this significantly reduces the context volume, improves the agent's utilization of effective context, and reduces the interference of repeated recalls of repetitive or semantically overlapping original fragments on the stability of downstream reasoning or generated results.
[0089] S304: In response to the need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is called based on the retrieval request, and the corresponding long-term memory unit in the long-term memory unit storage area is called through the association relationship, and return information is generated according to the called topic summary unit and the corresponding long-term memory unit.
[0090] Specifically, when the original evidence needs to be returned, the system not only calls the corresponding topic summary unit, but also calls the corresponding long-term memory unit in the long-term memory storage area through association relationships, and generates return information based on the called topic summary unit and the corresponding long-term memory unit. The return information may include one or more of the following: compressed summary, original evidence supporting the summary, source information, time information, processing status, merging batch, and summary version information.
[0091] By tracing back to the original evidence through correlation, the summary content is no longer an isolated conclusion that cannot be verified, but can be traced back to specific original memory fragments and their source and time information. This enhances the interpretability and verifiability of long-term memory conclusions and meets the needs of high-credibility scenarios such as auditing, interpretation and conflict resolution.
[0092] In one embodiment of this application, the storage method for agent-oriented long-term memory is implemented using the following steps: S110: Receives long-term memory records or long-term memory units generated during the operation of the intelligent agent.
[0093] S120: Determine the grouping range associated with this long-term memory unit, such as users, agent objects, or business tasks.
[0094] S130: Generate or obtain the semantic representation of the long-term memory unit, and record the source information, time information and processing status.
[0095] S140: Retrieve existing topic summary units within the same grouping range and determine the similarity between long-term memory units and topic summary units.
[0096] S150: If the long-term memory unit meets the similarity threshold with a topic summary unit, then the long-term memory unit is assigned to the corresponding topic set.
[0097] S160: Update the association between the topic and the evidence, incrementally update the compressed summary content, refresh the topic semantic representation, and record the summary version.
[0098] S170: If no topic summary unit meets the similarity threshold, then the long-term memory unit, along with its metadata and processing status, is stored in the set to be merged.
[0099] S180: When the set to be merged meets the preset merging conditions such as size, time, access or strategy, one or more new topic sets are formed based on the semantic similarity between the memories to be merged.
[0100] S190: Generate compressed topic summary units for the newly formed topic set and establish traceable evidence links pointing to the original memory units.
[0101] S200: Prioritize searching topic summaries during the retrieval process and, when necessary, trace back to the original memory evidence through evidence association records.
[0102] S210: Update semantic indexes, source and time indexes, process status logs, access statistics and audit metadata.
[0103] It should be noted that the storage method for long-term memory of intelligent agents in this embodiment can be applied to single-agent systems, multi-agent systems, personal assistants, enterprise intelligent agents, autonomous task intelligent agents, or multimodal intelligent agents.
[0104] For example, in a personal assistant, user preferences, long-standing facts, and recurring instructions are stored as long-term memory units. Multiple long-term memory units related to the same preference topic are progressively merged into the same topic set. The topic summary unit stores a compressed description of the preference, while the evidence association record stores the original dialogue evidence corresponding to each preference conclusion. When a user inquires about related content, the system prioritizes returning the topic summary rather than all historical dialogue fragments. If the user requests an explanation of the source of the preference conclusion, the system traces back to the original dialogue fragment and time information through the evidence association record.
[0105] Within an enterprise intelligence agent, the agent handles multiple projects, customers, or business processes. Grouping can be determined by business tasks, tenants, projects, or customers. Tool results, approval records, status changes, and interim conclusions related to the same business topic are grouped into topic sets within their respective groups. When a business user retrieves a task status, the system can return a compressed topic summary; when an audit of a business conclusion is required, the system can further return the original evidence, source system, generation time, and processing status corresponding to that conclusion.
[0106] The storage method for agent-based long-term memory provided in this application reduces topic fragmentation in agent-based long-term memory by merging semantically related long-term memory units into topic sets. It improves recall efficiency by prioritizing summary retrieval, ensuring that retrieval primarily targets compressed topic summary units rather than large amounts of original memory fragments. It enhances context utilization by providing the agent with topic-level compressed context and expanding original evidence only when needed. Incremental updates to topic summaries and topic semantic representations reduce interference from repetitive and semantically overlapping content on long-term memory retrieval results. Maintaining the traceability relationship between topic summaries and original memory evidence improves the interpretability and auditability of long-term memory conclusions. Updating only affected topics and sets to be merged avoids unnecessary full recompression of the entire long-term memory. Semantic matching within grouped scopes such as users, agent objects, or business tasks improves isolation between different users, tasks, or business objects.
[0107] Exemplary System Figure 2 This is a schematic diagram of the structure of a storage system for long-term memory of intelligent agents provided in an embodiment of this application. Figure 2 As shown, the storage system for long-term memory of intelligent agents includes a long-term memory unit storage area 201, a topic summary unit storage area 202, and a set to be merged storage area 203; The storage system further includes a controller 204, which is configured to: Receive long-term memory units generated during the operation of the intelligent agent, and save the long-term memory units to the long-term memory unit storage area; Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched; In response to a successful match, the topic summary unit is incrementally updated based on the long-term memory unit and the successfully matched topic summary unit; In response to a failed match, the long-term memory unit is saved to the merge set storage area, and when the merge sets in the merge set storage area meet the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
[0108] In one or more embodiments of this application, such as Figure 2 As shown, the storage system further includes an associated storage area 205, which stores the association relationship between topic summary units and long-term memory units. The controller is also configured to: Receive search request; Determine whether the original evidence needs to be returned based on the search request; In response to the lack of need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is invoked based on the retrieval request to generate return information; In response to the need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is called based on the retrieval request, and the corresponding long-term memory unit in the long-term memory unit storage area is called through the association relationship. Return information is generated based on the called topic summary unit and the corresponding long-term memory unit.
[0109] In one or more embodiments of this application, the controller is further configured to: The topic summary unit in the same group in the topic summary unit storage area is called based on the group identifier of the long-term memory unit; Similarity is calculated based on the semantic representation of the long-term memory unit and the semantic representation of the topic summary unit within the same group; A match is successful if at least one of the calculated similarities is greater than or equal to a similarity threshold. If all similarities in the calculated similarity score are less than the similarity threshold, the match is unsuccessful.
[0110] In one or more embodiments of this application, the controller is further configured to: If there are multiple successfully matched topic summary units, the target topic summary unit among the multiple topic summary units is determined based on preset selection conditions. The preset selection conditions include any one of similarity, evidence coverage, topic freshness, access frequency, business priority, or policy rules. The content and evidence of the target topic summary unit are updated based on the long-term memory unit, and the updated target topic summary unit is compressed using a preset compression strategy to generate a new topic summary unit. The evidence represents a long-term memory unit that is associated with the target topic summary unit.
[0111] In one or more embodiments of this application, the controller is further configured to: In response to a failed match, based on the group identifier of the long-term memory unit, the long-term memory unit is saved to the merge set with the corresponding group identifier in the merge set storage area; In response to the set to be merged satisfying the preset merging conditions, the similarity of the semantic representations of the stored long-term memory units is analyzed to form one or more topic sets; Each topic set is compressed using a preset compression strategy to generate a new topic summary set, which is then stored in the topic summary unit storage area.
[0112] In one or more embodiments of this application, the controller is further configured to: Generate semantic representations and version information for new topic summary units, wherein the new topic summary units include incrementally updated topic summary units and new topic summary units generated when preset merging conditions are met; Generate the association between the new topic summary unit and the corresponding long-term memory unit and save it to the associated storage area; Update the processing state of the long-term memory unit; Update the semantic index and the time index. The semantic index includes a retrieval structure based on the semantic representation of the topic summary unit, and the time index includes a retrieval structure based on the update time of the topic summary unit.
[0113] In one or more embodiments of this application, the group identifier includes any one or more of the following: user, smart agent object, business task, tenant, project, application, device, or session scope; The preset merging conditions include any one or more of the following: the number of long-term memory units in the set to be merged, the total byte size, the equivalent word size, the storage time of the first long-term memory unit, the access frequency, the semantic density, or the preset strategy priority.
[0114] In one or more embodiments of this application, in order to implement the above-mentioned functions of the controller, a storage module, an incremental semantic matching and topic routing module, an incremental merging, compression and summary update module, a set to be merged and new topic formation module, and a summary priority retrieval and evidence traceability module are set in the controller.
[0115] The storage module includes a long-term memory unit storage area, a topic summary unit storage area, traceable mapping records, semantic indexes, and state indexes. When a memory record generated during the operation of an agent is received, a long-term memory unit can be generated or updated and saved to the long-term memory unit storage area. The long-term memory unit can include content payload or payload reference, source identifier, role information, time information, event interval, group range identifier, semantic representation, processing status, access status, retained metadata, and original evidence identifier.
[0116] at the same time, Figure 3 This diagram illustrates the data model relationships between long-term memory units, topic summary units, original evidence records, and traceable indexes. (Example) Figure 3 As shown, in the storage module, long-term memory units are associated with corresponding topic summary units through grouping range keys; topic summary units establish a mapping relationship with original evidence records (metadata corresponding to long-term memory units) through traceable mapping records; semantic indexes are used to support summary-priority retrieval and topic matching; and status indexes are used to distinguish the statuses of evidence such as pending merging, merged, compressed, archived, expired, or expanded.
[0117] The incremental semantic matching and topic routing module performs semantic matching between received long-term memory units and topic summary units. The incremental merging, compression, and summary update module performs incremental updates on successfully matched topic summary units. The unmatched long-term memory units are stored in the unmatched merging set, and new topic summary units are formed when the unmatched merging set meets preset merging conditions.
[0118] Specifically Figure 4 This is a schematic diagram illustrating the process of incremental semantic matching, topic merging, processing of the set to be merged, and formation of new topics. (Example) Figure 4As shown, for a received long-term memory unit, its grouping range is first determined. For example, the memory unit may belong to a user, an intelligent agent object, a business task, a tenant, or a project. Subsequently, the semantic representation of the memory unit is obtained, and existing topic summary units are retrieved within the same grouping range. The similarity between the memory unit and one or more topic summary units is then calculated.
[0119] If the similarity between a memory unit and a topic summary unit meets the merging threshold, the system routes the memory unit to the corresponding topic set. If multiple topic summary units meet the threshold, the system can select the topic with the highest similarity, select multiple candidate topics for subsequent conflict handling, or determine the target topic based on evidence coverage, topic freshness, access frequency, business priority, or policy rules.
[0120] If a memory unit cannot be matched with any existing topic summary unit, it is not discarded directly, nor is it forcibly merged into a low-confidence topic. Instead, it is stored in the set to be merged within the corresponding grouping range.
[0121] When memory units are merged into an existing topic set, the system updates the evidentiary association between the topic summary units and the original memory units, and incrementally updates the topic summary content based on existing topic summaries, newly added memory evidence, and optional relevant historical evidence. This update does not require a full recompression of the entire long-term memory; instead, it prioritizes updating the affected topic summary units and their index records.
[0122] Incremental updates can include adding facts supported by evidence, updating user preferences, refreshing task status, deleting or weakening duplicate content, marking conflicting evidence, adjusting freshness metadata, updating the number of pieces of evidence, and refreshing thematic semantic representation. The system can maintain summary version information, enabling different versions of summaries to correspond to different merge batches and evidence sets.
[0123] The compression operation used during updates can be controlled based on maximum summary length, evidence coverage, time freshness, access frequency, confidence level, topic importance, or storage strategy. In one implementation, the original evidence is not deleted solely due to summary updates; the system retains at least the associations or references to the original evidence to support subsequent verification, interpretation, auditing, and conflict resolution.
[0124] For memories that cannot be assigned to existing topic summary units, the system stores them in a set to be merged corresponding to the grouping range. The set to be merged preserves semantic representation, source information, time information, and processing status, allowing these memories to be re-evaluated later based on size, time, access status, or policy rules.
[0125] When the set to be merged meets the conditions of size, time, access, or other strategies, the system analyzes the semantic similarity between the memories to be merged, forming one or more candidate topic sets. For each candidate topic set, the system generates a compressed topic summary, a topic semantic representation, and evidence association records, and updates the processing status of the corresponding memory to either merged or summarized.
[0126] Memories not included in newly formed topics can remain in the merge set, with their processing status and triggering metadata updated. This mechanism avoids premature topic creation and reduces the risk of forcibly including irrelevant memories into existing topics.
[0127] The Abstract Priority Search and Evidence Traceability modules are used to return search information based on the search request. Figure 5 The diagram shows the abstract-first retrieval and original evidence backtracking process, as follows: Figure 5 As shown, during the retrieval process, the system can prioritize retrieving topic summary units instead of directly returning a large number of raw memory fragments. Retrieval requests can include semantic queries, grouping range constraints, time ranges, role constraints, task identifiers, topic identifiers, or other filtering conditions. Based on the semantic representation and metadata of the topic summaries, the system returns a set of candidate summaries, providing the agent with a compressed topic-level context.
[0128] When an agent or application needs to verify, interpret, audit, or resolve conflicts, the system reads the association records between the topic and the evidence, and retrieves the corresponding original memory unit or source citation. The retrieval results may include a compressed summary, the original evidence supporting the summary, source information, time information, processing status, merge batch, and summary version information.
[0129] Abstract-priority retrieval mechanisms and evidence traceability mechanisms can be used in conjunction. In ordinary response generation scenarios, compressed abstracts may be sufficient; in high-risk decision-making, user inquiries, audit reviews, or conflict detection scenarios, the system can expand the abstract into a result with original evidence, thereby enhancing the interpretability and verifiability of long-term memory conclusions.
[0130] Exemplary solid-state drive Figure 6 This is a schematic diagram of the hardware structure of an artificial intelligence-based solid-state drive provided in an embodiment of this application. Figure 6 As shown, the solid-state drive in this embodiment includes a processor 601 and a memory 602.
[0131] The memory 602 is used to store a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. The memory 602 also stores a computer program that can be executed by the at least one processor 601. The computer program is executed by the at least one processor 601 to cause the at least one processor 601 to execute the storage method for long-term memory of intelligent agents in the above embodiments. For details, please refer to the relevant descriptions in the foregoing method embodiments.
[0132] Alternatively, the memory 602 can be either standalone or integrated with the processor 601.
[0133] When the memory 602 is set up independently, the electronic device also includes a bus 603 for connecting the memory 602 and the processor 601.
[0134] In one embodiment of this application, Figure 7 The diagram shows a schematic of the overall architecture of a solid-state drive and host computer based on artificial intelligence. Figure 7 As shown, the long-term memory units received by the solid-state drive (SSD) are generated by the host-side intelligent agent and sent to the SSD through the host-to-SSD interface. Within the SSD, the processor includes a processing module, and the memory includes a resident module. This resident module includes a long-term memory unit storage area, a topic summary unit storage area, a set to be merged storage area, a traceable index (i.e., a relational storage area), a semantic index, a grouping index, a source and time index, a processing status log, and a summary version record. The data stored in the resident module can be implemented using logical tables, key-value records, object storage, files, namespace regions, metadata partitions, or data structures manageable by the SSD firmware.
[0135] The host-side intelligent agent generates long-term memory write events, retrieval requests, or management requests; the host-to-SSD interface is used to transmit storage access, control, and retrieval-related requests; the processing module in the SSD is equipped with a memory cell builder, range-aware router, semantic matcher, merge decision controller, incremental summary updater, set to be merged manager, compression engine, and traceability manager to complete memory cell construction, group routing, semantic matching, merge decision, summary update, set to be merged management, compression processing, and traceability metadata maintenance.
[0136] Exemplary media and products This application also provides a computer storage medium that stores computer execution instructions, a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. When the processor executes the computer execution instructions, the above-mentioned storage method for long-term memory of intelligent agents is implemented.
[0137] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described storage method for long-term memory of intelligent agents.
[0138] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0139] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to implement the solution of this embodiment according to actual needs.
[0140] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The unit composed of the above modules can be implemented in hardware or in the form of hardware plus software functional units.
[0141] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0142] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0143] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk or optical disc, etc.
[0144] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0145] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0146] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.
[0147] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A storage method for long-term memory of intelligent agents, characterized in that, The storage method is applied to a storage system, which includes a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. Receive long-term memory units generated during the operation of the intelligent agent, and save the long-term memory units to the long-term memory unit storage area; Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched; In response to a successful match, the topic summary unit is incrementally updated based on the long-term memory unit and the successfully matched topic summary unit; In response to a failed match, the long-term memory unit is saved to the merge set storage area, and when the merge sets in the merge set storage area meet the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
2. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, The storage system further includes an associative storage area, which stores the association between topic summary units and long-term memory units, and also includes: Receive search request; Determine whether the original evidence needs to be returned based on the search request; In response to the lack of need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is invoked based on the retrieval request to generate return information; In response to the need to return the original evidence, the corresponding topic summary unit in the topic summary unit storage area is called based on the retrieval request, and the corresponding long-term memory unit in the long-term memory unit storage area is called through the association relationship. Return information is generated based on the called topic summary unit and the corresponding long-term memory unit.
3. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched, including: The topic summary unit in the same group in the topic summary unit storage area is called based on the group identifier of the long-term memory unit; Similarity is calculated based on the semantic representation of the long-term memory unit and the semantic representation of the topic summary unit within the same group; A match is successful if at least one of the calculated similarities is greater than or equal to the similarity threshold. If all similarities in the calculated similarity score are less than the similarity threshold, the match is unsuccessful.
4. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, The storage system further includes an associated storage area, which stores the association between topic summary units and long-term memory units. In response to a successful match, incremental updates of the topic summary units are performed based on the long-term memory units and the successfully matched topic summary units, including: If there are multiple successfully matched topic summary units, the target topic summary unit among the multiple topic summary units is determined based on preset selection conditions. The preset selection conditions include any one of similarity, evidence coverage, topic freshness, access frequency, business priority, or policy rules. The content and evidence of the target topic summary unit are updated based on the long-term memory unit, and the updated target topic summary unit is compressed using a preset compression strategy to generate a new topic summary unit. The evidence represents a long-term memory unit that is associated with the target topic summary unit.
5. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, In response to a failed match, the long-term memory unit is saved to the mergeable set storage area. When the mergeable sets in the mergeable set storage area meet preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area, including: In response to a failed match, based on the group identifier of the long-term memory unit, the long-term memory unit is saved to the merge set with the corresponding group identifier in the merge set storage area; In response to the set to be merged satisfying the preset merging conditions, the similarity of the semantic representations of the stored long-term memory units is analyzed to form one or more topic sets; Each topic set is compressed using a preset compression strategy to generate a new topic summary set, which is then stored in the topic summary unit storage area.
6. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, Also includes: Generate semantic representations and version information for new topic summary units, wherein the new topic summary units include incrementally updated topic summary units and new topic summary units generated when preset merging conditions are met; Generate the association between the new topic summary unit and the corresponding long-term memory unit and save it to the associated storage area; Update the processing state of the long-term memory unit; Update the semantic index and the time index. The semantic index includes a retrieval structure based on the semantic representation of the topic summary unit, and the time index includes a retrieval structure based on the update time of the topic summary unit.
7. The storage method for long-term memory of intelligent agents according to claim 1, characterized in that, The group identifier includes any one or more of the following: user, intelligent agent object, business task, tenant, project, application, device, or session scope; The preset merging conditions include any one or more of the following: the number of long-term memory units in the set to be merged, the total byte size, the equivalent word size, the storage time of the first long-term memory unit, the access frequency, the semantic density, or the preset strategy priority.
8. A storage system for long-term memory of intelligent agents, characterized in that, The storage system includes a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area; The storage system also includes a controller, which is configured to: Receive long-term memory units generated during the operation of the intelligent agent, and save the long-term memory units to the long-term memory unit storage area; Based on the group identifier of the long-term memory unit, the long-term memory unit and the topic summary units in the same group in the topic summary unit storage area are matched; In response to a successful match, the topic summary unit is incrementally updated based on the long-term memory unit and the successfully matched topic summary unit; In response to a failed match, the long-term memory unit is saved to the merge set storage area, and when the merge sets in the merge set storage area meet the preset merging conditions, a new topic summary unit is generated and stored in the topic summary unit storage area.
9. A solid-state drive based on artificial intelligence, characterized in that, include: At least one processor; The at least one processor is also connected to a memory. The memory stores a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. The memory also stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to cause the at least one processor to perform the storage method for long-term memory of an intelligent agent as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, a long-term memory unit storage area, a topic summary unit storage area, and a set to be merged storage area. When the computer-executable instructions are executed by the processor, they are used to implement the storage method for agent-oriented long-term memory as described in any one of claims 1 to 7.
