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

By introducing memory knowledge graphs into the memory engine, storing and querying user conversation information, the problem of insufficient correlation between redundant data and recall in the prior art is solved, and more efficient and accurate user memory management is achieved.

CN119990277APending Publication Date: 2025-05-13ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510078876.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When existing memory engines store and recall user conversation information, there is a problem of insufficient correlation between redundant data and recall, especially when dealing with multimedia information and complex query intent.

Method used

A method based on memory knowledge graph is proposed, which stores user dialogue information as a user memory triple through the memory engine, and querys based on user information and its relationships, eliminates information that is not related to personal memory, and improves memory correlation.

Benefits of technology

Effectively eliminate redundant data, improve the relevance of user memory, and enhance the query accuracy and efficiency of the memory engine, especially when processing time information and schedule-related memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990277A_ABST
    Figure CN119990277A_ABST
Patent Text Reader

Abstract

The invention provides a user memory data generation method and system, a computer and a storage medium, the method is applied to a large model, the large model comprises a memory engine, the memory engine is used for storing and managing dialogue information of the large model and a user, and the method comprises the following steps: obtaining the dialogue information of the user, establishing a memory knowledge graph based on user memory through a memory engine; the memory engine stores the obtained dialogue information into a memory knowledge graph, and data information in the memory knowledge graph is user memory data. The memory knowledge graph in the application can store dialogue information related to user memory, so that information irrelevant to personal memory in historical dialogue information can be eliminated. The memory engine performs query based on the user information and the relationship thereof in the dialogue information in the memory knowledge graph, and recall the memory query result as memory, so that the relevancy of user memory is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent dialogue, and in particular to a method, system, computer and storage medium for generating user memory data. Background Art

[0002] In the process of large model development, large model dialogue has become one of the research hotspots in the field of natural language processing. In order to improve the performance of large model dialogue systems, related technologies have introduced memory functions. That is, in large model dialogue scenarios, large models can simulate human memory functions, enabling them to store and retrieve previous historical dialogue information. In the process of large model dialogue, the memory function of the large model can be enhanced by operating the memory engine.

[0003] In the related art, a memory engine implementation scheme is proposed, which can directly store and manage all or part of the historical conversation information between the user and the big model as memory. For example, keywords can be used as indexes to store historical conversation information in a full-text retrieval database. In addition, during the conversation between the user and the big model, the conversation information may not only be limited to text information, but may also include multimedia information such as pictures, music or videos. Therefore, the related art proposes that the conversation information between the user and the big model can also be stored in the vector database in the form of vectors for use as memory. After the multimedia information such as text, pictures, music or videos in the conversation information is vectorized, it can be stored in the vector database. Summary of the invention

[0004] In view of this, embodiments of the present application are directed to providing a method, system, computer, and storage medium for generating user memory data.

[0005] In a first aspect, a method for generating user memory data is provided, which is applied to a large model. The large model includes a memory engine, which is used to store and manage conversation information between the large model and the user. The method includes: obtaining the user's conversation information, and establishing a memory knowledge graph based on the user's memory through the memory engine; the memory engine stores the acquired conversation information in the memory knowledge graph, and the data information in the memory knowledge graph is the user's memory data.

[0006] According to the first aspect, the method also includes: when the memory engine does not find a memory query result in the memory knowledge graph based on the acquired conversation information, the memory engine stores the conversation information in the memory knowledge graph, and / or when the memory engine finds a memory query result in the memory knowledge graph based on the acquired conversation information, but the memory query result conflicts with the conversation information, the memory engine deletes the memory query result from the memory knowledge graph and stores the conversation information in the memory knowledge graph, wherein the memory query result is the result of the memory engine querying the user memory data in the memory knowledge graph based on the conversation information.

[0007] According to the first aspect, or any implementation of the first aspect above, the acquired conversation information is stored in a memory knowledge graph, and the method includes: when the memory engine stores the acquired conversation information in the memory knowledge graph, when the memory engine determines that the conversation information contains time information, the time information includes absolute time information and relative time information, when the conversation information is absolute time information, the memory engine stores the absolute time information in the memory knowledge graph; when the conversation information is relative time information, the memory engine converts the relative time information into absolute time information, and then stores it in the memory knowledge graph.

[0008] According to the first aspect, or any implementation of the first aspect above, the memory knowledge graph is composed of user memory triples, the user memory triples are determined by conversation information, the user memory triples include user subject data, relationship data and object data, and the relationship data is used to represent the relationship between the user subject data and the object data.

