Large model memory processing method and device, equipment, storage medium and product

By structuring and adjusting the memory data of a large language model, the problem of inconsistent memory data quality is solved, dynamic evolution and semantic consistency of the memory data are realized, and response performance and user experience are improved.

CN121144976APending Publication Date: 2025-12-16BEIJING QIHOOD TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511212802.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

The quality of memory data accumulated by large language models during interaction varies, leading to a decrease in the stability of response performance and affecting the interaction effect.

Method used

By responding to model memory update instructions through a large language model, new memory data is extracted, the target historical memory data associated with it is queried and adjusted, structured information is generated, stored in a graph database, and the memory data in the data storage area is updated.

Benefits of technology

It enables the dynamic evolution of memory data, ensures the semantic consistency and logical coherence of the data, improves the quality of memory data, and guarantees the response performance and user experience of large language models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144976A_ABST
    Figure CN121144976A_ABST
Patent Text Reader

Abstract

The invention discloses a large model memory processing method and device, equipment, a storage medium and a product, relates to the technical field of artificial intelligence, and discloses a method for extracting new memory data from a model memory updating instruction in response to the model memory updating instruction; querying target historical memory data associated with the new memory data from a data storage area; adjusting the target historical memory data based on the new memory data through a large language model to obtain adjusted target historical memory data; the new memory data is stored in a data storage area, 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 questions and answers. According to the method, the quality of memory data of the large language model can be effectively improved, so that the answer performance of the large language model is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a large model memory processing method and device, equipment, a storage medium and a product. BACKGROUND

[0002] In the interaction process of a large language model and a user, the system continuously accumulates user information and stores it as memory data in a database. These memory data provide a reference for the model in subsequent interactions to enhance the coherence and personalization of the dialogue and significantly improve the user experience.

[0003] However, as the number of interactions increases, the scale of the memory data stored in the database continues to expand, and the quality of the memory data presents a mixed situation. Part of the memory data can accurately reflect the user information or demand, but a considerable proportion of the data is biased or even wrong. When the model answers based on these memory data of poor quality, it is easy to have problems such as the response content not matching the actual situation of the user and logical contradictions, which leads to a significant decline in the stability of the answer performance and seriously affects the interaction effect.

[0004] Therefore, how to effectively improve the quality of the memory data of the large language model to ensure the answer performance of the model has become a key problem to be solved at present.

[0005] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0006] The main purpose of the present application is to provide a large model memory processing method, device, equipment, storage medium and product, which can effectively improve the quality of the memory data of the large language model and thus ensure the answer performance of the large language model.

[0007] To achieve the above purpose, the present application provides a large model memory processing method, which comprises the following steps:

[0008] In response to a model memory update instruction, new memory data is extracted from the model memory update instruction;

[0009] Target historical memory data associated with the new memory data is queried from a data storage area;

[0010] Through a large language model, the target historical memory data is adjusted based on the new memory data, and the adjusted target historical memory data is obtained;

[0011] store the new memory data to the data storage area, and update the target historical memory data originally in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question and answer.

[0012] Optionally, the extracting, in response to the model memory updating instruction, new memory data from the model memory updating instruction comprises:

[0013] acquiring, in response to the model memory updating instruction, new user information from the model memory updating instruction;

[0014] extracting, by the large language model, structured information from the new user information, the structured information containing core content of the new user information, and at least one of abstract, keyword and classification label information;

[0015] generating the new memory data containing the structured information.

[0016] Optionally, the adjusting, by the large language model, the target historical memory data based on the new memory data to obtain the adjusted target historical memory data comprises:

[0017] generating a model context based on the new memory data and the target historical memory data;

[0018] adjusting, by the large language model, structured information contained in the target historical memory data based on the model context to obtain the adjusted target historical memory data.

[0019] Optionally, the storing the new memory data to the data storage area comprises creating the following information in a graph database based on the new memory data:

[0020] a new memory node, attribute information of the new memory node being the structured information;

[0021] a label node corresponding to the classification label in the attribute information, and an edge connecting the label node and the new memory node;

[0022] a keyword node corresponding to the keyword in the attribute information, and an edge connecting the keyword node and the new memory node;

[0023] an edge connecting the new memory node and a target historical memory node, the target historical memory node being a memory node corresponding to the target historical memory data.

[0024] Optionally, the method further comprises:

[0025] In response to a memory graph viewing instruction, a memory graph is rendered in an interactive interface based on data in the graph database;

[0026] Based on the modification operation on the memory graph, the data in the graph database is updated;

[0027] Based on the updated data in the graph database, the memory graph is re-rendered.

[0028] Optionally, the updating of the data in the graph database based on the modification operation on the memory graph comprises at least one of the following:

[0029] Based on the trigger operation on any memory node in the memory graph, attribute information of the memory node is displayed in the interactive interface, and based on the modification operation on the attribute information, the attribute information of the memory node is updated to modified attribute information in the graph database;

[0030] Based on the modification operation on the classification label corresponding to any label node in the memory graph, neighbor memory nodes of the label node are determined, and in the graph database, the classification label in the attribute information of the neighbor memory nodes is updated to the modified classification label;

[0031] Based on the modification operation on the keyword corresponding to any keyword node in the memory graph, neighbor memory nodes of the keyword node are determined, and in the graph database, the keyword in the attribute information of the neighbor memory nodes is updated to the modified keyword;

[0032] Based on the operation of adding or deleting a node in the memory graph, a node is 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 the two nodes is added or deleted in the graph database.

[0034] Optionally, after the memory graph is re-rendered based on the updated data in the graph database, the method further comprises:

[0035] Based on the operation of triggering memory evolution, neighbor memory nodes of a memory node whose attribute information has been updated are determined;

[0036] Based on the attribute information of the updated memory node and the attribute information of the neighbor memory nodes, a model context is generated;

[0037] Through the large language model, the attribute information of the neighbor memory nodes is adjusted based on the model context to obtain adjusted attribute information of the neighbor memory nodes;

[0038] updating the adjusted attribute information of the neighbor memory node to 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 instruction, the method further comprises:

[0040] obtaining an input node search condition, the node search condition comprising at least one of a keyword, a classification label, and a time range;

[0041] highlighting the node matching the node search condition and the neighbor node of the node in the memory graph.

[0042] Optionally, the storing the new memory data to the data storage area further comprises:

[0043] storing a feature vector of the new memory data to a vector database, and the memory identifier corresponding to the feature vector being the same as the memory identifier corresponding to the new memory node in the graph database.

[0044] Optionally, the querying the target historical memory data associated with the new memory data from the data storage area comprises:

[0045] determining a similarity between the feature vector of the new memory data and the feature vector of each historical memory data in the data storage area;

