Bidirectional feedback driven large model dynamic memory regulation and control system and method

Through a two-way feedback-driven large-model dynamic memory control system, dynamic hierarchy and forgetting mechanism optimize the memory management of the large language model (LLM), the problem of lack of static memory structure and forgetting mechanism is solved, storage efficiency and task resolution capabilities are improved, and the adaptive optimization of the model is realized.

CN120387480APending Publication Date: 2025-07-29浣江实验室
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510344574.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The memory management of the existing large language model (LLM) has a static memory structure, a lack of dynamic hierarchy and feedback mechanism, which leads to the accumulation of redundant information and the loss of key information, lack of forgetting mechanisms, and the inability to effectively integrate the memory content of similar tasks, affecting the model's task-solving capabilities.

Method used

The big model dynamic memory control system driven by two-way feedback is adopted. Through the dynamic grading mechanism, forgetting mechanism, enhancement mechanism and extraction mechanism, the human memory consolidation mechanism is simulated, including dynamic grading, forgetting, enhancement and feedback regulation. The TinyBERT knowledge distillation technology and the LLM-driven text merging device are used to combine the latent semantic index model and search enhancement generation technology to achieve accurate retrieval and extraction of memory.

Benefits of technology

It significantly improves the storage efficiency and task resolution capabilities of the model, reduces redundant storage by more than 30%, improves the resolution speed of similar tasks by 20%, and increases the accuracy of the generation solution by 15%, supporting long-term adaptive optimization of the model in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387480A_ABST
    Figure CN120387480A_ABST
Patent Text Reader

Abstract

The invention discloses a bidirectional feedback-driven large-model dynamic memory regulation and control system and method, and the system comprises a router, a generator, an actuator and a memory system, and is optimized through four core mechanisms: 1) a dynamic grading mechanism: dividing memory grades based on timeliness, accuracy, repeatability and context consistency by using fuzzy comprehensive evaluation; 2) a forgetting mechanism: performing knowledge distillation compression on the low-priority memory by adopting TinyBERT, and clearing redundant data; 3) an enhancement mechanism: combining similar task memories through LLM to generate an optimized narrative text; and 4) extracting a mechanism, and accurately retrieving knowledge in combination with a potential semantic index and retrieval enhancement generation technology, realizing closed-loop regulation and control of task allocation, generation, execution and memory enhancement through bidirectional interaction of actuator feedback and a memory system, remarkably improving storage efficiency, task solving speed and long-term self-adaptive ability, and greatly improving the system performance. The method is suitable for complex scene optimization of a large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of artificial intelligence, and particularly relates to a large model dynamic memory regulation system and method driven by two-way feedback, which is especially applicable to the long-term memory management, task processing optimization, and self-adaptability enhancement of large language models (LLMs). Background Art

[0002] In the technical field of artificial intelligence, especially in the direction of long-term memory management of large language models (LLMs), there are the following problems in the memory management of artificial intelligence systems: Static memory structure, traditional memory systems lack dynamic hierarchical and feedback mechanisms, and cannot adjust memory weights according to task requirements, resulting in the accumulation of redundant information and the loss of key information. Lack of forgetting mechanism, existing methods mostly adopt simple deletion strategies and do not combine knowledge distillation technology, resulting in the loss of core information or low storage efficiency; Insufficient memory enhancement, lack of semantic-based active enhancement mechanism, unable to effectively integrate memory content of similar tasks, affecting the task-solving ability of the model. The above problems make it difficult for existing systems to simulate the memory consolidation mechanism of humans (such as the dynamic strengthening and selective forgetting of long-term memory), restricting the adaptability, storage efficiency, and task-solving ability of the model. Therefore, in view of the above problems, there is an urgent need for a technical solution that can simulate the human memory consolidation mechanism and support dynamic hierarchical, forgetting, enhancement, and feedback regulation. Summary of the Invention

[0003] To solve the above-mentioned problems of the prior art, the present invention provides a large model dynamic memory regulation system and method driven by two-way feedback, which has technical features such as being able to simulate the human memory consolidation mechanism and support dynamic hierarchical, forgetting, enhancement, and feedback regulation.

