Intelligent agent memory processing method and apparatus, electronic device, and readable storage medium

By employing a hierarchical memory storage architecture and a lazy loading mechanism, the intelligent agent memory system performs low-dimensional semantic pointer matching and association graph expansion at the semantic index layer, solving the problems of latency and memory consumption in high-dimensional vector retrieval and achieving efficient memory retrieval and association capabilities.

CN121706833BActive Publication Date: 2026-06-05XIAN XINTONG SEMICON TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN XINTONG SEMICON TECH CO LTD
Filing Date
2026-02-13
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing intelligent agent memory systems, high-dimensional vector retrieval suffers from high latency, large memory consumption, and difficulty in recalling indirectly associated memories, affecting the real-time interaction and memory recall rate of the intelligent agent.

Method used

A hierarchical memory storage architecture is adopted, which uses low-dimensional semantic pointers to perform semantic similarity matching and association graph expansion in the semantic index layer. Combined with a lazy loading mechanism, only memories that meet preset conditions are loaded.

Benefits of technology

It reduces memory usage and computational load, improves the comprehensiveness and response speed of memory recall, prevents memory overflow and I/O blocking, and enhances the associative ability of the intelligent agent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121706833B_ABST
    Figure CN121706833B_ABST
Patent Text Reader

Abstract

The present disclosure provides an agent memory processing method and device, electronic equipment and readable storage medium, belonging to the technical field of data processing. The agent memory processing method comprises: in the semantic index layer, determining a first candidate pointer set based on the semantic similarity between a query vector corresponding to a query request and a semantic feature vector in each semantic pointer, each semantic pointer comprising a semantic feature vector with a dimension lower than a dimension threshold and a reference identifier pointing to a memory in a detail data layer; adding a second semantic pointer with a relevance greater than a relevance threshold to each first semantic pointer in the first candidate pointer set to obtain a second candidate pointer set; and loading the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using a target reference identifier in the target semantic pointer in the second candidate pointer set that meets a preset loading condition. Efficient data loading and recall of indirect associated memories can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to an intelligent agent memory processing method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the development of Large Language Model (LLM) and AI Agent technologies, AI agents have been widely used in scenarios such as long-term dialogue, task execution, and cross-round reasoning. They rely on short-term and long-term memory mechanisms to maintain interaction consistency and continuously learn from historical experience. Memory ability has become a core factor affecting the performance of AI agents.

[0003] Existing intelligent agent memory systems mostly employ a hierarchical storage architecture, where short-term and long-term memories are stored in different locations. High-dimensional vectors serve as memory carriers, and memory retrieval is achieved through similarity matching from a vector library. However, high-dimensional vector retrieval suffers from high latency and is limited to direct semantic matching, failing to recall indirectly related memories. This results in the agent being unable to guarantee real-time interaction and exhibiting insufficient memory recall, severely impacting the agent's long-term efficiency and stability. Summary of the Invention

[0004] This disclosure provides an intelligent agent memory processing method, apparatus, electronic device, and readable storage medium, which can achieve efficient data loading and recall of indirectly related memories.

[0005] The technical solution disclosed herein is implemented as follows:

[0006] In a first aspect, this disclosure provides an intelligent agent memory processing method, which includes: in a semantic indexing layer, determining a first candidate pointer set based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer, wherein each semantic pointer includes a semantic feature vector with a dimension lower than a dimension threshold and a reference identifier pointing to the memory in the detail data layer; adding a second semantic pointer whose correlation with each first semantic pointer in the first candidate pointer set is greater than a correlation threshold to the first candidate pointer set to obtain a second candidate pointer set; and loading the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using the target reference identifier in the target semantic pointer in the second candidate pointer set that meets the preset loading conditions.

[0007] Secondly, this disclosure provides an intelligent agent memory processing device, including a determining part, an adding part, and a loading part; the determining part is configured to determine a first candidate pointer set in a semantic index layer based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer, each semantic pointer including a semantic feature vector with a dimension lower than a dimension threshold and a reference identifier pointing to the memory in the detail data layer; the adding part is configured to add second semantic pointers with a correlation greater than a correlation threshold to the first candidate pointer set to obtain a second candidate pointer set; the loading part is configured to load the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using the target reference identifier in the target semantic pointer in the second candidate pointer set that meets the preset loading conditions.

[0008] Thirdly, this disclosure provides an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the intelligent agent memory processing method as described in the first aspect.

[0009] Fourthly, this disclosure provides a computer-readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the intelligent agent memory processing method as described in the first aspect.

[0010] Fifthly, this disclosure provides a computer program product, wherein the computer program product includes a computer program or instructions, which, when run on a processor, cause the processor to execute the computer program or instructions to implement the steps of the intelligent agent memory processing method as described in the first aspect.

[0011] In a sixth aspect, this disclosure provides a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the intelligent agent memory processing method as described in the first aspect.

[0012] This disclosure provides an agent memory processing method, apparatus, electronic device, and readable storage medium. Because the retrieval operation is performed at the semantic index layer, and the processing object is a low-dimensional semantic feature vector rather than memory, compared to retrieval in the high-dimensional vector space of the detail data layer, this method significantly reduces memory usage, bandwidth, and computational load, resulting in a shorter retrieval response time. Furthermore, this solution can uncover implicit logical chains between memories through the correlation between semantic vectors, such as "A leads to B, querying A recalls B," enabling the agent to have more complete contextual information when handling complex reasoning tasks. In addition, the lazy loading mechanism of this solution only recalls memories corresponding to feature vectors that meet preset loading conditions, reducing invalid memory reads and eliminating most unnecessary disk read operations. When handling concurrent requests or large-scale knowledge bases, this mechanism prevents memory overflow and I / O blocking. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of the application environment architecture of an intelligent agent memory processing system provided in this disclosure.

[0014] Figure 2 This is a flowchart illustrating an intelligent agent memory processing method provided in this disclosure.

[0015] Figure 3 This is a schematic diagram illustrating the relationship between the semantic index layer and the detailed data layer provided in this disclosure.