[0046] filtering out a plurality of historical memory data corresponding to the maximum similarity from the data storage area;

[0047] determining a logical relationship between the plurality of filtered historical memory data and the new memory data by the large language model, and determining the target historical memory data associated with the new memory data from the plurality of historical memory data based on the logical relationship.

[0048] In addition, to achieve the above-mentioned purpose, the present application further provides a large model memory processing device, the device comprises:

[0049] a memory extraction module configured to extract new memory data from a model memory update instruction in response to the model memory update instruction;

[0050] a memory query module configured to query target historical memory data associated with the new memory data from a data storage area;

[0051] a memory adjustment module configured to adjust the target historical memory data based on the new memory data by a large language model to obtain adjusted target historical memory data.

[0052] a memory storage module, configured to store the new memory data into the data storage area, and update the target historical memory data originally in the data storage area as 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, acquire 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 containing core content of the new user information, and at least one of abstract, keyword and classification label information; and generate the new memory data containing the structured information.

[0054] Optionally, the memory adjustment module is configured to generate a model context based on the new memory data and the target historical memory data; and adjust the structured information contained in the target historical memory data based on the model context through the large language model, to obtain the adjusted target historical memory data.

[0055] Optionally, the memory storage module is configured to create the following information in a graph database based on the new memory data:

[0056] a new memory node, attribute information of the new memory node being the structured information;

[0057] a label node corresponding to the classification label in the attribute information, and an edge connecting the label node and the new memory node;

[0058] a keyword node corresponding to the keyword in the attribute information, and an edge connecting the keyword node and the new memory node;

[0059] an edge connecting the new memory node and a target historical memory node, the target historical memory node being a memory node corresponding to the target historical memory data.

[0060] Optionally, the apparatus further comprises:

[0061] a graph rendering module, configured to, in response to a memory graph viewing instruction, render a memory graph in an interactive interface based on data in the graph database;

[0062] a memory updating module, configured to update the data in the graph database based on a modification operation on the memory graph;

[0063] a graph updating module, configured to re-render the memory graph based on the data in the updated graph database.

[0064] Optionally, the memory updating module is configured to perform at least one of the following operations:

[0065] Based on a triggering operation on any memory node in the memory graph, attribute information of the memory node is displayed in the interaction interface, and based on a modification operation on the attribute information, attribute information of the memory node is updated to modified attribute information in the graph database.

[0066] Based on a modification operation on a classification label corresponding to any label node in the memory graph, neighbor memory nodes of the label node are determined, and in the graph database, a classification label in attribute information of the neighbor memory nodes is updated to a modified classification label.

[0067] Based on a modification operation on a keyword corresponding to any keyword node in the memory graph, neighbor memory nodes of the keyword node are determined, and in the graph database, a keyword in attribute information of the neighbor memory nodes is updated to a modified keyword.

[0068] Based on an operation of adding or deleting a node in the memory graph, a node is created or deleted in the graph database.

[0069] Based on an operation of adding or deleting an edge between any two nodes in the memory graph, an edge between the any two nodes is added or deleted in the graph database.

[0070] Optionally, the apparatus further comprises:

[0071] The memory evolution module is configured to, based on an operation of triggering memory evolution, determine neighbor memory nodes of a memory node whose attribute information has been updated; based on attribute information of the updated memory node and attribute information of the neighbor memory nodes, generate a model context; based on the model context, adjust, by the large language model, the attribute information of the neighbor memory nodes to obtain adjusted attribute information of the neighbor memory nodes; and update the adjusted attribute information of the neighbor memory nodes to the graph database.

[0072] Optionally, the apparatus further comprises:

[0073] The node search module is configured to obtain an input node search condition, the node search condition including at least one of a keyword, a classification label, and a time range; and highlight nodes in the memory graph that match the node search condition and neighbor nodes of the nodes.

[0074] Optionally, the memory storage module is further configured to store the feature vector of the new memory data into a vector database, and a memory identifier corresponding to the feature vector is the same as a memory identifier corresponding to the new memory node in the graph database.

[0075] Optionally, the memory query module is configured to determine a similarity between the feature vector of the new memory data and feature vectors of historical memory data in the data storage area, filter a plurality of historical memory data corresponding to the maximum similarity from the data storage area, determine a logical relationship between the plurality of filtered historical memory data and the new memory data through the large language model, and determine the target historical memory data associated with the new memory data from the plurality of historical memory data based on the logical relationship.

[0076] In addition, to achieve the above-mentioned purpose, the present application further provides a large model memory processing device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the large model memory processing method as described above.

[0077] In addition, to achieve the above-mentioned purpose, the present application further provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the large model memory processing method as described above.

[0078] In addition, to achieve the above-mentioned purpose, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the large model memory processing method as described above.

[0079] The one or more technical solutions provided by the present application have at least the following technical effects:

[0080] The large model memory processing scheme provided by the present application not only extracts and stores new memory data when receiving a model memory update instruction, but also actively queries target historical memory data associated with the new memory data. The large language model is used to intelligently adjust the target historical memory data, realizing 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 the new memory data into the data storage area and updating the original target historical memory data in the data storage area to the adjusted target historical memory data, not only the dynamic evolution of memory data is realized, but also the semantic consistency and logical coherence of memory data in the data storage area are ensured, which significantly improves the quality of memory data, thereby ensuring the reliability of the large language model answering performance and enhancing the user experience. BRIEF DESCRIPTION OF DRAWINGS

[0081] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required by the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those skilled in the field, other drawings can also be obtained based on these drawings without creative labor.

[0083] Figure 1 A schematic diagram of an implementation environment of a large model memory processing method of the present application;

[0084] Figure 2 A flowchart schematic diagram provided by a first embodiment of the large model memory processing method of the present application;

[0085] Figure 3 A detailed step schematic diagram of step S10 in the second embodiment of the large model memory processing method of the present application;

[0086] Figure 4 A detailed step schematic diagram of step S20 in the third embodiment of the large model memory processing method of the present application;

[0087] Figure 5 A detailed step schematic diagram of step S30 in the fourth embodiment of the large model memory processing method of the present application;

[0088] Figure 6 A detailed step schematic diagram of step S40 in the fifth embodiment of the large model memory processing method of the present application;

[0089] Figure 7 A schematic diagram of the newly added step in the sixth embodiment of the large model memory processing method of the present application;

[0090] Figure 8 A schematic diagram of the newly added step in the seventh embodiment of the large model memory processing method of the present application;

[0091] Figure 9 A schematic diagram of a large model memory data processing flow provided by an embodiment of the present application;

[0092] Figure 10 A module structure schematic diagram of the large model memory processing device of the embodiment of the present application;