[0004] A large model dynamic memory regulation system driven by two-way feedback according to the present invention includes the following components:

[0005] 1) Router: Used to receive task input C M , and select the corresponding solution generator C according to the task type G ;

[0006] 2) Generator: Includes a solution generator and a narrative generator. The solution generator is used to generate task solutions C S , and the narrative generator is used to generate serialized narrative text S(K);

[0007] 3) Executor: Used to execute the generated task solutions and feedback the execution status T p ;

[0008] 4) Memory system: Includes a working memory subsystem and a long-term memory subsystem. The working memory subsystem is used to cache short-term memory, and the long-term memory subsystem is used to store long-term memory.

[0009] Preferably, the system adopts multi-mechanism operation, specifically including the following mechanisms:

[0010] Dynamic grading mechanism: used to grade and evaluate the memory data in the long-term memory system according to four indicators of timeliness, accuracy, repeatability, and context consistency, and divide it into four levels: very important, important, general, and unimportant;

[0011] Forgetting mechanism: Based on the TinyBERT knowledge distillation technology, compress memories of different levels to different degrees to reduce the storage burden;

[0012] Enhancement mechanism: Through the LLM-driven text combiner, merge and optimize the memory data of similar tasks to generate the enhanced narrative text S OS ;

[0013] Extraction mechanism: Combine the latent semantic indexing model and the retrieval-augmented generation technology to achieve precise retrieval and extraction of memory information.

[0014] Preferably, the dynamic grading mechanism is implemented through the following steps:

[0015] Step S1: Construct a factor set U = {u1, u2, u3, u4}, where u1 is timeliness, u2 is accuracy, u3 is repeatability, and u4 is context consistency;

[0016] Step S2: Construct an evaluation set V = {v1, v2, v3, v4}, where v1 is very important, v2 is important, v3 is general, and v4 is unimportant;

[0017] Step S3: Use the trapezoidal membership function to calculate the fuzzy relation matrix R of each group of memory data;

[0018] Step S4: Dynamically adjust the weight vector A based on the LLM, and calculate the comprehensive evaluation vector B through the fuzzy composition operator to determine the memory level.

[0019] Preferably, the generation method of the weight vector A includes:

[0020] Step S1: Define a fixed weight τ1 and a disposable weight τ2, satisfying τ1 + τ2 = 1;

[0021] Step S2: Analyze the state of the memory system based on the LLM, and dynamically allocate the disposable weight τ2 to the four indicators of timeliness, accuracy, repeatability, and context consistency to generate the final weight vector A.

[0022] Preferably, the forgetting mechanism is implemented through the following steps:

[0023] Step S1: Use the TinyBERT model for knowledge distillation. Based on the memory classification results, compress the narrative text according to different compression ratios to generate a compressed narrative text S C , so as to reduce the storage burden and improve the system operation efficiency;

[0024] Step S2: When the amount of memory data in the long-term memory system reaches a custom threshold, trigger the memory clearing mechanism to clear the memory data classified as unimportant.

[0025] Preferably, the enhancement mechanism is implemented through the following steps:

[0026] Step S1: When the task status T of the new memory information p = 1, based on the input task C M , retrieve whether there are similar or identical elements in the long-term memory system;

[0027] Step S2: If similar memories are retrieved, use the LLM-driven text merger to merge and optimize the similar memory narrative text S SC and the compressed narrative text S C to generate an enhanced narrative text S OS ;

[0028] The formula for the merging and optimization is:

[0029] S OS = αS SC + βS C (α + β ≤ 1)

[0030] where α and β are text synthesis ratio coefficients, dynamically determined by the LLM.

[0031] Preferably, the extraction mechanism is implemented through the following steps:

[0032] Step S1: Use the Latent Semantic Indexing (LSI) model to preprocess the memory information and generate a low-dimensional vector representation of the text;