[0009] According to the first aspect, or any implementation method of the first aspect above, the memory engine divides the user memory triples into different memory categories based on the data of the user memory triples, and the memory engine generates corresponding memory knowledge graphs based on the memory categories, including one or more of the following: user work related; user life related; user schedule related.

[0010] According to the first aspect, or any implementation method of the first aspect above, the memory engine generates a memory category plan based on the memory knowledge graph corresponding to the memory category, and pushes it to the user. The memory category plan includes one or more of the following: user work summary; user life management plan; user schedule plan.

[0011] According to the first aspect, or any implementation method of the first aspect above, the user's conversation information is obtained, and a memory knowledge graph based on the user's memory is established through a memory engine. The method includes: the memory engine creates a memory knowledge graph of the logged-in user based on the conversation information of different logged-in users, and different logged-in users obtain the memory knowledge graphs of other logged-in users through mutual authorization.

[0012] On the second aspect, the present application provides a dialogue system based on a large model, which includes: a memory engine for managing dialogue information between the large model and the user; wherein, after obtaining the user's dialogue information, the memory engine is used to establish a memory knowledge graph based on the user's memory; the memory engine is also used to store the acquired dialogue information in the memory knowledge graph, and the data information in the memory knowledge graph is the user's memory data.

[0013] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to, when executing the computer program, execute a large model-based dialogue method including the first aspect and any possible implementation of the first aspect.

[0014] In a fourth aspect, the present application provides a computer-readable storage medium storing a program code for computer execution, wherein the program code includes a method for generating user memory data for executing the first aspect and any possible implementation of the first aspect.

[0015] In a fifth aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method for generating user memory data in the first aspect and any possible implementation of the first aspect.

[0016] In the present application, the conversation information between the user and the big model can be extracted, and the extracted conversation information can be stored in a memory knowledge graph based on the user's memory through the memory engine. In the subsequent conversation between the user and the big model, the big model can query the content of the memory knowledge graph through the memory engine, and have a conversation with the user based on the query results. Based on this, the present application proposes a memory knowledge graph that can store historical conversation information. The memory knowledge graph can store conversation information related to user memory, so that information in the historical conversation information that is not related to personal memory can be eliminated. In the memory knowledge graph, the memory engine queries based on the user information and its relationship in the conversation information, and uses the memory query results as memory recall, thereby improving the relevance of the user's memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic flowchart of a method for generating user memory data provided in an embodiment of the present application.

[0018] Figure 2 A schematic flowchart of another method for generating user memory data provided in an embodiment of the present application.

[0019] Figure 3A schematic flowchart of another method for generating user memory data provided in an embodiment of the present application.

[0020] Figure 4 A schematic flowchart of another method for generating user memory data provided in an embodiment of the present application.

[0021] Figure 5 A schematic flowchart of another method for generating user memory data provided in an embodiment of the present application.

[0022] Figure 6 A schematic structural diagram of a large model-based dialogue system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0024] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0025] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0026] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0027] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0028] The emergence and development of big models have not only changed the traditional paradigm of natural language processing, but also brought great shocks to all walks of life. Big models can be considered as the abbreviation of large-scale language models, which are trained to understand and generate natural language. In the process of big model development, big model dialogue has become one of the research hotspots in the field of natural language processing. Big model dialogue can refer to a model based on deep learning. By training massive dialogue data, the model can generate natural language responses with semantic and logical coherence. In order to improve the performance of big model dialogue systems, related technologies have introduced memory functions. That is, in the big model dialogue scenario, the big model can simulate the human memory function, so that it can store and retrieve previous historical dialogue information. The memory function can refer to the ability of a system to obtain and store information from past experiences. This concept can be applied to models in machine learning, enabling them to "remember" previous inputs and use this information in future inputs. Giving big models memory functions can implement a memory engine to store and recall memory. In the process of big model dialogue, the memory function of the big model can be enhanced by operating the memory engine.

[0029] In the related art, a memory engine implementation scheme is proposed, which can directly store and manage all or part of the historical conversation information between the user and the big model as memory. For example, the historical conversation information can be stored in a full-text search database, such as ElasticSearch, using keywords as indexes. When the user has a new conversation with the big model, the big model can extract an index based on the conversation information of the new conversation, and the memory engine can query the full-text search database through the index, so as to output the big model based on the query results. In addition, during the conversation between the user and the big model, the conversation information may not only include text information, but also multimedia information such as pictures, music or videos. Therefore, the related art also proposes that the conversation information between the user and the big model can be stored in the vector database in the form of vectors for memory use. After the multimedia information such as text, pictures, music or videos in the conversation information is vectorized, it can be stored in the vector database. For example, Qdrant can be used as a storage carrier for conversation information, and similar memories can be found by vector distance calculation when querying the conversation information related memories. When storing memories, the vector database can directly convert the information into vectors through the embedding model and store it in the library.

