Memory management method and system, electronic equipment and storage medium

By generating short-term memories through real-time analysis of user conversations, dynamically updating memory strength, and introducing a long-term memory threshold mechanism, combined with privacy level marking and context awareness, the problem of not being able to provide personalized services and privacy leaks in existing technologies has been solved, achieving a smarter and safer AI service.

CN121834894APending Publication Date: 2026-04-10XIAN YIPU COMM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing dialogue systems based on large language models cannot dynamically evolve to provide personalized services that meet user needs, and may leak sensitive user information in multi-occupant scenarios.

Method used

By analyzing user conversations in real time to generate short-term memories, dynamically updating memory strength based on user behavior and triggering events, and introducing a long-term memory threshold mechanism, combined with privacy level marking and context awareness for filtering, proactive services are generated.

Benefits of technology

It enables memory to dynamically evolve according to the frequency and patterns of user behavior, improving user experience and effectively reducing the risk of AI leaking privacy in public places, thus enhancing the personalization and security of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834894A_ABST
    Figure CN121834894A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a memory management method and system, electronic equipment and a storage medium. The memory management method comprises the following steps: analyzing dialogue content in real time to generate short-term memory and storing the short-term memory; dynamically updating the memory intensity of each short-term memory, and promoting the short-term memory of which the memory intensity reaches a long-term memory threshold value into long-term memory storage; performing privacy level marking on the short-term memory and the long-term memory; and sensing the current situation in real time, searching related memories from the database according to the current situation, performing privacy level filtering on the related memories, and generating and executing active services in combination with the current context and the filtered related memories. According to the embodiment of the invention, the memory can be dynamically evolved along with the frequency and rule of user behaviors, the humanization degree of the system is continuously deepened along with time, the service meeting the current demand of the user is actively generated, memory grading and real-time context awareness can be combined, and the risk of privacy disclosure is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a memory management method, system, electronic device, and storage medium. Background Technology

[0002] The inventors discovered through research that existing dialogue systems based on large language models have at least the following drawbacks: Memory is static and cannot dynamically evolve based on the frequency and patterns of user behavior, thus failing to proactively provide personalized services tailored to user needs; they lack privacy context awareness, potentially leaking sensitive user information in multi-occupant scenarios such as in-vehicle systems. For example, in an in-vehicle setting, existing systems cannot automatically learn a user's habit of playing tennis every Saturday, nor can they distinguish the privacy level differences between "air conditioning preferences" and "frequently visited emotional relationship destinations," potentially inappropriately prompting sensitive locations when family members are in the same car.

[0003] Therefore, improvements to existing technologies are necessary.

[0004] The above information is provided as background information only to aid in understanding this application and does not constitute an assertion or admission that any of the above content can be used as prior art relative to this application. Summary of the Invention

[0005] This application provides a memory management method, system, electronic device, and storage medium to solve the problems of proactively providing personalized services tailored to user needs and the potential leakage of sensitive user information in the prior art.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] In a first aspect, embodiments of this application provide a memory management method, including:

[0008] In each round of dialogue between the user and the large language model, the dialogue content is analyzed in real time to generate short-term memory and store it in the database;

[0009] Based on user behavior and the triggering of the short-term memory, the memory strength of each short-term memory is dynamically updated, and short-term memories whose memory strength reaches the long-term memory threshold are promoted to long-term memory storage.

[0010] The stored short-term memory and long-term memory are labeled with privacy levels;

[0011] The system can perceive the current context in real time, search for relevant memories in the database based on the current context and filter them at a privacy level, and generate and execute proactive services by combining the current context and the relevant memories after privacy level filtering.

[0012] Optionally, dynamically updating the memory strength of each short-term memory based on user behavior and the triggering status of the short-term memory includes:

[0013] For each newly generated short-term memory, its semantic similarity with existing short-term memories in the database is calculated. When the semantic similarity between the new short-term memory and the target short-term memory in the existing short-term memories exceeds a similarity threshold, a preset memory strength adjustment mechanism is triggered.

