A Large Model Memory Management and Optimization System and Method Based on Vector Data Lake

By adopting a large model memory management system based on vector data lake, the problem of low memory management efficiency in intelligent agent systems is solved, achieving efficient storage and retrieval, enhancing knowledge transfer and continuous learning capabilities, and adapting to complex multi-task scenarios.

CN121501798BActive Publication Date: 2026-06-30BEIJING INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2025-11-20
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing intelligent agent systems suffer from problems such as inefficient memory management, insufficient dynamic adaptability, and limited knowledge transfer capabilities, making it difficult to meet the needs of efficient reasoning, knowledge reuse, and continuous learning in complex dynamic tasks.

Method used

A large model memory management system based on vector data lake is adopted. Through multi-dimensional memory vectorization encoding and hierarchical management, intelligent retrieval and dynamic updating, memory optimization strategy based on reflection and backtracking mechanism, and interactive evaluation and cyclic adjustment optimization module, efficient storage and retrieval, dynamic updating and optimization of memory representation are achieved.

Benefits of technology

It significantly improves the storage efficiency and retrieval speed of memory data, enhances knowledge transfer capabilities, supports continuous learning and multi-task adaptation, mitigates catastrophic forgetting problems, and enables efficient reasoning and dynamic adaptation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501798B_ABST
    Figure CN121501798B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of artificial intelligence technology and discloses a large-scale model memory management and optimization system and method based on vector data lake. It includes a multi-dimensional memory vectorization encoding and hierarchical management module, an intelligent retrieval and dynamic update module, a memory optimization strategy based on reflection and backtracking mechanisms, and an interactive evaluation and iterative adjustment optimization module. This invention employs the aforementioned large-scale model memory management and optimization system and method based on vector data lake. By constructing a multi-dimensional, hierarchical memory storage and dynamic retrieval framework, it supports the collaborative management of long-term and short-term memory, enabling intelligent agents to achieve efficient reasoning, knowledge reuse, and continuous learning capabilities in complex dynamic tasks, thereby significantly improving the robustness, adaptability, and task transfer capabilities of intelligent systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a large model memory management and optimization system and method based on vector data lake. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent agent systems have been widely applied in various fields, such as intelligent robots, autonomous driving, intelligent customer service, and virtual assistants. These systems typically need to perform tasks in complex and dynamic environments and rely on efficient memory management mechanisms to support decision-making, reasoning, and learning. However, existing intelligent agent systems still face many challenges in memory management, such as low memory management efficiency, insufficient dynamic adaptability, limited knowledge transfer capabilities, catastrophic forgetting problems, challenges in multimodal data processing, and a lack of reflection and optimization mechanisms.

[0003] Currently, academia and industry have proposed several methods to improve memory management, such as neural network-based memory models and experience replay mechanisms in reinforcement learning. However, these methods still have limitations, including low storage efficiency, slow retrieval speed, poor adaptability, difficulty in knowledge transfer, and insufficient multimodal data processing capabilities.

[0004] Therefore, existing intelligent agent systems face problems such as low efficiency, insufficient dynamic adaptability, and limited knowledge transfer capabilities in memory management, making it difficult to cope with the demands of efficient reasoning, knowledge reuse, and continuous learning in complex dynamic tasks. Thus, there is an urgent need for a novel memory management technology that can support the storage and retrieval of large-scale, multimodal data, achieve dynamic updates and optimization, and enhance knowledge transfer and continuous learning capabilities. Summary of the Invention

[0005] The purpose of this invention is to provide a large model memory management and optimization system and method based on vector data lake, which aims to solve the problems of low memory management efficiency, insufficient dynamic adaptability and limited knowledge transfer capability in existing intelligent agent systems.

[0006] To achieve the above objectives, this invention provides a large model memory management and optimization system based on vector data lake, including a multi-dimensional memory vectorization encoding and hierarchical management module, an intelligent retrieval and dynamic update module, a memory optimization strategy based on reflection and backtracking mechanism, and an interactive evaluation and cyclic adjustment optimization module.

[0007] The multi-dimensional memory vectorization encoding and hierarchical management module is used to divide the agent's memory into contextual memory, semantic memory and working memory, and represent them as high-dimensional vector embeddings through vectorization encoding technology, which are then stored in a vector data lake;

[0008] The intelligent retrieval and dynamic update module is used to design a context-aware memory matching algorithm based on vector retrieval, and dynamically match relevant memory units according to task requirements. At the same time, it intelligently adjusts the storage content and embedding representation of the memory units through a dynamic update mechanism.

[0009] The memory optimization strategy based on reflection and retrieval mechanism is used to simulate the reflection mechanism of the human brain, periodically trigger the memory review and reconstruction process, and dynamically adjust the representation of memory vector through knowledge reconstruction algorithm to improve generalization ability and retrieval efficiency.

[0010] The interactive evaluation and cyclic adjustment optimization module assesses memory performance and system performance through an interactive evaluation framework; based on the evaluation results, it continuously optimizes the memory system, forming a closed-loop adjustment mechanism.

[0011] Preferably, the multi-dimensional memory vectorization encoding and hierarchical management module further includes:

[0012] The memory classification and encoding unit is used to classify the agent's memory into episodic memory, semantic memory and working memory, and to perform vectorized encoding through autoencoder and Transformer model technology.