[0030] Based on the above content, it can be seen that the implementation scheme of the existing memory engine is to store all or part of the historical conversation information between the user and the large model, and in the subsequent conversation process, use text or vector similarity retrieval technology to embed the relevant historical conversation content as memory into the current conversation content, so as to realize the function of conversation memory.

[0031] However, in the existing memory engine implementation, all or part of the historical conversation information between the user and the big model is stored as memory, which results in a lot of conversation data that is not related to the user's personal memory being stored in the current memory. For example, historical conversation information includes information such as "the sky is blue" and "the United States is in North America". Such information will cause memory information redundancy and database resources to be occupied.

[0032] Secondly, when the memory engine queries related memories based on conversation information, the full-text retrieval database focuses on vocabulary matching. The memories recalled through indexing can only be recalled through text matching. The full-text retrieval database cannot understand the semantics of the query information, nor can it perform fuzzy queries in context. The conversation information in the vector database is stored in the form of vectors. When the memory engine queries based on the vector database, it can convert the text, pictures, etc. in the conversation information into vectors, and perform similarity searches based on vector distance in the vector database to recall related memories. Since the vector database cannot understand complex query intentions, for example, when a user says "I want to eat apples", when performing similarity searches based on vector distances, memories such as "new messages on Apple phones" may be recalled. The vector database is unable to distinguish the meaning of "Apple phones" and the fruit "apple". Based on the above, due to the inaccuracy of the recalled memory information, the relevance of the memory recalled by the existing memory engine is insufficient.

[0033] Knowledge graph is a structured form of knowledge representation. It is a network constructed through entities, concepts, classifications and the relationships between them, which can be easily understood and processed by machines. Knowledge graph emphasizes the structured and semantic relationships of knowledge, which makes it easier for large models to perform logical reasoning and knowledge retrieval. Therefore, the use of knowledge graph in the training process of large models can not only enable large models to better process and generate natural language, but also enable large models to better understand and reason about the complex relationships between entities.

[0034] Based on the above problems, this application proposes a memory knowledge graph that can store historical conversation information. The memory knowledge graph can store conversation information related to user memory, thereby eliminating information in historical conversation information that is irrelevant to personal memory. In the memory knowledge graph, the memory engine queries based on user information and their relationships in the conversation information, and uses the memory query results as memory recall, thereby improving the relevance of user memory.

[0035] Figure 1 This is a schematic flowchart of a method for generating user memory data provided in an embodiment of the present application to solve the above-mentioned problem. Figure 1 The method shown can be applied to a large model. Optionally, the large model can include a memory engine, which can be used to store and manage the dialogue information between the large model and the user.

[0036] Figure 1 The dialog method shown includes steps S110 to S120.

[0037] Step S110, obtaining the user's conversation information, and establishing a memory knowledge graph based on the user's memory through a memory engine.

[0038] In some embodiments, the memory engine can be used to establish a memory knowledge graph based on the user's memory. Optionally, the memory engine can establish a memory knowledge graph belonging to the user based on the user's conversation information.

[0039] Exemplarily, a user can log in to the big model by logging in with an electronic account. After logging in, each user can correspond to a separate user information. The memory engine can establish a memory knowledge graph for the user based on the user information. The memory knowledge graph can be generated based on the user's memory. It is understandable that for different users, the memory engine can establish memory knowledge graphs for different users based on different user information.

[0040] In some embodiments, the memory knowledge graph based on user memory can be understood as a special type of knowledge graph, in which user information and relationships related to the user's memory can be stored. Exemplarily, a knowledge structure can be constructed based on the user's memory, preferences, behavior, and interaction history. For example, the information in the memory knowledge graph can include information related to personal memory such as "I am Zhang San from Hangzhou", "I like to eat apples", and "I have a meeting in the afternoon of December 1, 2024".

[0041] In some embodiments, when a user logs into the large model, the memory engine finds that the user's memory knowledge graph has been established, and then skips step S110 and goes directly to step S120.

[0042] Step S120, the memory engine stores the acquired conversation information into the memory knowledge graph, and the data information in the memory knowledge graph is the user memory data.

[0043] In some embodiments, the user memory data may refer to user information and relationships related to the user memory. For example, the user memory data may be "I like climbing mountains" or "I am from Hangzhou".

[0044] In some embodiments, the memory engine can be used to perform related operations on the memory knowledge graph, such as the memory engine can be used to store, query, delete or update the memory knowledge graph.