[0014] If the new short-term memory comes from the user's active operation or positive feedback to the system's recommendations, then the memory strength of the target short-term memory is enhanced.

[0015] If the new short-term memory originates from negative feedback from the user to the system recommendation, the memory strength of the target short-term memory is weakened.

[0016] Optionally, the method for calculating the semantic similarity between the new short-term memory and the existing short-term memory includes:

[0017] The text of the new short-term memory and the existing short-term memory are converted into vector embeddings and stored respectively. Vector calculation is performed on the converted new short-term memory and the existing short-term memory to obtain their semantic similarity.

[0018] Optionally, the real-time analysis of dialogue content to generate short-term memory includes:

[0019] During the current dialogue, the large language model is used to analyze the content of the current dialogue to identify explicit memory instructions and implicit latent memories.

[0020] Based on the explicit memory instructions, the implicit latent memory, and the corresponding metadata, the short-term memory is generated and given an initial memory strength; wherein, the metadata includes any item or combination of the original dialogue fragment of the current dialogue content, timestamp, and sentiment weight.

[0021] Optionally, the long-term memory includes: the content of the corresponding short-term memory before promotion, and automatically summarized user profile information; wherein, the user profile information includes any item or combination of user attributes, car usage preferences, interests and hobbies, and group tags obtained through collaborative filtering.

[0022] Optionally, the memory management method further includes: dynamically updating the memory strength of short-term memories to below a deletion threshold and deleting them from the database.

[0023] Optionally, the privacy levels include: vehicle setting levels, public habit levels, and personal privacy levels, arranged from low to high.

[0024] Secondly, embodiments of this application provide a memory management system for implementing the memory management method described in any of the above claims, including:

[0025] The data and context-aware module is used to perceive the dialogue content between the user and the large language model in real time, as well as the current context and current situation in real time.

[0026] The memory management engine is used to analyze the dialogue content in real time through the large language model in each round of dialogue between the user and the large language model to generate and store short-term memories; and to dynamically update the memory strength of each short-term memory based on user behavior and the triggering of the short-term memories, and promote the short-term memories whose memory strength reaches the long-term memory threshold to long-term memory storage.

[0027] A database is used to store the short-term memory and the long-term memory;

[0028] A privacy and security gateway is used to mark the stored short-term memory and long-term memory with privacy levels; and to perform privacy level filtering operations on the relevant memories being searched along the memory retrieval path;

[0029] An active service engine is used to search for relevant memories from the database based on the current context, and after the privacy and security gateway performs privacy level filtering on the relevant memories, it generates and executes active services by combining the current context and the privacy level filtered relevant memories.

[0030] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the memory management methods described above.

[0031] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions thereon, which are executed by a computer processor to implement the memory management method described above.

[0032] Compared with the prior art, this application has the following beneficial effects:

[0033] This application's embodiments, on the one hand, dynamically update the memory strength of each short-term memory based on user behavior and short-term memory triggering, and introduce a memory promotion mechanism based on long-term memory thresholds. This enables memories to dynamically evolve with the frequency and patterns of user behavior, deepening the system's "personalization" over time and more closely resembling the learning methods of human assistants. This allows the system to proactively generate services tailored to the user's current needs, enhancing the user experience. On the other hand, by classifying memories of different sensitivity levels through privacy-level labeling and dynamically filtering sensitive memories based on the current context, this combination of memory classification and real-time context awareness effectively reduces the risk of AI leaking privacy in public places, removing a major obstacle to the widespread adoption of AI.

[0034] This application has other features and advantages that will be apparent from or will be set forth in detail in the accompanying drawings and following detailed description, which together serve to explain the particular principles of this application. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is a flowchart of the memory management method provided in the embodiments of this application;

[0037] Figure 2 This is a memory management system architecture and data flow diagram provided in the embodiments of this application;

[0038] Figure 3 This is a flowchart of automatic memory recognition and dynamic evolution provided in the embodiments of this application;