[0033] Step S2: Based on the Retrieval-Augmented Generation (RAG) technology, retrieve similar memories in the forward generation to trigger the enhancement mechanism, and extract the narrative text of the dual memory system as a prompt word in the reverse feedback to optimize the task generation ability.

[0034] A method for dynamic memory regulation of a large model driven by bidirectional feedback according to the present invention is characterized in that the method includes the following steps:

[0035] Step S1: Receive the task input C M , and allocate it to the corresponding solution generator C G through a router to generate a task solution C s ;

[0036] Step S2: Use a narrative generator to generate serialized narrative text S(K), and construct short-term memory tuples, which are stored in the working memory system;

[0037] Step S3: When the working memory system reaches its capacity limit, the working system will transfer memories and store them in the long-term memory system;

[0038] Step S4: Dynamically classify the memories in the long-term memory system into four levels: very important, important, general, and unimportant;

[0039] Step S5: Based on the memory classification results and the forgetting mechanism, different levels of memories are forgotten to different extents;

[0040] Step S6: When the amount of long-term memory data reaches the threshold, trigger the clearing mechanism in the forgetting mechanism to clear the memory data classified as unimportant;

[0041] Step S7: When the task status T p = 1 of the new memory information, trigger the enhancement mechanism to merge and optimize similar memory data;

[0042] Step S8: Through the Latent Semantic Indexing (LSI) model and Retrieval-Augmented Generation (RAG) technology, extract the narrative text of the dual memory system and feed it back to the router and generator as a prompt to optimize subsequent task processing.

[0043] Beneficial effects: 1) The two-way feedback-driven dynamic memory regulation system and method proposed in the present invention significantly improve the memory management and task processing capabilities of the artificial intelligence system through the following technological innovations:

[0044] Simulate the human memory consolidation mechanism: Through the dynamic classification mechanism, memories are classified (very important / important / general / unimportant) according to timeliness, accuracy, repeatability, and context consistency, realizing dynamic adjustment of memory weights, reducing redundant storage, and preventing key information loss. Combining the forgetting mechanism of knowledge distillation technology (such as TinyBERT), semantic compression and selective clearing of low-priority memories are performed, significantly reducing the storage burden.

[0045] Task processing optimization: The enhancement mechanism actively integrates the memory content of similar tasks through an LLM-driven text merger to generate an optimized enhanced narrative text, improving the model's generalization ability for complex tasks. The extraction mechanism (Latent Semantic Indexing LSI + Retrieval-Augmented Generation RAG) realizes precise retrieval of memories and cross-task knowledge reuse, improving the quality and efficiency of the generation scheme.

[0046] Closed-loop feedback and self-adaptability improvement: The real-time state feedback of the actuator and the long-term data of the memory system form a two-way interaction, dynamically optimizing the router task allocation logic and the generator output strategy.

[0047] The collaborative mechanism between working memory and long-term memory (such as short-term cache transfer and long-term experience reuse) enables the system to dynamically adjust resource allocation according to task requirements, realizing a closed-loop of "experience accumulation - feedback optimization - task enhancement";

[0048] 2) Practical application advantages:

[0049] Storage efficiency: Knowledge distillation and dynamic grading reduce redundant storage occupancy by more than 30%.

[0050] Task-solving ability: The enhancement mechanism improves the solution speed of similar tasks by 20% and the accuracy of the generated solutions by 15%.

[0051] Long-term adaptability: The closed-loop feedback mechanism supports the model to self-optimize in continuous tasks, avoiding the performance degradation problem of traditional static systems.

[0052] 3) The present invention has technical features such as being able to simulate the human memory consolidation mechanism, supporting dynamic grading, forgetting, enhancement, and feedback regulation, providing the artificial intelligence system with human-like dynamic memory management capabilities, and significantly improving its long-term learning, task generalization, and adaptive optimization levels in complex scenarios. Brief description of the drawings

[0053] Figure 1 is the system architecture diagram of the present invention.

[0054] Figure 2 is the flowchart of the memory grading mechanism of the present invention.

[0055] Figure 3 is the flowchart of the memory forgetting mechanism of the present invention.