[0093] Figure 11 A device structure schematic diagram of a hardware running environment involved in the large model memory processing method in the embodiment of the present application.

[0094] The purposes, functional features and advantages of the present application will be further illustrated in conjunction with the embodiments, with reference to the accompanying drawings. DETAILED DESCRIPTION

[0095] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.

[0096] In order to better understand the technical solutions of the present application, the specific embodiments will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0097] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present disclosure. Referring to Figure 1 , the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are connected through a wireless or wired network. Illustratively, the terminal 101 is installed with a target application provided by the server 102, and the terminal 101 can realize functions such as data transmission, message interaction, etc. through the target application.

[0098] Illustratively, the terminal 101 is a computer, a mobile phone, a tablet computer, a smart speaker, a vehicle-mounted terminal, or other terminals. Illustratively, the target application is a target application in the operating system of the terminal 101, or a target application provided by a third party. For example, the target application is a search application, a short video application, a chat application, etc. Illustratively, the server 102 is a background server corresponding to the target application. Correspondingly, the server 102 is a search application server, a short video application server, a chat application server, etc.

[0099] In the present application, the server 102 is configured to respond to a model memory update instruction, extract new memory data from the model memory update 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 through a large language model to obtain adjusted target historical memory data; store the new memory data to the data storage area, and update the original target historical memory data in the data storage area to the adjusted target historical memory data. The terminal 101 is configured to respond to a dialogue instruction, extract a user question from the dialogue instruction, and forward the user question to the server 102. The server 102 is configured to generate an answer corresponding to the user question based on the memory data in the data storage area.

[0100] Alternatively, the above-mentioned large model memory processing process can also be completed by the terminal 101 alone. Alternatively, the terminal 101 completes it through the installed target application, and the embodiments of the present application do not limit this.

[0101] The application scenarios of the large model memory processing method are in the field of intelligent services that require continuous learning and personalized interaction. For example, the following application scenarios:

[0102] Personalized intelligent assistant: During the use of personal intelligent assistants such as mobile phone voice assistants, smart speakers, car terminals, PC (Personal Computer) terminals, and the like, users will continuously provide new preference information such as work and rest times, frequently used locations, eating habits, reading styles, and the like. In the case where the personalized intelligent assistant obtains new user information, the personalized intelligent assistant can automatically adjust the relevant historical memory through the large language model, thereby constructing a deep and structured understanding of the user's dynamically changing interests, habits, experiences, and emotions, to achieve more natural and coherent personalized services. For example, when the personalized intelligent assistant obtains new information that the user has changed work locations, it will automatically associate data such as the user's original work location and navigation preferences in the historical memory, analyze the scenario relevance through the large language model, determine that the core parameters of the commuting scenario have changed, and then automatically update the relevant memory information, such as default switching to the optimal path of the new work location in the navigation settings, synchronously adjusting the recommended range of services around the workday to the vicinity of the new work location, and the like. In this way, when providing subsequent navigation services or information recommendation services for the user, not only can the user's basic habits be continued, but also the service details can be dynamically optimized based on the new information, greatly improving the user experience.

[0103] Figure 2 The flowchart of the first embodiment of the large model memory processing method of the present application is shown. Referring to Figure 2 Taking the terminal as an example, the large model memory processing method includes the following steps S10-S40:

[0104] Step S10, in response to the model memory update instruction, extracting new memory data from the model memory update instruction.

[0105] The model memory update instruction is an instruction that triggers the model to start the memory update process, and contains information that needs to be updated to the model memory. The new memory data is information extracted from the model memory update instruction and needs to be included in the model memory.

[0106] For example, the terminal listens to and records various types of input information of the user in real time through the user-authorized API interface or background service, including but not limited to: text dialogue, voice transcription content, uploaded files, shared links, and the like. In the case where new user information is obtained, a model memory update instruction containing the new user information is generated. Then the terminal pre-processes the new user information, such as converting it to the target format after adding necessary metadata, thereby obtaining the new memory data. The metadata can include timestamps, information sources, interaction types, and the like. For example, the information source can be WeChat, and the interaction type is

[0107] Step S20, querying 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 for storing various types of memory data accumulated by the model in the past.

[0109] The target historical memory data is the historical memory data associated with the new memory data queried from the data storage area, which is the object that needs to be adjusted based on the new memory data subsequently.

[0110] Exemplarily, the target historical memory data associated with the new memory data can be queried by 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. Alternatively, a keyword matching method is used to query the historical memory data containing keywords that match the keywords contained in the new memory data to a degree higher than a threshold value as the target historical memory data associated with the new memory data. Of course, other methods can also be used to query the target historical memory data, which is not limited by the embodiments of the present application.

[0111] Step S30, adjusting the target historical memory data based on the new memory data by the large language model to obtain the adjusted target historical memory data.

[0112] The large language model is an artificial intelligence model trained by large-scale data, which has the ability to understand, analyze and generate natural language.

[0113] The adjusted target historical memory data is a new version of the target historical memory data obtained by adjusting the target historical memory data based on the new memory data through the large language model.

[0114] Exemplarily, the model context can be generated based on the new memory data and the target historical memory data, and the target historical memory data can be adjusted based on the model context by the large language model to obtain the adjusted target historical memory data. Since the large language model has strong semantic understanding and context reasoning ability, it can identify the logical relationship between new and old memories, so it can realize dynamic correction of the target historical memory data, avoid information conflict or redundancy, and improve the accuracy of the memory data in the data storage area.

[0115] Step S40, storing the new memory data to the data storage area, and updating the original target historical memory data in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question and answer.

[0116] After the original target historical memory data is intelligently adjusted by using the large language model, the new memory data is stored in the data storage area, and the adjusted target historical memory data is used to replace the original target historical memory data in the data storage area. The purpose of this is to ensure that the subsequent model can generate responses based on the latest, most accurate and semantically coherent memory data when reasoning, thereby improving the relevance and personalization level of the answers.

[0117] The large model memory processing scheme provided in the present application not only extracts and stores new memory data when receiving a model memory update instruction, but also actively queries target historical memory data associated with the new memory data. The large language model is used to intelligently adjust the target historical memory data, realizing the organic integration and optimization of new and old memories, and avoiding memory conflicts or information redundancy caused by simply accumulating new memory data in the data storage area. By storing the new memory data in the data storage area and updating the original target historical memory data in the data storage area to the adjusted target historical memory data, not only the dynamic evolution of memory data is realized, but also the semantic consistency and logical coherence of the memory data in the data storage area are ensured, which significantly improves the quality of the memory data, thereby ensuring the reliability of the large language model answer performance and enhancing the user experience.

