A long-term memory management system and method based on hierarchical coding and dynamic reasoning

The long-term memory management system, which utilizes hierarchical coding and dynamic reasoning, solves the problems of fragmented and singular storage of long-term memory. It achieves multi-dimensional structured storage and efficient reasoning, improving storage efficiency and reasoning accuracy, and is suitable for applications in multiple scenarios.

CN123180216APending Publication Date: 2026-11-27HEFEI LINGJIYIDONG INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611201800.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing long-term memory management technologies suffer from problems such as fragmented long-term memory, single storage method, low storage efficiency, weak reasoning ability, and poor dynamic adaptability. In particular, traditional vector storage can only store single-dimensional information and cannot associate it with dimensions such as time and location.

Method used

A long-term memory management system based on hierarchical coding and dynamic reasoning is adopted. It achieves multi-dimensional structured storage by combining multimodal preprocessing, vector structured storage and knowledge graph storage. It performs deep reasoning through multi-head attention mechanism and bidirectional BFS + personalized PageRank algorithm, and dynamically adjusts by combining feedback optimization module.

Benefits of technology

It achieves multi-dimensional structured storage of long-term memory, improves storage efficiency and inference accuracy, enhances system adaptability and response speed, and is suitable for cloud and edge smart devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180216A_ABST
    Figure CN123180216A_ABST
Patent Text Reader

Abstract

The application relates to a management system and method of a long-term memory management system based on hierarchical coding and dynamic reasoning. It solves the problems of single vector storage dimension and incomplete information of the long-term memory management technology in the prior art. It includes two long-term memory storage implementation modes, vector structured storage and knowledge graph storage, and through the introduction of high-end technologies such as an event entropy value cutting algorithm, a hippocampus biomimetic hierarchical storage algorithm, a multi-head relationship memory matrix algorithm, a bidirectional BFS+personalized PageRank fusion retrieval algorithm and a joint loss optimization algorithm, the long-term memory is intelligently managed in the whole link from raw data input, structured coding, multi-dimensional hierarchical storage to cross-level association, deep reasoning and dynamic optimization in the two storage modes. The application has the advantages that the utilization rate, retrieval efficiency and multi-hop reasoning accuracy of the long-term memory can be significantly improved, and the pain points of long-term memory redundancy, disordered forgetting, inconvenient calling and single-dimensional storage are effectively solved.
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, specifically to a long-term memory management system and method based on hierarchical coding and dynamic reasoning. Background Technology

[0002] Long-term memory is the core foundation for artificial intelligence systems to achieve continuous learning, complex reasoning, context awareness, and personalized interaction; its performance directly determines the level of intelligence of the system. However, existing long-term memory management technologies generally suffer from the following core defects, which severely restrict the development of intelligent systems:

[0003] 1. Fragmentation of long-term memory encoding: Traditional systems mostly use linear storage or simple vector retrieval methods, lacking an event-based encoding mechanism similar to the human brain. They cannot divide the continuous flow of long-term memory information into logically complete event units, resulting in severe fragmentation of long-term memory, contextual separation, and difficulty in accurately recalling long-term memory.

[0004] 2. Limited Long-Term Memory Storage Methods: Existing technologies mostly use a single storage method (either vector storage or graph storage), which cannot adapt to the long-term memory management needs of different scenarios. The core drawback is that traditional vector storage can only store single-dimensional information, such as only recording the preference results of "what users like", and cannot associate the preference with key multi-dimensional information such as the time and place of preference formation. This results in long-term memory lacking contextual relevance and making it difficult to achieve accurate personalized retrieval.

[0005] 3. Low long-term memory storage efficiency: Without a scientific hierarchical storage structure or semantic association mechanism, long-term memory is stored in a mixed manner without regard to value or frequency, and single-dimensional storage leads to incomplete long-term memory information, further reducing storage utilization and making it difficult to retrieve high-value long-term memory.

[0006] 4. Weak long-term memory reasoning ability: Existing technologies mostly focus on the storage and simple retrieval of long-term memory, lacking deep integration with reasoning logic. Furthermore, because long-term memory is only stored in a single dimension, it cannot perform associative reasoning based on multi-dimensional features such as time and location, making it difficult to handle complex long-term memory association tasks.

[0007] 5. Poor dynamic adaptability of long-term memory: The encoding threshold, storage strategy, and inference rules of long-term memory are mostly fixed settings and cannot be dynamically adjusted according to query tasks and user feedback, resulting in the retrieval accuracy and response efficiency of long-term memory failing to meet the needs of practical applications.

[0008] To address the core pain points of long-term memory management, especially the critical shortcomings of traditional vector storage such as its single dimension and incomplete information, there is an urgent need for a long-term memory management architecture with diversified storage methods, multi-dimensional structured encoding, deep reasoning, and dynamic optimization capabilities. This architecture would break through the performance bottlenecks of traditional technologies and achieve efficient management and accurate retrieval of long-term memory. Summary of the Invention

[0009] The purpose of this invention is to address the shortcomings of existing long-term memory management technologies, particularly the technical problem that traditional vector storage can only store single-dimensional information (such as only recording user preference results and failing to associate them with dimensions such as time and location). This invention provides a long-term memory management system and method based on hierarchical encoding and dynamic reasoning. The core focus is on the entire long-term memory chain of "encoding-dual-mode storage-association-reasoning-optimization." By providing two implementation methods—vector structured storage and knowledge graph storage—it achieves multi-dimensional structured storage of long-term memory. Combined with the integrated application of a series of high-end algorithms, it solves the technical problems of long-term memory fragmentation, single storage method, low storage efficiency, weak reasoning ability, poor dynamic adaptability, and single-dimensional storage. This enables structured, efficient, and intelligent management of long-term memory, improving the long-term memory processing capabilities of intelligent systems.

[0010] To achieve the above objectives, the present invention adopts the following technical solution: a long-term memory management system based on hierarchical encoding and dynamic reasoning, comprising a multimodal preprocessing module, a long-term memory encoding module, a dual-mode storage module, a dynamic reasoning module, and a feedback optimization module; wherein, the long-term memory encoding module includes a vector embedding unit and an event segmentation unit; the dual-mode storage module includes a vector structured storage unit and a knowledge graph storage unit, the vector structured storage unit includes a hierarchical storage subunit and a forgetting scheduling subunit, the knowledge graph storage unit includes an entity relation extraction subunit, a knowledge graph construction subunit, and a graph update subunit; the dynamic reasoning module includes a relation memory enhancement unit, a rule compression reasoning unit, and a multi-hop retrieval unit.

