A large model intelligent agent memory construction method and memory system

CN121638303BActive Publication Date: 2026-10-30NANJING YINGQI INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511786572.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-10-30
Estimated Expiration
2045-12-01

AI Technical Summary

Technical Problem

[0003]发明目的:本发明的目的是提供一种大模型智能体记忆构建方法及记忆系统,解决大模型智能体记忆系统在长时交互过程中上下文遗忘、知识冗余、记忆混乱及适配性不足等问题

Benefits of technology

[0016]有益效果:本发明具有如下优点:1、本发明通过预设的模板,可实现记忆结构的标准化定义和多粒度组织,能够根据不同场景快速生成任务定制化的记忆模板,从而降低开发与部署成本,提高记忆构建的效率和准确度;2、结合引入智能体作为核心驱动单元,承担记忆的调度、管理与演化更新的关键角色,不仅能够根据场景需求灵活调用模板和工具/方法,还能对外部输入进行分析和上下文感知,进而触发记忆的抽取、存储、更新与检索等操作;3、通过策略化、模块化的可配置工作流框架,用户可以仅通过参数配置实现记忆流程的灵活组合和跨场景切换,减少系统迁移的成本并提高跨领域适应能力;4、同采用模块化、低耦合设计,可便捷地集成至各类智能体应用,在上下文连续交互、个性化推荐、生理指标追踪等场景中,为用户提供“老友式”的连贯与个性化体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638303B_ABST
    Figure CN121638303B_ABST
Patent Text Reader

Abstract

The application discloses a large model intelligent agent memory construction method and a memory system, comprising the following steps: using a large model intelligent agent to abstract the structure according to a preset memory template based on historical environment information, constructing a plurality of templated memory units, and storing them in a persistent library; based on the persistent library, the large model intelligent agent performs identity matching and intent understanding on the current input message of a user, dynamically plans an execution demand list according to the intent type, thereby calling an external tool chain to perform memory unit retrieval and calculation, generating an execution scheme according to the retrieval and calculation results, and updating and adding memory units in the persistent library according to the current input message and the calculation results. The application solves the problems of context forgetting, knowledge redundancy, memory confusion and insufficient adaptability of the large model intelligent agent memory system in the long-time interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method and system for constructing memory for a large-scale intelligent agent. Background Technology

[0002] Existing research on large-scale model memory systems has achieved certain results in system design, strategy management, and engineering implementation. However, in large-scale, cross-domain, and multi-scenario real-world applications, memory systems still have prominent problems. First, existing memory construction and organization methods are mostly based on fixed architectures, lacking templated abstraction layers oriented towards specific business objects and task forms. This makes it difficult to achieve rapid adaptation to different scenarios, often resulting in a mismatch between memory granularity and organizational depth and actual needs. Second, memory update and retention mechanisms remain simplistic, mainly relying on simple addition, overwriting, or similarity-based deduplication strategies. They lack agent-driven mechanisms, making it difficult to handle conflicting, obsolete, or noisy memories in a timely manner, easily leading to redundancy accumulation and a decline in overall effectiveness. Finally, workflow design is generally geared towards single-task scenarios. Process orchestration, scheduling strategies, and triggering conditions are highly coupled with specific domains, resulting in high costs for cross-scenario migration and reuse, and making it impossible to achieve flexible combination and rapid switching solely through configuration. Summary of the Invention

[0003] Purpose of the invention: The purpose of this invention is to provide a method and system for constructing memory for large-scale intelligent agents, which solves the problems of contextual forgetting, knowledge redundancy, memory confusion and insufficient adaptability in the long-term interaction process of large-scale intelligent agent memory systems.

[0004] Technical solution: To achieve the above objectives, the present invention provides a method for constructing memory of a large model intelligent agent, comprising: using a large model intelligent agent to perform structural abstraction of historical environmental information according to a preset memory template, constructing several templated memory units, and storing them in a persistent library;

[0005] Based on the persistent library, the large model agent performs identity matching and intent understanding on the message currently input by the user, and dynamically plans the list of execution requirements according to the intent type. It then calls the external toolchain to retrieve and calculate memory units, generates an execution plan based on the retrieval and calculation results, and updates or adds memory units to the persistent library according to the current input message and calculation results.

[0006] Preferably, the environmental information includes user input or externally pushed information, which is processed into memory units by a large model agent in the order of receipt.

[0007] Preferably, the memory template is a predefined, structured framework that includes data name, data type, data description and logical relationship between them in terms of data format, and can be divided into personal information and domain information in terms of information dimension.

[0008] Preferably, the structural abstraction process includes: the large model agent, guided by the constraints in the memory template, actively extracts and fills relevant semantic information from the environmental information to form a series of memory units. The memory units contain structured data instances of metadata such as identity information associated with a specific user account, original information, key information extracted under the guidance of constraints, and timestamps.