[0118] Based on the above first embodiment, the second embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above introduction, and the following will not be repeated. Refer to Figure 3 In the second embodiment, the above step S10 includes steps S101-S103:

[0119] Step S101, in response to the model memory update instruction, obtaining new user information from the model memory update instruction.

[0120] The new user information is new information about the user obtained from the model memory update instruction, and is the original user-related content that needs to be processed and stored in this memory update process.

[0121] Step S102, extracting structured information from the new user information by using the large language model, the structured information containing at least one of the core content of the new user information, and the summary, keywords and classification tags.

[0122] The structured information is information with a standard format and an organizational form extracted from the new user information by the large language model, contains core content of the new user information, and contains at least one of an abstract, a keyword, and a classification label. The core content is the most critical and core substantive information in the new user information, and is a refinement of the essential content of the user information. The abstract is a brief summary of the main content of the new user information, and can quickly reflect the core points of the information. The keyword is a word extracted from the new user information and capable of representing the theme or core concept of the information. The classification label is a label indicating the category to which the new user information belongs, labeled according to the content attribute of the new user information.

[0123] For example, the structured information can also contain other content, such as a timestamp, a feature vector of the new user information, etc. Among them, the feature vector of the user information can be a vector spliced from the feature vectors of the core content, the abstract, the keyword, and the classification label, or the feature vector of the core content can be directly used as the feature vector of the user information.

[0124] Step S103, generating new memory data containing the structured information.

[0125] The scheme provided by the embodiments of the present application extracts structured information containing core content and abstract, keyword, classification label, etc. from the new user information by the large language model, and generates new memory data. This structured processing improves the organization and usability of the memory data, and further enhances the memory accuracy and application efficiency of the large model for user information.

[0126] Based on the above first embodiment, the third embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above introduction, and will not be described hereinafter. Refer to Figure 4 In the third embodiment, the above step S20 includes steps S201-S203:

[0127] Step S201, determining 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 converted from the memory data by 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, abstract, keyword, and classification label, which can be converted 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 above second embodiment, and the embodiments of the present application do not distinguish between them.

[0129] The similarity is an index for measuring the closeness between the feature vector of the new memory data and the feature vector of the historical memory data, and a higher value indicates that the two are closer in features.

[0130] In step S202, a plurality of historical memory data with the largest corresponding similarity are screened out from the data storage area.

[0131] The plurality of historical memory data are a plurality of historical memory data with the largest similarity to the feature vector of the new memory data, which are screened out from the data storage area, and are candidate objects for further analysis of the correlation. The number of historical memory data screened based on the similarity can be set as needed, and the embodiments of the present application do not limit this.

[0132] For example, the data storage area includes a vector database and a graph database, the graph database is used to store structured memory data, the vector database is used to store feature vectors of the memory data, and the feature vectors in the vector database are associated with the structured memory data stored in the graph database through memory identifiers. Correspondingly, the implementation manner of screening out a plurality of historical memory data with the largest corresponding similarity from the data storage area is: querying a plurality of feature vectors with the largest similarity to the new memory data from the vector database, determining memory identifiers of the plurality of feature vectors, and querying a plurality of historical memory data corresponding to the plurality of memory identifiers from the graph database. For example, the graph database is Neo4j (Network Engine for Objects, object-oriented network engine), and the vector data is Pinecone (the name of a vector database).

[0133] In step S203, a large language model is used to determine the logical relationship between the plurality of historical memory data screened out and the new memory data, and a target historical memory data associated with the new memory data is determined from the plurality of historical memory data based on the logical relationship.

[0134] The logical relationship between the historical memory data and the new memory data refers to the internal connection between the historical memory data and the new memory data, such as a cause-and-effect relationship, a subordinate relationship, an analogy relationship, a progressive relationship, etc., which reflects the semantic association between the data.

[0135] The target historical memory data is a historical memory data with a deep correlation determined from the plurality of historical memory data screened out by analyzing the logical relationship between each historical memory data and the new memory data through the large language model.

[0136] The scheme provided by the embodiment of the application filters a plurality of candidate historical memory data by first calculating the feature vector similarity, and then determines the target historical memory data by using a large language model to analyze the logical relationship. This two-step query mechanism not only quickly narrows down the range through similarity calculation, but also accurately locates the associated target historical memory data with the help of logical analysis, avoiding misjudgment caused by simply relying on similarity and improving the accuracy and efficiency of target historical memory data query, thereby providing a reliable premise for effective fusion of new and old memories.

[0137] Based on the above-mentioned second embodiment, the fourth embodiment of the application is proposed. The same or similar contents as the first embodiment can be referred to the above description, and will not be described in detail hereinafter. Refer to Figure 5 In the fourth embodiment, the above-mentioned step S30 includes steps S301-S302:

[0138] Step S301, generating a model context based on the new memory data and the target historical memory data.

[0139] The model context refers to reference information for the large language model to adjust the target historical memory data, which is jointly constituted by the new memory data and the target historical memory data.

[0140] Step S302, adjusting the structured information contained in the target historical memory data based on the model context by using the large language model, to obtain the adjusted target historical memory data.

[0141] The structured information contained in the target historical memory data is information with a standard format and an organization form in the target historical memory data, including core content, abstract, keyword, classification label, etc., which is the specific object of 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 perfecting the structured information of the target historical memory data based on the model context by using the large language model.

[0143] The scheme provided by the embodiment of the application generates a model context based on the new memory data and the target historical memory data when adjusting the target historical memory data, so that the large language model can adjust the structured information of the target historical memory data in a targeted manner based on a full understanding of the association between the two. This accurate adjustment based on the 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, improves the accuracy and rationality of memory adjustment, and further optimizes the quality of memory data in the data storage area.

[0144] Based on the second embodiment, the fifth embodiment of the present application is proposed. The same or similar contents as the first embodiment can be referred to the above description, and will not be described hereinafter. Figure 6 In the fifth embodiment, the step S40 includes steps S401-S404.

[0145] In step S401, a new memory node is created in the graph database based on the new memory data, and the attribute information of the new memory node is structured information.

[0146] The graph database is a database with a "node-edge-node" graph structure as the core storage mode, which is used to store and manage data with complex association relationship, and can efficiently query the connection relationship between data. Compared with the traditional relational database, it is more suitable to show the network association between data, such as the association of memory data, tags, keywords, and historical memory data.

[0147] The new memory node is a core data unit created in the graph database for the new memory data, which is the corresponding entity object of the new memory data in the graph database. The attribute information directly comes from the structured information contained in the new memory data, which is the key information to distinguish the new memory node from other memory nodes.

[0148] In step S402, a tag node corresponding to the classification tag in the attribute information is created, and an edge connecting the tag node and the new memory node is created.