[0045] Optionally, the memory engine can store the knowledge graph based on the acquired dialogue information. Exemplarily, when the user is in a dialogue with the large model, the memory engine can extract and judge the acquired dialogue information to determine whether the dialogue information includes information related to user memory. When the memory engine determines that the dialogue information includes information related to user memory, the memory engine can store the dialogue information in the memory knowledge graph. If the dialogue information does not include information related to user memory, the memory engine ignores the dialogue information and continues to judge the next dialogue information. Exemplarily, when the dialogue information is "Hello everyone, I am Zhang San from Hangzhou", the memory engine can determine that this sentence includes user memory, so the memory engine can store the dialogue information in the memory knowledge graph; when the dialogue information is "The sky is blue", the memory engine can determine that this sentence does not belong to user memory, so it is not saved in the knowledge graph. By establishing a memory knowledge graph based on user memory through the memory engine, dialogue information related to user memory can be retained, thereby eliminating other redundant dialogue information. These dialogue information related to user memory in the memory knowledge graph can be considered as user memory data.

[0046] Optionally, the memory engine can perform relevant memory queries in the memory knowledge graph based on the conversation information. Exemplarily, when the memory engine determines that the conversation is related to the user's memory information, the memory engine can query the user's memory data in the memory knowledge graph based on the acquired conversation information, and the query result can be considered as the memory query result. For example, when the conversation information includes "my name", the memory engine can query the memory knowledge graph based on the information, and the query result "My name is Zhang San" can be the memory query result.

[0047] Optionally, when the big model is conversing with the user, the memory engine can actively obtain the content of the conversation information and perform queries based on the memory knowledge graph. After obtaining the memory query results, it can be recalled so that the big model can have a conversation with the user based on the recalled memory query results.

[0048] Optionally, when the memory engine does not find a memory query result in the memory knowledge graph based on the acquired conversation information, the memory engine can store the conversation information in the memory knowledge graph. Exemplarily, the acquired conversation information is "I like traveling", and based on this information, no relevant memory is found in the memory knowledge graph, then the memory engine can store the conversation information "I like traveling" in the memory knowledge graph.

[0049] Optionally, when the memory engine queries the memory query result in the memory knowledge graph based on the acquired conversation information, but the memory query result conflicts with the conversation information, the memory engine can delete the memory query result from the memory knowledge graph and store the conversation information in the memory knowledge graph. It can also be understood that when the memory engine compares the acquired conversation information with the memory query result queried in the memory knowledge graph, if the comparison result is inconsistent, the memory engine updates the acquired conversation information to the memory knowledge graph. Exemplarily, when the acquired conversation information is "I don't like traveling", based on this information, the memory query result queried in the memory knowledge graph is "I like traveling", which is inconsistent with the conversation information, then the memory engine can update the relevant memory in the memory knowledge graph to "I don't like traveling". Alternatively, the memory engine can delete "I like traveling" in the memory knowledge graph and store the conversation information "I don't like traveling" in the memory knowledge graph.

[0050] In some embodiments, the memory engine may be a graph database. For example, the memory knowledge graph may be stored, queried, deleted, or updated through the graph database.

[0051] In an embodiment of the present application, the memory engine can store, query, delete or update the memory knowledge graph based on the user's memory information in the conversation information, effectively solving the problem of unfriendly historical memory updates and deletions, especially for conversation information with a longer storage time span, making user memory management more efficient and friendly.

[0052] Next, combine Figure 2 The scheme of the present application is described.

[0053] Figure 2 FIG. 1 is a flow chart of a method for generating user memory data provided by an embodiment of the present application. Figure 2 When the user logs in to the large model system for the first time, the memory engine can create a memory knowledge graph for the user; if the user is not logging in to the large model system for the first time, it can be considered that the memory knowledge graph of the user has been created.

[0054] Figure 2 The steps shown in include step S210 to step S230.

[0055] Step S210, the user logs into the system and inputs a question in the input interface.

[0056] In step S220, the memory engine may query the memory knowledge graph based on the conversation information and return the memory query result.

[0057] Optionally, the memory engine may first determine whether the conversation information includes information related to the user's memory. If not, the memory engine may ignore the conversation information or not process the conversation information. If the conversation information includes information related to the user's memory, the memory engine may query the memory knowledge graph based on the conversation information. When the memory engine finds relevant memory information in the user's memory knowledge graph, it may return the memory query result.

[0058] Optionally, the large model may also include a dialogue information processing module, which may assemble the final prompt words based on the memory query results returned by the memory engine and submit them to the large model.