[0016] Figure 4 This is a flowchart illustrating the process of determining the first candidate pointer set provided in this disclosure.

[0017] Figure 5 This is a flowchart illustrating the process of determining the second candidate pointer set provided in this disclosure.

[0018] Figure 6 This is a schematic diagram illustrating the principle of determining adjacent nodes based on semantic association graphs provided in this disclosure.

[0019] Figure 7 This is a flowchart illustrating the process of determining the threshold value in the preset loading conditions provided in this disclosure.

[0020] Figure 8 This is a flowchart illustrating another intelligent agent memory processing method provided in this disclosure.

[0021] Figure 9 This is a structural block diagram of an intelligent agent memory processing device provided in this disclosure.

[0022] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in this disclosure. Detailed Implementation

[0023] The technical solutions in the embodiments of this disclosure will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure are within the scope of protection of this disclosure.

[0024] The terms "first," "second," etc., used in this disclosure are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that this disclosure can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, the term "and / or" in the specification indicates at least one of the connected objects.

[0025] The development of artificial intelligence relies on the storage of massive amounts of data. Taking intelligent agents as an example, as the application scenarios of intelligent agents become more diversified, such as in personal assistants, enterprise knowledge management, and complex task planning, intelligent agents not only need to handle the current instantaneous interaction, but also need to have "memory ability" in order to maintain the consistency of context in cross-turn dialogues, long-term task execution, and multi-conversation scenarios, and be able to continuously learn and accumulate experience from historical interactions.

[0026] Existing agent memory systems typically employ an architecture combining short-term memory (STM) and long-term memory (LTM). STM consists of session data during the current query process, while LTM contains historical session data preceding the current query. The memory itself is the original text content of the session. For example, if the query is "How's the weather today?" and the answer is "Sunny, 25 degrees Celsius", the corresponding memory after the session ends is that session record: "How's the weather today?" "Sunny, 25 degrees Celsius". STM generally resides in the context window of the LLM (Local Management Module) and is used to process the current dialogue flow, usually residing in memory. Long-term memory, on the other hand, relies on external storage systems, such as disks. It is typically transformed into high-dimensional (e.g., 768, 1024, or even higher) semantic feature vectors, and the corresponding memories are stored in a vector database. When the agent needs to recall historical sessions, it transforms the current query request into a query vector with the same dimensions as the semantic feature vector in the long-term memory, and performs a full Approximate Nearest Neighbor (ANN) search to retrieve the memory corresponding to the semantic feature vector most similar to the query vector.

[0027] However, with the increase in the running time of intelligent agents and the explosive accumulation of memory data, using high-dimensional semantic feature vectors as memory indexes, such as OpenAI's text-embedding-3-large which can reach 3072 dimensions, to perform similarity calculation and sorting of high-dimensional vectors on large-scale datasets (hundreds or even billions of vectors) is computationally complex. This leads to a significant increase in retrieval latency as the data scale grows, making it difficult to meet the needs of real-time interaction.

[0028] Secondly, existing intelligent agents often store high-dimensional semantic feature vector indices coupled with memory. Since high-dimensional vectors themselves occupy a large amount of memory (e.g., each floating-point number is 4 bytes, a 768-dimensional vector is about 3KB, and indexing a billion-level vector alone requires several terabytes of memory), the system's memory consumption is large.

[0029] Furthermore, traditional vector retrieval primarily relies on geometric distances (such as cosine similarity) in the vector space to measure relevance. This direct matching mechanism struggles to recall memories that are semantically or literally distant but logically or causally closely related. For example, for the query "apple," vector retrieval might recall "pear" or "fruit," but it's difficult to recall memories indirectly related to the query request, such as "user's health plan," through the semantic link "apple → fruit → healthy eating." This limitation results in insufficient memory recall when agents handle complex tasks requiring multi-hop reasoning or associative abilities.

[0030] Finally, most existing solutions adopt a crude "load on hit" approach, where the agent loads all corresponding memories once the vector matching degree exceeds a threshold. In many scenarios, the agent may only need a summary of the memories or confirmation of their existence, without needing to read the full memories. This inefficient data transfer not only wastes bandwidth and increases system response time, but also leads to increased disk input / output (I / O) overhead.

[0031] To address the aforementioned issues, this disclosure aims to provide an agent memory processing method that enables lightweight memory representation, possesses efficient indirect semantic association mining capabilities, and supports on-demand lazy loading.

[0032] First, please refer to Figure 1 This illustrates the application environment architecture of an intelligent agent memory processing system provided in an embodiment of this application. This intelligent agent memory processing system aims to provide efficient, long-lasting, and associative memory support for LLM-based intelligent agents. For example... Figure 1 As shown, the intelligent agent memory processing system mainly includes: a user terminal 10, an intelligent agent service platform 20, and a hierarchical memory storage system 30.

[0033] The user terminal 10 is the front-end device for users to interact with the intelligent agent, and can be a smartphone, personal computer, Internet of Things (IoT) device, etc. Users input multimodal commands such as text, voice, or images through the user terminal 10, such as "Help me review the key points of last week's meeting regarding Project A".

[0034] The intelligent agent service platform 20 is the computing core and can be deployed on cloud servers or high-performance edge computing nodes. It includes a query processing module, a memory retrieval module, and an LLM (Local Management Model). The query processing module receives user query requests and uses an encoder to transform the query requests into a computer-understandable semantic feature vector representation with a dimension below a dimensionality threshold. The memory retrieval module initiates a query to the hierarchical memory storage system 30, performing the functions disclosed herein to determine the first candidate pointer set, the second candidate pointer set, and the target reference identifier in the target semantic pointer, as well as loading the memory corresponding to the low-dimensional semantic feature vector in the target semantic pointer. The LLM uses the retrieved memory to generate the final answer or execute an action.