[0149] The tag node is a node created in the graph database for the classification tag in the attribute information of the new memory data, which is the corresponding entity object of the classification tag in the graph database. It can be used to classify and manage memory nodes with the same classification tag, and facilitate subsequent filtering of memory data by tags.

[0150] In step S403, a keyword node corresponding to the keyword in the attribute information is created, and an edge connecting the keyword node and the new memory node is created.

[0151] The keyword node is a node created in the graph database for the keyword in the attribute information of the new memory data, which is the corresponding entity object of the keyword in the graph database. It can be used to quickly retrieve all memory nodes containing the keyword through the keyword, and improve the retrieval efficiency of memory data.

[0152] In step S404, an edge connecting the new memory node and the target historical memory node is created, and the target historical memory node is the memory node corresponding to the target historical memory data.

[0153] Edge is used to describe the association relationship between two nodes in the graph database, such as the ownership relationship between the label node and the new memory node, the ownership relationship between the keyword node and the new memory node, and the logical association relationship between the new memory node and the target historical memory node.

[0154] The target historical memory node is a core data unit corresponding to the target historical memory data in the graph database, and is an entity object corresponding to the target historical memory data in the graph database. The attribute information is derived from the structured information contained in the target historical memory data.

[0155] Optionally, storing the new memory data into the data storage area further includes: storing a feature vector of the new memory data into 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.

[0156] The memory identifier is used to uniquely distinguish different memory data, and its core function is to establish a one-to-one correspondence between the feature vector in the vector database and the new memory node in the graph database, so that the complete memory data, i.e. the structured information and the feature vector of the memory data, can be quickly associated and queried through the same identifier.

[0157] The scheme provided by the embodiments of the present application stores the feature vector of the new memory data into the vector database and keeps consistent with the memory identifier of the corresponding node in the graph database. This storage method combining the vector database and the graph database not only realizes efficient similarity retrieval through the vector database, but also maintains the association structure of the memory through the graph database, and the unified memory identifier realizes seamless association of the two storage methods, thereby improving the retrieval efficiency and association analysis capability of the memory data.

[0158] The scheme provided by the embodiments of the present application stores the new memory data in the graph database, and constructs a structured mesh memory relationship by creating a new memory node, a label node, a keyword node and various connection edges. This storage method clearly records the core information of the new memory data and its association with the classification label, keyword and target historical memory data, which not only facilitates efficient query and management of memory data, but also provides a basis for visual display and association analysis of memory data.

[0159] Based on the above-mentioned fifth embodiment, the sixth embodiment of the present application is proposed. The same or similar contents as the fifth embodiment can be referred to the above description, and will not be described in detail hereinafter. Refer to Figure 7 In the sixth embodiment, after the step S40, the steps S501-S503 are further included.

[0160] Step S501, in response to the memory graph viewing instruction, rendering the memory graph in the interactive interface based on the data in the graph database.

[0161] The memory graph viewing instruction is an instruction signal for triggering the viewing of the memory graph function, which can be initiated by the user, such as clicking the "view memory graph" button of the interactive interface. The core function of the instruction is to start the process of reading data from the graph database and rendering the memory graph. For example, the "view memory graph" button can be displayed in the graph management page of the interactive interface.

[0162] Rendering the memory graph means converting the "node-edge-node" data in the graph database into graphical elements that can be visually displayed in the interactive interface, such as node icons of different styles, lines connecting nodes, etc. The core is to convert structured graph data into visual charts that users can intuitively understand. For example, the memory graph contains at least one memory node, at least one label node, and at least one keyword node. The memory node points to each label node and keyword node it contains through the connection line with an arrow, and the memory node points to other memory nodes associated with it through the connection line with an arrow.

[0163] For example, the data in the graph database can be rendered into a memory graph by a memory graph rendering tool. The memory graph rendering tool can be D3.js, which is 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, and is the carrier for rendering the memory graph. It is also the entry for users to initiate memory graph viewing instructions and perform modification operations, supporting users to visually view and operate the memory graph.

[0165] For example, in the memory graph rendered in the interactive interface, different types of nodes, such as memory nodes, keyword nodes, and label nodes, can be represented by different colors and sizes. And the memory graph can be explored through operations such as dragging and zooming.

[0166] Optionally, in response to the memory graph viewing instruction, after rendering the memory graph in the interactive interface based on the data in the graph database, the method further includes: obtaining an input node search condition, the node search condition including at least one of a keyword, a classification label, and a time range; highlighting the nodes in the memory graph that match the node search condition and the neighbor nodes of the matching nodes.

[0167] The node search condition is a query condition input by the user in the interactive interface for filtering specific nodes in the memory graph, which can include at least one of a keyword, a classification label, a time range, etc., and is the basis for searching for target nodes.

[0168] The node matching the node search condition is a node in the memory graph whose attribute information such as a keyword, a classification label, a time feature, and the like matches the node search condition input by the user, including various nodes such as a memory node, a label node, and a keyword node. The neighbor node of the matched node is all nodes directly connected to the matched node through an edge in the memory graph.

[0169] The highlighting is a manner of highlighting and displaying a specific node in an interactive interface through a special visual style such as changing a color, enlarging a size, adding a highlight frame, and the like, so that the node matching the search condition and the neighbor node thereof are more easily identified and focused on by the user in the memory graph.

[0170] Exemplarily, the node matching the node search condition and the neighbor node of the matched node in the memory graph are highlighted, including the node matching the node search condition and the first-order neighbor node and the second-order neighbor node of the matched node. The first-order neighbor node is a node directly connected to the matched node through an edge, and the second-order neighbor node is a node directly connected to the first-order neighbor node through an edge. For example, searching for a classification label "science fiction movie", all memory nodes directly connected to the label node corresponding to the classification label, keyword nodes directly connected to the memory nodes, label nodes, and neighbor memory nodes are highlighted.

[0171] In the embodiments of the present application, after rendering the memory graph, the node is searched based on a keyword, a classification label, a time range, and the like, and the matched node and the neighbor node thereof are highlighted. This function improves the information retrieval efficiency of the memory graph, enables the user to quickly locate the target memory and associated information, and enhances the accessibility and practicality of the memory data.

[0172] In the embodiments of the present application, after rendering the memory graph, the node is searched based on a keyword, a classification label, a time range, and the like, and the matched node and the neighbor node thereof are highlighted. This function improves the information retrieval efficiency of the memory graph, enables the user to quickly locate the target memory and associated information, and enhances the accessibility and practicality of the memory data.

[0172] Step S502, updating the data in the graph database based on the modification operation on the memory graph.

[0173] The modification operation on the memory graph is an adjustment operation of the user on the rendered memory graph in the interactive interface, for example, adding a node, deleting a node, adjusting a connection relationship of an edge, editing a node attribute, and the like, which is an operation manner of the user actively adjusting the memory data.