[0039] Figure 4 This is a schematic diagram illustrating the contextualized privacy control principle provided in the embodiments of this application;

[0040] Figure 5 This is a schematic diagram of the proactive service process in a vehicle-mounted scenario provided in the embodiments of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0042] To overcome the shortcomings of the prior art, this application provides a memory management scheme that can automatically identify important user information through multi-turn dialogue, realize the dynamic transformation of memory from short-term to long-term based on user behavior and triggering conditions, and perform privacy classification control according to the current context, so as to achieve more intelligent, safer and more personalized proactive services.

[0043] Firstly, please refer to Figure 1 and Figure 2 This application provides a memory management method, including:

[0044] S1. In each round of dialogue between the user and the Large Language Model (LLM), the dialogue content is analyzed in real time to generate short-term memory and store it in the database.

[0045] S2. Based on user behavior and the triggering of short-term memory, dynamically update the memory strength of each short-term memory, and promote short-term memories whose memory strength reaches the long-term memory threshold to long-term memory storage.

[0046] S3. Label the stored short-term and long-term memories with privacy levels.

[0047] S4. Real-time perception of the current context, searching for relevant memories in the database based on the current context and filtering them for privacy levels, combining the current context and the relevant memories after privacy level filtering to generate and execute proactive services.

[0048] This application's embodiments, on the one hand, dynamically update the memory strength of each short-term memory based on user behavior and short-term memory triggering, and introduce a memory promotion mechanism based on long-term memory thresholds. This enables memories to dynamically evolve with the frequency and patterns of user behavior, deepening the system's "personalization" over time and more closely resembling the learning methods of human assistants. This allows the system to proactively generate services tailored to the user's current needs, enhancing the user experience. On the other hand, by classifying memories of different sensitivity levels through privacy-level labeling and dynamically filtering sensitive memories based on the current context, this combination of memory classification and real-time context awareness effectively reduces the risk of AI leaking privacy in public places, removing a major obstacle to the widespread adoption of AI.

[0049] To facilitate understanding, each step will be described in detail below:

[0050] I. Steps for automatic recognition and short-term storage of memories:

[0051] It should be noted that the inventors also discovered through research that existing dialogue systems based on large language models have the following defects: memory relies on explicit user commands and does not actively identify and capture potential important information from users; thus, the system cannot obtain potential, unstated, important information from users, which not only increases the user's interaction burden, but also makes it easy to recommend irrelevant content when actively recommending services, resulting in a poor user experience.

[0052] Therefore, in one optional implementation, this application embodiment uses a large language model to analyze the dialogue content in real time during multi-turn dialogues between the user and the model, in order to identify explicit memory instructions and implicit latent memories, and to combine this information with its original dialogue fragments, timestamps, sentiment weights and other metadata to form a short-term memory, and assign it an initial value for memory strength.

[0053] Explicit memory instructions refer to instructions explicitly provided by the user, such as "set the air conditioner to 23 degrees Celsius." Implicit latent memory refers to important information that the user has not explicitly requested but which is identified through LLM analysis. For example, if a user says, "I'm going swimming at the gym again on Saturday," LLM will automatically analyze and capture the habit of "going swimming every Saturday." Sentiment weights are used to mark the importance of the memory content to the user and can be derived by LLM through sentiment analysis of the original dialogue fragments.

[0054] This application's embodiments achieve a leap from "passive recording" to "active understanding" through multi-turn dialogue analysis and LLM reasoning. It can proactively capture important implicit information in dialogue content, laying a solid foundation for subsequent intelligent proactive generation of services tailored to user needs.

[0055] II. The dynamic evolution and long-term development of memory (including memory enhancement mechanisms):

[0056] In this step, please refer to Figure 3 The system continuously monitors user behavior and the triggering of short-term memory, and dynamically updates the memory strength of each short-term memory accordingly, and promotes short-term memories whose memory strength reaches the long-term memory threshold to long-term memory storage.