[0009] Preferably, the large model agent extracts personal information and intent information from the user's current input message according to a preset memory template, and matches the user account with the identity information of the memory unit in the persistent library to determine the current user's identity.

[0010] Preferably, the large model agent first determines the type of intent, and then determines the external tool / method to be called based on the intent type before proceeding with execution; if it is a complex intent, the intent is first decomposed to generate several sub-intent tasks, and then the external tool / method to be called is determined based on the type of the sub-intent tasks before proceeding with execution.

[0011] Preferably, the intent type includes query, save, update, and multi-step solution; if the intent is query, then plan the information requirement list and call the toolchain for retrieval and calculation; if the intent is save, then perform structural abstraction according to the preset memory template, construct memory units, and store them in the persistent library; if the intent is update, then locate the old information in the memory unit and replace it; if the intent is multi-step solution, then load the snapshot before intent configuration, initialize and verify the subtask graph, generate the snapshot after configuration, and execute according to the snapshot order.

[0012] Preferably, the determination of the external tools / methods to be invoked includes: first planning the user's "information needs list" according to the intent type, and then determining whether it is necessary to obtain the user's historical personal information and domain information, as well as the invocation of external tools / methods, based on the "information needs list".

[0013] The present invention discloses a large model intelligent agent memory system, comprising: a memory construction module, a persistent library, and a memory retrieval and evolution module; the memory construction module comprises: an environmental information receiving port, a first large model intelligent agent, and a memory template library; the information receiving port receives environmental information; the first large model intelligent agent performs structural abstraction on the environmental information according to the preset memory templates in the memory template library, constructs several templated memory units, and stores them in the persistent library;

[0014] The memory retrieval and evolution module includes: a user information receiving port, an identity and intent recognition unit, an agent method invocation unit, and an execution feedback port. The user information receiving port receives the user's current input message. The identity and intent recognition unit parses the current input message, confirms the user's identity and obtains the user's intent, and requests the agent method invocation unit to execute it. The agent method invocation unit displays the execution result to the user through the execution feedback port.

[0015] Preferably, the intelligent agent method invocation unit includes: a base model, a method library, an engine library, and a plan library; the base model receives user intent and retrieves relevant memory units from the persistent library according to the user's identity, assembles them into a first-round prompt, and sends it to the engine library; the engine library determines the task type and the tools / methods required to execute the task based on the first-round prompt, and calls the plan library or method library to execute it; the method library includes: stored memory and evolutionary memory; the plan library includes: reflection / thought chain and problem decomposition.

[0016] Beneficial Effects: This invention has the following advantages: 1. Through preset templates, this invention can achieve standardized definition and multi-granularity organization of memory structures, and can quickly generate task-customized memory templates according to different scenarios, thereby reducing development and deployment costs and improving the efficiency and accuracy of memory construction; 2. By introducing intelligent agents as the core driving unit, which play a key role in the scheduling, management, and evolution and updating of memory, it can not only flexibly call templates and tools / methods according to scenario requirements, but also analyze external inputs and be context-aware, thereby triggering operations such as memory extraction, storage, updating, and retrieval; 3. Through a strategic and modular configurable workflow framework, users can achieve flexible combination and cross-scenario switching of memory processes simply by configuring parameters, reducing the cost of system migration and improving cross-domain adaptability; 4. Adopting a modular and loosely coupled design, it can be easily integrated into various intelligent agent applications, providing users with a "friend-like" coherent and personalized experience in scenarios such as continuous contextual interaction, personalized recommendation, and physiological indicator tracking. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0018] Figure 2 This is a schematic diagram of the system framework of the present invention. Detailed Implementation

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

[0020] like Figure 1 As shown, this invention provides a method for constructing the memory of a large-scale intelligent agent, including the following:

[0021] First, using a large model intelligent agent, the historical environmental information is structurally abstracted according to a preset memory template, and several templated memory units are constructed and stored in a persistent library.

[0022] The environmental information includes user input or external push information, which is processed into memory units in the order received by the large model agent.

[0023] In this section, the large model intelligent agent is an intelligent agent that can autonomously perceive, invoke tools, make decisions, and execute. It can intelligently extract and structure unstructured environmental information based on a preset memory template.

[0024] A memory template is a predefined, structured framework that includes data names, data types, data descriptions, and logical relationships between them in terms of data format. In terms of information dimensions, it can be divided into personal information, domain information, etc. The data format and domain information of a memory template can be adapted to different scenarios, exhibiting a certain degree of generalization.

[0025] In this embodiment, the user ID u123 inputs the message "My name is Zhang San, and my recent weight is 75kg" as an example. The data format extracted according to the memory template is shown in Table 1:

[0026] The structural abstraction process includes: guided by constraints (such as data format) in the memory template, the large model agent actively extracts and fills relevant semantic information from the environmental information to form a series of memory units.

