Memory and reasoning coupled ai biomimetic brain architecture system
Patent Information
- Application Number
- CN202611078789.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-23
AI Technical Summary
[0012]2)记忆持久性不足
[0047]1、区别于现有技术中记忆存储于模型参数、上下文窗口或向量数据库的方案,本发明将记忆物理存储于文件系统,且以纯文本文件,与推理引擎完全分离,同一个记忆库可无缝对接任意推理引擎,即不同模型、不同设备、不同提供商,实现“一次构建,随处运行”;
Smart Images

Figure CN122965591A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an AI bionic brain architecture system that decouples memory and reasoning. Background Technology
[0002] Current mainstream large language models and AI agent systems (including but not limited to GPT series, Claude series, Gemini, etc.) generally adopt the following memory management schemes:
[0003] 1) Context Window Solution
[0004] Information such as dialogue history, user preferences, and task status is stored in the model's context window. The window capacity is limited (usually 8K-200K tokens). Once the capacity is exceeded, the data is automatically truncated or forgotten. The memory is lost after each session ends and does not have cross-session persistence.
[0005] 2) Vector database / embedded retrieval scheme
[0006] Information is vectorized and stored in vector databases (such as Pinecone, Chroma, and FAISS) through text embedding, and related memories are retrieved through similarity retrieval. Representative systems include the long-term memory modules of MemGPT and AutoGPT.
[0007] 3) Fine-tuning / model parameter injection scheme
[0008] The memory data is injected into the model parameters through fine-tuning. The memory is fixed as weights and cannot be dynamically updated. This is costly and requires retraining for each update.
[0009] Existing memory management solutions have the following drawbacks:
[0010] 1) Strong coupling between memory and reasoning
[0011] Memory exists in model parameters, context windows, or vector embeddings and is inseparable from reasoning ability. Changing the model results in the loss of memory, and changing the inference engine for the same model also results in the loss of memory. The memory storage format depends on specific retrieval algorithms and embedding models.
[0012] 2) Insufficient memory retention
[0013] Context window solution: memory is lost across sessions; Vector database solution: depends on the running state of external services and is not available offline; Parameter injection solution: memory cannot be dynamically updated after it is solidified.
[0014] 3) Low degree of structuring
[0015] Existing solutions lack a tree-like / hierarchical structured organization, rely on semantic similarity for memory retrieval, lack precise path indexes, and cannot achieve efficient access with "partial updates and partial references";
[0016] 4) Poor cross-platform portability
[0017] The memory format is tied to a specific model or system, and changing the model provider or deployment environment requires a complete migration.
[0018] Based on this, the present invention proposes an AI bionic brain architecture system that decouples memory and reasoning to solve the above problems. Summary of the Invention
[0019] (a) Technical problems to be solved
[0020] To address the shortcomings of existing technologies, this invention provides an AI bionic brain architecture system that decouples memory and reasoning. This system completely separates the memory storage layer of the AI system from the model reasoning layer, uses a pure file system as the memory medium, and uses lightweight markup language (Markdown, YAML) and scripting language (Shell Script) as the memory encoding format to achieve persistent, structured, and portable memory storage.
[0021] (II) Technical Solution
[0022] To achieve the above objectives, the present invention provides the following technical solution: an AI bionic brain architecture system decoupled from memory and reasoning, comprising:
[0023] The memory storage layer uses a local or remote file system as the storage medium and stores the AI system's memory data in plain text file format.
[0024] The inference engine adaptation layer converts the text memory data stored in the file system into a standard text format and injects it into the inference context of the inference engine through system prompts or input prefixes.
[0025] The memory read / write interface layer provides operations for creating, reading, updating, and deleting memory files, and enables precise access to memory through both file path and content retrieval.
[0026] Preferably, the memory storage layer organizes memory files using a tree-like directory structure, and the indexing mechanism uses file paths as natural indexes, supplemented by tag metadata.
[0027] Preferably, the memory data includes identity information, behavioral norms, user profiles, work notes, and long-term memory. The system organizes the memory files using a tree-like directory structure, dividing them into an unmodifiable core constraint layer, a readable and writable session work layer, and a progressively updated long-term experience layer. Different layers have different access permissions and update frequency controls.
[0028] Preferably, the memory file format is Markdown lightweight markup language format, which includes a structured metadata area and a main text content area. The metadata area records the file category, creation time, tags, and reference relationships.
[0029] The memory storage layer executes a script-formatted memory file. The script-formatted memory is executed by the system when loaded, and the memory content is dynamically generated based on the execution result, realizing runtime calculation and generation of memory.
[0030] Preferably, the inference engine adaptation layer supports multi-model access, including but not limited to closed-source large language model APIs, open-source large language models, and locally deployed lightweight models. Different models use the same memory storage layer. The memory storage layer and the inference engine are physically independent of each other. When the inference engine is changed, the memory data does not need to be migrated or converted. When the memory storage layer is synchronized across devices, the memory files are synchronized between different computing devices through a standard file synchronization protocol to achieve cross-device memory consistency.
[0031] Preferably, the core constraint layer is an identity or behavioral norm document, including system rules, execution manual, and user profile; the system rules are immutable ironclad rules and behavioral constraints, the execution manual includes identity settings, personality traits, and execution preferences, and the user profile includes user information, preferences, and relationship records;
[0032] The session work layer includes workspace files, tool notes, and daily logs; the workspace files contain descriptions of the current project and tasks, the tool notes include environment configurations, tool parameters, and scenario experience, and the daily logs are session records archived by date;
[0033] The long-term experience layer is the accumulation of experience or knowledge, including long-term memory files, skill base files, and knowledge indexes; the long-term memory files include important events, learning gains, and decision records; the skill base files are the experience and best practices of using the tools that have been mastered; and the knowledge indexes are indexes of external knowledge and experience.
[0034] Preferably, the system also includes a memory initialization module, which automatically loads core memory files according to a preset priority order when the system starts up. The module prioritizes loading unmodifiable constitutional constraints, followed by the execution manual and user profiles, and finally loads the working context of the session working layer and the long-term memory of the long-term experience layer.
[0035] Preferably, the memory read / write interface layer includes a memory read interface module and a memory write interface module;
[0036] The memory reading interface module includes precise reading, semantic retrieval, and context injection. Precise reading directly reads the specified memory file according to the file path. Semantic retrieval uses a combination of file search tools to search by keywords in file content, regular expression matching, and filename pattern matching to achieve precise and fuzzy retrieval of memory files without relying on vector embedding services. Context injection injects the retrieval results into the inference engine in the form of system prompts.
[0037] Preferably, the memory writing interface module includes file creation or update, structured writing, and batch operation. The file creation or update is to create or update memory files through the file system API. The structured writing is to write different types of memories according to a preset directory specification. The batch operation supports batch memory management at the directory level.
[0038] The memory write interface module uses the file system's modification timestamps and content version management to record the history and trajectory of each memory file change.
[0039] Secondly, the present invention provides an AI memory management method for the above-mentioned system, comprising the following steps:
[0040] S1. Create and maintain a tree-like memory directory structure in the file system;
[0041] S2. When the inference engine starts, load the core memory content from the file system into the inference context in priority order;
[0042] S3. During the reasoning process, the contents of relevant memory files are retrieved and obtained in real time through the memory read / write interface;
[0043] S4. After the user interaction is completed, write the newly acquired experience and information into the memory file of the corresponding category;
[0044] S5. Regularly maintain and organize memory files, archive expired information, and update the long-term experience database.
[0045] (III) Beneficial Effects
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. Unlike existing technologies that store memory in model parameters, context windows, or vector databases, this invention physically stores memory in the file system as plain text files, completely separate from the inference engine. The same memory bank can seamlessly connect to any inference engine, that is, different models, different devices, and different providers, to achieve "build once, run anywhere".
[0048] 2. Unlike the semantic index of vector databases, this invention utilizes the natural tree structure of the file system to achieve hierarchical organization. Different levels of memory have different modifiability, that is, the core layer is protected, the working layer is readable and writable, and the long-term layer is updated gradually, thus realizing memory management accurate to the file granularity.
[0049] 3. It adopts plain text formats such as Markdown and Shell scripts as the storage format for memory, which is human-readable and editable, does not rely on proprietary tools, has friendly version control, and can be directly managed using Git and other VCS. At the same time, it adopts a common coding standard, which is cross-platform, cross-language, and cross-model. In addition, it also supports diff tracing and auditability of memory changes.
[0050] 4. Memory is divided into "constitution-level unmodifiable constraints" and "execution-level optimizable strategies" to ensure that core security constraints are not modified during the optimization process, while allowing execution strategies to be continuously optimized based on experience. At the same time, the system automatically loads core memory files in a fixed order when it starts up or when a session is initialized, ensuring that each round of reasoning has a complete identity cognition and behavioral constraint context, without being limited by the context window. Attached Figure Description
[0051] Figure 1 This is a system architecture diagram of the present invention;
[0052] Figure 2 This is a memory file organization tree diagram for the present invention;
[0053] Figure 3 This is a data flow timing diagram for the present invention;
[0054] Figure 4 This is a schematic diagram illustrating the multi-engine switching of the present invention. Detailed Implementation
[0055] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] This invention aims to completely separate the memory storage layer of an AI system from the model inference layer. It employs a pure file system as the memory medium and lightweight markup language (Markdown, YAML) and scripting language (ShellScript) as the memory encoding format, achieving persistent, structured, and portable memory storage. For details, please refer to [link to relevant documentation]. Figure 1-4 This invention proposes an AI bionic brain architecture system that decouples memory and reasoning, including a memory storage layer, an inference engine adaptation layer, and a memory read / write interface layer. The memory storage layer uses a local or remote file system as the storage medium and stores the AI system's memory data in plain text file format. The inference engine adaptation layer converts the text memory data stored in the file system into a standard text format and injects it into the inference context of the inference engine through system prompts or input prefixes. The memory read / write interface layer provides operations for creating, reading, updating, and deleting memory files, and enables precise access to memory through both file path and content retrieval.
[0057] The memory storage layer organizes memory files using a tree-like directory structure. The indexing mechanism uses file paths as the natural index, supplemented by tag metadata. Memory data includes identity information, behavioral norms, user profiles, work notes, and long-term memory. The memory file format is Markdown lightweight markup language, containing a structured metadata area and a main content area. The metadata area records file category, creation time, tags, and reference relationships. Simultaneously, the memory storage layer also executes script-formatted memory files. Script-formatted memories are executed by the system upon loading, dynamically generating memory content based on the execution results, achieving runtime computation and generation of memories.
[0058] The system uses a tree-like directory structure to organize memory files, dividing them into an immutable core constraint layer, a readable and writable session working layer, and a progressively updated long-term experience layer. Different layers have different access permissions and update frequency controls.
[0059] The core constraint layer consists of identity or behavioral norms documents, including system rules, execution manuals, and user profiles. System rules are immutable ironclad rules and behavioral constraints. Execution manuals include identity settings, personality traits, and execution preferences. User profiles include user information, preferences, and relationship records.
[0060] The session work layer includes workspace files, tool notes, and daily logs; the workspace files contain descriptions of the current project and tasks, the tool notes include environment configurations, tool parameters, and scenario experience, and the daily logs are session records archived by date;
[0061] The long-term experience layer consists of accumulated experience or knowledge, including long-term memory files, skill base files, and knowledge indexes. Long-term memory files include important events, learning outcomes, and decision records. Skill base files contain experience in using tools and best practices. Knowledge indexes are indexes of external knowledge and experience.
[0062] The system also includes a memory initialization module, which automatically loads core memory files according to a preset priority order when the system starts up. It prioritizes loading unmodifiable constitutional constraints, followed by the execution manual and user profiles, and finally loads the working context of the session working layer and the long-term memory of the long-term experience layer.
[0063] Regarding memory read and write, the memory read and write interface layer includes a memory read interface module and a memory write interface module. The memory read interface module includes precise reading, semantic retrieval, and context injection. Precise reading directly reads the specified memory file according to the file path. Semantic retrieval is a combination of searching by file content keywords, regular expression matching, and filename pattern matching through a file search tool to achieve precise and fuzzy retrieval of memory files without relying on vector embedding services. Context injection injects the retrieval results into the inference engine in the form of system prompts.
[0064] The memory write interface module includes file creation or update, structured writing, and batch operations. File creation or update refers to creating or updating memory files through the file system API. Structured writing refers to writing different types of memories according to preset directory specifications. Batch operations support directory-level batch memory management. The memory write interface module uses the file system's modification timestamps and content version management to record the change history and change trajectory of each memory file.
[0065] In addition, the inference engine adaptation layer of this system supports the access of multiple models, including but not limited to closed-source large language model APIs, open-source large language models, and locally deployed lightweight models. Different models use the same memory storage layer. The memory storage layer and the inference engine are physically independent of each other. When the inference engine is changed, the memory data does not need to be migrated or converted. When the memory storage layer is synchronized across devices, the memory files are synchronized between different computing devices through the standard file synchronization protocol to achieve cross-device memory consistency.
[0066] This system stores memory data as plain text files (Markdown format) in a POSIX-compliant file system, using a tree-like directory structure organized hierarchically by functional domain, including a constitutional constraint layer, an identity setting layer, a working memory layer, and a log recording layer. The inference engine reads text content from the file system through an adaptation layer and injects it into the inference context as system prompts or input prefixes, achieving physical decoupling between memory and inference. It does not rely on any proprietary storage system (database, vector library, caching service), but only uses the operating system's native file system. The memory format is standard text (Markdown / PlainText / YAML), which can be directly understood and edited by humans. The cost of replacing the inference engine is zero. The memory architecture is completely decoupled from the model provider. The storage backend is hot-swappable and supports multiple file system backends such as local, network, and cloud storage. This system solves the technical problems in existing AI systems such as memory binding to specific models, memory loss across sessions, and difficulties in cross-platform migration. It has advantages such as memory persistence, structure, portability, auditability, and zero external dependencies, and can be widely used in scenarios such as large language model agent systems, cross-device AI assistants, and distributed AI clusters.
[0067] On the other hand, the present invention also provides an AI memory management method for the above-mentioned system, comprising the following steps:
[0068] S1. Create and maintain a tree-like memory directory structure in the file system;
[0069] S2. When the inference engine starts, load the core memory content from the file system into the inference context in priority order;
[0070] S3. During the reasoning process, the contents of relevant memory files are retrieved and obtained in real time through the memory read / write interface;
[0071] S4. After the user interaction is completed, write the newly acquired experience and information into the memory file of the corresponding category;
[0072] S5. Regularly maintain and organize memory files, archive expired information, and update the long-term experience database.
[0073] The following examples illustrate the complete implementation of the present invention in different scenarios.
[0074] Example 1: General AI Assistant System
[0075] The following example illustrates the specific implementation of this system in a general AI assistant system scenario.
[0076] (1) Operating environment configuration
[0077] In this scenario, the system operating environment can be configured as follows: the operating system uses a POSIX-compatible system such as Linux or macOS; the working directory is set to the path .ai-assistant / workspace / under the user's home directory (i.e., the home directory represented by "~"); the inference engine is implemented by calling a large language model in the cloud through the OpenAI API, or by providing services using a deployed open-source model; the file system is based on local SSD (solid-state drive) or persistent storage mounted on the network to ensure reliable reading and writing of the stored data;
[0078] (2) Memory initialization process
[0079] After the system launches the AI assistant, follow these steps to complete the memory initialization:
[0080] Step 1: Read the ~ / .ai-assistant / core / system rules.md file and inject the rules it contains as the "constitutional constraints" for system operation;
[0081] Step 2: Read the file ~ / .ai-assistant / workspace / SOUL.md and inject the identity setting information;
[0082] Step 3: Read the file ~ / .ai-assistant / workspace / USER.md and inject the user's relevant information;
[0083] Step 4: Read the file ~ / .ai-assistant / workspace / MEMORY.md and inject long-term memory content;
[0084] Step 5: After completing the above loading, enter the interactive loop state;
[0085] (3) Memory operations in interactive loops
[0086] During the interaction loop, the memory operations performed by the system include: before each user input is received, selectively loading memory files related to the current interaction based on the context information of the current session; after the inference engine completes the current round of inference, determining whether new information that needs to be persisted to memory has been generated; when it is determined that writing is required, creating a new memory file in the corresponding directory or updating an existing memory file through the file system API, thereby achieving dynamic maintenance of memory.
[0087] (4) Cross-model switching demonstration
[0088] When switching between different large language models, such as from GPT-4 to Claude 3, this system only needs to modify the relevant configuration of the inference engine adaptation layer. The memory storage files (i.e., the memory storage layer) remain completely unchanged, and no migration or conversion operations are required. The switched Claude 3 model can immediately inherit all the memory content accumulated during the use of the GPT-4 model, achieving seamless cross-model memory continuation.
[0089] Example 2: Multi-device AI agent system
[0090] The following example illustrates the specific implementation of this system in a cross-device collaboration scenario.
[0091] (1) System Architecture
[0092] In this cross-device collaboration scenario, the system includes a master device and at least one sub-device. The master device acts as a server, responsible for running the core inference engine and storing the complete memory file system. The master device distributes memory snapshots to each sub-device through a file synchronization service (such as using synchronization tools like Syncthing) to achieve cross-device sharing of memory data. Sub-devices can be, for example, mobile terminals or workstations. Each sub-device has a local cache of the latest acquired memory files and runs an adaptation layer and a lightweight inference engine, so that it can still use the locally cached memory data for inference calculations even when offline. When the sub-devices return to online status, they synchronize and update the changed content of the memory with the master device.
[0093] (2) Mechanism for resolving memory conflicts
[0094] During the synchronization of memory data between the master device and the slave device, when version conflicts arise due to modifications to the same memory file on both the master device and the slave device, the system adopts the following conflict resolution mechanism: the version with the latest modification timestamp is taken as the priority version, that is, the most recently modified content is retained; for memory files belonging to the constitutional layer (i.e., the system rule layer), they are set to write-protected status, allowing only the master device to make modifications, and prohibiting the slave device from performing write or modification operations on them; for changes to memory files belonging to the working layer, a bidirectional synchronization strategy is adopted, and modifications made by either the master device or the slave device can be propagated to the other during the synchronization process to achieve cross-device consistency maintenance of working layer memory content.
[0095] Example 3: Distributed AI Cluster System
[0096] The following example illustrates the specific implementation of this system in a large-scale deployment scenario of a distributed AI cluster.
[0097] (1) Shared network file system
[0098] In this large-scale deployment scenario, the system has a shared network file system, such as the Network File System (NFS) protocol or the Common Internet File System (CIFS) protocol, to mount the shared memory directory to each node in the cluster. Multiple AI instances can access and operate the same memory storage layer, thereby achieving centralized management and unified maintenance of memory data. Each AI instance has its own independent inference engine adaptation layer, which allows each instance to independently configure the corresponding adaptation parameters according to the different large language models or inference services it calls, while the memory storage layer remains shared and consistent.
[0099] (2) Memory isolation and sharing mechanism
[0100] Regarding access control for memory data, the system employs a mechanism combining isolation and sharing. For user-level memory, a memory isolation strategy is implemented, assigning each user an independent subdirectory to store their memory files. Memory data from different users is isolated and invisible to each other, ensuring the privacy and security of user data. For knowledge base-level memory, a memory sharing strategy is implemented, storing common knowledge-based memories in a pre-defined shared directory. All users and AI instances can access the memory content in this shared directory to achieve knowledge reuse and dissemination. This access granularity control is achieved through the file system's own permission management mechanism, such as setting corresponding read, write, and execute permissions for different subdirectories and shared directories, thereby ensuring secure and controllable memory access at the operating system level.
[0101] 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. An AI bionic brain architecture system with decoupled memory and reasoning, characterized in that, include: The memory storage layer uses a local or remote file system as the storage medium and stores the AI system's memory data in plain text file format. The inference engine adaptation layer converts the text memory data stored in the file system into a standard text format and injects it into the inference context of the inference engine through system prompts or input prefixes. The memory read / write interface layer provides operations for creating, reading, updating, and deleting memory files, and enables precise access to memory through both file path and content retrieval.
2. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 1, characterized in that, The memory storage layer organizes memory files using a tree-like directory structure, and the indexing mechanism uses file paths as natural indexes, supplemented by tag metadata.
3. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 2, characterized in that, The memory data includes identity information, behavioral norms, user profiles, work notes, and long-term memory. The system organizes the memory files using a tree-like directory structure, dividing them into an unmodifiable core constraint layer, a readable and writable session work layer, and a progressively updated long-term experience layer. Different layers have different access permissions and update frequency controls.
4. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 2, characterized in that, The memory file format is Markdown lightweight markup language format, which includes a structured metadata area and a main content area. The metadata area records the file category, creation time, tags, and reference relationships. The memory storage layer executes a script-formatted memory file. The script-formatted memory is executed by the system when loaded, and the memory content is dynamically generated based on the execution result, realizing runtime calculation and generation of memory.
5. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 1, characterized in that, The inference engine adaptation layer supports multi-model access, including but not limited to closed-source large language model APIs, open-source large language models, and locally deployed lightweight models. Different models use the same memory storage layer. The memory storage layer and the inference engine are physically independent of each other. When the inference engine is changed, the memory data does not need to be migrated or converted. When the memory storage layer is synchronized across devices, the memory files are synchronized between different computing devices through a standard file synchronization protocol to achieve cross-device memory consistency.
6. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 3, characterized in that, The core constraint layer consists of identity or behavioral norms documents, including system rules, execution manuals, and user profiles. System rules are immutable ironclad rules and behavioral constraints. Execution manuals include identity settings, personality traits, and execution preferences. User profiles include user information, preferences, and relationship records. The session work layer includes workspace files, tool notes, and daily logs; the workspace files contain descriptions of the current project and tasks, the tool notes include environment configurations, tool parameters, and scenario experience, and the daily logs are session records archived by date; The long-term experience layer is the accumulation of experience or knowledge, including long-term memory files, skill base files, and knowledge indexes; the long-term memory files include important events, learning gains, and decision records; the skill base files are the experience and best practices of using the tools that have been mastered; and the knowledge indexes are indexes of external knowledge and experience.
7. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 6, characterized in that, It also includes a memory initialization module, which automatically loads core memory files according to a preset priority order when the system starts up. It prioritizes loading unmodifiable constitutional constraints, followed by the execution manual and user profiles, and finally loads the working context of the session working layer and the long-term memory of the long-term experience layer.
8. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 6, characterized in that, The memory read / write interface layer includes a memory read interface module and a memory write interface module; The memory reading interface module includes precise reading, semantic retrieval, and context injection. Precise reading directly reads the specified memory file according to the file path. Semantic retrieval uses a combination of file search tools to search by keywords in file content, regular expression matching, and filename pattern matching to achieve precise and fuzzy retrieval of memory files without relying on vector embedding services. Context injection injects the retrieval results into the inference engine in the form of system prompts.
9. The AI bionic brain architecture system with decoupled memory and reasoning according to claim 8, characterized in that, The memory writing interface module includes file creation or update, structured writing, and batch operation. The file creation or update is to create or update memory files through the file system API. The structured writing is to write different types of memories according to a preset directory specification. The batch operation supports batch memory management at the directory level. The memory write interface module uses the file system's modification timestamps and content version management to record the history and trajectory of each memory file change.
10. An AI memory management method for the system according to any one of claims 1-9, characterized in that, Includes the following steps: S1. Create and maintain a tree-like memory directory structure in the file system; S2. When the inference engine starts, load the core memory content from the file system into the inference context in priority order; S3. During the reasoning process, the contents of relevant memory files are retrieved and obtained in real time through the memory read / write interface; S4. After the user interaction is completed, write the newly acquired experience and information into the memory file of the corresponding category; S5. Regularly maintain and organize memory files, archive expired information, and update the long-term experience database.