[0059] Step S230: the large model communicates with the user based on the memory query result.

[0060] The large model can answer the question raised by the user based on the assembly prompt words generated in step S220. Afterwards, the memory engine can store the conversation information in the memory knowledge graph.

[0061] The implementation scheme of existing large-model memory engines usually involves storing all or part of the historical conversation information as memory, which may lead to too much redundant data in the memory. When using a full-text retrieval database to store memories, memories can only be retrieved through text matching; and when using a vector database to store memories such as pictures, audio and video, the memory information recalled by similar queries may not be accurate enough, resulting in the problem of insufficient memory relevance. Therefore, the present application proposes a memory knowledge graph that can store historical conversation information. The memory knowledge graph can store conversation information related to user memory, so that information in the historical conversation information that is not related to personal memory can be eliminated. In the memory knowledge graph, the memory engine queries based on the user information and its relationships in the conversation information, and uses the memory query results as memory recall, thereby improving the relevance of the user's memory.

[0062] In some embodiments, the dialogue information between the user and the big model may include time information, which may include absolute time information and relative time information. Absolute time information may refer to a specific point in time, usually associated with a specific date and time. For example, the user says "I was born at 18:00 on January 1, 1990". Based on the dialogue information, the absolute time information can be obtained as 18:00 on January 1, 1990. Relative time information may refer to the relative position or order of time, rather than a specific point in time. For example, the user said on Wednesday, September 25, 2024: "I'm going to play ball on Sunday". The relative time information can be obtained as Sunday.

[0063] In some embodiments, when the memory engine determines that the conversation information includes relative time information, the memory engine may first convert the relative time information into absolute time information, and then store the conversation information in the memory knowledge graph. As described above, when the memory engine obtains the relative time information as Sunday, based on the user saying this sentence on Wednesday, September 25, 2024, the memory engine can infer that the absolute time information of Sunday in the conversation information is September 29, 2024. Therefore, the memory engine can convert the Sunday in the conversation information into September 29, 2024 and store it in the memory knowledge graph.

[0064] In some embodiments, the conversation information including time information can be used as schedule memory. The memory engine in this application can convert relative time into absolute time and store it in the memory knowledge graph, so that during the conversation between the user and the large model, the memory engine can query more accurate memory information in the memory knowledge graph, thereby improving the memory accuracy of the schedule memory.

[0065] In some embodiments, the memory knowledge graph may be composed of triples. A triple may refer to a set of three elements, and there is a certain relationship or order between the three elements. For example, a triple may be expressed as <entity, relationship, time>.

[0066] In some embodiments, the memory knowledge graph may be composed of user memory triples. The user memory triples may be composed of three elements: user subject data, relationship data, and object data. Among them, the relationship data may be used to represent the relationship between the user subject data and the object data. Optionally, the content of the user memory triples may be determined by dialogue information. Exemplarily, the user says "Hello everyone, I am Zhang San from Hangzhou." The dialogue information extracted from this sentence is "I am Zhang San from Hangzhou." Based on the dialogue information, it can be determined that the user memory triple information is <I, from, Hangzhou><I, name, Zhang San>.

[0067] In some embodiments, the memory engine can compare the user's memory triple information with the information in the existing memory knowledge graph, and update or delete the memory in the memory knowledge graph. For example, the memory knowledge graph has the following memory: <I, name, Zhang San>. Now change the name to Li Si, then the memory engine only needs to match this tuple information and change Zhang San in the tuple to Li Si.

[0068] A memory knowledge graph composed of user memory triples is adopted. Since the triples have a clear structure and can clearly express the relationship between entities, the memory storage is more concise and clear, and the efficiency of the memory engine based on dialogue information query is improved.

[0069] In some embodiments, when the dialogue information includes time information, the time information may include absolute time information and relative time information. The memory engine may convert the relative time information into absolute time information. For information related to the schedule, the triple information may be expanded to record the absolute time in the triple information. For example, if a user says on Wednesday, September 25, 2024, "I'm going to play ball on Sunday," the user's memory triple information may be <I, playing ball, September 29, 2024>. As a result, during the dialogue between the user and the large model, the memory engine can not only better store the memory in the memory knowledge graph through the absolute time information, but also more accurately query the memory information of the relevant schedule in the memory knowledge graph, thereby improving the memory accuracy of the schedule memory.

[0070] In some embodiments, the memory engine can classify the user memory triples into different memory categories based on the data of the user memory triples, and generate corresponding memory knowledge graphs based on the different memory categories. The memory categories may include those related to the user's work, those related to the user's life, and those related to the user's schedule.

