Large model memory processing method and device, equipment, storage medium and product
Patent Information
- Application Number
- CN202511212802.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-08-27
AI Technical Summary
当模型基于这些质量欠佳的记忆数据进行回答时,极易出现响应内容与用户实际情况不符、逻辑矛盾等问题,导致回答性能稳定性大幅下降,严重影响交互效果
[0080] The large-scale model memory processing solution provided in this application, upon receiving a model memory update instruction, not only extracts and stores new memory data but also actively queries the target historical memory data associated with the new memory data. By intelligently adjusting the target historical memory data using a large language model, it achieves the organic integration and optimization of new and old memories, avoiding memory conflicts or information redundancy caused by simply accumulating new memory data in the data storage area. By storing new memory data in the data storage area and updating the existing target historical memory data in the data storage area with the adjusted target historical memory data, it achieves dynamic evolution of memory data and ensures the semantic consistency and logical coherence of the memory data in the data storage area, significantly improving the quality of memory data. This, in turn, guarantees the reliability of the large language model's response performance and enhances the user experience.
Smart Images

Figure CN121144976B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, storage medium and product for processing large model memory. Background Technology
[0002] During the interaction between the large language model and the user, the system continuously accumulates user information and stores it in the database as memory data. This memory data provides a reference for the model in subsequent interactions, thereby enhancing the coherence and personalization of the dialogue and significantly improving the user experience.
[0003] However, as the number of interactions increases, the scale of the stored memory data in the database continues to expand, but its quality becomes inconsistent. Some memory data accurately reflects user information or needs, but a significant proportion of the data contains biases or even errors. When the model responds based on this poor-quality memory data, it is highly susceptible to problems such as responses that do not match the user's actual situation or logical contradictions, leading to a significant decrease in response performance stability and severely impacting the interaction effect.
[0004] Therefore, how to effectively improve the quality of the memory data of large language models in order to ensure the model's response performance has become a key issue that urgently needs to be addressed.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main objective of this application is to provide a method, apparatus, device, storage medium, and product for processing large language model memory, which can effectively improve the quality of large language model memory data, thereby ensuring the response performance of large language models.
[0007] To achieve the above objectives, this application proposes a large model memory processing method, the method comprising:
[0008] In response to a model memory update instruction, new memory data is extracted from the model memory update instruction;
[0009] Query the target historical memory data associated with the new memory data from the data storage area;
[0010] Using a large language model, the target historical memory data is adjusted based on the new memory data to obtain the adjusted target historical memory data;
[0011] The new memory data is stored in the data storage area, and the original target historical memory data in the data storage area is updated to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering.
[0012] Optionally, the step of retrieving new memory data from the model memory update instruction in response to the model memory update instruction includes:
[0013] In response to the model memory update instruction, new user information is obtained from the model memory update instruction;
[0014] The large language model is used to extract structured information from the new user information. The structured information includes the core content of the new user information, as well as at least one of the following: summary, keywords, and category tags.
[0015] Generate the new memory data containing the structured information.
[0016] Optionally, the step of adjusting the target historical memory data based on the new memory data using a large language model to obtain the adjusted target historical memory data includes:
[0017] A model context is generated based on the new memory data and the target historical memory data;
[0018] Using the large language model and based on the model context, the structured information contained in the target historical memory data is adjusted to obtain the adjusted target historical memory data.
[0019] Optionally, storing the new memory data in the data storage area includes creating the following information in the graph database based on the new memory data:
[0020] A new memory node, wherein the attribute information of the new memory node is the structured information;
[0021] The attribute information includes the tag nodes corresponding to the classification tags, and the edges connecting the tag nodes and the new memory nodes;
[0022] The keyword nodes corresponding to the keywords in the attribute information, and the edges connecting the keyword nodes and the new memory nodes;
[0023] An edge is formed connecting the new memory node and the target historical memory node, where the target historical memory node is the memory node corresponding to the target historical memory data.
[0024] Optionally, the method further includes:
[0025] In response to the memory map viewing command, the memory map is rendered in the interactive interface based on the data in the graph database;
[0026] Based on the modification operations on the memory graph, the data in the graph database is updated;
[0027] The memory graph is re-rendered based on the updated data in the graph database.
[0028] Optionally, updating the data in the graph database based on the modification operation on the memory graph includes at least one of the following:
[0029] Based on the trigger operation of any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface. Based on the modification operation of the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database.
[0030] Based on the modification operation of the classification label corresponding to any label node in the memory graph, the neighbor memory nodes of the label node are determined, and the classification label in the attribute information of the neighbor memory node is updated to the modified classification label in the graph database.
[0031] Based on the modification operation of the keyword corresponding to any keyword node in the memory graph, the neighbor memory nodes of the keyword node are determined, and the keywords in the attribute information of the neighbor memory nodes are updated to the modified keywords in the graph database.
[0032] Based on the operation of adding or deleting nodes in the memory graph, nodes are created or deleted in the graph database;
[0033] Based on the operation of adding or deleting an edge between any two nodes in the memory graph, an edge between any two nodes is added or deleted in the graph database.
[0034] Optionally, after re-rendering the memory graph based on the updated data in the graph database, the method further includes:
[0035] Based on the operation that triggers memory evolution, determine the neighboring memory nodes of the memory node whose current attribute information has been updated;
[0036] Based on the updated attribute information of the memory nodes and the attribute information of the neighboring memory nodes, a model context is generated.
[0037] Using the large language model and based on the model context, the attribute information of the neighbor memory node is adjusted to obtain the adjusted attribute information of the neighbor memory node;
[0038] The adjusted attribute information of the neighbor memory nodes is updated in the graph database.
[0039] Optionally, after rendering the memory graph in the interactive interface based on the data in the graph database in response to the memory graph viewing command, the method further includes:
[0040] Obtain the input node search criteria, which include at least one of keywords, category tags, and time range;
[0041] The nodes in the memory graph that match the node search criteria, as well as the neighboring nodes of the nodes, are highlighted.
[0042] Optionally, storing the new memory data in the data storage area further includes:
[0043] The feature vector of the new memory data is stored in the vector database, and the memory identifier corresponding to the feature vector is the same as the memory identifier corresponding to the new memory node in the graph database.
[0044] Optionally, querying the target historical memory data associated with the new memory data from the data storage area includes:
[0045] Determine the similarity between the feature vector of the new memory data and the feature vectors of each historical memory data in the data storage area;
[0046] Select the most similar historical memory data from the data storage area;
[0047] Using the large language model, the logical relationships between the selected historical memory data and the new memory data are determined, and based on the logical relationships, the target historical memory data associated with the new memory data is determined from the multiple historical memory data.
[0048] Furthermore, to achieve the above objectives, this application also proposes a large model memory processing device, the device comprising:
[0049] The memory retrieval module is used to retrieve new memory data from the model memory update command in response to the model memory update command;
[0050] The memory query module is used to query target historical memory data associated with the new memory data from the data storage area;
[0051] The memory adjustment module is used to adjust the target historical memory data based on the new memory data using a large language model, so as to obtain the adjusted target historical memory data.
[0052] A memory storage module is used to store the new memory data in the data storage area and update the original target historical memory data in the data storage area with the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering.
[0053] Optionally, the memory extraction module is configured to, in response to the model memory update instruction, obtain new user information from the model memory update instruction; extract structured information from the new user information through the large language model, the structured information including the core content of the new user information, as well as at least one of the following: summary, keywords, and classification tags; and generate the new memory data containing the structured information.
[0054] Optionally, the memory adjustment module is used to generate a model context based on the new memory data and the target historical memory data; and through the large language model, based on the model context, adjust the structured information contained in the target historical memory data to obtain the adjusted target historical memory data.
[0055] Optionally, the memory storage module is used to create the following information in the graph database based on the new memory data:
[0056] A new memory node, wherein the attribute information of the new memory node is the structured information;
[0057] The attribute information includes the tag nodes corresponding to the classification tags, and the edges connecting the tag nodes and the new memory nodes;
[0058] The keyword nodes corresponding to the keywords in the attribute information, and the edges connecting the keyword nodes and the new memory nodes;
[0059] An edge is formed connecting the new memory node and the target historical memory node, where the target historical memory node is the memory node corresponding to the target historical memory data.
[0060] Optionally, the device further includes:
[0061] The graph rendering module is used to render the memory graph in the interactive interface in response to the memory graph viewing command, based on the data in the graph database.
[0062] The memory update module is used to update the data in the graph database based on the modification operation of the memory graph;
[0063] The graph update module is used to re-render the memory graph based on the updated data in the graph database.
[0064] Optionally, the memory update module is configured to perform at least one of the following operations:
[0065] Based on the trigger operation of any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface. Based on the modification operation of the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database.
[0066] Based on the modification operation of the classification label corresponding to any label node in the memory graph, the neighbor memory nodes of the label node are determined, and the classification label in the attribute information of the neighbor memory node is updated to the modified classification label in the graph database.
[0067] Based on the modification operation of the keyword corresponding to any keyword node in the memory graph, the neighbor memory nodes of the keyword node are determined, and the keywords in the attribute information of the neighbor memory nodes are updated to the modified keywords in the graph database.
[0068] Based on the operation of adding or deleting nodes in the memory graph, nodes are created or deleted in the graph database;
[0069] Based on the operation of adding or deleting an edge between any two nodes in the memory graph, an edge between any two nodes is added or deleted in the graph database.
[0070] Optionally, the device further includes:
[0071] The memory evolution module is used to determine the neighboring memory nodes of a memory node whose attribute information has been updated based on the operation that triggers memory evolution; generate a model context based on the attribute information of the updated memory node and the attribute information of the neighboring memory nodes; adjust the attribute information of the neighboring memory nodes based on the model context through the large language model to obtain the adjusted attribute information of the neighboring memory nodes; and update the adjusted attribute information of the neighboring memory nodes to the graph database.
[0072] Optionally, the device further includes:
[0073] The node search module is used to obtain input node search conditions, which include at least one of keywords, category tags, and time ranges; and to highlight the nodes in the memory graph that match the node search conditions and the neighboring nodes of the nodes.
[0074] Optionally, the memory storage module is further configured to store the feature vector of the new memory data in a vector database, and the memory identifier corresponding to the feature vector is the same as the memory identifier corresponding to the new memory node in the graph database.
[0075] Optionally, the memory query module is used to determine the similarity between the feature vector of the new memory data and the feature vector of each historical memory data in the data storage area; to filter out multiple historical memory data with the highest similarity from the data storage area; to determine the logical relationship between the filtered multiple historical memory data and the new memory data through the large language model; and to determine the target historical memory data associated with the new memory data from the multiple historical memory data based on the logical relationship.
[0076] In addition, to achieve the above objectives, this application also proposes a large model memory processing device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the large model memory processing method as described above.
[0077] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the large model memory processing method described above.
[0078] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the large model memory processing method described above.
[0079] One or more technical solutions proposed in this application have at least the following technical effects:
[0080] The large-scale model memory processing solution provided in this application, upon receiving a model memory update instruction, not only extracts and stores new memory data but also actively queries the target historical memory data associated with the new memory data. By intelligently adjusting the target historical memory data using a large language model, it achieves the organic integration and optimization of new and old memories, avoiding memory conflicts or information redundancy caused by simply accumulating new memory data in the data storage area. By storing new memory data in the data storage area and updating the existing target historical memory data in the data storage area with the adjusted target historical memory data, it achieves dynamic evolution of memory data and ensures the semantic consistency and logical coherence of the memory data in the data storage area, significantly improving the quality of memory data. This, in turn, guarantees the reliability of the large language model's response performance and enhances the user experience. Attached Figure Description
[0081] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0082] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0083] Figure 1 This is a schematic diagram of an implementation environment for the large model memory processing method of this application;
[0084] Figure 2 This is a flowchart illustrating the first embodiment of the large model memory processing method of this application.
[0085] Figure 3 This is a detailed step diagram of step S10 in the second embodiment of the large model memory processing method of this application;
[0086] Figure 4 This is a detailed step diagram of step S20 in the third embodiment of the large model memory processing method of this application;
[0087] Figure 5 This is a detailed step diagram of step S30 in the fourth embodiment of the large model memory processing method of this application;
[0088] Figure 6 This is a detailed step diagram of step S40 in the fifth embodiment of the large model memory processing method of this application;
[0089] Figure 7 This is a schematic diagram of a newly added step in the sixth embodiment of the large model memory processing method of this application;
[0090] Figure 8 This is a schematic diagram of a newly added step in the seventh embodiment of the large model memory processing method of this application;
[0091] Figure 9 This is a schematic diagram of a large model memory data processing flow provided in an embodiment of this application;
[0092] Figure 10 This is a schematic diagram of the module structure of the large model memory processing device in an embodiment of this application;
[0093] Figure 11 This is a schematic diagram of the device structure of the hardware operating environment involved in the large model memory processing method in the embodiments of this application.
[0094] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0095] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0096] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0097] Figure 1 This is a schematic diagram illustrating an implementation environment provided by an embodiment of this disclosure. See also... Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected via a wireless or wired network. For example, the terminal 101 is installed with a target application provided by the server 102, and the terminal 101 can perform functions such as data transmission and message interaction through the target application.
[0098] For example, terminal 101 can be a computer, mobile phone, tablet computer, smart speaker, in-vehicle terminal, or other terminal. For example, the target application can be a target application in the operating system of terminal 101, or a target application provided by a third party. For example, the target application can be a search application, a short video application, a chat application, etc. For example, server 102 can be the backend server corresponding to the target application. Accordingly, server 102 can be a search application server, a short video application server, a chat application server, etc.
[0099] In this application, server 102 is used to respond to a model memory update command by extracting new memory data from the command; querying target historical memory data associated with the new memory data from the data storage area; adjusting the target historical memory data based on the new memory data using a large language model to obtain adjusted target historical memory data; storing the new memory data in the data storage area; and updating the existing target historical memory data in the data storage area with the adjusted target historical memory data. Terminal 101 is used to respond to a dialogue command by extracting the user question from the command and forwarding the user question to server 102. Server 102 is used to generate an answer to the user question based on the memory data in the data storage area.
[0100] Alternatively, the aforementioned large model memory processing can also be completed by the terminal 101 alone. Alternatively, the terminal 101 can complete it through the installed target application; this embodiment of the application does not impose any restrictions on this.
[0101] The application scenarios for this large-scale model memory processing method are reflected in the field of intelligent services that require continuous learning and personalized interaction. For example, the following application scenarios:
[0102] Personalized Intelligent Assistants: As users interact with personal intelligent assistants such as mobile voice assistants, smart speakers, in-vehicle terminals, and PC (Personal Computer) intelligent assistants, they continuously receive new preference information, such as their daily routine, frequently visited locations, dietary habits, and reading styles. When a personalized intelligent assistant acquires new user information, it can automatically adjust relevant historical memories through a large language model. This allows it to build a deep, structured understanding of the user's dynamically changing interests, habits, experiences, and emotions, enabling more natural and coherent personalized services. For example, when a personalized intelligent assistant learns that a user has "changed their work location," it automatically links this information to historical memories such as the user's original work location and navigation preferences. By analyzing the contextual relevance through a large language model, it determines that the core parameters of the commuting scenario have changed and automatically updates relevant memory information. This includes defaulting to the optimal route to the new work location in navigation settings and simultaneously adjusting the recommended service area around the new work location on weekdays. This way, when providing navigation or information recommendations to the user later, it not only maintains the user's basic habits but also dynamically optimizes service details based on new information, greatly improving the user experience.
[0103] Figure 2 This is a flowchart illustrating the first embodiment of the large model memory processing method of this application. (Refer to...) Figure 2 Taking the terminal as the executing entity as an example, this large model memory processing method includes the following steps S10 to S40:
[0104] Step S10: In response to the model memory update instruction, extract new memory data from the model memory update instruction.
[0105] The model memory update command is the instruction that triggers the model to start the memory update process, containing information that needs to be updated in the model memory. New memory data is the information extracted from the model memory update command that needs to be incorporated into the model memory.
[0106] For example, the terminal listens to and records various user input information in real time through user-authorized API interfaces or backend services, including but not limited to: text conversations, voice transcriptions, uploaded files, and shared links. Upon receiving new user information, the terminal generates a model memory update instruction containing the new user information. The terminal then preprocesses the new user information, such as adding necessary metadata and converting it to the target format, thereby obtaining new memory data. The metadata may include timestamps, information sources, and interaction types. For example, the information source could be WeChat, and the interaction type could be...
[0107] Step S20: Query the target historical memory data associated with the new memory data from the data storage area.
[0108] The data storage area is a storage space or system used to store various types of memory data accumulated in the past of the model.
[0109] Target historical memory data is historical memory data that is retrieved from the data storage area and is associated with new memory data. It is the object that needs to be adjusted based on the new memory data.
[0110] For example, target historical memory data associated with the new memory data can be queried based on the similarity between the feature vector of the new memory data and the feature vectors of each historical memory data in the data storage area. Alternatively, a keyword matching method can be used to query historical memory data in the data storage area whose keywords match the keywords contained in the new memory data with a matching degree higher than a threshold, as target historical memory data associated with the new memory data. Of course, other methods can also be used to query target historical memory data, and this application embodiment does not limit this.
[0111] Step S30: Using a large language model, the target historical memory data is adjusted based on the new memory data to obtain the adjusted target historical memory data.
[0112] Large language models are artificial intelligence models trained on large-scale data and capable of understanding, analyzing, and generating natural language.
[0113] The adjusted target historical memory data is obtained by processing the target historical memory data through a large language model. The new version of the target historical memory data is obtained by adjusting the target historical memory data based on the new memory data.
[0114] For example, a model context can be generated based on new memory data and target historical memory data. Using a large language model, the target historical memory data can be adjusted based on this model context to obtain the adjusted target historical memory data. Because the large language model possesses powerful semantic understanding and contextual reasoning capabilities, it can identify the logical relationships between new and old memories. Therefore, this allows for dynamic correction of the target historical memory data, avoiding information conflicts or redundancy, and improving the accuracy of memory data in the data storage area.
[0115] Step S40: Store the new memory data in the data storage area, and update the original target historical memory data in the data storage area with the adjusted target historical memory data. The memory data in the data storage area is used for model question answering.
[0116] After intelligently adjusting the original target historical memory data using a large language model, the new memory data is stored in the data storage area, and the adjusted target historical memory data replaces the original target historical memory data in the data storage area. The purpose of this is to ensure that subsequent models can generate responses based on the latest, most accurate, and semantically coherent memory data during reasoning, thereby improving the relevance and personalization of the answers.
[0117] The large-scale model memory processing solution provided in this application, upon receiving a model memory update instruction, not only extracts and stores new memory data but also actively queries the target historical memory data associated with the new memory data. By intelligently adjusting the target historical memory data using a large language model, it achieves the organic integration and optimization of new and old memories, avoiding memory conflicts or information redundancy caused by simply accumulating new memory data in the data storage area. By storing new memory data in the data storage area and updating the existing target historical memory data in the data storage area with the adjusted target historical memory data, it achieves dynamic evolution of memory data and ensures the semantic consistency and logical coherence of the memory data in the data storage area, significantly improving the quality of memory data. This, in turn, guarantees the reliability of the large language model's response performance and enhances the user experience.
[0118] Based on the first embodiment described above, a second embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 3 In the second embodiment, step S10 includes steps S101 to S103:
[0119] Step S101: In response to the model memory update instruction, new user information is obtained from the model memory update instruction.
[0120] The new user information is entirely new information about the user obtained from the model memory update instruction. It is the original user-related content that needs to be processed and stored in this memory update process.
[0121] Step S102: Extract structured information from the new user information using a large language model. The structured information includes the core content of the new user information, as well as at least one of the following: summary, keywords, and category tags.
[0122] Structured information is information extracted from new user information using a large language model. It has a standardized format and organization, contains the core content of the new user information, and includes at least one of the following: summary, keywords, and category tags. The core content is the most critical and essential substantive information in the new user information; it is a distillation of the essential content of the user information. The summary is a concise overview of the main content of the new user information, quickly reflecting its core points. Keywords are words extracted from the new user information that represent the information's theme or core concepts. Category tags are labels assigned to the new user information based on its content attributes, indicating its category.
[0123] For example, structured information can also include other content, such as timestamps, feature vectors of new user information, etc. The feature vector of the user information can be a vector concatenated from the feature vectors of the core content, summary, keywords, and category tags, or the feature vector of the core content can be directly used as the feature vector of the user information.
[0124] Step S103: Generate new memory data containing the structured information.
[0125] The solution provided in this application extracts structured information, including core content, summaries, keywords, and category tags, from new user information using a large language model, generating new memory data. This structured processing improves the organization and usability of the memory data, thereby enhancing the accuracy and efficiency of the large model in remembering and applying user information.
[0126] Based on the first embodiment described above, a third embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 4 In the third embodiment, step S20 includes steps S201 to S203:
[0127] Step S201: Determine the similarity between the feature vector of the new memory data and the feature vector of each historical memory data in the data storage area.
[0128] The feature vector of the memory data is a numerical array transformed from the memory data through a feature extraction algorithm, which can quantitatively represent the key features of the memory data. For example, the memory data contains structured information such as core content, summary, keywords, and category tags, which can be transformed into the feature vector of the memory data. It should be noted that the feature vector of the new memory data is the same as the feature vector of the user information proposed in the second embodiment above; this application does not distinguish between them.
[0129] Similarity is an indicator used to measure how similar the feature vectors of new memory data are to the feature vectors of historical memory data. The higher the value, the closer the two are in terms of features.
[0130] Step S202: Select the multiple historical memory data with the highest similarity from the data storage area.
[0131] Multiple historical memory data points are selected from the data storage area based on their highest similarity to the feature vector of the new memory data. These historical memory data points serve as candidates for further analysis of their relationships. The number of historical memory data points selected based on similarity can be set as needed, and this embodiment does not impose any limitation on this.
[0132] For example, the data storage area includes a vector database and a graph database. The graph database stores structured memory data, and the vector database stores feature vectors of the memory data. The feature vectors in the vector database are associated with the structured memory data stored in the graph database through memory identifiers. Correspondingly, the method for filtering out multiple historical memory data with the highest similarity from the data storage area is as follows: query the vector database for multiple feature vectors with the highest similarity to new memory data, determine the memory identifiers of these feature vectors, and query the graph database for multiple historical memory data corresponding to these memory identifiers. For example, the graph database is Neo4j (Network Engine for Objects), and the vector data is Pinecone (the name of a vector database).
[0133] Step S203: Using a large language model, determine the logical relationship between the selected historical memory data and the new memory data, and based on the logical relationship, determine the target historical memory data associated with the new memory data from the multiple historical memory data.
[0134] The logical relationship between historical memory data and new memory data refers to the inherent connection between them, such as causal relationship, subordinate relationship, analogy relationship, and progressive relationship, which reflects the semantic association between the data.
[0135] The target historical memory data is the historical memory data with deep correlation identified from multiple selected historical memory data through large language model analysis of the logical relationship between each historical memory data and new memory data.
[0136] The solution provided in this application first filters multiple candidate historical memory data by calculating feature vector similarity, and then uses a large language model to analyze logical relationships to determine the target historical memory data. This two-step query mechanism not only quickly narrows down the scope through similarity calculation, but also accurately locates the associated target historical memory data through logical analysis, avoiding misjudgments caused by relying solely on similarity. This improves the accuracy and efficiency of target historical memory data query and provides a reliable prerequisite for the effective fusion of old and new memories.
[0137] Based on the second embodiment described above, a fourth embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 5 In the fourth embodiment, step S30 includes steps S301 to S302:
[0138] Step S301: Generate model context based on new memory data and target historical memory data.
[0139] Model context refers to the reference information composed of new memory data and target historical memory data, which is used by the large language model to adjust the target historical memory data.
[0140] Step S302: Using a large language model and based on the model context, adjust the structured information contained in the target historical memory data to obtain the adjusted target historical memory data.
[0141] The structured information contained in the target historical memory data refers to the information in the target historical memory data that has a standardized format and organization, including core content, summary, keywords, classification labels, etc., and is the specific object for the adjustment operation of the large language model.
[0142] The adjusted target historical memory data is a new version of the target historical memory data obtained by modifying, supplementing or improving the structured information of the target historical memory data based on the model context of the large language model.
[0143] The solution provided in this application, when adjusting target historical memory data, generates a model context based on the new memory data and the target historical memory data. This enables the large language model to adjust the structured information of the target historical memory data in a targeted manner, based on a full understanding of the relationship between the two. This precise adjustment based on a complete context ensures that the structured information of the target historical memory data and the structured information of the new memory data are consistent in logic and semantics, improving the accuracy and rationality of memory adjustment and further optimizing the quality of memory data in the data storage area.
[0144] Based on the second embodiment described above, a fifth embodiment of this application is proposed. Contents that are the same as or similar to the first embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 6 In the fifth embodiment, step S40 includes steps S401 to S404:
[0145] Step S401: Create a new memory node in the graph database based on the new memory data. The attribute information of the new memory node is structured information.
[0146] Graph databases are databases that use a graph structure of "node-edge-node" as their core storage model. They are used to store and manage data with complex relationships and can efficiently query the connections between data. Compared with traditional relational databases, they are more suitable for displaying the network relationships between data, such as the relationship between memory data and tags, keywords, and historical memory data.
[0147] A new memory node is the core data unit created for new memory data in the graph database. It is the entity object corresponding to the new memory data in the graph database. Its attribute information comes directly from the structured information contained in the new memory data and is the key information that distinguishes the new memory node from other memory nodes.
[0148] Step S402: Create the tag node corresponding to the category tag in the attribute information, and the edge connecting the tag node and the new memory node.
[0149] A tag node is a node created separately in the graph database for the category label in the attribute information of new memory data. It is the entity object corresponding to the category label in the graph database. It can be used to classify and manage memory nodes with the same category label, making it easier to filter memory data by label later.
[0150] Step S403: Create keyword nodes corresponding to the keywords in the attribute information, and edges connecting the keyword nodes to the new memory nodes.
[0151] Keyword nodes are nodes created separately in the graph database for keywords in the attribute information of new memory data. They are the entity objects corresponding to the keywords in the graph database and can be used to quickly retrieve all memory nodes containing a keyword, thereby improving the retrieval efficiency of memory data.
[0152] Step S404: Create an edge connecting the new memory node and the target historical memory node, where the target historical memory node is the memory node corresponding to the target historical memory data.
[0153] Edges are used to describe the relationships between two nodes in a graph database, such as the relationship between a tag node and a new memory node, the relationship between a keyword node and a new memory node, and the logical relationship between a new memory node and a target historical memory node.
[0154] The target historical memory node is the core data unit in the graph database that corresponds to the target historical memory data. It is the entity object corresponding to the target historical memory data in the graph database, and its attribute information comes from the structured information contained in the target historical memory data.
[0155] Optionally, storing the new memory data in the data storage area further includes storing the feature vector of the new memory data in a vector database, wherein the memory identifier corresponding to the feature vector is the same as the memory identifier corresponding to the new memory node in the graph database.
[0156] Memory identifiers are used to uniquely distinguish different memory data. Their core function is to establish a one-to-one correspondence between feature vectors in the vector database and new memory nodes in the graph database, ensuring that the complete memory data, i.e., the structured information and feature vectors of the memory data, can be quickly retrieved through the same identifier.
[0157] The solution provided in this application stores the feature vectors of new memory data in a vector database and maintains consistency with the memory identifiers of corresponding nodes in the graph database. This storage method, combining vector and graph databases, achieves efficient similarity retrieval using the vector database and maintains the association structure of the memories through the graph database. Furthermore, the unified memory identifier enables seamless association between the two storage methods, improving the retrieval efficiency and association analysis capabilities of the memory data.
[0158] The solution provided in this application uses a graph database to store new memory data. By creating new memory nodes, tag nodes, keyword nodes, and various connecting edges, a structured network of memory relationships is constructed. This storage method clearly records the core information of the new memory data and its association with category tags, keywords, and target historical memory data. This not only facilitates efficient querying and management of memory data but also provides a foundation for the visualization and association analysis of memory data.
[0159] Based on the fifth embodiment described above, a sixth embodiment of this application is proposed. Contents that are the same as or similar to the fifth embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 7 In the sixth embodiment, after step S40, steps S501 to S503 are further included:
[0160] Step S501: In response to the memory map viewing command, the memory map is rendered in the interactive interface based on the data in the graph database.
[0161] The memory graph view command is a signal used to trigger the view memory graph function. It can be initiated by the user, such as by clicking the "View Memory Graph" button on the interactive interface. The core function of this command is to initiate the process of reading data from the graph database and rendering the memory graph. For example, the "View Memory Graph" button can be displayed on the graph management page of the interactive interface.
[0162] Rendering a memory graph refers to transforming the "node-edge-node" data in a graph database into intuitively displayable graphical elements in an interactive interface, such as different styles of node icons and lines connecting nodes. The core is to convert structured graph data into a visually understandable chart. For example, this memory graph contains at least one memory node, at least one label node, and at least one keyword node. Memory nodes are connected by arrowed lines to each of their contained label and keyword nodes, and memory nodes are also connected by arrowed lines to other memory nodes deeply related to them.
[0163] For example, data from a graph database can be rendered into a memory graph using a memory graph rendering tool. This tool could be D3.js, a powerful JavaScript library specifically designed for data visualization.
[0164] The interactive interface is a visual operation interface for users to interact with the terminal. It is the carrier for rendering the memory map and the entry point for users to initiate memory map viewing commands and perform modification operations. It supports users to intuitively view and operate the memory map.
[0165] For example, in the memory graph rendered in the interactive interface, different types of nodes, such as memory nodes, keyword nodes, and tag nodes, can be represented by different colors and sizes. Furthermore, the memory graph can be explored through dragging, zooming, and other operations.
[0166] Optionally, in response to a memory graph viewing command, after rendering the memory graph in the interactive interface based on data from the graph database, the method further includes: obtaining input node search criteria, which include at least one of keywords, category labels, and time ranges; and highlighting nodes in the memory graph that match the node search criteria, as well as the neighboring nodes of the matching nodes.
[0167] Node search criteria are query conditions entered by the user in the interactive interface to filter specific nodes in the memory graph. They can include at least one of the following: keywords, category tags, time range, etc., and serve as the basis for accurately locating the target node.
[0168] Nodes matching the search criteria are those nodes in the memory graph whose attributes, such as keywords, category labels, and time features, match the user's input search criteria. These include memory nodes, label nodes, keyword nodes, and other types of nodes. The neighbors of a matching node are all nodes in the memory graph that are directly connected to the matching node via edges.
[0169] Highlighting is a method in the interactive interface to emphasize specific nodes through special visual styles, such as changing colors, enlarging sizes, and adding highlight borders, making nodes that meet the search criteria and their neighboring nodes easier for users to identify and focus on in the memory graph.
[0170] For example, in the memory graph, nodes that match the node search criteria and their neighboring nodes are highlighted, including: nodes that match the node search criteria and their first-order and second-order neighboring nodes. First-order neighboring nodes are those directly connected to the matching node via edges, and second-order neighboring nodes are those directly connected to first-order neighboring nodes via edges. For instance, when searching for the category tag "science fiction movies," all memory nodes directly connected to the tag node corresponding to that category tag, as well as the keyword nodes, tag nodes, and neighboring memory nodes directly connected to these memory nodes, will be highlighted.
[0171] In this embodiment, after rendering the memory graph, it supports searching for nodes based on conditions such as keywords, category tags, and time ranges, and highlights matching nodes and their neighboring nodes. This function improves the information retrieval efficiency of the memory graph, enabling users to quickly locate target memories and their associated information, and enhancing the accessibility and usability of memory data.
[0172] Step S502: Update the data in the graph database based on the modification operation on the memory graph.
[0173] Modification operations on the memory graph refer to the adjustments that users make to the rendered memory graph in the interactive interface. These operations include adding nodes, deleting nodes, adjusting the connection relationships of edges, and editing node attributes. This is a way for users to actively adjust the memory data.
[0174] Updating the data in the graph database is the process by which the terminal synchronously adjusts the corresponding data in the graph database based on the user's modifications to the memory graph. For example, if the user deletes an edge between a memory node and a label node in the memory graph, the terminal will synchronously delete the corresponding edge data between those two nodes in the graph database, ensuring that the graph database data is consistent with the user's visualization results.
[0175] Optionally, based on the modification operations on the memory graph, the data in the graph database is updated, including at least one of the following:
[0176] First, based on the trigger operation of any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface. Based on the modification operation of the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database.
[0177] A trigger action is an interactive action performed by the user on any memory node within the memory graph of the interactive interface to display its attribute information. Examples include single-clicking, double-clicking, and right-clicking. For instance, after triggering any memory node, an inspector panel slides out from the right side of the interactive interface, displaying the memory node's attribute information. Examples include core content, summary, keywords, category tags, and timestamps.
[0178] Second, based on the modification operation of the classification label corresponding to any label node in the memory graph, the neighboring memory nodes of the label node are determined. In the graph database, the classification labels in the attribute information of the neighboring memory nodes are updated to the modified classification labels. Neighboring memory nodes are all memory nodes directly connected to the label node through edges. This method allows for batch modification of classification labels shared by multiple memory nodes, improving the efficiency of adjusting memory data.
[0179] For example, by triggering any tag node in the memory graph, making the tag corresponding to that tag node editable, the category tag corresponding to that tag node can be modified.
[0180] Third, based on the modification operation of the keyword corresponding to any keyword node in the memory graph, the neighboring memory nodes of the keyword node are determined. In the graph database, the keywords in the attribute information of the neighboring memory nodes are updated to the modified keywords. Here, neighboring memory nodes are all memory nodes directly connected to the keyword node through edges. This method allows for batch modification of keywords shared by multiple memory nodes, improving the efficiency of adjusting memory data.
[0181] For example, by triggering any keyword node in the memory graph, the keyword corresponding to that keyword node becomes editable, and modification operations can be performed on the category keyword corresponding to that keyword node.
[0182] Fourth, based on the operations of adding or deleting nodes in the memory graph, nodes are created or deleted in the graph database.
[0183] For example, you can click on any node and then right-click to select the "Delete Node" button to delete the node in the graph database. Alternatively, you can right-click to select the "Add Node" button and then edit the node's properties in the sliding inspector panel to create the node in the graph database.
[0184] Fifth, based on the operation of adding or deleting an edge between any two nodes in the memory graph, add or delete an edge between any two nodes in the graph database.
[0185] For example, you can select any two nodes while holding down the control keys, and then right-click and select the "Create Link" button to add an edge between the two nodes in the graph database. Alternatively, you can click on the edge between any two nodes and right-click and select the "Delete Link" button, or click the "Delete Link" button in the slide-out inspector panel to delete the edge between the two nodes in the graph database.
[0186] For example, to implement modification operations on the memory data in the graph database, after the user issues a specific command based on the interactive interface, the following interface functions can be used to perform corresponding operations on the graph database.
[0187] GET / api / graph?query={...}: Used to retrieve data from a graph database, and supports filtering.
[0188] GET / api / memory / {id}: Used to retrieve attribute information of a single memory node.
[0189] PUT / api / memory / {id}: Used to update the attribute information of a memory node.
[0190] POST / api / memory: Used to manually create a brand new memory node.
[0191] DELETE / api / memory / {id}: Used to delete a memory node and its associated edges.
[0192] POST / api / links: Used to create an edge between two memory nodes.
[0193] DELETE / api / links / {link_id}: Deletes the edge between two memory nodes.
[0194] In the embodiments of this application, various specific methods for updating the graph database based on memory graph modification operations are specified. These refined update mechanisms ensure that user interaction operations on the memory graph are accurately reflected in the underlying data, achieving consistent maintenance of memory data, reducing manual maintenance costs, and improving the efficiency and accuracy of memory data management.
[0195] Step S503: Based on the updated graph database, re-render the memory graph.
[0196] After the data in the graph database is updated, the terminal executes the process of rendering the memory graph again, transforming the updated data into a visual chart in the interactive interface. This ensures that the memory graph reflects the latest data status of the graph database in real time, guaranteeing that the graph seen by the user is consistent with the underlying data.
[0197] The solution provided in this application supports rendering a memory graph based on data in a graph database. It synchronously updates the graph database based on modifications to the memory graph and then re-renders the memory graph. This mechanism enables visual and interactive management of memory data, allowing users to intuitively view and adjust the data. This ensures the operability and transparency of the memory data, facilitates timely correction of memory information, and guarantees the accuracy of the memory data.
[0198] Based on the sixth embodiment described above, a seventh embodiment of this application is proposed. Contents that are the same as or similar to the sixth embodiment can be referred to the above description and will not be repeated hereafter. (Refer to...) Figure 8 In the seventh embodiment, after step S503, steps S601 to S604 are further included:
[0199] Step S601: Based on the operation that triggers memory evolution, determine the neighboring memory nodes of the memory node whose current attribute information has been updated.
[0200] Among them, the operation that triggers memory evolution refers to the triggering behavior that causes the graph database to update the associated memory. It can be a specific operation initiated by the user, such as clicking the "Update Associated Memory" button in the interactive interface; or it can be an operation that is automatically triggered by the terminal according to preset rules, such as detecting changes in the key attribute information of nodes in the graph database.
[0201] The memory node whose current attribute information has been updated refers to the memory node in the graph database whose attribute information, such as core content, keywords, and category tags, has been modified or supplemented. It is the starting node of this memory evolution process, and its attribute changes will trigger information adjustments of related nodes.
[0202] Neighbor memory nodes are all memory nodes in the graph database that are directly connected to the memory node whose current attribute information has been updated through edges. These are the objects that need to be adjusted later.
[0203] Step S602: Generate a model context based on the updated attribute information of the memory nodes and the attribute information of the neighboring memory nodes.
[0204] The model context is a set of information composed of the attribute information of the updated memory nodes and the attribute information of the neighboring memory nodes. It provides the large language model with background information to understand the relationship between the two and to judge the adjustment logic, so as to ensure that the adjustment operation conforms to the semantic logic.
[0205] Step S603: Using the large language model and based on the model context, adjust the attribute information of the neighbor memory nodes to obtain the adjusted attribute information of the neighbor memory nodes.
[0206] The adjusted attribute information of neighbor memory nodes is the new attribute information obtained by the large language model based on the model context after modifying, supplementing or optimizing the original attribute information of neighbor memory nodes.
[0207] Step S604: Update the adjusted attribute information of the neighbor memory nodes to the graph database.
[0208] The purpose of updating the attribute information of the neighbor memory nodes to the graph database is to ensure that the attribute information of the neighbor memory nodes is logically consistent with the attribute information of the updated memory nodes, thereby achieving the co-evolution of memory data.
[0209] For example, after updating the adjusted attribute information of neighboring memory nodes to the graph database, the memory graph can be re-rendered based on the updated data in the graph database, ensuring that the memory graph seen by the user reflects the evolution results of node attributes in real time.
[0210] For example, upon detecting an operation that triggers memory evolution, the terminal calls the interface function POST / api / evolve / {id} to initiate a memory evolution process for its neighboring memory nodes, centered on the memory node whose attribute information has been updated. This allows a single modification by the user to be intelligently propagated and generalized to relevant areas throughout the entire memory network through the model's capabilities.
[0211] The solution provided in this application, after the attributes of a memory node are updated, can trigger the adjustment of the attributes of its neighboring memory nodes. Specifically, a model context is constructed using a large language model based on the updated attribute information of the memory node and the attribute information of its neighboring memory nodes. Based on this model context, the attribute information of the neighboring memory nodes is intelligently adjusted and updated in the graph database. This memory evolution mechanism achieves chain optimization of associative memories, ensures the coordinated updating of related node information in the memory network, avoids memory logic contradictions caused by local updates, and enhances the overall consistency of memory data.
[0212] Figure 9 This is a schematic diagram of a large model memory data processing flow provided in an embodiment of this application. (Reference) Figure 9First, new user information is captured through human-computer interaction. Then, structured information is extracted from this new user information as new memory data. Next, the associated target historical memory data is adjusted based on the new memory data, and both the new and target historical memory data are updated in the graph database. Afterward, a memory graph is rendered based on the data in the graph database, facilitating manual review and maintenance of the memory data. Finally, based on manual modifications to the memory graph, both the graph database and the memory graph are updated, achieving the evolution of the memory data.
[0213] Current personalized AI (Artificial Intelligence) assistants face serious technical bottlenecks in long-term interactions with users, primarily in the area of "memory":
[0214] First, there's the issue of superficial and forgetful memory: Current AI assistants' memories are typically limited to brief conversational contexts or rely on simple keyword-triggered storage. They can remember a user's name or a few explicitly set preferences, but they cannot build a deep, structured understanding of a user's dynamically changing interests, habits, experiences, and emotions. Once the interaction is interrupted, most of this valuable information is forgotten, resulting in a disjointed user experience and a lack of true personalization.
[0215] Secondly, memory is static and rigid: Some advanced systems employ Retrieval-Augmented Generation (RAG) technology to store user information in vector databases. However, this kind of memory is static; the connections between memories are predefined or based on simple similarity calculations. It cannot autonomously discover new and meaningful logical connections between different memories, let alone evolve or update its understanding of old memories based on new interactions.
[0216] Thirdly, the memory black box and unreliability: AI's memory is a complete black box for users. Users don't know what the AI has remembered, nor what memories the AI bases its recommendations or judgments on. This lack of transparency makes it difficult for users to trust AI, and when the AI's memory is flawed—for example, mistakenly remembering the user's preferences—the user has no way to review or correct it.
[0217] Therefore, there is an urgent need in this field for a novel technical solution to address the superficial, static, and black-box nature of AI assistant memory, thereby achieving true deep personalization and long-term companionship.
[0218] This application provides a closed-loop memory management system integrating autonomous evolution and human intervention. The system architecture includes a memory acquisition module, a dynamic management module, a graph-based storage module, and a visualization intervention module. The memory acquisition module acquires new user information. The dynamic management module autonomously extracts structured memory data, associates new memory data with historical memory data, and updates historical memory data to achieve memory evolution. The graph-based storage module stores structured memory data to support the rendering of memory graphs. The visualization intervention module, based on the memory graph, supports human review, modification, and triggering of further evolution of memory data. The dynamic management module and the visualization intervention module are organically combined to form a complete, continuously optimized, human-machine collaborative personalized memory management closed loop.
[0219] This application provides a dynamic memory system that can evolve autonomously, is structurally interconnected, and supports human visual intervention, enabling AI assistants to achieve the following beneficial effects:
[0220] Achieve deep personalization: Learn from every user interaction and build a continuously growing and self-optimizing user cognitive network.
[0221] Provide highly contextualized services: Based on a deep understanding of users' history, preferences, and plans, offer truly thoughtful and accurate advice and assistance.
[0222] Building user trust: Making AI's memory transparent and manageable allows users to review, correct, and participate in the AI's cognitive construction process, thus establishing a trust relationship between humans and machines.
[0223] With this complete technical solution, the memory system of an intelligent assistant is no longer a black box. It becomes a transparent, maintainable, and reliable "living knowledge base," where human wisdom and experience can be seamlessly integrated into the AI's memory growth process, ultimately achieving a synergistic intelligent effect where 1+1>2.
[0224] Another point to note is that the above examples are only for understanding this application and do not constitute a limitation on the large model memory processing method of this application. Any simple transformations based on this technical concept are all within the protection scope of this application.
[0225] This application also provides a large model memory processing device; please refer to [reference needed]. Figure 10 The large model memory processing device includes:
[0226] The memory retrieval module 10 is used to retrieve new memory data from the model memory update command in response to the model memory update command;
[0227] Memory query module 20 is used to query target historical memory data associated with new memory data from the data storage area;
[0228] The memory adjustment module 30 is used to adjust the target historical memory data based on the new memory data through a large language model to obtain the adjusted target historical memory data.
[0229] The memory storage module 40 is used to store new memory data in the data storage area and update the original target historical memory data in the data storage area with the adjusted target historical memory data. The memory data in the data storage area is used for model question answering.
[0230] Optionally, the memory extraction module 10 is used to retrieve new user information from the model memory update instruction in response to the model memory update instruction; extract structured information from the new user information through a large language model, the structured information containing the core content of the new user information, as well as at least one of the information of summary, keywords and classification labels; and generate new memory data containing structured information.
[0231] Optionally, the memory adjustment module 30 is used to generate a model context based on the new memory data and the target historical memory data; and through a large language model, based on the model context, adjust the structured information contained in the target historical memory data to obtain the adjusted target historical memory data.
[0232] Optionally, the memory storage module 40 is used to create the following information in the graph database based on the new memory data:
[0233] The new memory node has structured attribute information.
[0234] The attribute information includes the tag nodes corresponding to the category labels, and the edges connecting the tag nodes to the new memory nodes;
[0235] The keyword nodes corresponding to the keywords in the attribute information, and the edges connecting the keyword nodes and the new memory nodes;
[0236] An edge connects the new memory node to the target historical memory node, where the target historical memory node is the memory node corresponding to the target historical memory data.
[0237] Optionally, the device further includes:
[0238] The graph rendering module is used to respond to the memory graph viewing command and render the memory graph in the interactive interface based on the data in the graph database.
[0239] The memory update module is used to update the data in the graph database based on the modification operations on the memory graph;
[0240] The graph update module is used to re-render the memory graph based on the updated data in the graph database.
[0241] Optionally, the memory update module is used to perform at least one of the following operations:
[0242] Based on the trigger operation of any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface. Based on the modification operation of the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database.
[0243] Based on the modification operation of the classification label corresponding to any label node in the memory graph, the neighboring memory nodes of the label node are determined. In the graph database, the classification label in the attribute information of the neighboring memory nodes is updated to the modified classification label.
[0244] Based on the modification operation of the keyword corresponding to any keyword node in the memory graph, the neighboring memory nodes of the keyword node are determined. In the graph database, the keywords in the attribute information of the neighboring memory nodes are updated with the modified keywords.
[0245] Based on the operations of adding or deleting nodes in the memory graph, nodes are created or deleted in the graph database;
[0246] Based on the operation of adding or deleting an edge between any two nodes in the memory graph, add or delete an edge between any two nodes in the graph database.
[0247] Optionally, the device further includes:
[0248] The memory evolution module is used to determine the neighboring memory nodes of the memory node whose attribute information has been updated based on the operation that triggers memory evolution; generate a model context based on the attribute information of the updated memory node and the attribute information of the neighboring memory nodes; adjust the attribute information of the neighboring memory nodes based on the model context through the large language model to obtain the adjusted attribute information of the neighboring memory nodes; and update the adjusted attribute information of the neighboring memory nodes to the graph database.
[0249] Optionally, the device further includes:
[0250] The node search module is used to obtain the input node search criteria, which include at least one of keywords, category labels, and time ranges; and to highlight the nodes in the memory graph that match the node search criteria, as well as the neighboring nodes of those nodes.
[0251] Optionally, the memory storage module 40 is also used to store the feature vector of the new memory data into the vector database, and the memory identifier corresponding to the feature vector is the same as the memory identifier corresponding to the new memory node in the graph database.
[0252] Optionally, the memory query module 20 is used to determine the similarity between the feature vector of the new memory data and the feature vector of each historical memory data in the data storage area; to filter out the historical memory data with the highest similarity from the data storage area; to determine the logical relationship between the filtered historical memory data and the new memory data through a large language model; and to determine the target historical memory data associated with the new memory data from the multiple historical memory data based on the logical relationship.
[0253] The large model memory processing apparatus provided in this application, employing the large model memory processing method described in the above embodiments, can solve the technical problem in related technologies where the quality of stored large model memory data is low, leading to unstable model response performance. Compared with the prior art, the beneficial effects of the large model memory processing apparatus provided in this application are the same as those of the large model memory processing method described in the above embodiments, and other technical features in the large model memory processing apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0254] This application provides a large model memory processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the large model memory processing method described above.
[0255] The following is for reference. Figure 11 This document illustrates a structural schematic diagram of a large model memory processing device suitable for implementing embodiments of this application. The large model memory processing device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The large model memory processing device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0256] like Figure 11As shown, the large model memory processing device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the large model memory processing device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the large model memory processing device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a large model memory processing device with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.
[0257] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0258] The large model memory processing device provided in this application, employing the large model memory processing method described in the above embodiments, can solve the technical problem in related technologies where the quality of stored large model memory data is low, leading to unstable model response performance. Compared with the prior art, the beneficial effects of the large model memory processing device provided in this application are the same as those of the large model memory processing method provided in the above embodiments, and other technical features of this large model memory processing device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0259] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0260] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0261] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the large model memory processing method described in the above embodiments.
[0262] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0263] The aforementioned computer-readable storage medium may be included in a large model memory processing device; or it may exist independently and not be assembled into a large model memory processing device.
[0264] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a large model memory processing device, cause the large model memory processing device to: extract new memory data from a model memory update instruction in response to the instruction; query target historical memory data associated with the new memory data from a data storage area; adjust the target historical memory data based on the new memory data using a large language model to obtain adjusted target historical memory data; store the new memory data in a data storage area and update the existing target historical memory data in the data storage area with the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering.
[0265] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0266] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0267] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0268] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described large model memory processing method. This solves the technical problem in related technologies where the quality of stored large model memory data is low, leading to unstable model response performance. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the large model memory processing method provided in the above embodiments, and will not be repeated here.
[0269] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the large model memory processing method described above.
[0270] The computer program product provided in this application can solve the technical problem in related technologies where the quality of large model memory data is low, leading to unstable model response performance. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the large model memory processing method provided in the above embodiments, and will not be repeated here.
[0271] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for processing large model memory, characterized in that, The method includes: In response to a model memory update instruction, structured information of new user information is extracted from the instruction, and new memory data containing the structured information is generated. The structured information includes the core content, keywords, and classification tags of the new user information. Query the target historical memory data associated with the new memory data from the data storage area; Using a large language model, the structured information contained in the target historical memory data is adjusted based on the new memory data to obtain the adjusted target historical memory data. Based on the new memory data, the following information is created in the data storage area: A new memory node, wherein the attribute information of the new memory node is the structured information; The category labels and keywords in the attribute information correspond to the label nodes and keyword nodes, respectively; The edges between the new memory node and the tag node, the keyword node and the target historical memory node are respectively connected, and the target historical memory node is the memory node corresponding to the target historical memory data; The original target historical memory data in the data storage area is updated to the adjusted target historical memory data, and the memory data in the data storage area is used for model question answering; The method further includes: Render a memory map and modify the data in the data storage area based on the memory map; In response to the operation that triggers memory evolution, a model context is generated based on the updated attribute information of the memory node and the attribute information of its neighboring memory nodes; Using the large language model and based on the model context, the attribute information of the neighbor memory nodes is adjusted to obtain the adjusted attribute information; The adjusted attribute information of the neighbor memory node is updated to the data storage area.
2. The method as described in claim 1, characterized in that, The structured information for extracting new user information from the model memory update instruction in response to the instruction includes: In response to the model memory update instruction, the new user information is obtained from the model memory update instruction; The structured information is extracted from the new user information using the large language model.
3. The method as described in claim 2, characterized in that, The process involves adjusting the structured information contained in the target historical memory data based on the new memory data using a large language model, resulting in adjusted target historical memory data, including: A model context is generated based on the new memory data and the target historical memory data; Using the large language model and based on the model context, the structured information contained in the target historical memory data is adjusted to obtain the adjusted target historical memory data.
4. The method as described in claim 1, characterized in that, The rendering of the memory map, and the modification of data in the data storage area based on the memory map, includes: In response to a memory map viewing command, the memory map is rendered in the interactive interface based on data in the graph database, wherein the data storage area contains the graph database; Based on the modification operations on the memory map, the data in the graph database is updated; The memory graph is re-rendered based on the updated data in the graph database.
5. The method of claim 4, wherein, The updating of data in the graph database based on the modification operation of the memory graph includes at least one of the following: Based on the trigger operation of any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface. Based on the modification operation of the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database. Based on the modification operation of the classification label corresponding to any label node in the memory graph, the neighbor memory nodes of the label node are determined, and the classification label in the attribute information of the neighbor memory node is updated to the modified classification label in the graph database. Based on the modification operation of the keyword corresponding to any keyword node in the memory graph, the neighbor memory nodes of the keyword node are determined, and the keywords in the attribute information of the neighbor memory nodes are updated to the modified keywords in the graph database. Based on the operation of adding or deleting nodes in the memory graph, nodes are created or deleted in the graph database; Based on the operation of adding or deleting an edge between any two nodes in the memory graph, an edge between any two nodes is added or deleted in the graph database.
6. A large model memory processing device, characterized in that, The device includes: The memory extraction module is used to extract structured information of new user information from the instruction in response to the model memory update instruction, and generate new memory data containing the structured information, wherein the structured information contains the core content, keywords and classification tags of the new user information; The memory query module is used to query target historical memory data associated with the new memory data from the data storage area; The memory adjustment module is used to adjust the structured information contained in the target historical memory data based on the new memory data using a large language model, so as to obtain the adjusted target historical memory data. A memory storage module is used to create the following information in the data storage area based on the new memory data: a new memory node, the attribute information of which is the structured information; a tag node and a keyword node corresponding to the classification label and keyword in the attribute information, respectively; edges between the new memory node and the tag node, the keyword node, and the target historical memory node, where the target historical memory node is the memory node corresponding to the target historical memory data; and to update the original target historical memory data in the data storage area with the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering. The graph rendering module is used to render memory graphs; A memory update module is used to modify the data in the data storage area based on the memory map; The memory evolution module is used to respond to the operation that triggers memory evolution by generating a model context based on the updated attribute information of the memory node and the attribute information of its neighboring memory nodes; adjusting the attribute information of the neighboring memory nodes based on the model context through the large language model to obtain the adjusted attribute information; and updating the adjusted attribute information of the neighboring memory nodes to the data storage area.
7. A large model memory processing device, comprising: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the large model memory processing method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the large model memory processing method as described in any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the large model memory processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Large model persistent storage method, device and equipment and storage medium
CN119378503A