[0035] The hierarchical memory storage system 30 adopts a storage method that separates indexes and data, logically divided into a semantic index layer and a detail data layer. The semantic index layer stores semantic pointers and the correlations between any two semantic pointers. A semantic pointer is a lightweight composite data structure. In this embodiment, a semantic pointer includes at least: a semantic feature vector representing the abstract semantics of the memory, and a reference identifier pointing to the storage location of the memory in the detail data layer. The dimension of the semantic feature vector in the semantic pointer is lower than a dimension threshold. The dimension threshold can be determined based on the available storage space of the semantic index layer, or empirically set to a small fixed value, such as 32 or 64.

[0036] High-dimensional semantic feature vectors can represent all the details of memory, requiring a large amount of storage space; while low-dimensional semantic feature vectors compress memory, retaining only the most critical information, which can be understood as a summary of memory, but require very little storage space. Since determining the first candidate pointer set is a coarse direct matching process, large-scale semantic matching can be completed with minimal resource consumption by operating on lightweight semantic pointers in the semantic index layer (such as memory).

[0037] Because the semantic feature vectors included in the semantic pointers have undergone dimensionality reduction and are extremely small, this layer can reside in high-speed random access memory (RAM) or be implemented using high-performance components such as a remote dictionary server (Redis) or the memory mode of a Milvus vector database to ensure millisecond-level retrieval response. The detailed data layer is used to persistently store complete memories, such as original long text dialogue records, document files, and structured data tables. Due to the massive amount of data, this layer can be implemented based on a disk storage system, such as a distributed file system, object storage, or a document-oriented database.

[0038] This layered architecture resolves the conflict between latency and high memory costs in large-scale vector retrieval. By storing only lightweight semantic pointers and the correlation between any two semantic pointers in memory, the system can perform complex semantic matching and association reasoning with extremely low resource consumption; the slow detailed data layer is only accessed when it is finally determined that content needs to be read, thus achieving overall performance optimization.

[0039] The following is combined Figure 2 This disclosure details the specific steps of an intelligent agent memory processing method. This intelligent agent memory processing method can be... Figure 1 The intelligent agent service platform 20 executes the method. The intelligent agent memory processing method includes the following steps S201 to S203.

[0040] In step S201, in the semantic indexing layer, a first candidate pointer set is determined based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer.

[0041] A query request refers to user input. When an agent receives a query request, such as "Please summarize last week's meeting on environmental protection projects," the agent first converts the query request into a numerical query vector. This query vector is a low-dimensional numerical array whose dimensions match the semantic feature vectors in the semantic pointers. Subsequently, within the semantic indexing layer, this query vector is compared with the semantic feature vectors in the tens of thousands of semantic pointers already stored in the detail data layer.

[0042] The semantic similarity between the query vector and the semantic feature vector portion of each semantic pointer is calculated. The semantic similarity reflects the distance between the memory and the query request in the semantic space.

[0043] Based on the calculated semantic similarity, semantic pointers with a semantic similarity greater than a preset threshold constitute the first candidate pointer set. At this point, only semantic pointers are being selected; the underlying memory corresponding to the semantic pointers is not being accessed.

[0044] In step S202, the second semantic pointers whose relevance to each first semantic pointer in the first candidate pointer set is greater than the relevance threshold are added to the first candidate pointer set to obtain the second candidate pointer set.

[0045] The correlation between any two semantic pointers can be determined based on whether there is a temporal relationship between them, whether they belong to the same event chain, whether there is a reference relationship, the semantic similarity between the semantic feature vectors in the semantic pointers, and whether there is a causal relationship. For two semantic pointers with low correlation, the correlation between the two semantic pointers below the minimum threshold can be set to 0 for the convenience of subsequent calculations.

[0046] For each first semantic pointer, find the second semantic pointer whose relevance is greater than the relevance threshold and add it to the first candidate pointer set to obtain the second candidate pointer set.

[0047] In some feasible approaches, the association weights of the associated edges in the semantic association graph can be used to characterize the correlation between two semantic pointers, and multiple semantic pointers and semantic association graphs can be stored in the semantic index layer.

[0048] The semantic association graph is a data structure built upon multiple semantic pointers, containing nodes and associated edges. It is used to explicitly store and manage the logical relationships between semantic pointers. Each node corresponds to a semantic pointer, and each associated edge represents a certain association between two nodes (such as causality, temporal sequence, semantic similarity, etc.). The association weight on each associated edge characterizes the strength of the correlation between the two nodes. The association weight is a numerical attribute on the edge connecting two nodes in the semantic association graph, usually normalized to an interval, used to quantify the tightness of the connection between two semantic pointers. For example, node A represents "Project A's kickoff meeting," and node B represents "Project A's budget sheet." There is an edge between them with an association weight of 0.9, indicating a very strong association. Node C represents "cafeteria menu," and the association weight between A and C is 0.1, indicating a weak association. Association weights can be calculated based on co-occurrence frequency, temporal distance, or explicit reference relationships.

[0049] Direct vector matching based solely on the first set of candidate pointers can only recall memories that are literally similar or directly semantically related, but it may miss implicit, logically related indirect memories. For example, if a user queries "environmental protection project," direct matching may recall "environmental protection meeting minutes," but it may miss closely related items such as "budget approval emails" or "partner lists" that do not directly mention "environmental protection."

[0050] Using a semantic association graph, starting with a semantic pointer from the first candidate pointer set, the system explores outwards along the association edges in the semantic association graph, examining adjacent nodes connected to the starting node. If the semantic association graph structure indicates that an adjacent node has a high association weight with the starting node, i.e., high relevance (e.g., belonging to the same event chain, or having a reference relationship), it will be considered even if the semantic feature vector corresponding to the adjacent node does not have a high direct semantic similarity to the query vector.

[0051] After semantic association graph expansion, the newly discovered indirect association nodes are merged with the original first candidate pointer set to form a second candidate pointer set with a wider scope and more complete context, thereby improving the comprehensiveness of memory recall and enabling the agent to acquire human-like associative abilities.

[0052] In step S203, the memory corresponding to the semantic feature vector in the target semantic pointer is loaded from the detail data layer using the target reference identifier in the target semantic pointer that meets the preset loading conditions in the second candidate pointer set.