[0057] In this embodiment, memory strength is a quantitative indicator that measures the importance and activity of a single memory, reflecting the degree to which the memory matches the user's actual needs. In this embodiment, memory strength can be quantified by integrating multiple factors such as user behavior feedback, time dimension, and semantic relevance. The dynamic influencing factors of memory strength may include, but are not limited to:

[0058] User feedback factor: Increase intensity for positive feedback and decrease intensity for negative feedback;

[0059] Trigger frequency factor: The higher the frequency of memory recall, user mention, or associated behavior, the more significant the increase in intensity.

[0060] Time decay factor: The strength of a memory naturally decays over time, and the strength of a memory that has not been triggered for a long time gradually decreases;

[0061] Semantic relevance factor: The higher the semantic similarity with other memories, the greater the weight of the strength increase. For example, "playing tennis on Saturday" and "navigation to the Olympic Sports Center" are associated, and the strength of the two mutually enhances each other.

[0062] In one alternative implementation, the method for dynamically updating the memory strength of each short-term memory may include:

[0063] For each newly generated short-term memory, its semantic similarity with existing short-term memories stored in the database is calculated. When the semantic similarity between the new short-term memory and the target short-term memory in the existing short-term memories exceeds a similarity threshold, a preset memory strength adjustment mechanism is triggered.

[0064] If new short-term memories come from the user's active actions or positive feedback to system recommendations, the memory strength of the target short-term memory will be enhanced.

[0065] If a new short-term memory originates from negative feedback from the user to the system's recommendations, the strength of the target short-term memory will be weakened.

[0066] It should be noted that, in this embodiment, semantic similarity refers to the degree of overlap between two memory contents at the semantic level, used to determine whether a new memory belongs to the same type of information as an existing memory. For example, "play basketball in the district every Saturday" and "go to the Olympic Sports Center to play basketball on Saturday" have high similarity.

[0067] In one optional implementation, the method for calculating the semantic similarity between the new short-term memory and the existing short-term memory may include: converting the text of the new short-term memory and the existing short-term memory into vector embeddings, and storing them in a short-term memory vector database and a long-term memory vector database, respectively; performing vector calculations on the converted new short-term memory and the existing short-term memory to obtain their semantic similarity. Using vector embedding to calculate semantic similarity, compared to traditional synonym search methods, enables accurate judgment of semantic similarity across expressions, providing a quantitative basis for dynamic adjustment of memory strength. For example, for keywords such as "play tennis every Saturday" and "go to the Olympic Sports Center to play tennis on Saturday," which do not completely overlap in meaning, vector embedding can identify that their core semantics are consistent, calculating a high similarity between them.

[0068] User-initiated actions refer to actions that users actively perform related to memory (such as manually setting the air conditioner to 23 degrees Celsius or actively navigating to the Olympic Sports Center), which proves that users value the memory and therefore need to increase the memory intensity.

[0069] Positive user feedback to the system's recommendations refers to user behavior that indicates approval of the system's memory-based recommendation service; for example, when the system recommends "navigation to play ball at the Olympic Sports Center on Saturday," the user replies "okay" or directly clicks confirm. Positive user feedback indicates that the memory matches their needs, therefore, the memory strength needs to be increased to ensure that the memory can be retained long-term.

[0070] User feedback to system recommendations refers to a user's negative response to the system's memory-based recommendation service. For example, if the system recommends "navigation to play ball at the Olympic Sports Center on Saturday," the user might reply "I'm not going" or "I misremembered, I'll play on Sunday." User feedback indicates that the memory doesn't adequately match the user's needs, therefore the memory strength needs to be reduced to gradually eliminate that memory.

[0071] Therefore, in this embodiment, for important short-term memories, the memory strength will gradually increase as it is continuously enhanced. When it reaches the preset long-term memory threshold, it indicates that the memory item is stable and important to the user, and thus it is promoted from short-term memory to long-term memory.