[0013] The hierarchical storage and collaborative optimization unit is used to build a hierarchical storage architecture of long-term memory and short-term memory in the vector data lake, and to realize the dynamic adjustment and integration of different levels of memory through the collaborative optimization mechanism between memories.

[0014] Preferably, memory classification and encoding include:

[0015] (1) Contextual memory encoding: Using an autoencoder and reconstruction loss function to capture time-series change information in the dynamic environment, record key events and contextual changes, support dynamic memory updates, and achieve memory compression;

[0016] The time series Transformer is used to capture time dependencies and dynamic changes in context, as shown below:

[0017] ;

[0018] in, Input the environment from the most recent k steps; This is the context memory vector for the current time step; This represents the time-series Transformer architecture;

[0019] Information compression and reconstruction are performed using a variational autoencoder (VAE) to ensure the compactness and effectiveness of memory, as shown below:

[0020] ;

[0021] in, The Kullback-Leibler divergence; To weigh the parameters; Represents the prior probability distribution of the latent space; This represents the approximate posterior distribution of the encoder output; The data reconstruction error is represented as follows:

[0022] ;

[0023] in, This represents the generation distribution of the decoder; for each sample via encoder Generate latent vectors Through the decoder Reconstructing the original data ;

[0024] (2) Semantic memory encoding: Through knowledge embedding technology, long-term stable knowledge is stored in vector form, supporting efficient retrieval and cross-task reuse;

[0025] For structured knowledge, a knowledge representation is constructed based on knowledge graph embedding and combined with graph neural networks (GNNs), as shown below:

[0026] ;

[0027] in, and These represent the nodes and edges of the knowledge graph, respectively. For semantic memory vector embedding;

[0028] We selected the Graph Attention Network (GAT) to achieve higher expressive power, as shown below:

[0029] ;

[0030] in, Indicates the activation function; Represents a node and nodes Attention coefficient; This represents the weight matrix of the graph attention network; Indicates the first Layer nodes eigenvectors; Indicates the first Layer nodes eigenvectors;

[0031] For text-based knowledge, a pre-trained language model is used for embedding, as shown below:

[0032] ;

[0033] in, This represents the input text data; This represents the BERT pre-trained language model; Represents a semantic memory vector;

[0034] (3) Working memory encoding: Dynamically extract high-priority memory units required for immediate decision-making based on task requirements, and support immediate task decision-making through a relevance scoring mechanism;

[0035] Multi-head attention mechanisms are used to extract highly relevant memory units from semantic and episodic memories, as shown below:

[0036] ;

[0037] in, The task vector is obtained by embedding the task description statement; It is a memory vector, whose priority is calculated based on the frequency of recent access or the task context. , , These are the sets of all attention head projection matrices; It is the output projection matrix; It is the input dimension; This represents the attention weight, used in weighted memory units.

[0038] Preferably, in the hierarchical storage and collaborative optimization unit, a collaborative optimization mechanism is constructed to dynamically adjust the representation of short-term and long-term memory, as shown below:

[0039] ;

[0040] in, and These represent the optimization goals for short-term and long-term memory, respectively. and They represent and Weighting coefficients;

[0041] and Dynamically adjust based on task frequency: when the task frequency is high, increase... Optimize short-term memory; increase memory usage when the system is idle. Optimize long-term memory;

[0042] Short-term memory typically focuses on the speed of task response, and its optimization objective is defined as task execution time. and retrieval time The sum is as follows:

[0043] ;

[0044] Long-term memory focuses on stability and accuracy, defined as retrieval hit rate. and knowledge redundancy The function is shown below:

[0045] ;

[0046] in, Controlling the impact of redundancy.

[0047] Preferably, the intelligent retrieval and dynamic update module further includes:

[0048] A context-aware memory retrieval strategy unit is used to design a vector-based context-aware memory matching algorithm and dynamically match relevant memory units according to task requirements. The specific implementation process is as follows:

[0049] (1) Utilize indexing techniques in the vector data lake to quickly retrieve memory vectors relevant to the current task;

[0050] (2) Design a context-aware relevance scoring model to support accurate recall of memory units in complex multimodal environments;

[0051] A comprehensive matching process is performed based on semantic, contextual, and task relevance scores, as shown below:

[0052] ;

[0053] in, Score the relevance to the context; , and The relevance scores are for semantic memory, episodic memory, and task vectors, respectively. , , They are respectively , and Corresponding weights;

[0054] Semantic relevance Cosine similarity based on embedding vectors is shown below:

[0055] ;

[0056] in, Represents a semantic memory vector. Represents the query vector; The norm of a vector;

[0057] Contextual relevance Combining time weights The similarity to episodic memory vectors is shown below:

[0058] ;

[0059] in, Represents a contextual memory vector; Indicates time weight;

[0060] Task relevance The weighted similarity between the task vector and the memory vector is calculated using a multi-head attention mechanism.

[0061] Preferably, the intelligent retrieval and dynamic update module further includes:

[0062] The adaptive update mechanism unit for memory is used to intelligently adjust the stored content and embedded representation of memory units through a dynamic update mechanism, and periodically evaluate the usage frequency and task relevance of memory units, and clean up outdated or redundant memories. The specific implementation process is as follows:

[0063] (1) Regularly assess the usage frequency and task relevance of memory units, and filter and clean up memory units based on usage frequency, task relevance, and environmental changes, as shown below:

[0064] ;

[0065] in, The number of times a memory cell is accessed within a time period; This indicates the length of the time window; memory cells that are below a set threshold will be cleared. Indicates the frequency of use of memory units;

[0066] (2) Incorporate environmental feedback mechanisms to dynamically adjust memory representations based on task performance, thereby improving the adaptability and efficiency of memory, as shown below:

[0067] ;

[0068] in, This represents the memory update loss function; This is the regularization coefficient, used to balance the stability of memory updates; This represents the updated memory representation vector; Represents the old memory representation vector; The performance loss is defined by task completion rate or retrieval hit rate, as shown below:

[0069] ;

[0070] in, This indicates the task completion rate.

[0071] Preferably, the memory optimization strategy based on reflection and backtracking mechanisms further includes:

[0072] The dynamic knowledge optimization unit is used to simulate the human brain's reflection mechanism, periodically triggering the memory review and reconstruction process, and dynamically adjusting the representation of the memory vector through a knowledge reconstruction algorithm. The specific implementation process is as follows:

[0073] (1) Regularly retrieve historical task data, analyze differences in task performance, and identify knowledge areas that need optimization;

[0074] (2) By using knowledge reconstruction algorithms, the representation of memory vectors is dynamically adjusted to improve generalization ability and retrieval efficiency;

[0075] The memory representation is optimized using a contrastive learning method, as shown below:

[0076] ;

[0077] in, and A positive sample vector; Negative samples; Indicates cosine similarity; This is a temperature parameter used to control the smoothness of the positive and negative sample distribution; This represents the contrastive learning loss function.

[0078] Preferably, the memory optimization strategy based on reflection and backtracking mechanisms further includes:

[0079] The efficient knowledge transfer unit, which draws on the backtracking mechanism of the human brain, enables efficient knowledge transfer between tasks and constructs the optimal transfer path through semantic matching and vector comparison. The specific implementation process is as follows:

[0080] (1) Quickly trace relevant knowledge and construct the optimal transfer path through semantic matching and vector comparison, as shown below:

[0081] ;

[0082] in, The similarity score represents the degree of knowledge transfer. Indicates cosine similarity; Vector representation of source knowledge; A vector representation of the target knowledge;

[0083] (2) Construct a noise robustness module and introduce a noise shielding mechanism to reduce the interference of data flow noise on knowledge transfer and improve transfer efficiency and robustness, as shown below:

[0084] ;

[0085] in, This represents the knowledge vector after noise reduction processing. Represents the original knowledge vector; For noise vectors, This represents the noise weight.

[0086] Preferably, the interactive evaluation and cyclic adjustment optimization module evaluates memory performance and system performance through an interactive evaluation framework; based on the evaluation results, it continuously optimizes the memory system, forming a closed-loop adjustment mechanism; the interactive evaluation and cyclic adjustment optimization module includes:

[0087] Interactive memory assessment unit: Design memory assessment metrics based on task performance and retrieval efficiency, as shown below:

[0088] ;

[0089] in, Indicates the score for task performance; This indicates the retrieval efficiency score; Weighting coefficients representing task performance; Weighting coefficients representing retrieval efficiency; This represents the overall performance index of the memory system;

[0090] Closed-loop adjustment mechanism: The memory system architecture is dynamically adjusted based on the evaluation results, with the following optimization objectives:

[0091] ;

[0092] in, This represents the task performance loss function; This represents the storage cost loss function; This represents the memory update cost loss function; This represents the overall optimization objective loss function of the memory system.

[0093] A method for managing and optimizing the memory of large models based on vector data lakes is proposed and applied to a system for managing and optimizing the memory of large models based on vector data lakes. The specific process is as follows:

[0094] Step S1: Construct a vector data lake;

[0095] Step S11: Utilize the vector database to construct a vector data lake that supports large-scale memory storage and retrieval;

[0096] Step S12: Optimize the retrieval performance of the memorized data and reduce storage redundancy through indexing technology;

[0097] Step S2: Memory classification and management;

[0098] Step S21, Contextual Memory: Use an autoencoder to embed and compress dynamic environmental data, and periodically clean up outdated memories;

[0099] Step S22, Semantic Memory: Through knowledge embedding technology, long-term stable knowledge is stored as a high-dimensional vector, supporting cross-task reuse;

[0100] Step S23, Working Memory: Combining the task relevance scoring mechanism, dynamically select high-priority memory units for immediate decision-making;

[0101] Step S3: Memory optimization and update;

[0102] Step S31: Periodically trigger the reflection mechanism to analyze task performance and memory usage, and optimize memory representation;

[0103] Step S32: Introduce an environmental feedback model to dynamically adjust the memory storage and update strategy according to task requirements;

[0104] Step S4: Memory assessment and cyclical adjustment;

[0105] Step S41: Evaluate the memory performance of the agent in different task scenarios using an interactive memory evaluation framework;

[0106] Step S42: Based on the evaluation results, adjust the memory system structure regularly to achieve self-evolution and continuous optimization of the memory system.

[0107] Therefore, the present invention employs the above-mentioned large model memory management and optimization system and method based on vector data lake, and the beneficial effects are as follows:

[0108] (1) Efficient memory management: This invention significantly improves the storage efficiency and retrieval speed of memory data through vectorized encoding and hierarchical storage, and reduces the storage overhead and computing resource requirements of the intelligent agent;

[0109] (2) Enhanced knowledge transfer capability: This invention utilizes reflection and backtracking mechanisms to optimize the knowledge transfer path between tasks, thereby improving the adaptability and robustness of the agent in dynamic task scenarios;

[0110] (3) Strong continuous learning capability: This invention supports the agent to continuously learn and reuse knowledge in complex environments through dynamic updating and adaptive optimization of memory, thereby mitigating the problem of catastrophic forgetting;

[0111] (4) Flexible multi-task support: This invention constructs a multi-dimensional memory system and a context-aware retrieval strategy, enabling the agent to achieve efficient reasoning and dynamic adaptation in multi-task and multi-modal scenarios.

[0112] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0113] Figure 1 This is a system framework diagram of a large model memory management and optimization system based on vector data lake according to the present invention;

[0114] Figure 2 This is a flowchart illustrating the application of the present invention to a method for managing and optimizing the memory of a large model based on a vector data lake. Detailed Implementation

[0115] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0116] Example

[0117] like Figure 1 As shown, a large model memory management and optimization system based on vector data lake includes a multi-dimensional memory vectorization encoding and hierarchical management module, an intelligent retrieval and dynamic update module, a memory optimization strategy based on reflection and backtracking mechanism, and an interactive evaluation and cyclic adjustment optimization module.

[0118] I. Multidimensional Memory Vectorization Encoding and Hierarchical Management Module: This module simulates the multidimensional characteristics of human brain memory, dividing the agent's memory into episodic memory, semantic memory, and working memory. It then uses vectorization encoding technology to represent these memories as high-dimensional vector embeddings, which are stored in a vector data lake.

[0119] 1. Memory classification and encoding units.

[0120] First, the agent's memory is divided into episodic memory, semantic memory, and working memory, which correspond to dynamic tasks, stable knowledge, and immediate decision support, respectively.

[0121] Then, using vectorization encoding techniques (such as autoencoders, Transformer models, etc.), different types of memory are represented as high-dimensional vector embeddings and stored in a vector data lake, specifically including:

[0122] (1) Contextual memory encoding: Using an autoencoder and reconstruction loss function to capture time series change information in the dynamic environment, record key events and contextual changes, support dynamic memory updates, and realize memory compression.

[0123] The Time-series Transformer (TST) is used to capture time dependencies and dynamic changes in the context, as shown below:

[0124] ;

[0125] in, Input the environment from the most recent k steps; This is the context memory vector for the current time step; This represents the time series Transformer architecture.

[0126] Information compression and reconstruction are performed using a variational autoencoder (VAE) to ensure the compactness and effectiveness of memory, as shown below:

[0127] ;

[0128] in, The Kullback-Leibler divergence; To weigh the parameters; The prior probability distribution of the latent space is usually represented by the standard normal distribution. ); This represents the approximate posterior distribution of the encoder output, typically denoted as a Gaussian distribution. , by input Generate mean and variance ; This represents the generation distribution of the decoder, based on the latent vector. Reconstructing data ; The data reconstruction error is represented as follows:

[0129] ;

[0130] For each sample via encoder Generate latent vectors Through the decoder Reconstructing the original data .

[0131] (2) Semantic memory encoding: Through knowledge embedding technology, long-term stable knowledge is stored in vector form, supporting efficient retrieval and cross-task reuse.

[0132] For structured knowledge, knowledge representation is constructed based on Knowledge Graph Embedding and combined with Graph Neural Networks (GNNs), as shown below:

[0133] ;

[0134] in, and These represent the nodes and edges of the knowledge graph, respectively. This is a semantic memory vector embedding.

[0135] Graph Attention Networks (GATs) can be selected to achieve higher expressive power, as shown below:

[0136] ;

[0137] in, This represents the activation function, which can be ReLU, Sigmoid, Tanh, etc. Represents a node and nodes Attention coefficient; This represents the weight matrix of the graph attention network; Indicates the first Layer nodes eigenvectors; Indicates the first Layer nodes eigenvectors.

[0138] For common text-based knowledge, pre-trained language models (such as GPT and BERT) are used for embedding, as shown below:

[0139] ;

[0140] in, This represents the input text data; This refers to the BERT (Bidirectional Encoder Representations from Transformers) pre-trained language model. This represents a semantic memory vector.

[0141] (3) Working memory encoding: Dynamically extract high-priority memory units required for immediate decision-making based on task requirements, and support immediate task decision-making through a relevance scoring mechanism.

[0142] Multi-head attention is used to extract highly relevant memory units from semantic and episodic memories, as shown below:

[0143] ;

[0144] in, The task vector is obtained by embedding the task description statement (such as a vector generated by GPT or BERT); For memory vectors, their priority can be calculated based on the frequency of recent access or weighted by the task context; , , These are the sets of all attention head projection matrices; It is the output projection matrix; It is the input dimension; This represents the attention weight, used in weighted memory units.

[0145] 2. Tiered storage and collaborative optimization unit.