[0027] A memory unit is a knowledge carrier formed by using a large model intelligent agent to perform structural abstraction of environmental information. It contains structured data instances of metadata such as identity information associated with a specific user account, original information, key information extracted under constraints, and timestamps, and is persistently stored in a database.

[0028] II. Based on the persistent storage library, the large-scale intelligent agent performs identity matching and intent understanding on the user's current input message, and dynamically plans the execution requirement list according to the intent type. This involves calling an external toolchain to retrieve and compute memory units, generating an execution plan based on the retrieval and calculation results, and outputting the execution plan as natural language feedback to the user. Simultaneously, the persistent storage library's memory units are updated and updated based on the current input message and computation results. Specifically, this includes the following processes:

[0029] 1. The large model intelligent agent extracts personal information and intent information from the user's current input message based on a preset memory template.

[0030] For example, user ID u123 inputs the message "I am 175mm tall and my recent weight is 85kg. Do I need to adjust my diet?". Personal information: height 175mm / weight 85kg, intent information: do I need to adjust my diet?

[0031] The large model agent matches the user account with the identity information of the memory unit in the persistent library to determine the current user's identity, such as the identity of user ID u123 being Zhang San.

[0032] 2. The large model agent first determines the type of intent, and then, based on the intent type, determines the external tool / method to be invoked before execution. If it is a complex intent, it first decomposes the intent into several sub-intent tasks, and then, based on the type of the sub-intent tasks, determines the external tool / method to be invoked before execution.

[0033] Intent type determination: The large model agent determines the type of intent based on the semantics and instructions of the current input message. Intent types include query, save, update, multi-step solution, etc. Instructions can be understood as the actions or expected results that the user input requires the agent to perform. Taking the intent information "Do I need to make dietary adjustments?" as an example, the intent type is "query".

[0034] Determining when to call external tools / methods: Based on the intent type, first plan the user's "information needs list." Then, based on this list, determine whether it's necessary to obtain the user's historical personal and domain information, and whether to call external tools / methods (if historical personal and domain information is needed, a retrieval method needs to be called to retrieve persistent memory units related to the user). Taking user ID u123 as an example, the "information needs list" includes: Personal information: Zhang San's historical health data (e.g., weight); Retrieval method: Retrieve memory units; Domain information: Standards for judging whether weight is healthy (e.g., BMI calculation formula and standard range); Tool: BMI calculator.

[0035] The external tools / methods called by the large model agent are stored in the method library, such as unit conversion, BMI value calculation, persistent library query, etc. They are called according to the registered toolchain and the generated results after the call are merged into the candidate set. Finally, the large model agent generates an execution plan based on the contents of the candidate set and outputs the execution plan as natural language feedback to the user.

[0036] Taking user ID u123 as an example, the execution method is generated as follows: "Based on the data you provided, your current body mass index (BMI) is 27.76, which is overweight according to health standards. It is recommended that you start making some dietary adjustments, such as appropriately reducing the intake of high-calorie foods and increasing the proportion of vegetables and protein."

[0037] The intended decomposition method is to read the configured node information to automatically generate the task call flow, thereby enabling effective deployment and migration in different scenarios and possessing a certain degree of generalization. Specifically, it involves: loading a snapshot before configuration and initializing multiple tasks; validating and checking the syntax to generate a snapshot of the configured task.

[0038] If the intent is to query, then plan the information requirement list, call the toolchain for retrieval and calculation, integrate the candidate set to generate an analysis report and provide feedback.

[0039] If the intention is to save, the structure is abstracted according to the preset memory template, memory units are constructed, and stored in the persistent library.

[0040] If the intention is to update, the old information in the memory unit is located and replaced.

[0041] If the intent is to solve in multiple steps, load the snapshot before intent configuration, initialize and verify the subtask graph, generate the snapshot after configuration, execute in the snapshot order, and summarize the results.

[0042] 3. When memory updates and additions are triggered during the execution of an intentional task, new and valid information (such as the calculated BMI value or the recent weight becoming 85kg) is written into the user's memory unit in real time to ensure that the context remains accurate.

[0043] This invention provides a large-scale intelligent agent memory system, comprising: a memory construction module, a persistent library, a memory retrieval and evolution module, such as... Figure 2 As shown.

[0044] The memory construction module includes: an environmental information receiving port, a first large model agent, and a memory template library. The information receiving port receives environmental information, and the first large model agent performs structural abstraction of the environmental information according to the preset memory template, constructs several templated memory units, and stores them in the persistent library.