[0011] The above system provides a long-term memory management method based on hierarchical coding and dynamic reasoning, including the following steps:

[0012] S1. Multi-dimensional feature extraction and unified vector embedding;

[0013] S2. Multi-dimensional feature binding;

[0014] S3. Utilize a dual-mode storage module to achieve multi-dimensional structured storage;

[0015] S4. The long-term memory encoding module performs dynamic reasoning based on long-term memory:

[0016] S5. The feedback optimization module performs optimization feedback: Based on the long-term memory retrieval results and inference accuracy feedback, the event segmentation unit dynamically adjusts the event segmentation threshold, forgetting coefficient, attention weight, and retrieval depth to optimize the encoding, storage, and inference strategies of long-term memory and its multi-dimensional features under the two storage methods, thereby achieving continuous system evolution.

[0017] Step S1 specifically includes the following steps:

[0018] S11. The multimodal preprocessing module collects multimodal data related to long-term memory, such as text, images, speech, and time series, and extracts multi-dimensional features such as time, location, and attributes contained in the data.

[0019] S12. Transform multimodal data and multidimensional features into a sequence of embedding vectors of uniform dimension through a pre-trained embedding model.

[0020] Step S2 specifically includes the following steps:

[0021] S21. Employ the sliding window information entropy event cutting algorithm to traverse the vector sequence.

[0022] S22. Calculate the semantic similarity distribution entropy within each window, and use the entropy mutation point as the boundary of long-term memory events to segment the continuous vector sequence into independent and complete long-term memory event units.

[0023] S23. Each long-term memory event unit is bound to corresponding multi-dimensional features such as time, location, and attributes, breaking through the limitation of traditional vector storage that can only encode single-dimensional information.

[0024] In step S3, multi-dimensional structured storage includes two methods: vector structured storage unit storage and knowledge graph storage unit storage.

[0025] Method 1: Vector structured storage unit storage

[0026] S311. Construct a three-level biomimetic storage structure consisting of an immediate memory layer, an event memory layer, and a long-term memory layer;

[0027] S312. Based on the access frequency, time decay coefficient and importance score of long-term memory event units, the event units and their associated time, location, attributes and other multi-dimensional features are dynamically allocated to the corresponding memory layers to realize multi-dimensional hierarchical management of long-term memory.

[0028] S313. Based on the natural forgetting model and memory retention rate formula, evaluate the value of long-term memory event units and corresponding multi-dimensional features in the long-term memory layer, remove low-value and low-access-frequency long-term memories and corresponding multi-dimensional features, solidify high-value long-term memories and corresponding multi-dimensional features, and complete the dynamic update and storage optimization of long-term memory.

[0029] Method 2: Knowledge Graph Storage Unit Storage

[0030] S321. The entity-relationship extraction subunit extracts entities, attributes, and relationships from the encoded long-term memory event units. At the same time, it extracts multi-dimensional features such as time and location associated with the event units and uses these multi-dimensional features as supplementary entity attributes or relationships to complete entity deduplication and relationship normalization.

[0031] S322. The knowledge graph construction subunit constructs a dynamically updated long-term memory knowledge graph based on the processed entity-relationship-multi-dimensional feature pairs, establishes semantic associations between long-term memory units and multi-dimensional features, and realizes the semantic storage of long-term memory and its multi-dimensional features.

[0032] S323. The graph update subunit updates the entities, attributes, relationships, and corresponding multi-dimensional features in the knowledge graph in real time based on the newly input long-term memory event units, ensuring the timeliness of long-term memory storage.