[0146] First, a hierarchical storage architecture of long-term and short-term memory is constructed in the vector data lake. Long-term memory stores stable knowledge vectors, supporting knowledge reuse across multiple tasks; short-term memory records data relevant to immediate tasks, supporting rapid response to task requirements. Then, a collaborative optimization mechanism between memories enables dynamic adjustment and integration of different memory levels.

[0147] A collaborative optimization mechanism is constructed to dynamically adjust the representations of short-term and long-term memory, as shown below:

[0148] ;

[0149] in, and These represent the optimization goals for short-term and long-term memory, respectively. and They represent and Weighting coefficients;

[0150] and It can be dynamically adjusted based on task frequency: when the task frequency is high, increase... Optimize short-term memory; increase memory usage when the system is idle. Optimize long-term memory.

[0151] Short-term memory typically focuses on the speed of task response, and its optimization objective is defined as task execution time. and retrieval time The sum is as follows:

[0152] ;

[0153] Long-term memory focuses on stability and accuracy, defined as retrieval hit rate. and knowledge redundancy The function is shown below:

[0154] ;

[0155] in, Controlling the impact of redundancy.

[0156] II. Intelligent Retrieval and Dynamic Update Module: This module is used to design a context-aware memory matching algorithm based on vector retrieval, dynamically match relevant memory units according to task requirements, and intelligently adjust the storage content and embedded representation of memory units through a dynamic update mechanism.

[0157] 1. Context-aware memory retrieval strategy unit.

[0158] First, a context-aware memory matching algorithm based on vector retrieval is designed to dynamically match relevant memory units according to task requirements. The specific implementation process is as follows:

[0159] (1) Use indexing techniques in vector data lakes, such as IVF (Inverted File Index) and HNSW (Hierarchical Navigation Small World Graph), to quickly retrieve memory vectors related to the current task.

[0160] (2) Design a context-aware relevance scoring model to support accurate memory unit retrieval in complex multimodal environments.

[0161] A comprehensive matching process is performed based on semantic, contextual, and task relevance scores, as shown below:

[0162] ;

[0163] in, , and The relevance scores are for semantic memory, episodic memory, and task vectors, respectively. , , They are respectively , and Corresponding weights; Score the context relevance.

[0164] (Semantic relevance): Based on cosine similarity of the embedding vectors, as shown below:

[0165] ;

[0166] in, Represents a semantic memory vector; Represents the query vector; The norm of a vector.

[0167] (Contextual relevance): Combined with time weighting Similarity to episodic memory vectors:

[0168] ;

[0169] in, Represents a contextual memory vector; Indicates time weight.

[0170] (Task relevance): The weighted similarity between the task vector and the memory vector is calculated through a multi-head attention mechanism.

[0171] 2. Memory adaptive update mechanism unit.

[0172] The storage content and embedded representation of the memory unit are intelligently adjusted through a dynamic update mechanism. The specific implementation process is as follows:

[0173] (1) Regularly assess the usage frequency and task relevance of memory units, and filter and clean up memory units based on usage frequency, task relevance, and environmental changes, as shown below:

[0174] ;

[0175] in, The number of times a memory cell is accessed within a time period; This indicates the length of the time window; memory cells that are below a set threshold will be cleared. This indicates the frequency of use of the memory unit.

[0176] (2) Incorporate environmental feedback mechanisms to dynamically adjust memory representations based on task performance, thereby improving the adaptability and efficiency of memory, as shown below:

[0177] ;

[0178] in, This represents the memory update loss function; This is the regularization coefficient, used to balance the stability of memory updates; This represents the updated memory representation vector; Represents the old memory representation vector; The performance loss is defined by task completion rate or retrieval hit rate, as shown below:

[0179] ;

[0180] in, The task completion rate refers to the proportion of tasks successfully completed by the system out of the total number of tasks.

[0181] Third, a memory optimization strategy based on reflection and backtracking mechanism is used to simulate the human brain's reflection mechanism, periodically triggering the memory review and reconstruction process, and dynamically adjusting the representation of memory vectors through knowledge reconstruction algorithm to improve generalization ability and retrieval efficiency; with the help of backtracking mechanism, efficient knowledge transfer between tasks is achieved.

[0182] 1. Dynamic knowledge optimization unit.

[0183] Simulating the human brain's reflection mechanism, the memory review and reconstruction process is triggered periodically. The specific implementation process is as follows:

[0184] (1) Regularly retrieve historical task data, analyze differences in task performance, and identify knowledge areas that need optimization.

[0185] (2) By using the knowledge reconstruction algorithm, the representation of the memory vector is dynamically adjusted to improve the generalization ability and retrieval efficiency.

[0186] The memory representation is optimized using a contrastive learning approach, as shown below:

[0187] ;

[0188] in, and A positive sample vector; Negative samples; Indicates cosine similarity; Temperature is a parameter used to control the smoothness of the positive and negative sample distribution (to a lesser extent). It will amplify similarity differences and emphasize the weight of positive samples. This represents the contrastive learning loss function.

[0189] 2. Highly efficient knowledge transfer unit.

[0190] By drawing inspiration from the human brain's regression mechanism, efficient knowledge transfer can be achieved between tasks. The specific implementation process is as follows:

[0191] (1) Quickly trace relevant knowledge and construct the optimal transfer path through semantic matching and vector comparison, as shown below:

[0192] ;

[0193] in, The similarity score represents the degree of knowledge transfer. Indicates cosine similarity; Vector representation of source knowledge; A vector representation of the target knowledge.

[0194] (2) Construct a noise robustness module and introduce a noise shielding mechanism to reduce the interference of data flow noise on knowledge transfer and improve transfer efficiency and robustness, as shown below:

[0195] ;

[0196] in, This represents the knowledge vector after noise reduction processing. This represents the original knowledge vector, which contains knowledge information that may be affected by noise. For noise vectors, This represents the noise weight.

[0197] IV. Interactive Evaluation and Cyclic Adjustment Optimization Module: This module evaluates memory performance and system behavior through an interactive evaluation framework. Based on the evaluation results, it continuously optimizes the memory system, forming a closed-loop adjustment mechanism.

[0198] 1. Interactive Memory Assessment Unit: Design memory assessment indicators based on task performance and retrieval efficiency, as shown below:

[0199] ;

[0200] in, This indicates the score for task performance (statistics on task completion rate or response time). This represents the retrieval efficiency score (statistics on retrieval time or hit rate). Weighting coefficients representing task performance (0≤ ≤1), reflecting the system's emphasis on the task result; Weighting coefficients representing retrieval efficiency (0≤ ≤1, + =1), quantifying the speed requirements for memory retrieval; This represents the overall performance index of the memory system.

[0201] 2. Closed-loop adjustment mechanism: The memory system architecture (model weights, hyperparameters, etc.) is dynamically adjusted based on the evaluation results. The optimization objectives are as follows:

[0202] ;

[0203] in, This represents the task performance loss function; This represents the storage cost loss function; This represents the memory update cost loss function; This represents the overall optimization objective loss function of the memory system.

[0204] This invention proposes a multi-dimensional memory management system based on episodic memory, semantic memory, and working memory. Combining vectorized encoding and hierarchical storage, it simulates different characteristics and functions of human memory. Based on vector retrieval technologies (such as IVF and HNSW), it achieves efficient memory storage and dynamic retrieval, supporting unified management of multimodal data. Furthermore, this invention innovatively introduces reflection and backtracking mechanisms to optimize memory representation and knowledge transfer paths, significantly improving the agent's knowledge reuse and generalization capabilities in complex task scenarios. By constructing a memory cycle regulation mechanism inspired by the human brain, and through a closed-loop process of "evaluation—optimization—re-evaluation," it achieves the self-evolution and continuous optimization of the memory system.

[0205] Based on the above, this invention also proposes a method for managing and optimizing large model memory based on a vector data lake, which is applied to a system for managing and optimizing large model memory based on a vector data lake, such as... Figure 2 As shown, the specific process is as follows:

[0206] Step S1: Construct a vector data lake.

[0207] Step S11: Utilize vector databases (such as Milvus, Pinecone, Weaviate) to construct a vector data lake that supports large-scale memory storage and retrieval.

[0208] Step S12: Optimize the retrieval performance of memory data and reduce storage redundancy through indexing techniques (such as IVF and HNSW).

[0209] Step S2: Memory classification and management.

[0210] Step S21, Contextual Memory: Use an autoencoder to embed and compress dynamic environmental data, and periodically clean up outdated memories.

[0211] Step S22, Semantic Memory: Through knowledge embedding technology, long-term stable knowledge is stored as a high-dimensional vector, supporting cross-task reuse.

[0212] Step S23, Working Memory: Combining the task relevance scoring mechanism, dynamically select high-priority memory units for immediate decision-making.

[0213] Step S3: Memory optimization and update.

[0214] Step S31: Periodically trigger the reflection mechanism to analyze task performance and memory usage, and optimize memory representation.

[0215] Step S32: Introduce an environmental feedback model to dynamically adjust the memory storage and update strategy according to task requirements.

[0216] Step S4: Memory assessment and cyclical adjustment.

[0217] Step S41: Evaluate the memory performance of the agent in different task scenarios using an interactive memory evaluation framework.

[0218] Step S42: Based on the evaluation results, adjust the memory system structure regularly to achieve self-evolution and continuous optimization of the memory system.

[0219] Therefore, this invention adopts the aforementioned large-model memory management and optimization system and method based on vector data lake. By constructing an agent memory management and optimization system—a memory data lake—based on vector data lake, it proposes an innovative multi-dimensional memory management framework, a dynamic retrieval and adaptive update mechanism, and a knowledge optimization strategy driven by reflection and backtracking. This significantly improves the agent's memory management, knowledge transfer, and continuous learning capabilities in complex task scenarios. The technical solution of this invention can be widely applied to multimodal and multi-task scenarios such as intelligent robots, autonomous driving, and intelligent customer service, and has important theoretical significance and application value.