[0053] In the traditional retrieval-as-load model, retrieved memories are immediately and fully loaded into memory for LLM processing. However, many memories may only be marginally relevant, and the LLM may not ultimately reference them. In this embodiment, after determining the second set of candidate pointers, its vast memory is not immediately read, but rather delayed until it is actually needed and certain conditions are met—that is, lazy loading.

[0054] Specifically, based on a second set of candidate pointers, directly loading the memories corresponding to all semantic pointers in this set (potentially containing dozens of documents) would incur significant disk I / O overhead and network latency. Furthermore, many of the extended semantic pointers might contribute little to the current task corresponding to the query request. Therefore, the agent scans each semantic pointer in the second set of candidate pointers to determine if it meets preset loading conditions. If the preset loading conditions are met, it indicates that the target semantic pointer has high value or confidence. The agent extracts the reference identifier from the target semantic pointer, initiates a read request to the detail data layer, and loads the corresponding memories into the semantic index layer for use by the LLM in generating answers. If the preset loading conditions are not met, no loading operation is performed; only the semantic pointer itself is retained to avoid unnecessary data transfer.

[0055] The preset loading conditions are a set of logical gating rules that determine whether to consume I / O resources to read large files in the detailed data layer. This prevents indiscriminate full loading of all memories in the second candidate pointer set, thereby avoiding unnecessary computation and storage pressure.

[0056] In some embodiments, the preset loading conditions include at least one of the following: the semantic similarity with the query vector is greater than a similarity threshold, and the relevance with the first semantic pointer is greater than a filtering threshold. The similarity threshold is a numerical standard between 0 and 1, used to measure whether the semantic pointer and the user's query intent match sufficiently in direct semantics. The similarity threshold is greater than the preset threshold in the relevant description of step S201. The filtering threshold is also a numerical standard between 0 and 1, used to measure the closeness between indirect memories and memories corresponding to the semantic feature vector in the first semantic pointer. This filtering threshold is used to capture key memories that, although literally dissimilar, have a very strong logical relationship. This filtering threshold is greater than the relevance threshold in step S202.

[0057] For target semantic pointers that meet the preset loading conditions, the corresponding memory is loaded using the target reference identifier; for semantic pointers that do not meet the preset loading conditions, the memory corresponding to the semantic pointer is not loaded (i.e., the underlying text or file is not read), and the semantic pointer can be directly returned to the LLM. The size of the semantic pointer (usually a few hundred bytes) is much smaller than the memory (possibly a few KB to a few MB). For a large number of semantic pointers at the edge of the second candidate pointer set, expensive disk read operations and memory allocation are avoided. When the second candidate pointer set is large (e.g., extended to hundreds of nodes), this mechanism can reduce data throughput by several orders of magnitude, thereby preventing system lag.

[0058] For example, such as Figure 3 The diagram illustrates the relationship between the semantic index layer 31 and the detail data layer 32. It shows semantic pointer 1, semantic pointer 2, and semantic pointer 3, each representing a node and forming a semantic association graph through associated edges. For example, the first candidate pointer set determined based on the query vector corresponding to the query request is semantic pointer 1 (in practice, there are usually multiple pointers). Then, the second candidate pointer set is determined, including semantic pointer 1, semantic pointer 2, and semantic pointer 3. Based on preset loading conditions, semantic pointer 1 and semantic pointer 3 are determined as the final pointers to be loaded into memory. The corresponding original content, i.e., the memory, is loaded from the detail data layer 32 based on the reference identifiers of semantic pointer 1 and semantic pointer 3. The dashed lines in the diagram indicate the correspondence between reference identifiers and original content.

[0059] In this embodiment, since the retrieval operation is performed at the semantic index layer and the processing object is a low-dimensional semantic feature vector rather than memory, compared to retrieval in the high-dimensional vector space of the detail data layer, the memory bandwidth and computational load are greatly reduced, resulting in a lower retrieval response time. Furthermore, this solution can uncover implicit logical chains between memories through the correlation between semantic vectors, such as "A leads to B, querying A recalls B," enabling the agent to have more complete contextual information when handling complex reasoning tasks. In addition, the lazy loading mechanism of this solution only recalls memories corresponding to feature vectors that meet preset loading conditions, reducing invalid memory reads and eliminating most unnecessary disk read operations. When processing concurrent requests or large-scale knowledge bases, this mechanism prevents memory overflow and I / O blocking.

[0060] In some embodiments, such as Figure 4 As shown, in this intelligent agent memory processing method, determining the first candidate pointer set specifically includes the following steps S401 and S402.

[0061] In step S401, the cosine similarity between the query vector and the semantic feature vector of each semantic pointer is determined.

[0062] Cosine similarity is a metric used to measure the directional differences between two non-zero vectors in a multidimensional space. It assesses their similarity by calculating the cosine of the angle between the two vectors, typically ranging from -1 to 1. Values ​​closer to 1 indicate that the two vectors are more aligned in direction, meaning they are semantically more similar. Unlike Euclidean distance, which focuses on the absolute distance between vector endpoints, cosine similarity focuses on direction. In semantic space, vector length may be influenced by non-semantic factors such as text length, while direction primarily represents the core meaning of the text. Therefore, using cosine similarity can more accurately capture semantic consistency. However, using cosine similarity is merely one embodiment of this disclosure and is not intended to limit it. Other algorithms capable of measuring the semantic similarity between two vectors are also within the scope of this disclosure.

[0063] The semantic index layer stores multiple semantic pointers, and for each visited semantic pointer, the cosine similarity between the query vector and the semantic feature vector contained in that semantic pointer is calculated. Specifically, the dot product between the semantic feature vector contained in the semantic pointer and the query vector is first calculated, then the magnitudes of the two vectors are calculated separately, and finally the dot product is divided by the product of the two magnitudes to obtain the semantic similarity between the two vectors. For example, suppose the query request is "Apple's new phone", the corresponding query vector is Vq, and the retrieved semantic pointer P1 represents the memory "I ate a Fuji apple yesterday", its semantic feature vector is V1. The calculated semantic similarity between the two is 0.45, because one is a fruit and the other is an electronic product, with a large difference in semantic direction. The retrieved semantic pointer P2 represents the memory "Apple 15 launch event minutes", its corresponding semantic feature vector is V2. The calculated semantic similarity between the two is 0.88, indicating a high degree of consistency in semantic direction.

