Bionic memory system based on large model driving
By using a biomimetic memory system driven by a large model, real-time identification of dialogue time information is achieved. Combined with a context recall system and a memory correction module, the problems of time offset and unsmooth interaction in existing technologies are solved, enabling accurate replies and a deep interactive experience in AI chat.
Patent Information
- Application Number
- CN202511399100.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-27
- Publication Date
- 2026-01-09
AI Technical Summary
Existing memory systems suffer from time offset issues in real-time dialogue scenarios, leading to incorrect answers, a choppy interactive experience, and an inability to capture content not mentioned by the user in real time, thus impacting the user's interactive experience.
By using a biomimetic memory system driven by a large model, the system can identify time information in conversations in real time. Combined with a contextual recall system and a memory correction module, it enables instant updates and in-depth reflection of conversations, and facilitates real-time interaction based on user profiles.
It enables accurate responses to user questions in AI chat, improves the immediacy and smoothness of the interactive experience, ensures the accuracy and completeness of memory, infers content not mentioned by the user, and provides in-depth memory reflection and user profile updates.
Smart Images

Figure CN121303183A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent AI chat tools, and more particularly to a biomimetic memory system based on a large model. Background Technology
[0002] Currently, there is a lot of research on the ability to provide long-term memory for large models, such as mem0 and memobase. mem0 mainly provides the function of dynamically adding, deleting, and modifying event memories, allowing memories to continuously evolve and update; while memobase mainly extracts user profiles.
[0003] While most memory services currently offer the ability to add, delete, and modify memories, as well as extract user profiles, these memories lack real-world information. For example, if a user mentions doing something tomorrow, the recorded information remains simply "does that tomorrow." This event misalignment can occur during recall, leading to incorrect responses.
[0004] Currently, most recall methods are still based on traditional RAG (Relevant Information) recall content. User questions can be varied. For example, a user might ask: "Review yesterday's meeting content." If the memory shows that the meeting was mentioned both yesterday and the day before, then the recall may fail.
[0005] Furthermore, the use of highly complex methods for recall in many memory services increases latency, which negatively impacts the user's interactive experience in real-time dialogue scenarios.
[0006] Furthermore, during daily interactions between users and intelligent agents, these traditional memory services only mechanically summarize the content of the conversation, but they cannot obtain some information that the user did not mention during the conversation, such as what time the user usually gets off work, how they are feeling recently, etc.
[0007] Many of the existing memory systems mentioned above require a certain amount of dialogue history to be accumulated locally before being sent to a memory service for generation, which is not real-time or smooth enough. Summary of the Invention
[0008] The purpose of this invention is to provide a biomimetic memory system based on a large model, which allows memory to continuously evolve and update, and solves the problem of time offset by adding real-world physical time information.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a biomimetic memory system based on a large model, comprising the following steps:
[0010] S1: Memory extraction, which identifies time-related content in the dialogue history and extracts time information parameters, and combines time parameter technology to determine the time.
[0011] S2: Contextual recall, matching the contextual recall system, obtains relevant memories in real time based on the context and the current user's interaction without affecting the time spent acquiring memories, and returns them to the intelligent agent;
[0012] S3: Memory Correction. Use newly generated memories to recall related memories and retrieve updated or deleted old memories based on contextual history.
[0013] S4: Memory Reflection. Summarize and reflect on the memory content of several consecutive days, and let the LLM ask questions and then answer them to obtain deeper memory and express deeper content from the user.
[0014] Furthermore, after completing step S1, step S5 is executed simultaneously to extract the user profile and the agent profile, and then merge the new agent profile with the old user profile.
[0015] Furthermore, the content extracted in S5 includes: name, gender, interpersonal relationships, birthday, pets, daily routine, hobbies and some anniversaries, conversation style, user's schedule to do, and one or more interactive games.
[0016] Furthermore, the context recall system in S2 includes:
[0017] S2-1, set up a background real-time memory computing engine to analyze the dialogue history in real time, analyze the time and context of the dialogue, and recall relevant content as a candidate set;
[0018] S2-2, divide the current dialogue input into two different operations to be performed simultaneously, including operation one, which is directly vectorized and then the relevant memory is retrieved from the memory bank;
[0019] Operation 2: Analyze the input containing time information;
[0020] S2-3, similarity recall, recalls and merges the candidate set in S2-1 and the time interval in S2-2 respectively, and takes out the top-k memories to return to the user.
[0021] Furthermore, the memory reflection in step S4 includes:
[0022] When a user leaves the chat room, a memory reflection is triggered, which combines the memory content of several consecutive days and mainly focuses on the regular conclusions in the continuous memory content. The regular conclusions include one or more of the following: commuting and work schedule, intentional conclusions, and inferences about the user's possible behavior based on the user's recent memory facts.
[0023] Furthermore, it is equipped with a memory scheduling framework to ensure that the dialogue history is ordered during memory retrieval, and to support the simultaneous execution of memory tasks by multiple agents.
[0024] Furthermore, based on the ordered messages of the RocketMQ message middleware, the memory scheduling framework can deliver messages of the same MessageGroup sequentially, and a memory task generation scheduling framework is designed.
[0025] In summary, the present invention has the following advantages compared with the prior art:
[0026] 1. By extracting memories, the actual and definite time can be obtained, enabling more accurate responses to user questions in AI chat. For example, yesterday and the day before yesterday in the history will become definite times, rather than relative times.
[0027] 2. By using intelligent agent profiles, we can infer information from content that the user did not mention in the conversation.
[0028] 3. Through the context recall system and the analysis of the computing engine, a more timely interactive experience is achieved, which is more efficient, real-time and smooth.
[0029] 4. Through memory correction, historical memories are corrected in real time to ensure the accuracy and integrity of memories, and redundancy is deleted;
[0030] 5. Memory Reflection Module: Deeply reflect on memories from several consecutive days to obtain the user's recent underlying needs. Attached Figure Description
[0031] Figure 1 This is a flowchart of the memory generation task in Example 1.
[0032] Figure 2 This is a flowchart of the real-time memory computing engine in Example 1.
[0033] Figure 3 This is a flowchart of the memory generation task scheduling framework for Example 1. Detailed Implementation
[0034] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0035] Example 1: A biomimetic memory system based on a large model, comprising:
[0036] S1, memory extraction, identifies time-related content in the dialogue history, extracts time information parameters, and combines time parameter technology to determine the time.
[0037] Specifically, S1-1, using a large model, constructs an absolute time and relative calculator.
[0038] S1-2: Automatically identify time-related memory content in the dialogue history and extract these time-related parameters. Combine the current time with these extracted time-related parameters to calculate a specific time.
[0039] When extracting actual memory content using a Large Language Model (LLM), the time-related information mentioned by the user is rewritten into a specific time.
[0040] S1-3: Identify whether it is a schedule that needs a reminder. If so, add a time tag to the memory so that it can remind the user in real time during later interactions. Finally, add a scene tag to the memory.
[0041] S2. Contextual Recall: The contextual recall system retrieves relevant memories in real time based on the context and the current user's interaction, without affecting the time required to acquire memories, and returns them to the agent.
[0042] Specifically, the context recall system includes:
[0043] S2-1, set up a background real-time memory computing engine to analyze the dialogue history in real time, analyze information such as the time and context of the dialogue, and recall relevant content as a candidate set.
[0044] S2-2 divides the current dialogue input into two different operations that are performed simultaneously. Operation 1 is directly vectorized and then the relevant memory is retrieved from the memory bank.
[0045] Step 2: Analyze input containing time information, such as: "Do you remember what we talked about a couple of days ago?" or "What are my schedules for the next three days?" Retrieving such generic user input from a massive memory database solely based on similarity is extremely difficult. Therefore, extracting the time information in advance and pinpointing it to a specific time interval can effectively improve retrieval.
[0046] S2-3, similarity recall, recalls and merges the candidate set in S2-1 and the time interval in S2-2 respectively, and takes out the top-k memories to return to the user.
[0047] The candidate set obtained by the real-time memory computing engine in the background is imperceptible to the user. Therefore, in the process of real-time dialogue, this method will not damage the user experience and can more effectively recall memory content based on context, which is very effective.
[0048] S3, Memory Correction: As the user's conversation with the agent deepens, newly generated memories are used to recall related memories, and old memories are updated or deleted based on contextual history.
[0049] S3-1: After the memory extraction is completed, the extracted memories are used to recall related memory content for correction and deletion.
[0050] S3-2, Use the latest memory content to adjust the old memory content.
[0051] S3-3 merges memories of the same scene / fact to prevent the memory facts from being too scattered, which would lead to high recall pressure. It also ensures that the recalled memory facts are complete enough, enabling the agent to interact better with the user.
[0052] S4, Memory Reflection: Summarize and reflect on the memory content of several consecutive days, and have the LLM raise three in-depth questions, then answer them to obtain deeper memory and express deeper content from the user.
[0053] Specifically, when a user leaves the chat room, a memory reflection is triggered, which combines the memory content from several consecutive days and mainly focuses on the regular conclusions in the continuous memory content.
[0054] The aforementioned regularity conclusions include, but are not limited to, the following situations: commuting and work schedules; intentional conclusions, which, combined with the user's recent memory facts, infer the user's possible behavior, such as: recently studying intensely may be due to an exam or promotion; and emotional conclusions, which are more psychological in nature, such as: recently the user has been interacting late at night every day, which may have certain emotional or psychological reasons, and obtaining this memory can effectively allow the intelligent agent to channel these emotions.
[0055] S5: Extract user profile and agent profile. In this embodiment, S5 and S2 are performed simultaneously, or it can be understood that the work of step S5 can be started after S1 is completed.
[0056] The extracted content includes: name, gender, interpersonal relationships, birthday, pets, daily routine, hobbies, and anniversaries; while the agent profile aims to make the agent's interaction more in line with user habits, extracting content including: conversation style (catchphrases and language type, Cantonese, English, etc.); the user's schedule and to-do list, providing real-time reminders; interactive games, remembering mini-games interacted with by the user for later feedback; and some personality information. This profile content does not require recall; it is updated with each conversation so that the agent always has a clear understanding of this information.
[0057] Currently, most memory systems primarily focus on the user. However, in the field of emotional companionship, many users hope that in daily conversations, the intelligent agent's output will be more inclined to express itself in the way the user desires.
[0058] This embodiment also configures a memory scheduling framework. In order to support real-time dialogue, it is only necessary to upload the latest interaction content to the memory scheduling system each time, without waiting for the memory to be completed or accumulating the dialogue history locally. The configuration of the memory scheduling framework will naturally ensure that the dialogue history is ordered when extracting the memory, and can support the simultaneous execution of memory tasks by multiple agents, ensuring high availability.
[0059] To support high-availability real-time memory generation and ensure that memory tasks are performed in an orderly manner, a memory scheduling framework is designed based on the ordered messages of the RocketMQ message middleware, where messages of the same Message Group can be delivered sequentially.
[0060] During a conversation between a user and an agent, the user only needs to sequentially upload the latest conversation content and agent ID information to the memory service. The memory service assigns a unique MessageGroup to memory tasks with the same agent ID and generates the message.
[0061] Consumers bucket multiple messages retrieved at once, grouping messages from the same Message Group into one bucket. Messages from the same bucket are processed sequentially, while messages from different buckets are processed concurrently. Each bucket has its own worker thread to ensure no interference. Furthermore, if a task fails, a tiered invisibility time is set for the tasks in that bucket, for example, 5 seconds for the first task, 10 seconds for the second, and so on. This ensures that even if a task fails, subsequent tasks in that batch will still be delivered in the correct order. Moreover, message processing capacity can be horizontally scaled directly with the number of service instances, which is very convenient.
[0062] For specific implementation procedures, please refer to... Figure 1 First, the memory generation task is started. In the memory step, the dialogue history is obtained. Using an absolute time and a relative calculator, the relative time in the history is changed to absolute time, and then the specific time and specific content are extracted.
[0063] Then, the two steps of user profile extraction and addition to the memory are performed simultaneously. The extracted user profile is combined with the new user profile to form a new user profile.
[0064] Adding to the memory bank involves adding the time-calibrated dialogue history to the memory bank, and then using the context recall system to recall the relevant memory for updating;
[0065] After obtaining the absolute time, simultaneously execute step S5 to extract the agent profile and then merge it with the new agent profile information.
[0066] Reference Figure 2 , Figure 3 During the user's chat initiation process, the memory system performs the following tasks: The user's current input is combined with the conversation history and contextual information to construct a contextual recall. The backend uses a memory computing engine to analyze the conversation history in real time, sorting it by importance and providing the user with the top K most relevant memories. K is a number defined by the user or the backend.
[0067] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0068] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0069] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A biomimetic memory system based on a large model, characterized in that, Includes the following steps: S1: Memory extraction, which identifies time-related content in the dialogue history and extracts time information parameters, and combines time parameter technology to determine the time. S2: Contextual recall, matching the contextual recall system, obtains relevant memories in real time based on the context and the current user's interaction without affecting the time spent acquiring memories, and returns them to the intelligent agent; S3: Memory Correction. Use newly generated memories to recall related memories and retrieve updated or deleted old memories based on contextual history. S4: Memory Reflection. Summarize and reflect on the memory content of several consecutive days, and let the LLM ask questions and then answer them to obtain deeper memory and express deeper content from the user.
2. The biomimetic memory system based on a large model-driven approach according to claim 1, characterized in that, After completing step S1, simultaneously execute step S5 to extract the user profile and the agent profile, and merge the new agent profile with the old user profile.
3. The biomimetic memory system based on a large model driven according to claim 2, characterized in that, The content extracted in S5 includes: name, gender, interpersonal relationships, birthday, pets, daily routine, hobbies and some anniversaries, conversation style, user's schedule to do, and one or more interactive games.
4. The biomimetic memory system based on a large model-driven approach according to claim 1, characterized in that, The context recall system in S2 includes: S2-1, set up a background real-time memory computing engine to analyze the dialogue history in real time, analyze the time and context of the dialogue, and recall relevant content as a candidate set; S2-2, divide the current dialogue input into two different operations to be performed simultaneously, including operation one, which is directly vectorized and then the relevant memory is retrieved from the memory bank; Operation 2: Analyze the input containing time information; S2-3, similarity recall, recalls and merges the candidate set in S2-1 and the time interval in S2-2 respectively, and takes out the top-k memories to return to the user.
5. A biomimetic memory system based on a large model-driven approach according to claim 1, characterized in that, The memory reflection in step S4 includes: When a user leaves the chat room, a memory reflection is triggered, which combines the memory content of several consecutive days and mainly focuses on the regular conclusions in the continuous memory content. The regular conclusions include one or more of the following: commuting and work schedule, intentional conclusions, and inferences about the user's possible behavior based on the user's recent memory facts.
6. A biomimetic memory system based on a large model-driven approach according to claim 1, characterized in that, It is also equipped with a memory scheduling framework to ensure that the dialogue history is ordered when retrieving memories, and supports the simultaneous execution of memory tasks by multiple agents.
7. A biomimetic memory system based on a large model driven according to claim 6, characterized in that, The memory scheduling framework is based on the ordered messages of the RocketMQ message middleware. Messages of the same Message Group can be delivered in sequence. A memory task generation scheduling framework is designed.