[0072] Furthermore, the content of long-term memory not only includes all the memory content from the short-term memory stage to fully preserve the memory text and metadata (original dialogue fragments, timestamps, emotional weights, memory strength, etc.), but can also include user profile information automatically summarized and generated by the system, including but not limited to user attributes, car usage preferences, interests, and group tags obtained through collaborative filtering.

[0073] In addition, for unimportant short-term memories, the memory strength will gradually decrease as the memory weakens. When it falls below the preset deletion threshold, it indicates that the memory item is invalid / erroneous (such as the user's corrected erroneous memory of "playing ball on Saturday"). Thus, the memory item can be automatically deleted from the database to reduce database redundancy and avoid interfering with subsequent services.

[0074] It is important to emphasize that, in the embodiments of this application, the key driving factor for the promotion from short-term memory to long-term memory is not the simple and conventional "number of repetitions", but rather "the user's active operation and the user feedback (including positive and negative) obtained after the system actively provides recommendations".

[0075] In other words, the complete logic chain of this embodiment includes:

[0076] System Proactivity: Based on existing short-term memory, the system proactively generates a service suggestion (such as "Navigate to the tennis center?") at appropriate times (such as every Saturday morning).

[0077] Feedback-driven: The user's acceptance (positive feedback) or rejection (negative feedback) of the suggestion is the core basis for determining whether the corresponding memory strength value increases or decreases.

[0078] Threshold promotion / deletion: A memory is converted into a long-term memory only when its strength accumulates to the "long-term memory threshold" due to continuous positive feedback. Conversely, if continuous negative feedback causes the memory strength to fall below the "deletion threshold," the short-term memory will be cleared.

[0079] This constructs a complete interactive learning loop of "observation -> hypothesis -> verification -> reinforcement / weakening", which enables the system to have "personalized" learning capabilities and the degree of "personalization" will continue to deepen over time, making it closer to the learning style of human assistants. As a result, it can proactively generate services that meet the current needs of users and improve the user experience.

[0080] III. Hierarchical Memory Management and Contextualized Privacy Control Steps:

[0081] Please see Figure 4 This step includes classifying the stored short-term and long-term memories: a large language model can be applied, using methods such as inputting privacy keywords, to label the short-term and long-term memories with privacy levels. For example, in an in-vehicle intelligent system application scenario, privacy levels can be divided from low to high as follows:

[0082] Level 1 (Vehicle Settings): These are memories related to vehicle functions and have no privacy attributes; such as air conditioning temperature set to 23 degrees Celsius, preferred sports playlists, and frequently used navigation volume.

[0083] Level 2 (Public Habits): These are user-disclosed behavioral habits without sensitive attributes; for example, liking to play tennis or like fishing.

[0084] Level 3 (Personal Privacy): This category includes memories that involve sensitive user information and that users typically do not wish to disclose, such as frequently used contact numbers and contacts.

[0085] In this example, since vehicle settings are objective configurations for vehicle functions (such as air conditioning temperature) and do not involve the user's personal identity or behavioral characteristics, there is no risk of privacy leakage even if others know them, so the privacy level is relatively low; while public habits (such as liking to play tennis) are user personal behavioral characteristics. Although they are not sensitive privacy, they still have certain personalized attributes, so the privacy level is relatively high.

[0086] Please see Figure 4 This step further includes context awareness and safe recall: the current context is perceived in real time through multimodal input, and relevant memories are searched from the database based on the current context and filtered for privacy level.

[0087] Specifically, in vehicle scenarios, the system can use in-vehicle sensors (such as cameras and microphones) to detect the current situation (i.e., the current environmental state) in real time, such as the characteristics of the occupants (especially the number and identity of the occupants) and time characteristics (such as weekdays / weekends, daytime / nighttime).

[0088] When the system needs to search for relevant memories in the database, it uses the current context as a filter. For example, when other passengers are detected in the vehicle, all Level 3 and some Level 2 private memories are automatically blocked to ensure privacy and security.

[0089] IV. Proactive Service Triggering and Execution Steps:

[0090] In this step, the personalized service will be proactively triggered by combining the current context (referring to the real-time environment and user needs information when the service is triggered, such as time, location, user request, etc.), relevant memories after privacy-level filtering, and the reasoning ability of LLM.

[0091] Example: On Saturday morning, the system detects that only the owner is in the car, so it actively triggers the long-term memory that "the user has a habit of playing tennis every Saturday morning", and combines it with the Level 1 memory of "preferred air conditioning temperature", and actively asks: "Are you going to Olympic Park to play tennis? We have already set the commonly used 23-degree air conditioning and sports playlist for you".

[0092] It should be noted that the embodiments of this application are not only applicable to in-vehicle scenarios, but also to other scenarios, such as smart homes, smart customer service, personal smart assistants (mobile phones / wearable devices), smart terminals, and other scenarios. The embodiments of this application do not impose specific limitations on these scenarios.

[0093] In summary, the embodiments of this application have the following advantages:

[0094] Intelligent enhancement: Through multi-turn dialogue analysis and LLM reasoning, a leap from "passive recording" to "active understanding" has been achieved, enabling the capture of important information without explicit user commands.

[0095] Dynamic memory evolution: A memory promotion mechanism based on frequency thresholds is introduced, which makes the "personalization" of the system deepen over time, making it closer to the learning style of human assistants.

[0096] A privacy and security revolution: By innovatively combining memory grading with real-time context awareness, it solves the core pain point of AI leaking privacy in public places (such as in vehicles), clearing a major obstacle to the popularization of AI.

[0097] System performance optimization: Efficient similarity search is achieved through a vector database, and storage and retrieval efficiency is optimized through short-term / long-term memory separation.

[0098] Secondly, please refer to Figure 2 This application also provides a memory management system for implementing the above-described memory management method, including:

[0099] The data and context-aware module is used to perceive the dialogue content between the user and the large language model in real time, as well as the current context and current situation in real time.

[0100] The memory management engine is used to analyze the dialogue content in real time through the large language model in each round of dialogue between the user and the large language model to generate and store short-term memories; and to dynamically update the memory strength of each short-term memory based on user behavior and the triggering of short-term memories, and promote short-term memories whose memory strength reaches the long-term memory threshold to long-term memory storage.

[0101] Databases are used to store short-term and long-term memories;

[0102] A privacy and security gateway is used to label the stored short-term and long-term memories with privacy levels; and to perform privacy-level filtering operations on relevant memories searched along the memory retrieval path;

[0103] The proactive service engine is used to search for relevant memories in the database based on the current context, and after the relevant memories are filtered for privacy level by the privacy and security gateway, it generates and executes proactive services by combining the current context and the relevant memories filtered for privacy level.

[0104] The above system can execute the methods provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the methods. Furthermore, based on the foregoing embodiments, features not explained in this embodiment are explained using the methods described in the foregoing embodiments, and will not be repeated here.

[0105] Please see Figure 5 This embodiment provides a complete process in an in-vehicle scenario:

[0106] Memory capture: During the first week of navigation, the user said, "Go to the Olympic Park Tennis Center." LLM analyzed that this destination might be related to "sports" and "leisure" and stored it as a short-term memory (vector form) in the short-term memory vector database.

[0107] Memory Evolution: On Saturdays of the second and third weeks, the user provided positive feedback to the system's recommendation to "navigate to Olympic Park" (e.g., the user responded "okay"). The system detected that the strength of this short-term memory had reached the preset long-term memory threshold, and thus promoted it to a Level 2 long-term memory: "The user has a habit of going to Olympic Park to play tennis every Saturday."

[0108] Privacy Control: One Saturday, the user's family was in the car together. The user asked, "What are my plans for today?" When the system retrieved memories, the privacy and security gateway detected other passengers and blocked the Level 2 memory "going to play tennis" (defined as a higher level because it might involve the user's private social interactions), instead replying, "The weather is great today, would you like me to plan a family outing route for you?"