[0056] Figure 4 is the flowchart of the memory enhancement mechanism of the present invention.

[0057] Figure 5 is the flowchart of the memory extraction mechanism of the present invention. Detailed implementation manners

[0058] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the attached Figures 1-5 , it is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0059] The present invention achieves closed-loop optimization through the following core components and mechanisms:

[0060] System architecture: It includes a router, generators (solution generator and narrative generator), an executor, and a memory system (working memory and long-term memory).

[0061] 1) As the entry point of the system, the router is responsible for receiving task inputs from the outside. According to the specific type of the task, the router directs the task input to the corresponding generator component.

[0062] Router input: Receive task inputs.

[0063] Router output: According to the task type, pass the task input to the solution generator or the narrative generator.

[0064] 2) Generators: It includes a solution generator and a narrative generator. Input of the solution generator: Receive the task input that needs to generate a solution from the router. Output of the solution generator: The generated task solution is passed to the executor. Function definition of the solution generator: Generate executable solutions for tasks that require specific operations (such as troubleshooting, process design).

[0065] One composition and working mechanism of the solution generator: Input: Task description and context information from the router. Output: Structured solutions (such as code scripts, operation flowcharts, etc. as inputs).

[0066] Core module of the solution generator: Logic inference engine. For example, parse task requirements and break down steps based on large models (such as GPT-4). Memory retrieval interface of the solution generator: Call similar cases (such as historical successful solutions, etc.) from long-term memory.

[0067] Input of the narrative generator: Receive the task input that needs to generate serialized narrative text from the router. Output of the narrative generator: The generated narrative text may be directly output or passed to other components according to system requirements (such as the memory system for storage, or the executor for performing related narrative tasks, depending on the system design).

[0068] One composition and working mechanism of the narrative generator: Input: Task description from the router or result data from the executor.

[0069] Core module of the narrative generator: Template engine, such as predefined narrative structures (such as "problem - analysis - conclusion" framework). Semantic enhancer: Use LLM to polish the text to ensure coherence and readability. Output: Serialized text (in formats such as JSON, Markdown, etc.).

[0070] 3) The executor is responsible for executing the task solutions generated by the solution generator and providing feedback on the execution status.

[0071] Input of the executor: Receive task solutions from the solution generator.

[0072] Output of the executor: State feedback after executing the solution, which can be passed to the router (for subsequent task scheduling or optimization) or directly to the memory system (for recording the execution history). Function definition of the executor: Execute the task solutions output by the solution generator and provide real-time feedback on the execution status to form a closed-loop feedback.

[0073] One composition and working mechanism of the executor: Input: Executable instructions from the solution generator (such as API calls, scripts). Core module of the executor: Execution engine: Call corresponding interfaces according to the solution type (such as Kubernetes API, database operations). Status monitoring of the executor: Record execution logs (success / failure, elapsed time, resource consumption).

[0074] Feedback paths of the executor: 1) Direct feedback: Return the status to the router, affecting subsequent task allocation. 2) Indirect feedback: Store the logs in the working memory for analysis by the memory system.

[0075] 4) Memory system: In this application, the memory system is a modular component that simulates the hierarchical management mechanism of human memory, responsible for storing, organizing, compressing, and retrieving task-related information. It realizes the coordinated operation of short-term and long-term memories through dynamic grading, forgetting, enhancement, and extraction mechanisms to support the large model in efficiently processing complex tasks. The memory system includes a working memory subsystem and a long-term memory subsystem. Working memory subsystem: Similar to human short-term memory, it quickly caches key information of the current task (such as dialogue context, temporary parameters), with limited capacity but rapid response. Long-term memory subsystem: Similar to human long-term memory, it stores screened core knowledge (such as historical task solutions, general rules), with large capacity but requires retrieval and invocation.

[0076] Functions of the working memory subsystem: Short-term caching: Temporarily store dynamic data during task execution (such as the current dialogue state, executor feedback logs). Quick response: Support real-time interaction and avoid delays caused by frequent access to the long-term memory. Data transfer: Screen and transfer important information to the long-term memory subsystem.