[0220] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A large model memory management and optimization system based on vector data lake, characterized in that: It includes a multi-dimensional memory vectorization encoding and hierarchical management module, an intelligent retrieval and dynamic update module, a memory optimization strategy based on reflection and backtracking mechanisms, and an interactive evaluation and cyclic adjustment optimization module; The multi-dimensional memory vectorization encoding and hierarchical management module is used to divide the agent's memory into contextual memory, semantic memory and working memory, and represent them as high-dimensional vector embeddings through vectorization encoding technology, which are then stored in a vector data lake; The intelligent retrieval and dynamic update module is used to design a context-aware memory matching algorithm based on vector retrieval, and dynamically match relevant memory units according to task requirements. At the same time, it intelligently adjusts the storage content and embedding representation of the memory units through a dynamic update mechanism. The intelligent retrieval and dynamic update module further includes: The adaptive update mechanism unit for memory is used to intelligently adjust the stored content and embedded representation of memory units through a dynamic update mechanism, and periodically evaluate the usage frequency and task relevance of memory units, and clean up outdated or redundant memories. The specific implementation process is as follows: (1) Regularly assess the usage frequency and task relevance of memory units, and filter and clean up memory units based on usage frequency, task relevance, and environmental changes, as shown below: ; in, The number of times a memory cell is accessed within a time period; This indicates the length of the time window; memory cells that are below a set threshold will be cleared. Indicates the frequency of use of memory units; (2) Incorporate an environmental feedback mechanism to dynamically adjust the memory representation based on task performance, as shown below: ; in, This represents the memory update loss function; This is the regularization coefficient, used to balance the stability of memory updates; This represents the updated memory representation vector; Represents the old memory representation vector; The performance loss is defined by task completion rate or retrieval hit rate, as shown below: ; in, Indicates the task completion rate; A memory optimization strategy based on reflection and retrieval mechanisms is used to simulate the human brain's reflection mechanism, periodically triggering the memory review and reconstruction process, and dynamically adjusting the representation of memory vectors through a knowledge reconstruction algorithm; The interactive evaluation and cyclic adjustment optimization module assesses memory performance and system performance through an interactive evaluation framework; based on the evaluation results, it continuously optimizes the memory system, forming a closed-loop adjustment mechanism.

2. The large model memory management and optimization system based on vector data lake according to claim 1, characterized in that, The multi-dimensional memory vectorization encoding and hierarchical management module further includes: The memory classification and encoding unit is used to classify the agent's memory into episodic memory, semantic memory and working memory, and to perform vectorized encoding through autoencoder and Transformer model technology. The hierarchical storage and collaborative optimization unit is used to construct a hierarchical storage architecture of long-term memory and short-term memory in the vector data lake, and to realize the dynamic adjustment and integration of different levels of memory through a collaborative optimization mechanism between memories.

3. The large model memory management and optimization system based on vector data lake according to claim 2, characterized in that, Memory classification and encoding include: (1) Contextual memory encoding: Using an autoencoder and reconstruction loss function to capture time-series change information in the dynamic environment, record key events and contextual changes, support dynamic memory updates, and achieve memory compression; The time series Transformer is used to capture time dependencies and dynamic changes in context, as shown below: ; in, Input the environment from the most recent k steps; This is the context memory vector for the current time step; This represents the time-series Transformer architecture; Information compression and reconstruction are performed using a variational autoencoder (VAE), as shown below: ; in, The Kullback-Leibler divergence; To weigh parameters; Represents the prior probability distribution of the latent space; This represents the approximate posterior distribution of the encoder output; The data reconstruction error is represented as follows: ; in, This represents the generation distribution of the decoder; for each sample via encoder Generate latent vectors Through the decoder Reconstructing the original data ; (2) Semantic memory encoding: Through knowledge embedding technology, long-term stable knowledge is stored in vector form, supporting efficient retrieval and cross-task reuse; For structured knowledge, a knowledge representation is constructed based on knowledge graph embedding and combined with graph neural networks (GNNs), as shown below: ; in, and These represent the nodes and edges of the knowledge graph, respectively. For semantic memory vector embedding; We selected the Graph Attention Network (GAT) to achieve higher expressive power, as shown below: ; in, Indicates the activation function; Represents a node and nodes Attention coefficient; This represents the weight matrix of the graph attention network; Indicates the first Layer nodes eigenvectors; Indicates the first Layer nodes eigenvectors; For text-based knowledge, a pre-trained language model is used for embedding, as shown below: ; in, This represents the input text data; This represents the BERT pre-trained language model; Represents a semantic memory vector; (3) Working memory encoding: Dynamically extract high-priority memory units required for immediate decision-making based on task requirements, and support immediate task decision-making through a relevance scoring mechanism; Multi-head attention mechanisms are used to extract highly relevant memory units from semantic and episodic memories, as shown below: ; in, The task vector is obtained by embedding the task description statement; It is a memory vector, whose priority is calculated based on the frequency of recent access or the task context. , , These are the sets of all attention head projection matrices; It is the output projection matrix; It is the input dimension; This represents the attention weight, used in weighted memory units.

4. The large model memory management and optimization system based on vector data lake according to claim 2, characterized in that, In the hierarchical storage and collaborative optimization unit, a collaborative optimization mechanism is constructed to dynamically adjust the representations of short-term and long-term memory, as shown below: ; in, and These represent the optimization goals for short-term and long-term memory, respectively. and They represent and Weighting coefficients; and Dynamically adjust based on task frequency: when the task frequency is high, increase... Optimize short-term memory; increase memory usage when the system is idle. Optimize long-term memory; Short-term memory typically focuses on the speed of task response, and its optimization objective is defined as task execution time. and retrieval time The sum is as follows: ; Long-term memory focuses on stability and accuracy, defined as retrieval hit rate. and knowledge redundancy The function is shown below: ; in, Controlling the impact of redundancy.