[0064] In step S402, semantic pointers with a cosine similarity greater than the semantic matching threshold are added to the first candidate pointer set.

[0065] The semantic matching threshold is a preset numerical standard, such as 0.75 or 0.8, used to filter out semantic pointers with insufficient relevance. Only when the calculated cosine similarity exceeds this value will the corresponding semantic pointer be considered potentially relevant and included in the first candidate pointer set. For example, if the semantic matching threshold is set to 0.7, then in the example above, P1 has a semantic similarity of 0.45 with the query vector and is therefore excluded, while P2 has a semantic similarity of 0.88 with the query vector and is selected into the first candidate pointer set.

[0066] In this embodiment, the semantic similarity of two vectors is determined using cosine similarity. Even if two semantic feature vectors have different lengths—for example, one is a short dialogue summary and the other is a detailed meeting transcript, resulting in a large difference in their vector magnitudes—cosine similarity can accurately identify the relevance as long as the semantic direction is consistent with the query vector. This avoids the problem of long texts being misjudged as distant due to their large vector magnitudes, ensuring that the retrieval results focus on the content's substance rather than its length. Furthermore, the semantic matching threshold cuts off the transmission path of low-relevance data, ensuring that the first candidate pointer set is a high-purity set, preventing irrelevant information from contaminating the subsequent reasoning process, and reducing unnecessary computational overhead.

[0067] In some embodiments, such as Figure 5 As shown, in this intelligent agent memory processing method, determining the second candidate pointer set specifically includes the following steps S501 to S503.

[0068] In step S501, the semantic association graph is traversed along the associated edges, starting from the node corresponding to the first semantic pointer.

[0069] In graph traversal algorithms, the starting node serves as the starting point for the search. In this embodiment, each first semantic pointer in the first candidate pointer set is a starting node. Starting nodes are anchor points directly retrieved; the agent will start from these nodes and explore the surrounding semantic space.

[0070] In step S502, the adjacent nodes whose association weights with the associated edges of the starting node satisfy the preset expansion conditions are obtained.

[0071] The preset expansion conditions are a set of logical rules used to determine whether to include adjacent nodes in the candidate set. These conditions may include the association weight of the associated edges being greater than an expansion threshold, and the traversal depth being less than a preset hop count threshold. Traversal depth refers to the number of edges traversed from the starting node to the target node. For example, the starting node itself has a depth of 0, the adjacent nodes directly connected to the starting node have a depth of 1, and the adjacent nodes of adjacent nodes have a depth of 2. The preset hop count threshold limits the search scope, preventing the semantic association graph from expanding infinitely and causing an explosion in computational complexity.

[0072] Specifically, firstly, the first candidate pointer set is added to the second candidate pointer set. Each node (semantic pointer) in the first candidate pointer set is used as the starting node. The system traverses the edges directly connected to the starting node. If the association weight of this edge is greater than the expansion threshold, it indicates that the adjacent node connected to this edge has a strong correlation with the starting node (e.g., causal, containment, or close temporal relationship), and it passes the weight check. If it is less than or equal to the expansion threshold, it indicates that the adjacent node connected to this edge has a weak correlation with the starting node (possibly noise or accidental co-occurrence), and this adjacent node is ignored. After passing the weight check, the traversal depth of the currently reached adjacent node is further checked. If the traversal depth is less than a preset hop count threshold, it means that the adjacent node is within the nearest neighbor range, the correlation is controllable, and it is allowed to continue exploring the next level of neighbors (if the algorithm supports multi-hops). If the traversal depth is greater than or equal to the preset hop count threshold, it means that the distance is too far, the semantics may have drifted, i.e., it has gone off-topic, and the system stops expanding outward from this node.

[0073] In step S503, the semantic pointers corresponding to the adjacent nodes are added to the second candidate pointer set.

[0074] Add the semantic pointers of all adjacent nodes that simultaneously satisfy the above association weight condition and traversal depth condition to the second candidate pointer set.

[0075] For example, such as Figure 6As shown, the preset expansion threshold is 0.6, the preset hop count threshold is 3, and the starting node is any semantic pointer in the first candidate pointer set. The association weight of the edge between this starting node and node A is 0.8, which is greater than the expansion threshold of 0.6, and the traversal depth is 1. Therefore, node A is added to the second candidate pointer set, and correspondingly, nodes D and B are also added to the second candidate pointer set. Node E is excluded because its traversal depth is 3, and node C is excluded because its association weight is less than 0.8. The nodes included in the final determined second candidate pointer set are those circled by dashes in the diagram.

[0076] In this embodiment, by traversing along the associated edges and adding adjacent nodes to the set, the limitation of traditional vector retrieval, which can only recall literal and semantically similar content, is overcome. This allows for the retrieval of implicit memories that are literally unrelated but logically closely connected, enabling the agent to obtain a more complete context when handling complex tasks and avoiding reasoning errors caused by missing information. By introducing preset expansion conditions, irrelevant information and excessive association are prevented. This mechanism expands the recall range while strictly controlling the rate of relevance decay, ensuring that the expanded set of second candidate pointers remains closely aligned with the user's intent.

[0077] In some embodiments, such as Figure 7 As shown, the query request includes a task type identifier. In this agent memory processing method, before loading the memory, the determination of the judgment threshold in the preset loading conditions can be specifically determined through the following steps S701 and S702.

[0078] In step S701, when the task type identifier indicates a first-class task, the judgment threshold in the preset loading conditions is lowered to increase the number of memory loadings.