[0109] Proactive Service: On another Saturday, the user was alone in the car. The system proactively triggered this memory and integrated Level 1 vehicle settings memory to proactively provide a full suite of personalized services.

[0110] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the memory management method described above.

[0111] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions thereon, which, when executed by a processor, implement the memory management method provided in all embodiments of this application.

[0112] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0113] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0114] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0115] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0116] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A memory management method, characterized in that, include: In each round of dialogue between the user and the large language model, the dialogue content is analyzed in real time to generate short-term memory and store it in the database; Based on user behavior and the triggering of the short-term memory, the memory strength of each short-term memory is dynamically updated, and short-term memories whose memory strength reaches the long-term memory threshold are promoted to long-term memory storage. The stored short-term memory and long-term memory are labeled with privacy levels; The system can perceive the current context in real time, search for relevant memories in the database based on the current context and filter them at a privacy level, and generate and execute proactive services by combining the current context and the relevant memories after privacy level filtering.

2. The memory management method according to claim 1, characterized in that, The dynamic updating of the memory strength of each short-term memory based on user behavior and the triggering status of the short-term memory includes: For each newly generated short-term memory, its semantic similarity with existing short-term memories in the database is calculated. When the semantic similarity between the new short-term memory and the target short-term memory in the existing short-term memories exceeds a similarity threshold, a preset memory strength adjustment mechanism is triggered. If the new short-term memory comes from the user's active operation or positive feedback to the system's recommendations, then the memory strength of the target short-term memory is enhanced. If the new short-term memory originates from negative feedback from the user to the system recommendation, the memory strength of the target short-term memory is weakened.