[0077] Input of the working memory subsystem: May receive execution status feedback from the executor, solution summaries from the solution generator, key narrative points from the narrative generator, etc. (depending on the system design). Output of the working memory subsystem: Short-term memory information can be passed to the long-term memory subsystem for long-term storage or directly output according to system requirements.

[0078] Long-term Memory Subsystem Functions: Long-term Storage: Archive the history of important tasks (such as verified solutions, typical narrative templates). Dynamic Grading: Prioritize memories according to indicators such as timeliness and accuracy (very important → unimportant). Knowledge Reuse: Provide experience support for subsequent tasks through Retrieval-Augmented Generation (RAG) technology.

[0079] Inputs to the Long-term Memory Subsystem: Receive information that needs to be stored long-term from the Working Memory Subsystem. Outputs of the Long-term Memory Subsystem: Store long-term memory information and provide retrieval and output services according to system requirements.

[0080] Overall Connection Logic of the Present Invention:

[0081] 1. Task Input: External task inputs first arrive at the router.

[0082] 2. Task Allocation: The router allocates the task input to the corresponding generator (solution generator or narrative generator) according to the task type.

[0083] 3. Solution / Narrative Text Generation: The generator generates the corresponding solution or narrative text based on the task input.

[0084] 4. Execution and Feedback: The executor receives and executes the solution and simultaneously provides feedback on the execution status.

[0085] 5. Memory Storage: The memory system (especially the Working Memory Subsystem) receives and caches short-term memory information and transfers it to the Long-term Memory Subsystem for long-term storage as needed.

[0086] 6. Two-way Feedback: The execution status and memory information can be fed back to the system through the router or other mechanisms to optimize subsequent task processing and memory regulation.

[0087] The dynamic nature and two-way feedback capabilities of the system of the present invention enable the system to be flexibly adjusted and optimized according to task requirements and execution status.

[0088] Two-way feedback specifically includes: forward generation process, reverse feedback process;

[0089] Among them, the forward generation process: After the task input, the router allocates it to the corresponding generator to generate a solution, constructs a coherent memory in combination with the narrative generator, and stores it in the working memory system. After reaching the capacity limit of the working memory system, the memory enters the long-term working system, and the memory is graded, forgotten, and enhanced.

[0090] Reverse feedback process: Through the Retrieval-Augmented Generation (RAG) technology based on Latent Semantic Indexing (LSI), synchronously extract information from the dual memory systems, optimize the task generation ability, and form a self-loop of "generate → apply → evaluate → update".

[0091] The dynamic memory mechanism of the present invention is designed as follows:

[0092] Hierarchical mechanism: Based on the dynamic weight allocation of fuzzy mathematics and LLM, a four-level evaluation (very important / important / general / unimportant) is carried out on the timeliness, accuracy, repeatability, and context consistency of memory.

[0093] Forgetting mechanism: The TinyBERT knowledge distillation technology is adopted to compress memory information to different degrees according to the memory level.

[0094] Enhancement mechanism: Similar task memories are merged through LLM to generate more comprehensive narrative texts and solutions.

[0095] Extraction mechanism: Memory extraction is realized based on the Latent Semantic Indexing (LSI) model.

[0096] The innovation points of the present invention are as follows:

[0097] Closed-loop bidirectional feedback: Through the coordination of forward generation and reverse feedback, the dynamic optimization of the memory system and task processing ability is realized.

[0098] Dynamic weight allocation: Based on LLM, the weights of memory evaluation indicators are adjusted in real time to adaptively optimize the knowledge architecture.

[0099] Knowledge distillation forgetting: Memories of different levels are compressed at different compression ratios, taking into account both storage efficiency and the retention of core information.

[0100] Psychological theory mapping: Simulating the interaction mechanism of the human hippocampus-neocortex layer and the Tulving encoding specificity principle to enhance the biological rationality of the memory system.

[0101] Example 1:

[0102] A specific embodiment of a large model dynamic memory regulation method driven by bidirectional feedback, which includes the following steps:

[0103] Step 1: Task input and routing allocation. Input task text C M to the router, and select the solution generator C G according to the task type to generate the solution C S , and construct the element tuple K = <C M , C G , C S >.

[0104] Step 2: Narrative memory generation. The narrative generator generates the serialized narrative text S(K) based on the element tuple K, which consists of the timestamp T t , whether the task is executed T p , and the number of memory enhancement times T rThe number of consistencies T with the previous text c constitutes the state tuple I, where the time stamp T t is used to record the memory generation time; whether the task is executed T p is used to reflect the accuracy of the memory generation content, with a value of 0 representing not executed and 1 representing executed; the number of memory enhancements T r is used to reflect the repetition of memory information. Memory enhancement is not performed in the working memory system, and the default value is 0; the number of consistencies T with the previous text c is used to represent the relevance of the task. If the same scenario generator is called as the previous memory information, it is considered task-related. If multiple consecutive groups of memory information are related, the number of consistencies with the previous text is accumulated. Combining the state tuple I = <T t , T p , T r , T c >, construct the short-term memory tuple M S = <K, S(K), I> and store it in the working memory system W S .

[0105] Step 3: Long-term data generation. There is an upper limit n for the short-term memory data in the working memory system, that is, only n groups of short-term memory data are retained and stored in a queue form. When the cache upper limit is reached, every time new memory information enters the working memory system, a group of old memory data will leave the working memory system and enter the long-term working system, and memory classification, forgetting, and enhancement will be performed.

[0106] Step 4: Memory classification and dynamic adjustment. The memory classification mechanism uses a comprehensive evaluation method based on fuzzy mathematics and LLM to dynamically classify and evaluate the long-term memory cache data in the long-term memory system, and according to the real-time analysis of the memory system state, uses LLM to dynamically adjust the weight vector of the factor set, and focuses on optimizing the memory classification system of the memory system, so as to achieve the purpose of optimizing the information focus of the memory system and making the memory system learn to adaptively adjust according to the knowledge structure of the usage requirements.

[0107] The factor set U of the memory classification evaluation = {u1, u2, u3, u4}, where u1 represents timeliness, u2 represents accuracy, u3 represents repeatability, u4 represents context consistency; the evaluation set V = {v1, v2, v3, v4}, v1 means very important, v2 means important, v3 means general, v4 means unimportant. To unify the scales of different factors, each factor needs to be normalized so that the values of each factor are mapped to [0,1].

[0108] To ensure the flexibility, adaptability, stability, and reliability of the fuzzy evaluation model, trapezoidal membership functions are used to describe the membership degrees of each factor to different evaluation levels, and multi-segment fuzzy concepts are processed. Define three fuzzy membership degree threshold parameters As an external parameter and satisfying where represents a higher threshold value for dividing the boundary between the "very important" and "important" high-importance degree evaluations; represents a middle threshold value for dividing the boundary between the "important" and "general" medium-importance degree evaluations; represents a lower threshold value for dividing the boundary between the "general" and "unimportant" low-importance degree evaluations. Based on the fuzzy membership threshold parameters, membership functions for different evaluation levels can be constructed.

[0109] For the evaluation of "very important (v1)", there is a membership function:

[0110]

[0111] For the evaluation of "important (v2)", there is a membership function:

[0112]

[0113] For the evaluation of "general (v3)", there is a membership function:

[0114]

[0115] For the evaluation of "unimportant (v4)", there is a membership function:

[0116]

[0117] To achieve the adaptive dynamic adjustment of the factor set weight vector, an LLM is used to monitor the memory information state of the memory system and generate the weight vector. Define the fixed weight as τ1 and the disposable weight τ2, and the two satisfy the condition τ1 + τ2 = 1. Based on the fixed weight ρ, an initial weight vector A can be generated:

[0118]