[0079] A task type identifier is a data field or label included in a query request, used to characterize the nature, objectives, and specific information needs of the task being performed by the agent. This task type identifier can be explicitly generated by the upstream task planning module or implicitly extracted through the recognition of the user's natural language commands. For example, the task type identifier TASK_CREATIVE represents divergent tasks such as creative writing and brainstorming; the task type identifier TASK_FACTUAL represents convergent tasks such as fact-finding, data verification, and code debugging.

[0080] The first type of task refers to tasks that require a high breadth and diversity of information, but have a high tolerance for precise matching. These typically correspond to scenarios that require inspiration, association, or cross-disciplinary integration. For example, a query request might be "Help me brainstorm a science fiction outline about a future city." In this case, in addition to directly relevant semantic pointers like "future architecture," peripheral semantic pointers such as "climate change" and "flying car technology" can also be provided.

[0081] The decision threshold is a numerical limit used in preset loading conditions to determine whether a semantic pointer is important enough to require loading its corresponding memory. This decision threshold corresponds to the similarity threshold mentioned above, and / or the filtering threshold. A higher decision threshold results in stricter filtering, allowing less information to pass through but with greater accuracy; a lower threshold results in looser filtering, allowing more information to pass through but potentially including noise.

[0082] In step S702, when the task type identifier indicates a second type of task, the judgment threshold in the preset loading conditions is increased to reduce the number of memory loadings.

[0083] The second type of task refers to tasks with extremely high requirements for the precision and accuracy of information, necessitating the strict elimination of interfering information. These typically correspond to scenarios requiring precise facts, logical verification, or the execution of specific operations. For example, a query request might be "Please tell me the project deadlines determined in last week's meeting." In this case, only meeting minutes containing the exact dates should be loaded; any semantic pointers regarding "what was eaten for lunch at the meeting" or "discussions of other projects" are considered noise and should not be loaded.

[0084] When the task type identifier indicates a Category 1 task, the decision threshold is adjusted from the default value (e.g., 0.8) to a lower value (e.g., 0.6). This allows more semantic pointers with "moderate relevance" or "marginal association" to meet the criteria, thereby increasing the amount of memory loaded from the detailed data layer. When the task type identifier indicates a Category 2 task, the decision threshold is adjusted from the default value to a higher value (e.g., 0.9), allowing only semantic pointers with extremely high semantic matching or very close association to pass through. This reduces the amount of memory loaded from the detailed data layer, retaining only the most essential evidence.

[0085] In this disclosure, for tasks requiring creativity, the decision threshold is lowered, allowing the agent to acquire more potential, non-obvious background information and providing rich divergent information. For tasks requiring rigor, the decision threshold is raised, filtering out a large amount of secondary information and reducing noise input to the large model's context window, thus lowering the probability of the model experiencing illusions due to interfering information. This improves the agent's performance and user experience in different business scenarios.

[0086] In some embodiments, such as Figure 8 As shown, after loading the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using the target reference identifier in the target semantic pointer that meets the preset loading conditions in the second candidate pointer set, the agent memory processing method further includes the following steps S801 to S805.

[0087] In step S801, a new semantic pointer is generated based on the query request.

[0088] After loading the memory using the semantic pointer and completing the current task (such as generating a response), a new semantic pointer is generated based on the current query request. This new semantic pointer contains the semantic feature vector corresponding to the query request and a reference identifier pointing to the query request (original text data).

[0089] In step S802, based on the semantic similarity between the new semantic pointer and existing nodes in the semantic association graph, as well as the contextual continuity information of the query request, an association edge between the new semantic pointer and existing nodes is established in the semantic association graph, and the association weight of the corresponding association edge is determined.

[0090] Contextual continuity information refers to data identifiers that reflect the sequential relationship of semantic pointers in a time series or logical flow, typically manifested as dialogue turn IDs, preceding node pointers, or session identifiers. It is used to establish "temporal edges" or "logical flow edges" in the semantic association graph, enabling the agent to not only recall memories through semantic similarity but also to trace back according to the chronological order of events (e.g., "A happened first, leading to B"). For example, in a multi-turn dialogue, the user first says "I bought flour" (semantic pointer A), then immediately says "I want to make bread" (semantic pointer B). Semantic pointer B contains contextual continuity information pointing to semantic pointer A, which can be used to establish a directed edge between A and B.

[0091] Calculate the semantic similarity between the new semantic pointer and existing nodes in the semantic association graph. For nodes with similarity exceeding a certain threshold, establish an undirected association edge between the two nodes, with the association weight initialized to the semantic similarity value between them. Based on contextual continuity information, identify the preceding node of this interaction (i.e., the semantic pointer generated in the previous round of dialogue), and establish a directed association edge (temporal edge) in the direction from the new semantic pointer to the preceding node. The initial weight of this association edge can be set to the maximum value, such as 1.0, representing a very strong causal or temporal connection.

[0092] In step S803, the access frequency and the most recent access time of each node are recorded.

[0093] Access frequency refers to a counter variable that records the cumulative number of times a semantic pointer (node) has been retrieved, hit, and loaded. Access frequency is used to measure the "popularity" of a semantic pointer; frequently accessed semantic pointers have a higher access frequency. Recent access time records the timestamp of the last successful retrieval and use of the semantic pointer, used to calculate the "freshness" or "decay duration" of the semantic pointer.

[0094] Each node in the semantic association graph corresponds to a state table. Whenever a node is retrieved and hit, the access frequency is incremented by 1, and the most recent access time is updated to the current system time.

[0095] In step S804, the association weights of the associated edges connected to each node are updated based on the access frequency and the most recent access time.

[0096] Periodically or after each new semantic pointer is added, the association weights of the associated edges connected to the node are recalculated based on the node's access frequency and most recent access time.

[0097] For example, the Ebbinghaus forgetting curve algorithm is used to determine the association weights. ,in, It is the time interval since the last visit, and S is the memory strength (determined by frequency). It is the enhancement coefficient. It refers to the frequency of visits. This is the updated association weight. This represents the original association weight. Time interval. The longer the length, the more severe the weight decay; but the frequency of access... The higher the level, the more stable the memory and the slower the decay rate.