[0071] In some embodiments, the user memory triples may be divided into user work related and user life related according to the relational data in the user memory triples.

[0072] Exemplarily, when the relational data in the user memory triple is related to work, the memory engine can store the user memory triple related to work in the memory knowledge graph based on the user's work. For example, when the relational data includes information such as meetings, making plans, and delivering products, the user memory triple containing the relational data can be stored in the memory knowledge graph based on the user's work.

[0073] Exemplarily, when the relationship data in the user memory triple is related to life, the memory engine can store the user memory triple related to life in the memory knowledge graph based on the user's life. For example, when the relationship data includes similar information such as climbing, seeing a doctor, and watching a movie, the user memory triple containing the relationship data can be stored in the memory knowledge graph based on the user's life.

[0074] In some embodiments, the user memory triples may be divided into user schedule related ones according to whether the object data in the user memory triples includes time information.

[0075] Exemplarily, the object data may include time information, and the time information may include absolute time information and relative time information. The memory engine may store the user memory triple information including time information in the object data into a memory knowledge graph related to the user's schedule. For example, the user said on Wednesday, September 25, 2024: "I'm going to play ball on Sunday", and the user memory triple information may be <I, play ball, September 29, 2024>. The object data is September 29, 2024, and the triple information may be stored in a memory knowledge graph related to the user's schedule.

[0076] In some embodiments, the user memory triples can be divided into user work schedule related and user life schedule related according to whether the relationship data and object data in the user memory triples include time information.

[0077] Exemplarily, when the relational data in the user memory triple is related to work and the object data includes time information, the user memory triple containing the relational data and the object data can be stored in a memory knowledge graph related to the user's work schedule.

[0078] Exemplarily, when the relational data in the user memory triple is related to life and the object data includes time information, the user memory triple containing the relational data and the object data can be stored in a memory knowledge graph related to the user's life schedule.

[0079] In some embodiments, the memory engine can generate a memory category plan based on the corresponding memory knowledge graph generated by the memory category. Optionally, the memory category plan can provide the user with the memory category plan of the relevant memory category as reply information based on the content of the dialogue information during the dialogue between the user and the large model. Optionally, the memory category plan can be pushed to the user regularly. For example, it can be a user-defined time, or it can be pushed to the user regularly in units of weeks or months. For example, the memory engine can generate a work summary for the user this week or this month based on the content of the memory knowledge graph related to the user's work.

[0080] In some embodiments, the memory category plan may include the user's work summary, the user's life management plan, and the user's schedule plan.

[0081] Optionally, when a memory category plan is generated based on a memory knowledge graph related to the user's work, the memory engine can generate a work summary of the user over a period of time based on the memory category plan.

[0082] Optionally, when a memory category plan is generated based on a memory knowledge graph related to the user's life, the memory engine can extract information related to the user's life management based on the memory category plan to generate a life management plan for the user.

[0083] Optionally, when a memory category plan is generated based on a memory knowledge graph related to a user's schedule, the memory engine can extract information related to the user's schedule based on the memory category plan to generate a schedule plan for the user.

[0084] by Figure 3 For example, Figure 3 What is shown is a flowchart of generating a memory category plan based on periodic tasks in an embodiment of the present application.

[0085] The memory engine can be used to set periodic tasks, which can be weekly or monthly. Users can also customize the period, such as 3 days.

[0086] Within a cycle, the memory engine can generate a work summary based on the memory knowledge graph related to the user's work; the memory engine can generate a schedule plan based on the memory knowledge graph related to the user's schedule; the memory engine can generate a diet plan or health system based on the memory knowledge graph related to the user's life.

[0087] In some embodiments, the memory engine can generate memory knowledge graphs belonging to different users based on different user information. Different users can share the memories of other users through mutual authorization. Exemplarily, when user A and user B log in to the big model, they create their own memory knowledge graphs based on user A information and user B information. User A and user B can authorize each other so that when user A logs in to the big model and communicates with the big model, the memory engine can not only query in user A's memory knowledge graph, but also obtain user B's memory knowledge graph and query in user B's memory knowledge graph.

[0088] Combine the following Figure 4 , Figure 5 , the embodiments of the present application are described in detail.

[0089] Figure 4 Shown is a schematic diagram of the process of updating relevant memories through the memory engine.

[0090] Figure 4 In the method shown, the memory engine can operate the memory knowledge graph through the graph database. For example, neo4j can be selected as the graph database, and then the relevant memory can be queried in the memory knowledge graph through cypher query statements. It should be noted that when neo4j is selected as the graph database, the query restriction requires that the relevant relationship distance score is less than a certain limit, otherwise memory noise will be generated.