[0119] The LLM analyzes how to adjust the knowledge architecture of the memory system and the emphasis of factor weights according to the state of the memory system. Sort the memory information in descending order based on the time stamp, calculate the difference in time stamps of each group of memory information. If the difference in time stamps between the latest memory information and the second-ranked memory information is large, it indicates that no new information has entered the memory system for a long time, and the newly entered information has high representativeness. Therefore, more emphasis should be placed on the timing index. If the task execution status T in multiple consecutive groups of memory information pWhen it is 0, it indicates that the pre - content generation component has generated incorrect or user - requirement - non - compliant solutions multiple times. The memory information carrying accurate solutions should be emphasized to help the pre - content generation component generate correct solutions. Therefore, more emphasis should be placed on the accuracy index of the memory. If the number of times of the latest memory enhancement is large, it indicates that this memory is highly representative in the executed tasks and more attention should be given. Therefore, more emphasis should be placed on the repeatability index of the memory. If the value of the upper - context consistency times T c of c is high, it indicates that the task being executed has high coherence. It is necessary to increase the importance of this type of memory to assist in subsequent solution generation. Therefore, more emphasis should be placed on the context - consistency index of the memory.

[0120] In the above factors' weight - emphasis bases, there are vague definitions such as "large difference", "continuous multiple groups", "large number of times", and "high value" that are difficult to quantitatively evaluate. This type of fuzzy emphasis - allocation problem can be solved using an LLM with the emphasis basis as background knowledge. By analyzing the state of the memory system, determine the emphasis of the current memory system on the hierarchical evaluation of memory information, dynamically allocate the disposable weight τ, and generate the final dynamic weight vector A′ of this memory - grading mechanism:

[0121]

[0122] Use the algebraic product as the fuzzy - composition operator to obtain the evaluation vector of each memory in the long - term memory system and get the evaluation result.

[0123] Step 5: Memory forgetting. The memory - forgetting mechanism realizes the forgetting of memory information based on the knowledge - distillation technology of TinyBERT. This mechanism simulates the forgetting characteristics of human memory, dynamically adjusts the retention degree of memory according to the importance rating of each group of memory information. When the amount of memory data in the long - term memory system reaches the threshold q, the memory - clearing mechanism is triggered, and the memory information graded as "unimportant" will be completely forgotten and cleared.

[0124] Step 6: Memory enhancement. Every time a new group of memory information enters the long - term memory system, the system will judge whether the task of this group of memory information is executed T p If T p = 0, that is, the task is not executed, this type of memory is not enhanced. If T p = 1, that is, the task is executed, then based on the task text C M in the element tuple K, memory extraction is performed on each group of memory data with T p = 1 in the long - term memory system to find whether there are similar or identical elements in the stored memory information. If similar or identical memory elements are extracted, the narrative texts in the two groups of memory information are merged using an LLM.

[0125] Step 7: Applying Backward Feedback: By extracting memories based on the Latent Semantic Indexing (LSI) model and using Retrieval-Augmented Generation (RAG) technology, the narrative text is fed back to the router and generator as prompts to optimize subsequent task processing.

[0126] Finally, it should be noted that the present invention is not limited to the above embodiments and may be subject to many variations. All variations that can be directly derived or imagined by a person skilled in the art from the disclosure of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A large model dynamic memory regulation system driven by two-way feedback, characterized in that The system includes the following components: 1) Router: used to receive task input C M , and select the corresponding solution generator C according to the task type G ; 2) Generator: including a solution generator and a narrative generator, where the solution generator is used to generate task solution C S , and the narrative generator is used to generate serialized narrative text S(K); 3) Actuator: used to execute the generated task solution and feedback the execution status T p ; 4) Memory system: including a working memory subsystem and a long-term memory subsystem. The working memory subsystem is used to cache short-term memories, and the long-term memory subsystem is used to store long-term memories.

2. The dynamic memory regulation system of a large model driven by two-way feedback according to claim 1, characterized in that The system adopts multi-mechanism operations, specifically including the following mechanisms: Dynamic grading mechanism: used to grade and evaluate the memory data in the long-term memory system according to four indicators: timeliness, accuracy, repeatability, and context consistency, and divide them into four levels: very important, important, general, and unimportant; Forgetting mechanism: Based on the TinyBERT knowledge distillation technology, compress memories of different levels to different degrees to reduce the storage burden; Enhancement mechanism: Through an LLM-driven text merger, the memory data of similar tasks is merged and optimized to generate the enhanced narrative text S OS ; Extraction mechanism: Combine the latent semantic indexing model and the retrieval-augmented generation technology to achieve precise retrieval and extraction of memory information.