3. The memory management method according to claim 2, characterized in that, The method for calculating the semantic similarity between the new short-term memory and the existing short-term memory includes: The text of the new short-term memory and the existing short-term memory are converted into vector embeddings and stored respectively. Vector calculation is performed on the converted new short-term memory and the existing short-term memory to obtain their semantic similarity.

4. The memory management method according to claim 1, characterized in that, The real-time analysis of dialogue content to generate short-term memory includes: During the current dialogue, the large language model is used to analyze the content of the current dialogue to identify explicit memory instructions and implicit latent memories. Based on the explicit memory instructions, the implicit latent memory, and the corresponding metadata, the short-term memory is generated and an initial value for its memory strength is assigned; wherein, the metadata includes any item or combination of the original dialogue fragment of the current dialogue content, timestamp, and sentiment weight.

5. The memory management method according to claim 4, characterized in that, The long-term memory includes: the content of the corresponding short-term memory before promotion, and the automatically generated user profile information; wherein, the user profile information includes any item or combination of user attributes, car usage preferences, interests and hobbies, and group tags obtained through collaborative filtering.

6. The memory management method according to claim 1, characterized in that, The memory management method further includes: dynamically updating the memory strength of short-term memories to below the deletion threshold and deleting them from the database.

7. The memory management method according to claim 1, characterized in that, The privacy levels include: vehicle setting level, public habit level, and personal privacy level, arranged from low to high.

8. A memory management system, characterized in that, For implementing the memory management method as described in any one of claims 1 to 7, comprising: The data and context-aware module is used to perceive the dialogue content between the user and the large language model in real time, as well as the current context and current situation in real time. The memory management engine is used to analyze the dialogue content in real time through the large language model in each round of dialogue between the user and the large language model to generate and store short-term memories; and to dynamically update the memory strength of each short-term memory based on user behavior and the triggering of the short-term memories, and promote the short-term memories whose memory strength reaches the long-term memory threshold to long-term memory storage. A database is used to store the short-term memory and the long-term memory; A privacy and security gateway is used to mark the stored short-term memory and long-term memory with privacy levels; and to perform privacy level filtering operations on the relevant memories being searched along the memory retrieval path; An active service engine is used to search for relevant memories from the database based on the current context, and after the privacy and security gateway performs privacy level filtering on the relevant memories, it generates and executes active services by combining the current context and the privacy level filtered relevant memories.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the memory management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that, The computer-executable instructions are executed by a computer processor to implement the memory management method as described in any one of claims 1 to 7.