[0098] In step S805, when the association weight is lower than the preset forgetting threshold, the association edge is removed or the corresponding node is filtered out in subsequent searches.

[0099] The preset forgetting threshold is a preset lower limit of weight. When the associated weight of a semantic pointer decays to below the forgetting threshold due to long-term inaccessibility, it is determined that the semantic pointer is no longer important, thereby triggering a cleanup or archiving operation.

[0100] like If the value is less than a preset forgetting threshold, the associated edge can be disconnected, making it difficult for the node to be recalled through graph expansion. Alternatively, the node can be marked as forgotten, and in subsequent retrieval steps, such as step S201, it can be filtered out even if it has a high semantic similarity to the query vector, or its index can be moved from memory (semantic index layer) to disk to free up valuable memory resources.

[0101] In this embodiment, the semantic association graph is no longer static but a continuously growing network structure. New semantic pointers are not only stored but also automatically linked with existing knowledge. This allows the agent to better understand user intent over time, reconstructing a complete historical event sequence through association edges, thus improving the coherence of multi-turn dialogues. Furthermore, by introducing access frequency and recent access time to dynamically adjust association weights, high-frequency access increases association weight (strengthening) while long-term inactivity decreases it (fading). This preserves the most valuable common sense and habits for the user while gradually fading out accidental, one-off noise information. When the agent performs associative recall, it always prioritizes recalling the most important and active semantic pointers, significantly improving the accuracy of memory retrieval. In addition, the set forgetting threshold can identify and clean up long-term useless nodes, preventing the semantic index layer from expanding indefinitely and causing memory overflow, and also reducing the retrieval space and the number of branches in the graph traversal.

[0102] Figure 9 This is a structural block diagram of an intelligent agent memory processing device disclosed herein, such as... Figure 9 As shown, it includes: a determining part 901, an adding part 902, and a loading part 903; the determining part 901 is configured to determine a first candidate pointer set in the semantic index layer based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer, each semantic pointer including a semantic feature vector with a dimension lower than a dimension threshold and a reference identifier pointing to the memory in the detail data layer; the adding part 902 is configured to add second semantic pointers with a correlation greater than a correlation threshold to the first candidate pointer set to obtain a second candidate pointer set; the loading part 903 is configured to use the target reference identifier in the target semantic pointer in the second candidate pointer set that meets the preset loading conditions to load the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer.

[0103] In some embodiments, the determining portion 901 is configured to determine the cosine similarity between the query vector and the semantic feature vector of each semantic pointer; and to add semantic pointers with a cosine similarity greater than a semantic matching threshold to a first candidate pointer set.

[0104] In some embodiments, the addition part 902 is configured to traverse the semantic association graph along the associated edges, starting from the node corresponding to the first semantic pointer; obtain the adjacent nodes whose association weights of the associated edges with the starting node satisfy a preset expansion condition, the preset expansion condition including the association weight of the associated edge being greater than an expansion threshold, and / or the traversal depth being less than a preset hop count threshold; and add the semantic pointers corresponding to the adjacent nodes to the second candidate pointer set.

[0105] In some embodiments, the preset loading conditions include at least one of the following: the semantic similarity with the query vector is greater than a similarity threshold, and the relevance with the first semantic pointer is greater than a filtering threshold.

[0106] In some embodiments, the agent memory processing device further includes a return portion configured to return semantic pointers from a second set of candidate pointers that do not satisfy a preset loading condition.

[0107] In some embodiments, the query request includes a task type identifier, and the intelligent agent memory processing device further includes: a threshold adjustment section configured to lower the determination threshold in the preset loading conditions to increase the number of memories loaded when the task type identifier indicates a first type of task; and to raise the determination threshold in the preset loading conditions to reduce the number of memories loaded when the task type identifier indicates a second type of task.

[0108] In some embodiments, after loading the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using the target reference identifier in the target semantic pointer that meets the preset loading conditions in the second candidate pointer set, the intelligent agent memory processing device further includes: a generation part configured to generate a new semantic pointer based on a query request; a construction part configured to establish an association edge between the new semantic pointer and the existing node in the semantic association graph based on the semantic similarity between the new semantic pointer and the existing node in the semantic association graph, and the contextual continuity information of the query request; and a determination part 901 configured to determine the association weight of the corresponding association edge.

[0109] In some embodiments, the intelligent agent memory processing device further includes: a recording part, an updating part, and a deactivation part; the recording part is configured to record the access frequency and the most recent access time of each node; the updating part is configured to update the association weight of the association edge connected to each node according to the access frequency and the most recent access time; the deactivation part is configured to deactivate the association edge or filter out the corresponding node in subsequent searches when the association weight is lower than a preset forgetting threshold.

[0110] In this embodiment, each part can implement the intelligent agent memory processing method provided in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0111] Please refer to Figure 10This illustration shows a schematic diagram of the hardware structure of an electronic device provided in an exemplary embodiment of this disclosure. In some examples, the electronic device may be at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, virtual reality terminal, augmented reality terminal, wireless terminal, and laptop computer. The electronic device has communication capabilities and can access wired or wireless networks. The term "electronic device" can refer to one of multiple terminals; those skilled in the art will understand that the number of such terminals may be more or less.

[0112] like Figure 10 As shown, the electronic device in this disclosure may include one or more of the following components: processor 1010 and memory 1020.

[0113] Optionally, the processor 1010 connects to various parts within the electronic device using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1020, and by calling data stored in the memory 1020. Optionally, the processor 1010 can be implemented using at least one hardware form of Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1010 can integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Neural-network Processing Unit (NPU), and baseband chip. Specifically, the CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content displayed on the touchscreen; the NPU implements Artificial Intelligence (AI) functions; and the baseband chip handles wireless communication. It is understandable that the aforementioned baseband chip may not be integrated into the processor 1010, but may be implemented using a separate chip.