[0091] Figure 4 It includes steps S410 to S450.

[0092] Step S410, when the user inputs dialogue information, the memory engine can generate user memory triples according to the dialogue information, and identify memory categories based on the data of the user memory triples.

[0093] Step S420, determining the corresponding memory knowledge graph to be queried according to the memory category.

[0094] Step S430, judging whether to update the memory knowledge graph based on the relevant memories queried in the memory knowledge graph, and generating a corresponding query statement.

[0095] Based on the relevant memories queried in the memory knowledge graph, it is judged whether the memory knowledge graph needs to be updated, deleted or added, and the corresponding graph database processing statements are generated based on the operation content.

[0096] Step S440, submitting the processing statement to the graph database based on the confirmation in step S430.

[0097] Step S450, based on the processing statement of step S440, the memory knowledge graph can be updated.

[0098] Figure 5 Shown is a schematic diagram of the process of recalling relevant memories through the memory engine. Figure 5 In , the memory engine can also operate on the memory knowledge graph through the graph database.

[0099] Figure 5 It includes steps S510 to S560.

[0100] Step S510, when the user inputs dialogue information, the memory engine can generate user memory triples according to the dialogue information, and identify memory categories based on the data of the user memory triples.

[0101] Step S520, the memory engine confirms the corresponding memory knowledge graph according to the memory category.

[0102] Step S520 may also include step S5210 and step S5220.

[0103] In step S5210, the memory engine can confirm whether there are other users authorized based on the current user information, so that the memory engine can obtain the memory knowledge graph of the authorized user based on the current user information.

[0104] Step S5220, when the memory engine confirms that other users have authorized based on the current user information, it can refer to steps S510 to S550, recall the relevant memory information, and jump to step S550.

[0105] Step S530, based on the memory knowledge graph obtained in step S520, the memory engine can generate a graph database query statement for all nodes in the triple information according to the user's memory triple data.

[0106] In step S540, the memory engine may query the memory knowledge graph through a query statement of the graph database.

[0107] In step S550, the memory engine returns the memory query result obtained based on step S540 as memory, which includes the memory recalled based on the memory knowledge graph of the authorized user in step S5220.

[0108] As can be seen from the above, the present application stores the conversation information containing user memory into a memory knowledge graph based on user memory through a memory engine. In the subsequent conversation between the user and the big model, the big model can query the content of the memory knowledge graph through the memory engine, and have a conversation with the user based on the query results. Based on this, the present application proposes a memory knowledge graph that can store historical conversation information. The memory knowledge graph can store conversation information related to user memory, thereby eliminating information in the historical conversation information that is not related to personal memory. In the memory knowledge graph, the memory engine queries based on the user information and its relationships in the conversation information, and uses the memory query results as memory recall, thereby improving the relevance of the user's memory.

[0109] The method embodiments of the present application are described in detail above. Based on the above content, the present application also proposes a dialogue system based on a large model. Figure 6 The system embodiment of the present application is described in detail. It should be understood that the description of the above method embodiment corresponds to the description of the system embodiment, so the parts not described in detail can refer to the above method embodiment.

[0110] Figure 6 A large model-based dialogue system 600 is provided in an embodiment of the present application. The system 600 may include: a memory engine 610.

[0111] The memory engine 610 is used to store and manage the dialogue information between the large model and the user.

[0112] Among them, after obtaining the user's conversation information, the memory engine is used to establish a memory knowledge graph based on the user's memory; the memory engine is also used to store the acquired conversation information in the memory knowledge graph, and the data information in the memory knowledge graph is the user's memory data.

[0113] Optionally, when the memory engine does not find a memory query result in the memory knowledge graph based on the acquired conversation information, the memory engine stores the conversation information in the memory knowledge graph, and / or when the memory engine finds a memory query result in the memory knowledge graph based on the acquired conversation information, but the memory query result conflicts with the conversation information, the memory engine deletes the memory query result from the memory knowledge graph and stores the conversation information in the memory knowledge graph, wherein the memory query result is the result of the memory engine querying the user memory data in the memory knowledge graph based on the conversation information.

[0114] Optionally, when the memory engine stores the acquired conversation information into the memory knowledge graph, when the memory engine determines that the conversation information contains time information, the time information includes absolute time information and relative time information. When the conversation information is absolute time information, the memory engine stores the absolute time information into the memory knowledge graph; when the conversation information is relative time information, the memory engine converts the relative time information into absolute time information before storing it into the memory knowledge graph.

[0115] Optionally, the memory knowledge graph is composed of user memory triples, which are determined by dialogue information. The user memory triples include user subject data, relationship data and object data, and the relationship data is used to represent the relationship between the user subject data and the object data.