[0033] In step S21, the entropy event cutting algorithm satisfies: for the long-term memory vector sequence V={v1,…,v... n Let the sliding window size be m and the step size be s. Calculate the semantic similarity distribution entropy h(w) within each window w using the following formula:

[0034] h(w) = -Σpᵢⱼlogpᵢⱼ;

[0035] Where: pᵢⱼ is the normalized cosine similarity between vectors vᵢ and vⱼ within the window; when the entropy difference between two adjacent windows is |h(w t ₊1)-h(w t When the value is greater than the preset entropy difference threshold δ, the position is determined to be the boundary of long-term memory events, thereby achieving accurate event segmentation of long-term memory and ensuring the integrity of the binding between multi-dimensional features and event units.

[0036] Step S4 specifically includes the following steps:

[0037] S41. Based on long-term memory data and multi-dimensional features stored in two different ways, a global relational memory matrix is ​​generated through a multi-head attention mechanism to dynamically adjust the relational weights between long-term memory and multi-dimensional features.

[0038] S42. The convolutional attention rule compression algorithm is used to extract local features and fuse attention in the long-term memory reasoning rule chain to achieve lightweight compression of the reasoning rule chain.

[0039] S43. Introduce a bidirectional BFS + personalized PageRank fusion retrieval algorithm. Starting from the entity and multi-dimensional features corresponding to the query intent, the reasoning path is expanded from both ends simultaneously to quickly close the long-term memory multi-hop reasoning link. Combined with the personalized PageRank algorithm, the node association probability is calculated to filter and output the optimal long-term memory retrieval and reasoning results.

[0040] In step S41, the global relational memory matrix is ​​calculated as follows:

[0041] M_rel=LayerNorm(Concat(Head1,…,Head h )·W0);

[0042] Each attention head satisfies Head=Softmax((Q·Kᵀ) / √d k )·V;

[0043] Q, K, and V are the query vector, key vector, and value vector generated by linear transformation of the long-term memory relation embedding vector and the multi-dimensional feature embedding vector, respectively.

[0044] W0 is the projection matrix;

[0045] LayerNorm is a layer normalization operation.

[0046] 9. According to claim 8, in the management method of a long-term memory management system based on hierarchical coding and dynamic reasoning, the joint loss function for local feature extraction and attention fusion of the long-term memory reasoning rule chain in step S42 is:

[0047] L_total=α·L_CE+β·L_NCE+γ·L_L2;

[0048] Where: L_CE is the classification cross-entropy loss, used to optimize the inference classification accuracy;

[0049] L_NCE is the noise contrast loss, used to improve the model's noise resistance;

[0050] L_L2 is a weight regularization term used to prevent the model from overfitting;

[0051] α, β, and γ are weight coefficients, and α+β+γ=1.

[0052] 10. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 9, wherein in step S43, the bidirectional BFS and personalized PageRank fusion retrieval algorithm is specifically as follows:

[0053] A breadth-first search is initiated simultaneously from the head entity, multi-dimensional features, and tail entity corresponding to the query to quickly generate a closed long-term memory multi-hop inference path; the association probability of each node in the path is calculated using a personalized PageRank algorithm, with the formula as follows:

[0054] r = (1-λ)M_r + λr0;

[0055] Where r is the node probability distribution vector;

[0056] M_r is the transition matrix of the long-term memory knowledge graph;

[0057] λ is the damping factor;

[0058] r0 represents the initial distribution of seed nodes.

[0059] Compared with the prior art, the advantages of the present invention are as follows:

[0060] 1. Solving the problem of long-term memory fragmentation: By using the event entropy value segmentation algorithm, accurate event segmentation of long-term memory information flow is achieved, providing structured long-term memory units for two storage methods, and improving the integrity and retrieval of long-term memory;

[0061] 2. Breaking through the limitations of the single dimension of traditional vector storage: Both storage methods realize multi-dimensional structured storage of long-term memory, and can simultaneously store multi-dimensional features such as time, location, and attributes corresponding to long-term memory. For example, for user preferences, it no longer only records "what users like", but can also associate key information such as the time and location of preference formation, so that long-term memory has a complete context and solves the pain point of incomplete information in traditional vector storage.

[0062] 3. Overcoming the limitations of a single storage method: It provides two implementation methods, vector structured storage and knowledge graph storage, which can be selected individually or used in combination, balancing storage efficiency and semantic relevance, and adapting to the long-term memory management needs of different scenarios.

[0063] 4. Improve long-term memory storage efficiency: The three-level hierarchical structure of vector structured storage and the dynamic forgetting mechanism, combined with the semantic association management of knowledge graph storage and multi-dimensional structured storage, all achieve efficient utilization of long-term memory resources, eliminate low-value redundant long-term memories, solidify high-value long-term memories, and improve storage resource utilization by more than 40%.

[0064] 5. Enhanced Long-Term Memory Reasoning Ability: The global relational memory matrix and the bidirectional BFS + personalized PageRank fusion algorithm enable cross-modal association and deep multi-hop reasoning of long-term memory and its multi-dimensional features under two storage methods. It can achieve accurate reasoning based on multi-dimensional features such as time and location. Compared with traditional linear retrieval, the accuracy of long-term memory reasoning is improved by more than 25%, and the retrieval response speed is improved by 30%.

[0065] 6. Achieve dynamic adaptation for long-term memory: The feedback optimization module can dynamically adjust system parameters based on query tasks and user feedback, enabling the encoding, storage, and inference strategies of the two storage methods to adapt to different scenarios and improve the system's usability;

[0066] 7. Adaptable to multiple deployment scenarios: The lightweight rule compression algorithm enables the system to be tailored into a client-side version, reducing memory usage by more than 60%. It can be widely used in large cloud models and intelligent devices on the client side, and has strong engineering practicality. Attached Figure Description

[0067] Figure 1 This is a flowchart of the present invention;

[0068] Figure 2 This is a flowchart of the long-term memory encoding module in this invention;

[0069] Figure 3 This is a flowchart illustrating the workflow of the vector structured storage unit in this invention.

[0070] Figure 4 This is a flowchart illustrating the storage process of the knowledge graph storage unit in this invention. Detailed Implementation

[0071] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0072] like Figure 1-4 As shown, a long-term memory management system based on hierarchical encoding and dynamic reasoning includes a multimodal preprocessing module, a long-term memory encoding module, a dual-mode storage module, a dynamic reasoning module, and a feedback optimization module. The long-term memory encoding module includes a vector embedding unit and an event segmentation unit. The dual-mode storage module includes a vector structured storage unit and a knowledge graph storage unit. The vector structured storage unit includes a hierarchical storage subunit and a forgetting scheduling subunit. The knowledge graph storage unit includes an entity relation extraction subunit, a knowledge graph construction subunit, and a knowledge graph update subunit. The dynamic reasoning module includes a relation memory enhancement unit, a rule compression reasoning unit, and a multi-hop retrieval unit.

[0073] Long-term memory encoding module: It is used to identify event boundaries of continuous long-term memory information streams based on event entropy value segmentation algorithm, divide them into logically complete and independent long-term memory event units, and structure and encode the multi-dimensional features such as time, location and attributes associated with the event units, thus completing the multi-dimensional structured encoding of long-term memory and breaking through the limitation of traditional vector storage that can only encode single-dimensional information.

[0074] Dual-mode storage module: Provides two long-term memory storage implementation methods to adapt to different scenario requirements. Both can achieve multi-dimensional structured storage, solving the single-dimensional shortcomings of traditional vector storage.

[0075] Method 1, Vector Structured Storage Unit: Used to construct a three-level biomimetic storage structure of immediate memory layer, event memory layer, and long-term memory layer. The encoded long-term memory event units and associated multi-dimensional features such as time, location, and attributes are stored in a structured vector form. The long-term memory is updated, eliminated, and solidified through a dynamic forgetting mechanism. For example, for user preference-related long-term memory, multi-dimensional information such as user preference content, preference formation time, and preference generation location can be stored simultaneously.

[0076] Method 2, Knowledge Graph Storage Unit: Used to extract entities, relationships, and multi-dimensional features such as time and location from the encoded long-term memory event units, and construct a dynamically updatable long-term memory knowledge graph. It realizes the structured storage and association management of long-term memory and its multi-dimensional features in the form of semantic association. For example, user preferences are used as entities and associated with their corresponding time, location, related scenarios and other dimensional features to achieve multi-dimensional semantic association.

[0077] Dynamic Reasoning Module: Based on long-term memory data and multi-dimensional features from two storage methods, it constructs a global relation representation of long-term memory through a multi-head relation memory matrix algorithm, achieves lightweighting of the long-term memory reasoning link through a convolutional rule compression algorithm, and completes multi-hop association retrieval and deep reasoning of long-term memory using a bidirectional BFS + personalized PageRank fusion algorithm to achieve accurate retrieval of long-term memory.

[0078] Feedback optimization module: Based on the results of long-term memory retrieval and the feedback of inference accuracy, it dynamically adjusts the encoding threshold, forgetting coefficient, retrieval weight and inference rules to optimize the encoding efficiency, storage strategy and inference performance of long-term memory and its multi-dimensional features under the two storage methods, so as to realize the system's self-iterative optimization.

[0079] Vector Embedding Unit: Used to map multimodal long-term memory data to a dense vector space of uniform dimension through a pre-trained embedding model. At the same time, it extracts multi-dimensional features such as time, location, and attributes from the data and embeds these multi-dimensional features into the vector sequence. This eliminates the differences in multimodal data formats and breaks through the limitation of traditional vector storage that can only store single-dimensional information, ensuring the uniformity of long-term memory data and multi-dimensional features.

[0080] Event segmentation unit: It is used to traverse the vector sequence through a sliding window, calculate the semantic similarity distribution entropy within the window, identify entropy mutation points as long-term memory event boundaries, and segment the continuous long-term memory information flow into logically complete and independent long-term memory event units. At the same time, it binds the time, location, attributes and other multi-dimensional features corresponding to each event unit to the event unit to avoid long-term memory fragmentation and loss of multi-dimensional features.

[0081] The hierarchical storage sub-unit is used to dynamically allocate event units and their associated multi-dimensional features such as time, location, and attributes to a three-level bionic storage structure based on the access frequency, time decay coefficient, and importance score of long-term memory event units. The immediate memory layer stores recently accessed short-term long-term memories and their corresponding multi-dimensional features; the event memory layer stores structured complete long-term memory event units and their corresponding multi-dimensional features; and the long-term memory layer stores high-value, long-term fixed long-term memories and their corresponding multi-dimensional features. For example, when storing long-term memories of user preferences, the content the user likes, the specific time when the preference was formed, the location where the preference was generated, and other multi-dimensional information are simultaneously bound to the preference vector and stored hierarchically, solving the problem that traditional vector storage can only record the single dimension of "what the user likes".

[0082] Forgetting scheduling subunit: It is used to calculate the value of long-term memory event units (including multi-dimensional features) based on the memory retention rate formula, dynamically eliminate low-value, low-access-frequency long-term memories and corresponding multi-dimensional features in the long-term memory layer, and solidify high-value long-term memories and corresponding multi-dimensional features, optimize long-term memory storage resources, and simulate the natural forgetting mechanism of human long-term memory.

[0083] Entity-Relationship Extraction Subunit: Used to extract entities, attributes, and relationships from long-term memory event units. At the same time, it extracts multi-dimensional features such as time and location associated with event units, and uses these multi-dimensional features as attributes or relationships of entities to complete entity deduplication and relationship normalization, and constructs standardized entity-relationship-multi-dimensional feature pairs. For example, when extracting the "user preference" entity, the preference formation time and preference generation location are used as attributes of the entity, breaking through the limitations of traditional vector storage with a single dimension.

[0084] Knowledge Graph Construction Subunit: Used to construct a dynamically updatable long-term memory knowledge graph based on extracted entity-relationship-multi-dimensional feature pairs, establish deep semantic associations between long-term memory units and multi-dimensional features, and realize the semantic storage and management of long-term memory and its multi-dimensional features.

[0085] The graph update subunit is used to update the entities, attributes, relationships, and corresponding multi-dimensional features in the knowledge graph in real time based on new long-term memory event units, ensuring the timeliness and completeness of the long-term memory knowledge graph.

[0086] Relational Memory Enhancement Unit: This unit is used to construct a global relational memory matrix for long-term memory data and multi-dimensional features stored in two different ways. It uses a multi-head self-attention mechanism to dynamically adjust the relational weights between long-term memory and multi-dimensional features based on the query task. For example, when querying "user's preferences in a certain location", it dynamically increases the association weight between the "location" dimension and "user preferences" to enhance the association ability of long-term memory.

[0087] Rule compression inference unit: It is used to extract local features of the long-term memory inference rule chain through one-dimensional convolution, and combine attention fusion algorithm to compress the inference rule chain in a lightweight way, thereby reducing the computational overhead of long-term memory inference. At the same time, it uses a joint loss function to complete the inference model training and improve the accuracy of long-term memory inference.

[0088] Multi-hop retrieval unit: Starting from the head entity, multi-dimensional features and tail entity corresponding to the query intent, it generates long-term memory multi-hop inference paths through bidirectional breadth-first search, calculates the node association probability by combining the personalized PageRank algorithm, sorts and filters the inference paths, and outputs the optimal long-term memory association retrieval and inference results.

[0089] A long-term memory management method based on hierarchical coding and dynamic reasoning includes the following steps:

[0090] The core purpose of the long-term memory encoding module is to transform raw multimodal long-term memory data into structured, manageable long-term memory event units, and simultaneously encode the multi-dimensional features associated with the event units, such as time, location, and attributes. This provides a unified multi-dimensional input basis for both storage methods, solving the problem of long-term memory fragmentation and breaking through the limitations of traditional vector storage's single dimension.

[0091] S1. Multi-dimensional feature extraction and unified vector embedding;

[0092] S2. Multi-dimensional feature binding;

[0093] The dual-mode storage module provides two long-term memory storage implementation methods, which can be selected individually or used in combination according to the needs of the scenario. It takes into account both storage efficiency and semantic relevance. The core breakthrough is the defect of traditional vector storage, which can only store single-dimensional information. It realizes multi-dimensional structured storage of long-term memory and solves the pain point of "only recording results and lacking contextual dimension".

[0094] S3. Utilizing long-term memory dual-mode storage to achieve multi-dimensional structured storage, overcoming the single-dimensional limitation of traditional vector storage:

[0095] S4. The long-term memory encoding module performs dynamic reasoning based on long-term memory:

[0096] The core objective is to enable cross-modal association and deep reasoning of long-term memory and its multi-dimensional features under two storage methods, solving the problems of low accuracy in long-term memory retrieval and weak reasoning ability. In particular, it can achieve accurate reasoning based on multi-dimensional features such as time and location, further highlighting the advantages of multi-dimensional storage and ensuring that long-term memory can accurately match query needs.

[0097] S5. The feedback optimization module performs optimization feedback: Based on the long-term memory retrieval results and inference accuracy feedback, the event segmentation unit dynamically adjusts the event segmentation threshold, forgetting coefficient, attention weight, and retrieval depth to optimize the encoding, storage, and inference strategies of long-term memory and its multi-dimensional features under both storage methods, enabling continuous system evolution. This adapts to the long-term memory management needs of different scenarios.

[0098] The system receives user feedback. If the user is satisfied with the recommendation result (listening to music in the park on weekends), the system increases the association weight of "time: weekend", "location: park" and "music preference". If the user does not like the location, the system adjusts the weight of the location dimension and updates the association between "park" and "music preference" in the knowledge graph. After optimization, the system's user preference recommendation accuracy is improved by 18%.

[0099] Step S1 specifically includes the following steps:

[0100] S11. The multimodal preprocessing module collects multimodal data related to long-term memory, such as text, images, speech, and time series, and extracts multi-dimensional features such as time, location, and attributes contained in the data.

[0101] S12. Transform multimodal data and multidimensional features into a sequence of embedding vectors of uniform dimension through a pre-trained embedding model.

[0102] Example: Collect user preference-related data during intelligent interaction, including user voice feedback (e.g., "I like to go to the park to listen to classical music on weekends"), text input (e.g., "I prefer restaurants with light flavors"), and behavior records (e.g., click history, dwell time). Use the BERT model to convert text and voice into 768-dimensional embedding vectors, and use the MLP model to convert behavior records into a unified 512-dimensional embedding vector. At the same time, focus on extracting multi-dimensional features from the data: time dimension (weekend, dining time), location dimension (park, restaurant location), and scene dimension (leisure, dining), and generate a long-term memory vector sequence that integrates multi-dimensional features.

[0103] Step S2 specifically includes the following steps:

[0104] S21. Employ the sliding window information entropy event cutting algorithm to traverse the vector sequence.

[0105] S22. Calculate the semantic similarity distribution entropy within each window, and use the entropy mutation point as the boundary of long-term memory events to segment the continuous vector sequence into independent and complete long-term memory event units.

[0106] S23. Each event unit is bound to corresponding multi-dimensional features such as time, location, and attributes, breaking through the limitation of traditional vector storage that can only encode single-dimensional information.

[0107] In step S3, multi-dimensional structured storage includes two methods: vector structured storage unit storage and knowledge graph storage unit storage.

[0108] Method 1: Vector structured storage unit storage

[0109] The core objective is to achieve efficient hierarchical storage of long-term memory, balancing storage efficiency with fast retrieval. It is suitable for scenarios with high requirements for storage resources and fast retrieval, while also realizing multi-dimensional structured storage, breaking through the limitations of the single dimension of traditional vector storage.

[0110] S311. Construct a three-level biomimetic storage structure consisting of an immediate memory layer, an event memory layer, and a long-term memory layer;

[0111] A three-tiered biomimetic storage structure: mimicking the collaborative memory mechanism of the human hippocampus and neocortex, a three-tiered storage structure is constructed, consisting of an immediate memory layer, an event memory layer, and a long-term memory layer. The immediate memory layer stores recently accessed, frequently accessed short-term and long-term memories and their corresponding multi-dimensional features; the event memory layer stores structured, complete long-term memory event units and their corresponding multi-dimensional features; and the long-term memory layer stores high-value, long-term retained, solidified long-term memories and their corresponding multi-dimensional features.

[0112] For example, when storing long-term memory of user preferences, traditional vector storage no longer records only the single dimension of "users like a certain type of content". Instead, it binds multi-dimensional information such as "the specific content the user likes, the time when the preference was formed, the location where the preference was generated, and the scenario associated with the preference" with the preference vector and stores them in layers to achieve multi-dimensional structured management and give long-term memory complete contextual information.

[0113] Example: The immediate memory layer stores three frequently accessed user preference event units and their corresponding multi-dimensional features (such as the user's recent frequent mention of weekend park music preference); the event memory layer stores ten core user preference event units and their corresponding multi-dimensional features (such as the user's fixed preferences for dining, music, and leisure); the long-term memory layer stores all remaining user preference event units and their corresponding multi-dimensional features. The storage is partitioned using the Milvus vector database, and each vector is bound to multi-dimensional tags such as time, location, and scene, completely solving the single-dimensional defect of traditional vector storage that only records preference content.

[0114] S312. Based on the access frequency, time decay coefficient and importance score of long-term memory event units, the event units and their associated time, location, attributes and other multi-dimensional features are dynamically allocated to the corresponding memory layers to realize multi-dimensional hierarchical management of long-term memory.

[0115] S313. Based on the natural forgetting model and memory retention rate formula, evaluate the value of long-term memory event units and corresponding multi-dimensional features in the long-term memory layer, remove low-value and low-access-frequency long-term memories and corresponding multi-dimensional features, solidify high-value long-term memories and corresponding multi-dimensional features, and complete the dynamic update and storage optimization of long-term memory.

[0116] Dynamic forgetting mechanism: Based on the memory retention rate formula (Retention=freq / λ^Δt, where freq is the frequency of access to long-term memory, Δt is the time interval, and λ is the time decay factor), the value of long-term memory event units (including multi-dimensional features) is calculated. Low-value, low-access-frequency long-term memories and their corresponding multi-dimensional features in the long-term memory layer are dynamically eliminated, while high-value long-term memories and their corresponding multi-dimensional features are solidified. This simulates the natural forgetting process of human long-term memory, optimizes long-term memory storage resources, and avoids redundant occupation.

[0117] Example: Based on the memory retention rate formula Retention=freq / λ^Δt, a time decay factor λ=0.9 is set. When the retention rate of a user preference event unit (including multi-dimensional features) is lower than 0.2, it is removed from the long-term memory layer (such as a temporary preference that a user has not mentioned for a year). User preference event units with a retention rate higher than 0.8 (such as a user's long-term fixed weekend park music preference) are solidified to ensure long-term retention.

[0118] Method 2: Knowledge Graph Storage Unit Storage

[0119] The core objective is to achieve semantic association storage of long-term memory, enhance the associative reasoning ability of long-term memory, and make it suitable for scenarios with high requirements for semantic association and complex reasoning. At the same time, it integrates multi-dimensional features such as time and location into the knowledge graph to further strengthen the advantages of multi-dimensional storage.

[0120] S321. The entity-relationship extraction subunit extracts entities, attributes, and relationships from the encoded long-term memory event units. At the same time, it extracts multi-dimensional features such as time and location associated with the event units and uses these multi-dimensional features as supplementary entity attributes or relationships to complete entity deduplication and relationship normalization.

[0121] Entity Relationship Extraction and Multi-Dimensional Feature Supplementation: Entities, attributes, and relationships are extracted from the encoded long-term memory event units. At the same time, multi-dimensional features such as time and location associated with the event units are extracted and used as attributes or relationships of entities. This completes entity deduplication and relationship normalization, and constructs standardized entity-relationship-multi-dimensional feature pairs.

[0122] For example, when extracting the "user preference" entity, multiple features such as "preference formation time", "preference generation location" and "preference associated scenario" are used as attributes of the entity, breaking through the limitations of the single dimension of traditional vector storage and making the semantic association of long-term memory richer.

[0123] S322. The knowledge graph construction subunit constructs a dynamically updated long-term memory knowledge graph based on the processed entity-relationship-multi-dimensional feature pairs, establishes semantic associations between long-term memory units and multi-dimensional features, and realizes the semantic storage of long-term memory and its multi-dimensional features.

[0124] Knowledge graph construction sub-unit: Based on the extracted entity-relationship-multi-dimensional feature pairs, a dynamically updatable long-term memory knowledge graph is constructed, establishing deep semantic associations between long-term memory units and multi-dimensional features, realizing the semantic storage and management of long-term memory and its multi-dimensional features, which facilitates subsequent deep reasoning and association retrieval based on multi-dimensional features.

[0125] Example: Extract entities such as "user, music preference, dining preference, park, restaurant" and relationships such as "like, preference, go to" from user preference event units. At the same time, add time dimension (weekend), location dimension (park, restaurant location), and scenario dimension (leisure, dining) as entity attributes. For example, the attributes of the "music preference" entity are "time: weekend, location: park, scenario: leisure". Complete entity deduplication and relationship normalization.

[0126] Based on the processed entity-relationship-multi-dimensional feature pairs, a long-term memory knowledge graph of user preferences is constructed, containing 1000+ entities and 2000+ relationships, realizing semantic association between user preferences and multi-dimensional features such as time, location, and scenario; new user preference event units are received in real time to update the entities, relationships, and multi-dimensional features in the graph, ensuring timeliness.

[0127] S323. The graph update subunit updates the entities, attributes, relationships, and corresponding multi-dimensional features in the knowledge graph in real time based on the newly input long-term memory event units, ensuring the timeliness of long-term memory storage.

[0128] Real-time graph updates: Based on newly input long-term memory event units, the entities, attributes, relationships, and corresponding multi-dimensional features in the knowledge graph are updated in real time to ensure the timeliness and completeness of the long-term memory knowledge graph and avoid the lag of multi-dimensional information.

[0129] The core innovation is dual-mode storage. Both implementation methods break through the limitations of the single dimension of traditional vector storage, realize multi-dimensional structured storage, and can be used alone or in combination to adapt to different scenario needs.

[0130] In step S21, the entropy event cutting algorithm satisfies: for the long-term memory vector sequence V={v1,…,v... n (Including multi-dimensional feature embedding), set the sliding window size m and step size s, calculate the semantic similarity distribution entropy h(w) within each window w, and the calculation formula is:

[0131] h(w) = -Σpᵢⱼlogpᵢⱼ;

[0132] Where: pᵢⱼ is the normalized cosine similarity between vectors vᵢ and vⱼ within the window; when the entropy difference between two adjacent windows is |h(w t ₊1)-h(w t When the value is greater than the preset entropy difference threshold δ, the position is determined to be the boundary of long-term memory events, thereby achieving accurate event segmentation of long-term memory and ensuring the integrity of the binding between multi-dimensional features and event units.

[0133] Example: Set the sliding window size m=10 and the step size s=2. Calculate the local information entropy of each window. Set the entropy difference threshold δ=0.8. When the entropy difference between adjacent windows exceeds 0.8, it is marked as a long-term memory event boundary. Divide the vector sequence into independent long-term memory event units such as "user music preference" and "user dining preference". At the same time, bind each event unit with corresponding multi-dimensional features: for example, the "user music preference" event unit is bound to the time dimension (weekend), location dimension (park), and scene dimension (leisure); the "user dining preference" event unit is bound to the time dimension (dining time), location dimension (restaurant location), and scene dimension (dining). This breaks through the limitation of traditional vector storage that can only encode single preference content.

[0134] Step S4 specifically includes the following steps:

[0135] S41. Based on long-term memory data and multi-dimensional features stored in two different ways, a global relational memory matrix is ​​generated through a multi-head attention mechanism to dynamically adjust the relational weights between long-term memory and multi-dimensional features.

[0136] S42. The convolutional attention rule compression algorithm is used to extract local features and fuse attention in the long-term memory reasoning rule chain to achieve lightweight compression of the reasoning rule chain.

[0137] S43. Introduce a bidirectional BFS + personalized PageRank fusion retrieval algorithm. Starting from the entity and multi-dimensional features corresponding to the query intent, the reasoning path is expanded from both ends simultaneously to quickly close the long-term memory multi-hop reasoning link. Combined with the personalized PageRank algorithm, the node association probability is calculated to filter and output the optimal long-term memory retrieval and reasoning results.

[0138] In step S41, the global relational memory matrix is ​​calculated as follows:

[0139] M_rel=LayerNorm(Concat(Head1,…,Head h )·W0);

[0140] Each attention head satisfies Head=Softmax((Q·Kᵀ) / √d k )·V;

[0141] Q, K, and V are the query vector, key vector, and value vector generated by linear transformation of the long-term memory relation embedding vector and the multi-dimensional feature embedding vector, respectively.

[0142] W0 is the projection matrix;

[0143] LayerNorm is a layer normalization operation. It enables global modeling of the relationship between long-term memory and multi-dimensional features.

[0144] Global Relational Memory Matrix: Based on a multi-head self-attention mechanism, this matrix globally models long-term memory relationships and multi-dimensional features under two storage methods, generating a global relational memory matrix. It can dynamically adjust the relational weights between long-term memory and multi-dimensional features according to the needs of the query task. For example, when querying "user preferences at a certain location and time period," it dynamically increases the association weights between the "location" and "time" dimensions and "user preferences," achieving precise associations based on multi-dimensional features—something traditional single-dimensional vector storage cannot achieve.

[0145] The memory enhancement subunit transforms the user preference relationship embedding vector and multi-dimensional feature embedding vector from the two storage methods into Q, K, and V through linear transformation. It is then split according to an 8-head attention structure, calculates attention weights, and generates a global relation memory matrix. When a user queries "where is a good place to listen to music on the weekend", the association weights of "time: weekend", "location" and "music preference" are dynamically increased to ensure accurate association based on multi-dimensional features.

[0146] In step S42, the joint loss function for local feature extraction and attention fusion of the long-term memory reasoning rule chain is:

[0147] L_total=α·L_CE+β·L_NCE+γ·L_L2;

[0148] Where: L_CE is the classification cross-entropy loss, used to optimize the inference classification accuracy;

[0149] L_NCE is the noise contrast loss, used to improve the model's noise resistance;

[0150] L_L2 is a weight regularization term used to prevent the model from overfitting;

[0151] α, β, and γ are weighting coefficients, and α + β + γ = 1. This effectively improves the generalization and robustness of the long-term memory reasoning model.

[0152] Rule compression inference unit: Combining one-dimensional convolution and attention fusion algorithms, it performs lightweight compression of complex long-term memory inference rule chains. While retaining the core inference logic, it significantly reduces inference computation overhead, enabling the system to adapt to resource-constrained scenarios such as edge devices, while improving inference response speed.

[0153] Example: Rule compression inference unit: For the user preference inference rule chain of "user → like → music preference → time: weekend → location: park", local features are extracted by 1D convolution, and the merging priority is calculated by combining the global relational memory matrix to compress the rule sequence into a single rule representation vector; during training, α=0.6, β=0.3, γ=0.1 are set to optimize the joint loss function and improve the accuracy of user preference inference.

[0154] In step S43, the bidirectional BFS and personalized PageRank fusion retrieval algorithm is as follows:

[0155] A breadth-first search is initiated simultaneously from the head entity, multi-dimensional features, and tail entity corresponding to the query to quickly generate a closed long-term memory multi-hop inference path; the association probability of each node in the path is calculated using a personalized PageRank algorithm, with the formula as follows:

[0156] r = (1-λ)M_r + λr0;

[0157] Where r is the node probability distribution vector;

[0158] M_r is the transition matrix of the long-term memory knowledge graph (containing multi-dimensional feature associations).

[0159] λ is the damping factor;

[0160] r0 represents the initial distribution of seed nodes. The optimal long-term memory inference path is selected based on association probability sorting to improve retrieval efficiency and accuracy.

[0161] Bidirectional BFS + Personalized PageRank Fusion Multi-hop Inference: This innovative approach combines bidirectional breadth-first search with a personalized PageRank algorithm to simultaneously expand the inference path from the corresponding head entity, multi-dimensional features, and tail entity, quickly closing the long-term memory multi-hop inference link. It can complete long-term memory association retrieval across storage methods, entities, and dimensions without multiple iterations. By calculating the node association probability through the personalized PageRank algorithm, the optimal inference result is selected and output, improving the efficiency and accuracy of long-term memory retrieval.

[0162] Multi-hop retrieval unit: When a user queries "What leisure activities are suitable for me on the weekend?", the system uses "user" as the head entity and "leisure activities" as the tail entity, combined with the dimension feature of "time: weekend", to perform a bidirectional breadth-first search. It combines the user preference event units (containing multi-dimensional features) stored in a vector structure with the semantic association of the knowledge graph to generate two closed multi-hop inference paths: "User → Likes → Music Preferences → Time: Weekend → Location: Park → Leisure Activities" and "User → Likes → Walk → Time: Weekend → Location: Lakeside → Leisure Activities". A personalized PageRank algorithm (with a damping factor λ=0.5) is used to calculate the node association probability, selecting the inference path with the highest association and outputting the corresponding user preference and multi-dimensional information (e.g., going to the park to listen to music on the weekend). This achieves accurate recommendations based on multi-dimensional features, which is impossible with traditional single-dimensional vector storage.

[0163] In summary, the principle of this invention lies in providing two long-term memory storage implementation methods: Method 1 (vector structured storage) and Method 2 (knowledge graph storage). By introducing advanced technologies such as event entropy value cutting algorithm, hippocampal bionic hierarchical storage algorithm, multi-head relational memory matrix algorithm, bidirectional BFS + personalized PageRank fusion retrieval algorithm, and joint loss optimization algorithm, it achieves intelligent end-to-end management of long-term memory under both storage methods, from raw data input, structured encoding, multi-dimensional hierarchical storage to cross-level association, deep reasoning, and dynamic optimization. This significantly improves the utilization rate, retrieval efficiency, and multi-hop reasoning accuracy of long-term memory, effectively solving the pain points of long-term memory redundancy, disordered forgetting, inconvenient retrieval, and single-dimensional storage. It is suitable for scenarios relying on long-term memory processing, such as long-term contextual understanding of large language models, long-term memory updating of knowledge graphs, long-term memory management of intelligent interaction, and long-term memory integration of educational resources.

[0164] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

Claims

1. A long-term memory management system based on hierarchical coding and dynamic reasoning, characterized in that, It includes a multimodal preprocessing module, a long-term memory encoding module, a dual-mode storage module, a dynamic reasoning module, and a feedback optimization module. The long-term memory encoding module includes a vector embedding unit and an event segmentation unit. The dual-mode storage module includes a vector structured storage unit and a knowledge graph storage unit. The vector structured storage unit includes a hierarchical storage subunit and a forgetting scheduling subunit. The knowledge graph storage unit includes an entity relation extraction subunit, a knowledge graph construction subunit, and a graph update subunit. The dynamic reasoning module includes a relation memory enhancement unit, a rule compression reasoning unit, and a multi-hop retrieval unit.

2. A management method applicable to the management system described in claim 1, characterized in that, Includes the following steps: S1. Multi-dimensional feature extraction and unified vector embedding; S2. Multi-dimensional feature binding; S3. Utilize a dual-mode storage module to achieve multi-dimensional structured storage; S4. The long-term memory encoding module performs dynamic reasoning based on long-term memory: S5. The feedback optimization module performs optimization feedback: Based on the long-term memory retrieval results and inference accuracy feedback, the event segmentation unit dynamically adjusts the event segmentation threshold, forgetting coefficient, attention weight, and retrieval depth to optimize the encoding, storage, and inference strategies of long-term memory and its multi-dimensional features under the two storage methods, thereby achieving continuous system evolution.

3. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 2, characterized in that, Step S1 specifically includes the following steps: S11. The multimodal preprocessing module collects multimodal data related to long-term memory, such as text, images, speech, and time series, and extracts multi-dimensional features such as time, location, and attributes contained in the data. S12. Transform multimodal data and multidimensional features into a sequence of embedding vectors of uniform dimension through a pre-trained embedding model.

4. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 3, characterized in that, Step S2 specifically includes the following steps: S21. Employ the sliding window information entropy event cutting algorithm to traverse the vector sequence. S22. Calculate the semantic similarity distribution entropy within each window, and use the entropy mutation point as the boundary of long-term memory events to segment the continuous vector sequence into independent and complete long-term memory event units. S23. Each long-term memory event unit is bound to corresponding multi-dimensional features such as time, location, and attributes, breaking through the limitation of traditional vector storage that can only encode single-dimensional information.

5. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 2, characterized in that, In step S3, the multi-dimensional structured storage includes two methods: vector structured storage unit storage and knowledge graph storage unit storage. Method 1: Vector structured storage unit storage S311. Construct a three-level biomimetic storage structure consisting of an immediate memory layer, an event memory layer, and a long-term memory layer; S312. Based on the access frequency, time decay coefficient and importance score of long-term memory event units, the event units and their associated time, location, attributes and other multi-dimensional features are dynamically allocated to the corresponding memory layers to realize multi-dimensional hierarchical management of long-term memory. S313. Based on the natural forgetting model and memory retention rate formula, evaluate the value of long-term memory event units and corresponding multi-dimensional features in the long-term memory layer, remove low-value and low-access-frequency long-term memories and corresponding multi-dimensional features, solidify high-value long-term memories and corresponding multi-dimensional features, and complete the dynamic update and storage optimization of long-term memory. Method 2: Knowledge Graph Storage Unit Storage S321. The entity-relationship extraction subunit extracts entities, attributes, and relationships from the encoded long-term memory event units. At the same time, it extracts multi-dimensional features such as time and location associated with the event units and uses these multi-dimensional features as supplementary entity attributes or relationships to complete entity deduplication and relationship normalization. S322. The knowledge graph construction subunit constructs a dynamically updated long-term memory knowledge graph based on the processed entity-relationship-multi-dimensional feature pairs, establishes semantic associations between long-term memory units and multi-dimensional features, and realizes the semantic storage of long-term memory and its multi-dimensional features. S323. The graph update subunit updates the entities, attributes, relationships, and corresponding multi-dimensional features in the knowledge graph in real time based on the newly input long-term memory event units, ensuring the timeliness of long-term memory storage.

6. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 5, characterized in that, In step S21, the entropy event cutting algorithm satisfies: for the long-term memory vector sequence V={v1,…,v... n Let the sliding window size be m and the step size be s. Calculate the semantic similarity distribution entropy h(w) within each window w using the following formula: h(w) = -Σpᵢⱼlogpᵢⱼ; Where: pᵢⱼ is the normalized cosine similarity between vectors vᵢ and vⱼ within the window; when the entropy difference between two adjacent windows is |h(w t ₊1)-h(w t When the value is greater than the preset entropy difference threshold δ, the position is determined to be the boundary of long-term memory events, thereby achieving accurate event segmentation of long-term memory and ensuring the integrity of the binding between multi-dimensional features and event units.

7. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 6, characterized in that, Step S4 specifically includes the following steps: S41. Based on long-term memory data and multi-dimensional features stored in two different ways, a global relational memory matrix is ​​generated through a multi-head attention mechanism to dynamically adjust the relational weights between long-term memory and multi-dimensional features. S42. The convolutional attention rule compression algorithm is used to extract local features and fuse attention in the long-term memory reasoning rule chain to achieve lightweight compression of the reasoning rule chain. S43. Introduce a bidirectional BFS + personalized PageRank fusion retrieval algorithm. Starting from the entity and multi-dimensional features corresponding to the query intent, the reasoning path is expanded from both ends simultaneously to quickly close the long-term memory multi-hop reasoning link. Combined with the personalized PageRank algorithm, the node association probability is calculated to filter and output the optimal long-term memory retrieval and reasoning results.

8. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 7, characterized in that, In step S41, the global relational memory matrix is ​​calculated as follows: M_rel=LayerNorm(Concat(Head1,…,Head h )·W0); Each attention head satisfies: Head = Softmax((Q·Kᵀ) / √d k )·V; Q, K, and V are the query vector, key vector, and value vector generated by linear transformation of the long-term memory relation embedding vector and the multi-dimensional feature embedding vector, respectively. W0 is the projection matrix; LayerNorm is a layer normalization operation.

9. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 8, characterized in that, In step S42, the joint loss function for local feature extraction and attention fusion of the long-term memory reasoning rule chain is: L_total=α·L_CE+β·L_NCE+γ·L_L2; Where: L_CE is the classification cross-entropy loss, used to optimize the inference classification accuracy; L_NCE is the noise contrast loss, used to improve the model's noise resistance; L_L2 is a weight regularization term used to prevent the model from overfitting; α, β, and γ are weight coefficients, and α+β+γ=1.

10. The management method of a long-term memory management system based on hierarchical coding and dynamic reasoning according to claim 9, characterized in that, In step S43, the bidirectional BFS and personalized PageRank fusion retrieval algorithm is as follows: A breadth-first search is initiated simultaneously from the head entity, multi-dimensional features, and tail entity corresponding to the query to quickly generate a closed long-term memory multi-hop inference path; the association probability of each node in the path is calculated using a personalized PageRank algorithm, with the formula as follows: r = (1-λ)M_r + λr0; Where r is the node probability distribution vector; M_r is the transition matrix of the long-term memory knowledge graph; λ is the damping factor; r0 represents the initial distribution of seed nodes.