5. The large model memory management and optimization system based on vector data lake according to claim 1, characterized in that, The intelligent retrieval and dynamic update module further includes: A context-aware memory retrieval strategy unit is used to design a vector-based context-aware memory matching algorithm and dynamically match relevant memory units according to task requirements. The specific implementation process is as follows: (1) Utilize indexing techniques in the vector data lake to quickly retrieve memory vectors relevant to the current task; (2) Design a context-aware relevance scoring model to support accurate recall of memory units in complex multimodal environments; A comprehensive matching process is performed based on semantic, contextual, and task relevance scores, as shown below: ; in, Score the relevance to the context; , and The relevance scores are for semantic memory, episodic memory, and task vectors, respectively. , , They are respectively , and Corresponding weights; Semantic relevance Cosine similarity based on embedding vectors is shown below: ; in, Represents a semantic memory vector. Represents the query vector; The norm of a vector; Contextual relevance Combining time weights The similarity to episodic memory vectors is shown below: ; in, Represents a contextual memory vector; Indicates time weight; Task relevance The weighted similarity between the task vector and the memory vector is calculated using a multi-head attention mechanism.

6. The large model memory management and optimization system based on vector data lake according to claim 1, characterized in that, The memory optimization strategy based on reflection and backtracking mechanisms further includes: The dynamic knowledge optimization unit is used to simulate the human brain's reflection mechanism, periodically triggering the memory review and reconstruction process, and dynamically adjusting the representation of the memory vector through a knowledge reconstruction algorithm. The specific implementation process is as follows: (1) Regularly retrieve historical task data, analyze differences in task performance, and identify knowledge areas that need optimization; (2) The representation of the memory vector is dynamically adjusted through a knowledge reconstruction algorithm; The memory representation is optimized using a contrastive learning method, as shown below: ; in, and A positive sample vector; Negative samples; Indicates cosine similarity; This is a temperature parameter used to control the smoothness of the positive and negative sample distribution; This represents the contrastive learning loss function.

7. The large model memory management and optimization system based on vector data lake according to claim 1, characterized in that, The memory optimization strategy based on reflection and backtracking mechanisms further includes: The efficient knowledge transfer unit, which draws on the backtracking mechanism of the human brain, enables efficient knowledge transfer between tasks and constructs the optimal transfer path through semantic matching and vector comparison. The specific implementation process is as follows: (1) Quickly trace relevant knowledge and construct the optimal transfer path through semantic matching and vector comparison, as shown below: ; in, The similarity score represents the degree of knowledge transfer. Indicates cosine similarity; Vector representation of source knowledge; A vector representation of the target knowledge; (2) Construct a noise robustness module and introduce a noise shielding mechanism, as shown below: ; in, This represents the knowledge vector after noise reduction processing. Represents the original knowledge vector; For noise vectors, This represents the noise weight.

8. The large model memory management and optimization system based on vector data lake according to claim 1, characterized in that, The interactive evaluation and iterative adjustment optimization module evaluates memory performance and system performance through an interactive evaluation framework; Based on the evaluation results, the memory system is continuously optimized to form a closed-loop adjustment mechanism; the interactive evaluation and cyclic adjustment optimization module includes: Interactive memory assessment unit: Design memory assessment metrics based on task performance and retrieval efficiency, as shown below: ; in, The score indicates the performance on the task; This indicates the retrieval efficiency score; Weighting coefficients representing task performance; Weighting coefficients representing retrieval efficiency; This represents the overall performance index of the memory system; Closed-loop adjustment mechanism: The memory system architecture is dynamically adjusted based on the evaluation results, with the following optimization objectives: ; in, This represents the task performance loss function; This represents the storage cost loss function; This represents the memory update cost loss function; This represents the overall optimization objective loss function of the memory system.

9. A method for managing and optimizing the memory of a large model based on a vector data lake, applied to the large model memory management and optimization system based on a vector data lake as described in any one of claims 1-8, the specific process of which is as follows: Step S1: Construct a vector data lake; Step S11: Utilize the vector database to construct a vector data lake that supports large-scale memory storage and retrieval; Step S12: Optimize the retrieval performance of the memorized data through indexing technology; Step S2: Memory classification and management; Step S21, Contextual Memory: Use an autoencoder to embed and compress dynamic environmental data, and periodically clean up outdated memories; Step S22, Semantic Memory: Through knowledge embedding technology, long-term stable knowledge is stored as a high-dimensional vector, supporting cross-task reuse; Step S23, Working Memory: Combining the task relevance scoring mechanism, dynamically select high-priority memory units for immediate decision-making; Step S3: Memory optimization and update; Step S31: Periodically trigger the reflection mechanism to analyze task performance and memory usage, and optimize memory representation; Step S32: Introduce an environmental feedback model to dynamically adjust the memory storage and update strategy according to task requirements; Step S4: Memory assessment and cyclical adjustment; Step S41: Evaluate the memory performance of the agent in different task scenarios using an interactive memory evaluation framework; Step S42: Based on the evaluation results, adjust the memory system structure regularly to achieve self-evolution and continuous optimization of the memory system.