[0114] The memory 1020 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1020 may include a non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1020 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created based on the use of the electronic device, etc.

[0115] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include a display screen, camera assembly, microphone, speaker, radio frequency circuit, input unit, sensors (such as accelerometer, angular velocity sensor, light sensor, etc.), audio circuit, WiFi module, power supply, Bluetooth module, etc., which will not be described in detail here.

[0116] This disclosure also provides a computer-readable storage medium storing at least one instruction that is executed by a processor to implement the intelligent agent memory processing method as described in the above embodiments.

[0117] This disclosure also provides a computer program product including computer instructions stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the intelligent agent memory processing method described in the above embodiments.

[0118] This disclosure also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described intelligent agent memory processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0119] It should be understood that the chip mentioned in the embodiments of this disclosure may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0120] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, servers, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components 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 an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0121] The units described as separate components may or may not be physically separate. The components shown as units 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0122] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0123] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0124] Those skilled in the art will recognize that the functions described in this disclosure in one or more of the examples above can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer.

[0125] It should be noted that the technical solutions described in this disclosure can be combined arbitrarily as long as they do not conflict.

[0126] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for processing the memory of an intelligent agent, characterized in that, The method includes: In the semantic indexing layer, a first candidate pointer set is determined based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer. Each semantic pointer includes the semantic feature vector with a dimension lower than the dimension threshold and a reference identifier pointing to the memory in the detail data layer. The semantic feature vector represents the abstract semantics of the memory, and the memory is the original text content in the session. Add second semantic pointers whose relevance to each first semantic pointer in the first candidate pointer set is greater than a relevance threshold to the first candidate pointer set, thus obtaining a second candidate pointer set; and Using the target reference identifier in the target semantic pointers that meet the preset loading conditions from the second candidate pointer set, the memory corresponding to the semantic feature vector in the target semantic pointer is loaded from the detail data layer. The preset loading conditions include at least one of the following: the semantic similarity between the second candidate pointer set and the query vector is greater than a similarity threshold; or the relevance between the second candidate pointer set and the first semantic pointer is greater than a filtering threshold. The semantic index layer is located in memory, while the detailed data layer is located on disk.

2. The intelligent agent memory processing method according to claim 1, characterized in that, In the semantic indexing layer, a first candidate pointer set is determined based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer, including: Determine the cosine similarity between the query vector and the semantic feature vector of each semantic pointer; Semantic pointers whose cosine similarity is greater than the semantic matching threshold are added to the first candidate pointer set.

3. The intelligent agent memory processing method according to claim 1, characterized in that, The correlation strength between the semantic pointers is characterized by the correlation weight of the associated edges in the semantic association graph, which is a data structure containing nodes and associated edges constructed based on multiple semantic pointers. The step of adding second semantic pointers whose relevance to each first semantic pointer in the first candidate pointer set is greater than a relevance threshold to the first candidate pointer set to obtain a second candidate pointer set includes: Starting from the node corresponding to the first semantic pointer, traverse the semantic association graph along the associated edges; Obtain adjacent nodes whose association weights with the associated edges of the starting node satisfy a preset expansion condition. The preset expansion condition includes that the association weights of the associated edges are greater than an expansion threshold and that the traversal depth is less than a preset hop count threshold. Add the semantic pointers corresponding to the adjacent nodes to the second candidate pointer set.

4. The intelligent agent memory processing method according to claim 1, characterized in that, The intelligent agent memory processing method further includes: Return the semantic pointers in the second set of candidate pointers that do not meet the preset loading conditions.

5. The intelligent agent memory processing method according to claim 1, characterized in that, The query request includes a task type identifier, and the agent memory processing method further includes: When the task type identifier indicates a first-class task, the judgment threshold in the preset loading conditions is lowered to increase the number of memory loadings. When the task type identifier indicates a second type of task, the judgment threshold in the preset loading conditions is increased to reduce the number of memory loadings.

6. The intelligent agent memory processing method according to claim 1, characterized in that, After loading the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer using the target reference identifier in the target semantic pointer that meets the preset loading conditions from the second candidate pointer set, the agent memory processing method further includes: Based on the query request, a new semantic pointer is generated; Based on the semantic similarity between the new semantic pointer and existing nodes in the semantic association graph, as well as the contextual continuity information of the query request, an association edge between the new semantic pointer and existing nodes is established in the semantic association graph, and the association weight of the corresponding association edge is determined.

7. The intelligent agent memory processing method according to claim 6, characterized in that, The intelligent agent memory processing method further includes: Record the access frequency and most recent access time for each node; Update the association weight of the associated edges connected to each node based on the access frequency and the most recent access time; When the association weight is lower than the preset forgetting threshold, the association edge is removed or the corresponding node is filtered out in subsequent searches.

8. An intelligent agent memory processing device, characterized in that, include: Define the part, add the part, and load the part; The determining part is configured to determine a first candidate pointer set in the semantic index layer based on the semantic similarity between the query vector corresponding to the query request and the semantic feature vector in each semantic pointer. Each semantic pointer includes the semantic feature vector with a dimension lower than the dimension threshold and a reference identifier pointing to the memory in the detail data layer. The semantic feature vector represents the abstract semantics of the memory, and the memory is the original text content in the session. The adding part is configured to add second semantic pointers whose relevance to each first semantic pointer in the first candidate pointer set is greater than a relevance threshold to the first candidate pointer set, thereby obtaining a second candidate pointer set; and The loading section is configured to use the target reference identifier in the target semantic pointers that meet the preset loading conditions from the second candidate pointer set to load the memory corresponding to the semantic feature vector in the target semantic pointer from the detail data layer. The preset loading conditions include at least one of the following: the semantic similarity between the second candidate pointer set and the query vector is greater than a similarity threshold; or the relevance between the second candidate pointer set and the first semantic pointer is greater than a filtering threshold. The semantic index layer is located in memory, while the detailed data layer is located on disk.

9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the intelligent agent memory processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that, when executed by a processor, implement the intelligent agent memory processing method as described in any one of claims 1 to 7.