[0116] Optionally, the memory engine divides user memory triples into different memory categories based on the data of user memory triples, and the memory engine generates corresponding memory knowledge graphs based on the memory categories, including one or more of the following: user work related; user life related; user schedule related.

[0117] Optionally, the memory engine generates a memory category plan based on the memory knowledge graph corresponding to the memory category and pushes it to the user. The memory category plan includes one or more of the following: user work summary; user life management plan; user schedule plan.

[0118] Optionally, the memory engine creates a memory knowledge graph for the logged-in user based on conversation information obtained from different logged-in users. Different logged-in users obtain the memory knowledge graphs of other logged-in users through mutual authorization. When the user has a conversation with the big model, the big model has a conversation with the user based on relevant results queried by the memory engine from the user's memory knowledge graph and the memory knowledge graphs of other logged-in users to whom the user is authorized.

[0119] An embodiment of the present application also proposes a computer device, which may include a memory and a processor. The memory stores a computer program that can be executed on the processor. When the computer program is executed by the processor, the method for generating user memory data in the above embodiment is implemented.

[0120] In addition, an embodiment of the present application also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the operations in the method for generating user memory data provided in the above embodiment are implemented. The specific steps will not be repeated here.

[0121] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such actual relationship or order between these entities / operations / objects; the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0122] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, and the units described as separate components may or may not be physically separated. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. Those of ordinary skill in the art can understand and implement it without paying creative work.

[0123] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, TV, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0125] The above are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for generating user memory data, characterized in that: The method is applied to a large model, the large model includes a memory engine, the memory engine is used to store and manage the dialogue information between the large model and the user, and the method includes: Acquire the conversation information of the user, and establish a memory knowledge graph based on the memory of the user through the memory engine; The memory engine stores the acquired conversation information in the memory knowledge graph, and the data information in the memory knowledge graph is the user memory data.

2. The method according to claim 1, characterized in that: The step of storing the acquired conversation information in the memory knowledge graph includes: When the memory engine does not find a memory query result in the memory knowledge graph based on the acquired conversation information, the memory engine stores the conversation information in the memory knowledge graph, and / or When the memory engine searches the memory knowledge graph for the memory query result based on the acquired conversation information, but the memory query result conflicts with the conversation information, the memory engine deletes the memory query result from the memory knowledge graph and stores the conversation information in the memory knowledge graph. Among them, the memory query result is the result of the memory engine querying the user memory data in the memory knowledge graph according to the conversation information.

3. The method according to claim 1, characterized in that The step of storing the acquired conversation information in the memory knowledge graph includes: When the memory engine stores the acquired conversation information into the memory knowledge graph, when the memory engine determines that the conversation information contains time information, the time information includes absolute time information and relative time information, When the conversation information is absolute time information, the memory engine stores the absolute time information in the memory knowledge graph; When the conversation information is relative time information, the memory engine converts the relative time information into absolute time information and then stores it in the memory knowledge graph.

4. The method according to claim 1, characterized in that The memory knowledge graph is composed of user memory triples, which are determined by dialogue information. The user memory triples include user subject data, relationship data and object data, and the relationship data is used to represent the relationship between the user subject data and the object data.

5. The method according to claim 4, characterized in that The memory engine divides the user memory triples into different memory categories based on the data of the user memory triples, and the memory engine generates corresponding memory knowledge graphs based on the memory categories, including one or more of the following: The user is work related; The user's life is related; The user schedule is related.

6. The method according to claim 5, characterized in that The memory engine generates a memory category plan based on the memory knowledge graph corresponding to the memory category, and pushes it to the user. The memory category planning includes one or more of the following: The user's work summary; The user life management plan; The user schedule planning.

7. The method according to claim 1, characterized in that The acquiring the conversation information of the user and establishing a memory knowledge graph based on the memory of the user through the memory engine includes: The memory engine creates a memory knowledge graph of the logged-in users based on the conversation information of the logged-in users, and the different logged-in users obtain the memory knowledge graphs of other logged-in users through mutual authorization.

8. A dialogue system based on a large model, characterized in that: include: A memory engine, used to store and manage the conversation information between the large model and the user; After acquiring the conversation information of the user, the memory engine is used to establish a memory knowledge graph based on the user's memory; The memory engine is also used to store the acquired conversation information in the memory knowledge graph, and the data information in the memory knowledge graph is the user memory data.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to implement the method for generating user memory data as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for generating user memory data, and when the program for generating user memory data is executed by a processor, the method for generating user memory data according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

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

    CN121144976A