[0174] The updating of the data in the graph database is a process of synchronously adjusting the corresponding data in the graph database according to the modification operation of the user on the memory graph. For example, the user deletes an edge between a memory node and a label node in the memory graph, and the terminal synchronously deletes the corresponding edge data between the two nodes in the graph database, so as to ensure that the graph database data is consistent with the visual operation result of the user.

[0175] Optionally, the updating of the data in the graph database based on the modification operation on the memory graph includes at least one of the following:

[0176] First, based on the triggering operation on any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface, and based on the modification operation on the attribute information, the attribute information of the memory node is updated to the modified attribute information in the graph database.

[0177] The triggering operation is an interactive action performed by the user on any memory node in the memory graph of the interactive interface for triggering the display of the attribute information thereof. For example, single-click, double-click, right-click, etc. Illustratively, after triggering any memory node, an inspector panel is slid out on the right side of the interactive interface, and the attribute information of the memory node is displayed in the inspector panel. For example, core content, abstract, keyword, classification label, timestamp, etc.

[0178] Second, based on the modification operation on 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 nodes is updated to the modified classification label in the graph database. The neighbor memory nodes are all memory nodes directly connected to the label node through edges. In this way, the classification labels common to multiple memory nodes can be modified in batches, and the efficiency of adjusting memory data is improved.

[0179] Illustratively, by triggering any label node in the memory graph, the label corresponding to the label node becomes editable, and the modification operation on the classification label corresponding to the label node can be performed.

[0180] Third, based on the modification operation on the keyword corresponding to any keyword node in the memory graph, the neighbor memory nodes of the keyword node are determined, and the keyword in the attribute information of the neighbor memory nodes is updated to the modified keyword in the graph database. The neighbor memory nodes are all memory nodes directly connected to the keyword node through edges. In this way, the keywords common to multiple memory nodes can be modified in batches, and the efficiency of adjusting memory data is improved.

[0181] Illustratively, by triggering any keyword node in the memory graph, the keyword corresponding to the keyword node becomes editable, and the modification operation on the classification keyword corresponding to the keyword node can be performed.

[0182] Fourth, based on the operation of adding or deleting a node in the memory graph, a node is created or deleted in the graph database.

[0183] Illustratively, any node can be clicked, and then the "delete node" button is selected in the right-click menu to delete the node in the graph database. Illustratively, the "add node" button can be selected in the right-click menu, and then the attribute information of the node is edited in the slid-out inspector panel, so as 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, an edge between any two nodes in the graph database is added or deleted.

[0185] For example, when any two nodes are selected while holding the control key, and the "Create Link" button is selected in the right-click menu, an edge between the two nodes in the graph database can be added. For example, an edge between any two nodes can be deleted by clicking the edge, selecting the "Delete Link" button in the right-click menu, or clicking the "Delete Link" button in the inspector panel that slides out.

[0186] For example, to implement the modification operation on the memory data in the graph database, after the user issues a specific instruction 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 obtain data in the graph database and supports filtering.

[0188] GET / api / memory / {id}:Used to obtain 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 completely 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}:Delete the edge between two memory nodes.

[0194] In the embodiments of the present application, various specific ways of updating the graph database based on the memory graph modification operation are specified. These refined update mechanisms ensure that user interactions with the memory graph accurately reflect the underlying data, maintain the consistency of memory data, reduce manual maintenance costs, and improve the efficiency and accuracy of memory data management.

[0195] Step S503, based on the data in the updated graph database, the memory graph is re-rendered.

[0196] After the data in the graph database is updated, the terminal executes the process of rendering the memory graph again, converts the updated data into a visual chart in the interactive interface, so that the memory graph reflects the latest data state of the graph database in real time, and ensures that the graph viewed by the user is consistent with the underlying data.

[0197] The scheme provided by the embodiments of the present application supports rendering the memory graph based on the data in the graph database, synchronously updating the graph database according to the modification operation on the memory graph, and re-rendering the memory graph. This mechanism realizes visual interactive management of the memory data, enables the user to intuitively view and adjust the memory data, ensures the operability and transparency of the memory data, facilitates timely correction of the memory information, and ensures the accuracy of the memory data.

[0198] Based on the sixth embodiment, the seventh embodiment of the present application is proposed. The same or similar contents as the sixth embodiment can be referred to the foregoing description, and will not be described hereinafter. Refer to Figure 8 In the seventh embodiment, after the step S503, the steps S601-S604 are further included.

[0199] In step S601, the neighbor memory nodes of the memory node whose attribute information has been updated are determined based on the operation triggering the memory evolution.

[0200] The operation triggering the memory evolution refers to a triggering behavior that triggers the associated memory update of the graph database, which can be a specific operation initiated by the user, such as clicking the “update associated memory” button in the interactive interface, or an operation automatically triggered by the terminal according to the preset rules, such as detecting the change of the key attribute information of the node in the graph database.

[0201] The memory node whose attribute information has been updated refers to the memory node in the graph database whose attribute information such as core content, keyword, classification label, etc. has been modified or supplemented, which is the starting node of this memory evolution process, and the attribute change will trigger the information adjustment of the associated nodes.

[0202] The neighbor memory nodes are all memory nodes directly connected to the memory node whose attribute information has been updated through edges in the graph database, which are the objects to be adjusted subsequently.

[0203] In step S602, the model context is generated based on the attribute information of the updated memory node and the attribute information of the neighbor memory node.

[0204] The model context is an information set composed of the attribute information of the updated memory node and the attribute information of the neighbor memory node, which is background information for the large language model to understand the association between the two and judge the adjustment logic, ensuring that the adjustment operation conforms to the semantic logic.

[0205] In step S603, the attribute information of the neighbor memory node is adjusted based on the model context by the large language model to obtain adjusted attribute information of the neighbor memory node.

[0206] The adjusted attribute information of the neighbor memory node is new attribute information obtained by modifying, supplementing or optimizing the original attribute information of the neighbor memory node based on the model context by the large language model.

[0207] In step S604, the adjusted attribute information of the neighbor memory node is updated to the graph database.

[0208] The adjusted attribute information of the neighbor memory node is updated to the graph database, so that the attribute information of the neighbor memory node is logically consistent with the updated attribute information of the memory node, and the collaborative evolution of the memory data is realized.

[0209] After the adjusted attribute information of the neighbor memory node is updated to the graph database, the memory graph can be re-rendered based on the data in the updated graph database, ensuring that the memory graph seen by the user reflects the evolution result of the node attribute in real time.