[0045] The memory retrieval and evolution module includes: a user information receiving port, an identity and intent recognition unit, an agent method invocation unit, and an execution feedback port. The agent method invocation unit includes: a base model, a method library, an engine library, and a plan library. The user information receiving port receives the user's current input message. The identity and intent recognition unit parses the current input message, confirms the user's identity and obtains the user's intent, and requests the agent method invocation unit to process it. The base model receives the user's intent and, based on the user's identity, retrieves the relevant memory units from the persistent library, assembles them into a first-round prompt, and sends it to the engine library. The engine library, based on the first-round prompt, determines the task type and the tools / methods required to execute the task, and calls the plan library or method library to execute the task. The execution result is then displayed to the user through the execution feedback port.

[0046] The method library includes: memory preservation, evolutionary memory, etc.

[0047] The planning library includes: reflection / thinking chain (performs consistency checks and self-reflection after each method return; if a conflict is found, it returns to the engine library to adjust the next action or parameters); problem decomposition (used to break down a problem into several sub-tasks when the request is complex), etc.

Claims

1. A method for constructing the memory of a large-scale intelligent agent, characterized in that, include: Using a large model intelligent agent, historical environmental information is structurally abstracted according to a preset memory template, and several templated memory units are constructed and stored in a persistent library. Based on the persistent library, the large model agent performs identity matching and intent understanding on the message currently input by the user, and dynamically plans the list of execution requirements according to the intent type. It then calls the external toolchain to retrieve and calculate memory units, generates an execution plan based on the retrieval and calculation results, and updates or adds memory units to the persistent library according to the currently input message and calculation results. The structural abstraction process includes: the large model agent extracts and fills relevant semantic information from environmental information under the guidance of the constraints in the memory template to form a series of memory units. The memory units contain structured data instances of identity information associated with a specific user account, original information, key information extracted under the guidance of constraints, and timestamp metadata. The large model agent extracts personal and intent information from the user's current input message according to a preset memory template, and matches the user account with the identity information of the memory units in the persistent library to determine the current user's identity. The large model agent first determines the type of intent, and then, based on the intent type, determines the external tool / method to be invoked and proceeds to execution. If the intent is complex, it is first broken down into several sub-intent tasks. Then, based on the type of the sub-intent task, the external tool / method to be called is determined and executed.

2. The memory construction method according to claim 1, characterized in that, The environmental information includes user input or externally pushed information, which the large model agent processes into memory units in the order they are received.

3. The memory construction method according to claim 1, characterized in that, The memory template is a predefined, structured framework that includes data name, data type, data description, and logical relationships between them in terms of data format, and is divided into personal information and domain information in terms of information dimension.

4. The memory construction method according to claim 1, characterized in that, The intent types include query, save, update, and multi-step solution; if the intent is query, then plan the information requirement list and call the toolchain for retrieval and calculation; if the intent is save, then perform structural abstraction according to the preset memory template, construct memory units, and store them in the persistent library. If the intent is to update, the old information in the memory unit is located and replaced; if the intent is to solve in multiple steps, the snapshot before intent configuration is loaded, the subtask graph is initialized and verified, the snapshot after configuration is generated, and the tasks are executed in the order of the snapshots.

5. The memory construction method according to claim 1, characterized in that, The determination of the external tools / methods to be invoked includes: first planning the user's "information needs list" based on the intent type, and then determining whether it is necessary to obtain the user's historical personal information and domain information, as well as the invocation of external tools / methods based on the "information needs list".

6. A large-scale intelligent agent memory system as described in claim 1, characterized in that, include: Memory building module, persistence library, memory retrieval and evolution module; The memory construction module includes: an environmental information receiving port, a first large model agent, and a memory template library. The information receiving port receives environmental information, and the first large model agent performs structural abstraction on the environmental information according to the preset memory templates in the memory template library, constructs several templated memory units, and stores them in the persistent library. The memory retrieval and evolution module includes: a user information receiving port, an identity and intent recognition unit, an agent method invocation unit, and an execution feedback port. The user information receiving port receives the user's current input message. The identity and intent recognition unit parses the current input message, confirms the user's identity and obtains the user's intent, and requests the agent method invocation unit to execute it. The agent method invocation unit displays the execution result to the user through the execution feedback port.

7. The memory system according to claim 6, characterized in that, The intelligent agent method invocation unit includes: a base model, a method library, an engine library, and a plan library. The base model receives user intent and retrieves relevant memory units from the persistent library based on the user's identity, assembles them into a first-round prompt, and sends it to the engine library. Based on the first-round prompt, the engine library determines the task type and the tools / methods required to execute the task, and calls the plan library or method library to execute it. The method library includes: stored memory and evolutionary memory. The plan library includes: reflection / thought chain and problem decomposition.

Citation Information

Patent Citations

  • Human-computer interaction method and device, electronic equipment and storage medium

    CN118098217A

  • Large language model intelligent interaction method and system with memory management capability

    CN119200821A

  • Automatic Meta analysis method and device based on large language model information extraction

    CN120011544A