3. A dynamic memory regulation system for a large model driven by two-way feedback according to claim 2, characterized in that, The dynamic grading mechanism is implemented through the following steps: Step S1: Construct a factor set U = {u1, u2, u3, u4}, where u1 is timeliness, u2 is accuracy, u3 is repeatability, and u4 is context consistency; Step S2: Construct an evaluation set V = {v1, v2, v3, v4}, where v1 is very important, v2 is important, v3 is general, and v4 is unimportant; Step S3: Use the trapezoidal membership function to calculate the fuzzy relation matrix R of each group of memory data; Step S4: Dynamically adjust the weight vector A based on the LLM, and calculate the comprehensive evaluation vector B through the fuzzy composition operator to determine the memory level.

4. A large model dynamic memory regulation system with two-way feedback drive according to claim 2 or 3, characterized in that, The generation method of the weight vector A includes: Step S1: Define a fixed weight τ1 and a disposable weight τ2, satisfying τ1 + τ2 = 1; Step S2: Analyze the state of the memory system based on the LLM, and dynamically allocate the disposable weight τ2 to the four indicators of timeliness, accuracy, repeatability, and context consistency to generate the final weight vector A.

5. A large model dynamic memory regulation system driven by two-way feedback according to claim 2, characterized in that, The forgetting mechanism is implemented through the following steps: Step S1: Use the TinyBERT model for knowledge distillation. Based on the memory grading results, compress the narrative text according to different compression ratios to generate the compressed narrative text S C , so as to reduce the storage burden and improve the system operation efficiency; Step S2: When the amount of memory data in the long-term memory system reaches the custom threshold, trigger the memory clearing mechanism to clear the memory data classified as unimportant.

6. The dynamic memory regulation system of the large model driven by bidirectional feedback according to claim 2, characterized in that The enhancement mechanism is implemented through the following steps: Step S1: When the task status T of the new memory information p = 1, based on the input task C M , retrieve whether there are similar or identical elements in the long-term memory system; Step S2: If similar memories are retrieved, use an LLM-driven text merger to merge and optimize the similar memory narrative text S SC and the compressed narrative text S C to generate an enhanced narrative text S OS ; The formula for the merge and optimization is: S OS = αS SC + βS C (α + β ≤ 1) where α and β are text synthesis ratio coefficients, which are dynamically determined by the LLM.

7. A dynamic memory regulation system for a large model driven by two-way feedback according to claim 2, characterized in that The extraction mechanism is implemented through the following steps: Step S1: Use the latent semantic indexing model to preprocess the memory information and generate a low-dimensional vector representation of the text; [[ID= 8. A method for dynamic memory regulation of a large model driven by two-way feedback, characterized in that ​ Step S1: Receive task input C M , and allocate it to the corresponding solution generator C through the router G to generate a task solution C s ; ​ ​ ​ ​ Step S6: When the long-term memory data volume reaches the threshold, trigger the clearing mechanism in the forgetting mechanism to clear the memory data classified as unimportant; Step S7: When the task status T of the new memory information p = 1, trigger the enhancement mechanism to merge and optimize similar memory data; Step S8: Through the latent semantic indexing model and retrieval-augmented generation technology, extract the narrative text of the dual memory system as a prompt and feedback it to the router and generator to optimize subsequent task processing.

Citation Information

Cited By

  • Automatic memory management method based on context awareness and hierarchical routing

    CN121092650A

  • Memory operation processing method and system based on natural language instruction

    CN121684013A

  • Knowledge index and text generation control method and system for retrieval enhancement generation

    CN121765029A

  • Retrieval enhanced generated knowledge index and text generation control method and system

    CN121765029B