[0210] In an example, when an operation triggering memory evolution is detected, the terminal calls the interface function POST / api / evolve / {id}, and triggers the memory evolution process of the neighbor memory node of the memory node with the updated attribute information. In this way, one point modification of the user is intelligently propagated and generalized to the relevant area of the entire memory network through the ability of the model.

[0211] The scheme provided by the embodiments of the present application can trigger attribute adjustment of the neighbor memory node after the attribute of the memory node is updated, that is, the attribute information of the neighbor memory node is intelligently adjusted based on the model context constituted by the updated attribute information of the memory node and the attribute information of the neighbor memory node by the large language model, and is updated to the graph database. This memory evolution mechanism realizes the chain optimization of associative memory, ensures the collaborative update of the related node information in the memory network, avoids the memory logic contradiction caused by local update, and enhances the overall consistency of the memory data.

[0212] Figure 9 is a schematic diagram of a large model memory data processing flow provided by an embodiment of the present application. Referring to Figure 9The method comprises the following steps: firstly, capturing new user information through human-computer interaction; then, extracting structured information from the new user information as new memory data; then, adjusting the associated target historical memory data based on the new memory data, and updating the new memory data and the target historical memory data to a graph database; then, rendering a memory graph based on the data in the graph database, so as to facilitate manual review and maintenance of the memory data; then, updating the graph database and the memory graph based on the manual modification operation on the memory graph, so as to realize evolution of the memory data.

[0213] Current personalized AI (Artificial Intelligence) assistants face serious technical bottlenecks in long-term interactions with users, mainly in the aspect of "memory":

[0214] Firstly, the memory is superficial and forgetful: the memory of existing AI assistants is usually limited to short-term conversational context or relies on simple keyword-triggered storage. They can remember the user's name or a few explicitly set preferences, but cannot build a deep and structured understanding of the user's dynamically changing interests, habits, experiences, and emotions. Once the interaction is interrupted, most valuable information will be forgotten, resulting in an inconsistent user experience and a lack of true personalization.

[0215] Secondly, the memory is static and rigid: some advanced systems use Retrieval-Augmented Generation (RAG) technology to store user information in a vector database. However, this memory is static, and the association between memories is predefined or based on simple similarity calculations, which cannot autonomously discover new and meaningful logical connections between different memories, nor can it evolve or update its understanding of old memories based on new interactions.

[0216] Thirdly, the memory is a black box and not trustworthy: AI's memory is a complete black box to users. Users do not know what AI remembers, and they do not know what memories AI is based on to make a certain recommendation or judgment. This opacity makes it difficult for users to trust AI, and when AI's memory is biased, for example, incorrectly remembering a user's preferences, users have no way to review and correct it.

[0217] Therefore, there is an urgent need in the field for a completely new technical solution to solve the problems of superficial, static, and black-box memory of AI assistants, so as to realize 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 configured to adjust, by the large language model, the target historical memory data based on the new memory data, to obtain adjusted target historical memory data.

[0229] The memory storage module 40 is configured to store the new memory data to a data storage area, and update the original target historical memory data in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering.

[0230] Optionally, the memory extraction module 10 is configured to acquire 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 by the large language model, the structured information containing core content of the new user information, and at least one of abstract, keyword and classification label information; and generate new memory data containing the structured information.

[0231] Optionally, the memory adjustment module 30 is configured to generate a model context based on the new memory data and the target historical memory data; and adjust, by the large language model, the structured information contained in the target historical memory data based on the model context, to obtain the adjusted target historical memory data.

[0232] Optionally, the memory storage module 40 is configured to create the following information in the graph database based on the new memory data:

[0233] A new memory node, attribute information of the new memory node being the structured information;

[0234] A label node corresponding to the classification label in the attribute information, and an edge connecting the label node and the new memory node;

[0235] A keyword node corresponding to the keyword in the attribute information, and an edge connecting the keyword node and the new memory node;

[0236] An edge connecting the new memory node and a target historical memory node, the target historical memory node being a memory node corresponding to the target historical memory data.

[0237] Optionally, the apparatus further comprises:

[0238] The graph rendering module is configured to render, in response to a memory graph viewing instruction, a memory graph in an interactive interface based on data in the graph database;

[0239] The memory updating module is configured to update data in the graph database based on a modification operation on the memory graph;

[0240] The graph updating module is configured to re-render the memory graph based on the updated data in the graph database.

[0241] Optionally, the memory updating module is configured to perform at least one of the following operations:

[0242] Based on the triggering operation on any memory node in the memory graph, the attribute information of the memory node is displayed in the interactive interface, and based on the modification operation on 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 on 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 nodes is updated to the modified classification label in the graph database.

[0244] Based on the modification operation on the keyword corresponding to any keyword node in the memory graph, the neighbor memory nodes of the keyword node are determined, and the keyword in the attribute information of the neighbor memory nodes is updated to the modified keyword in the graph database.

[0245] Based on the operation of adding or deleting a node in the memory graph, the node is 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, the edge between the two nodes is added or deleted in the graph database.

[0247] Optionally, the device further comprises:

[0248] The memory evolution module is configured to determine the neighbor memory nodes of the memory node whose attribute information has been updated based on the operation of triggering memory evolution, generate a model context based on the attribute information of the updated memory node and the attribute information of the neighbor memory nodes, adjust the attribute information of the neighbor memory nodes based on the model context through the large language model to obtain the adjusted attribute information of the neighbor memory nodes, and update the adjusted attribute information of the neighbor memory nodes to the graph database.

[0249] Optionally, the device further comprises:

[0250] The node search module is configured to obtain an input node search condition, the node search condition including at least one of a keyword, a classification label, and a time range, and highlight the nodes in the memory graph that match the node search condition and the neighbor nodes of the nodes.

[0251] Optionally, the memory storage module 40 is further configured 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 configured to determine similarities between a feature vector of the new memory data and feature vectors of historical memory data in the data storage area, filter a plurality of historical memory data corresponding to the maximum similarities from the data storage area, determine logical relationships between the plurality of filtered historical memory data and the new memory data by using the large language model, and determine a target historical memory data associated with the new memory data from the plurality of historical memory data based on the logical relationships.

[0253] The large model memory processing device provided in the present application adopts the large model memory processing method in the above embodiments, and can solve the technical problem of low quality of stored large model memory data in the related art, which leads to unstable model answering performance. Compared with the prior art, the large model memory processing device provided in the present application has the same beneficial effects as the large model memory processing method provided in the above embodiments, and other technical features in the large model memory processing device are the same as the features disclosed in the above embodiments, which will not be repeated here.

[0254] The present application provides a large model memory processing device, which comprises at least one processor and a memory in communication connection with 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 in the above embodiments.

[0255] Reference will be made to the following description of the embodiments of the present application Figure 11 which shows a structural schematic diagram of a large model memory processing device suitable for implementing the embodiments of the present application. The large model memory processing device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 11 The large model memory processing device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0256] As Figure 11As shown, the large model memory processing device can include a processing apparatus 1001 (for example, a central processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to programs stored in a read only memory (ROM: Read Only Memory) 1002 or programs loaded from a storage apparatus 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the large model memory processing device are also stored. The processing apparatus 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input apparatus 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; an output apparatus 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, and the like; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, and the like; and a communication apparatus 1009. The communication apparatus 1009 can allow the large model memory processing device to communicate with other devices wirelessly or by wire to exchange data. Although the large model memory processing device having various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0257] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication apparatus, or installed from the storage apparatus 1003, or installed from the ROM 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are performed.

[0258] The large model memory processing device provided in the present application adopts the large model memory processing method in the above-mentioned embodiments, and can solve the technical problem that the quality of the stored large model memory data is low in the related art, resulting in unstable model answering performance. Compared with the prior art, the large model memory processing device provided in the present application has the same beneficial effects as the large model memory processing method provided in the above-mentioned embodiments, and other technical features in the large model memory processing device are the same as the features disclosed in the previous embodiment method, which will not be described here.

[0259] It should be understood that various parts of the present disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the description of the above-described embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in any one or more embodiments or examples.

[0260] The above description is merely that of a specific implementation of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present disclosure, and all such changes or replacements should be encompassed within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be subject to the scope of protection of the claims.

[0261] The present disclosure provides a computer-readable storage medium having stored thereon computer-readable program instructions (i.e., a computer program) for performing the large model memory processing method in the above-described embodiments.

[0262] The computer-readable storage medium provided by the present disclosure may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above. In the present embodiment, the computer-readable storage medium can 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 can be transmitted in any appropriate medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), etc., or any appropriate combination of the above.

[0263] The above-described computer-readable storage medium can be included in the large model memory processing device; or can exist separately without being assembled into the large model memory processing device.

[0264] The computer readable storage medium described above carries one or more programs, when the one or more programs are executed by the large model memory processing device, cause the large model memory processing device to: in response to a model memory update instruction, extract new memory data from the model memory update 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 through a large language model to obtain adjusted target historical memory data; store the new memory data to the data storage area, and update the original target historical memory data in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question and answer.

[0265] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0266] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified functions. It should also be noted that, in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the figures. For example, two blocks noted in succession can in fact be executed substantially concurrently or in the opposite order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware-based systems and computer instructions.

[0267] The modules described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0268] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e., a computer program) for executing the large model memory processing method described above, and can solve the technical problem of low quality of stored large model memory data in the related art, which leads to unstable model answering performance. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the large model memory processing method provided by the above embodiments, and will not be described here.

[0269] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the large model memory processing method as described above.

[0270] The computer program product provided by the present application can solve the technical problem of low quality of stored large model memory data in the related art, which leads to unstable model answering performance. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the large model memory processing method provided by the above embodiments, and will not be described here.

[0271] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields based on the technical concept of the present application, and the contents of the present application specification and drawings are included in the patent protection scope of the present application.

Claims

1. A method for processing large model memory, characterized in that, The method comprises: in response to a model memory update instruction, extracting new memory data from the model memory update instruction; querying target historical memory data associated with the new memory data from a data storage area; adjusting the target historical memory data based on the new memory data through a large language model to obtain adjusted target historical memory data; storing the new memory data to the data storage area, and updating the original target historical memory data in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question and answer.

2. The method of claim 1, wherein, The method comprises: in response to the model memory update instruction, obtaining new user information from the model memory update instruction; extracting structured information from the new user information through the large language model, the structured information containing core content of the new user information, and at least one of abstract, keyword and classification label information; generating the new memory data containing the structured information.

3. The method of claim 2, wherein, The method comprises: generating a model context based on the new memory data and the target historical memory data; adjusting the structured information contained in the target historical memory data based on the model context through the large language model to obtain the adjusted target historical memory data.

4. The method of claim 2, wherein, The method comprises: based on the new memory data, creating the following information in a graph database: a new memory node, the attribute information of the new memory node being the structured information; a label node corresponding to the classification label in the attribute information, and an edge connecting the label node and the new memory node; a keyword node corresponding to the keyword in the attribute information, and an edge connecting the keyword node and the new memory node; 5. The method of claim 4, wherein, an edge connecting the new memory node and a target historical memory node, the target historical memory node being a memory node corresponding to the target historical memory data. The method further comprises: in response to a memory graph viewing instruction, rendering a memory graph in an interactive interface based on data in the graph database; updating data in the graph database based on a modification operation on the memory graph; 6. The method of claim 5, wherein, re-rendering the memory graph based on the updated data in the graph database. The method comprises at least one of the following: based on a trigger operation on any memory node in the memory graph, displaying attribute information of the memory node in the interactive interface, and based on a modification operation on the attribute information, updating the attribute information of the memory node to modified attribute information in the graph database; Based on the modification operation on the classification label corresponding to any label node in the memory graph, the neighbor memory node of the label node is 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 on the keyword corresponding to any keyword node in the memory graph, the neighbor memory node of the keyword node is determined, and the keyword in the attribute information of the neighbor memory node is updated to the modified keyword 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 edges between any two nodes in the memory graph, edges between the two nodes are added or deleted in the graph database.

7. A large model memory processing apparatus, characterized by, The device comprises: a memory extraction module configured to extract new memory data from a model memory update instruction in response to the model memory update instruction; a memory query module configured to query target historical memory data associated with the new memory data from a data storage area; a memory adjustment module configured to adjust the target historical memory data based on the new memory data through a large language model to obtain adjusted target historical memory data; a memory storage module configured to store the new memory data to the data storage area and update the original target historical memory data in the data storage area to the adjusted target historical memory data, wherein the memory data in the data storage area is used for model question answering.

8. A large model memory processing device, comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the large model memory processing method according to any one of claims 1 to 6.

9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, which is executed by a processor to implement the steps of the large model memory processing method according to any one of claims 1 to 6.

10. A computer program product, characterised in that, The computer program product comprises a computer program, which is executed by a processor to implement the steps of the large model memory processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Large model persistent storage method, device and equipment and storage medium

    CN119378503A

  • Intelligent agent memory data processing method and system and nonvolatile storage medium

    CN119884347A

  • User memory data generation method and system, computer and storage medium

    CN119990277A

  • Question and answer method and device based on large language model

    CN119990300A

Cited By

  • Task interaction method and related device, electronic equipment and storage medium

    CN121902994A

  • Task interaction method and related apparatus, electronic device, and storage medium

    CN121902994B