Dynamic hierarchical memory method and related product
By constructing a dynamic hierarchical memory knowledge graph, the fragmentation and real-time issues of existing AI agent memory systems are solved, enabling the autonomous evolution of structured memory and high-order knowledge, and improving the AI agent's contextual understanding and personalized service capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-04-14
AI Technical Summary
Existing AI agent memory systems suffer from fragmented and unstructured memory in real-time dialogue scenarios, and their knowledge graph construction struggles to adapt to high concurrency and low latency, making them unable to support deep reasoning and personalized modeling.
By generating standardized memory units, a dynamic hierarchical memory knowledge graph is constructed, which is updated in real time and incorporates multi-dimensional contextual metadata and higher-order knowledge to achieve structured expression and cross-session association of memory.
While ensuring low-latency response, it improves the AI agent's contextual understanding and personalized service capabilities, and supports deep reasoning capabilities.
Smart Images

Figure CN121858696A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of artificial intelligence technology, specifically to a dynamic hierarchical memory method and related products. Background Technology
[0002] With the rapid development of large language model technology, AI-based dialogue agents are widely used in scenarios such as intelligent customer service, virtual assistants, and companion robots. Existing AI agent memory systems can be mainly divided into two categories.
[0003] The first type is a memory system based on retrieval enhancement. This type of method segments the user's conversation history or related documents into text fragments, vectorizes them, and stores them in a vector database. During the inference phase, the semantic similarity between the query and the stored fragments is calculated to retrieve the most relevant fragments as context. This type of method is relatively simple to implement and can effectively recall historical information with similar literal or semantic meanings.
[0004] However, its fundamental flaw lies in the fragmentation and unstructured nature of memory. All memories exist in isolated, flat textual forms, and the system cannot recognize the inherent logical connections between different memory units. For example, a conversation about "travel plans" and another conversation mentioning "photography as a hobby" may have a strong semantic connection (e.g., the user prefers "photography travel"), but memory retrieval enhancement systems cannot automatically establish such cross-conversation semantic connections, thus making it difficult to support deep reasoning, induction, or personalized modeling.
[0005] The second category is knowledge graph-based memory systems. These methods attempt to structure dialogue information into "entity-relationship-entity" triples and construct networked knowledge representations to explicitly express the logical connections between facts. Theoretically, knowledge graphs have the potential to support complex reasoning and semantic aggregation.
[0006] However, in dynamic memory scenarios for real-time dialogue, existing knowledge graph construction methods face significant challenges: First, most knowledge graph construction processes rely on offline batch processing, which is difficult to adapt to high-concurrency, low-latency online dialogue data streams; Second, once a knowledge graph is constructed, it usually lacks an automated knowledge evolution mechanism, making it impossible to deeply integrate and deepen reasoning based on newly input memory units.
[0007] Therefore, it is necessary to propose a dynamic hierarchical memory method to solve at least one of the above-mentioned technical problems. Summary of the Invention
[0008] The embodiments of this disclosure present a dynamic hierarchical memory method and related products.
[0009] In a first aspect, this disclosure provides a dynamic hierarchical memory method, the method comprising: In response to receiving a real-time dialogue data stream from a target user, N standardized memory units are generated based on the real-time dialogue data stream, where N is a positive integer, and each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the association relationship between the key entities. According to the preset standardized memory unit selection rules, at least one of the standardized memory units is selected in batches from the N standardized memory units; A memory knowledge graph is constructed based on the selected standardized memory units. Whenever at least one new standardized memory unit is selected, the memory knowledge graph is updated based on the newly selected standardized memory units. The memory knowledge graph includes at least two key entities, the relationships between the key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism.
[0010] In some optional implementations, the real-time dialogue data stream includes a dialogue sub-data stream corresponding to at least one dialogue topic, and the generation of N standardized memory units based on the real-time dialogue data stream includes: For each dialogue sub-data stream corresponding to the aforementioned dialogue topic, at least two key entities are extracted, and the relationships between these key entities are analyzed; and, Based on the key entities and their relationships, at least one event type memory unit corresponding to the dialogue sub-data stream is generated, wherein each event type memory unit includes two key entities and their relationship. Based on the event type memory units corresponding to each of the dialogue sub-data streams, N standardized memory units are generated.
[0011] In some alternative implementations, a memory knowledge graph is constructed based on the selected standardized memory units, including: Map at least two key entities contained in each of the standardized memory units to nodes of the memory knowledge graph, and map each of the associations to edges of the memory knowledge graph; Based on the selected standardized memory units, first memory enhancement attribute information corresponding to each key entity and each association relationship is generated, wherein the first memory enhancement attribute information includes the multi-dimensional context metadata related to the corresponding key entity or association relationship; Based on each of the standardized memory units and each of the first memory enhancement attribute information, second memory enhancement attribute information corresponding to at least one of the key entities and / or at least one of the association relationships is generated, wherein the second memory enhancement attribute information includes at least one of the target user's user preference information, user fixed behavior pattern information, and user basic attribute information; Based on each of the first memory enhancement attribute information and each of the second memory enhancement attributes, generate each of the memory enhancement attribute information; The memory knowledge graph is constructed based on the nodes, the edges, and the memory enhancement attribute information.
[0012] In some optional implementations, the method further includes: In response to the fulfillment of preset knowledge graph autonomous analysis triggering conditions, the memory knowledge graph is analyzed to generate at least one first long-term preference information of the target user, and each first long-term preference information is used as the memory enhancement attribute information and associated and stored in the memory knowledge graph as a key entity corresponding to the target user; Assign preference attention weights to each of the first long-term preference information; Based on the semantic similarity between each of the first long-term preference information and each of the preference attention weights, at least one second long-term preference information of the target user is generated, and the second long-term preference information is used as the memory enhancement attribute information and associated with and stored in the memory knowledge graph to the key entity corresponding to the target user; Based on each of the second long-term preference information, a long-term comprehensive cognitive profile of the target user is generated, and the long-term comprehensive cognitive profile is used as the memory enhancement attribute information and associated with and stored in the memory knowledge graph to the key entity corresponding to the target user.
[0013] In some optional implementations, after generating N standardized memory units based on the real-time dialogue data stream, the method further includes: Each of the standardized memory units is stored in the first data storage area; The memory knowledge graph is stored in the second data storage area.
[0014] In some optional implementations, the method further includes: Obtain the context information stream of the target user, wherein the context information stream includes at least one of time information, spatial information, device status information, and user behavior information; Based on the context information flow, memory information associated with the target user is retrieved from the first data storage area and / or the second data storage area, wherein the memory information includes short-term memory information and / or long-term memory information, the short-term memory information represents the short-term preferences exhibited by the target user in recent interactions, and the long-term memory information represents the long-term preferences formed by the target user in historical interactions; Based on the context information stream and the memory information, determine whether the triggering conditions for actively serving the target user are met. If the triggering condition is met, AIGC content for the target user is generated based on the context information stream and the memory information.
[0015] Secondly, this disclosure provides a dynamic hierarchical memory device, the device comprising: A memory unit generation unit is used to generate N standardized memory units based on the real-time dialogue data stream received from the target user in response to receiving the real-time dialogue data stream, where N is a positive integer, and each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the association relationship between the key entities. The selection unit is used to select at least one of the standardized memory units from the N standardized memory units in batches according to the preset standardized memory unit selection rules; A knowledge graph construction and updating unit is used to construct a memory knowledge graph based on the selected standardized memory units, and to update the memory knowledge graph based on the newly selected standardized memory units whenever at least one of the standardized memory units is newly selected. The memory knowledge graph includes at least two key entities, the relationships between the key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism.
[0016] In some optional implementations, the real-time dialogue data stream includes a dialogue sub-data stream corresponding to at least one dialogue topic, and the memory unit generation unit can be further used for: For each dialogue sub-data stream corresponding to the aforementioned dialogue topic, at least two key entities are extracted, and the relationships between these key entities are analyzed; and, Based on the key entities and their relationships, at least one event type memory unit corresponding to the dialogue sub-data stream is generated, wherein each event type memory unit includes two key entities and their relationship. Based on the event type memory units corresponding to each of the dialogue sub-data streams, N standardized memory units are generated.
[0017] In some alternative implementations, the knowledge graph construction and update unit can be further used for: Map at least two key entities contained in each of the standardized memory units to nodes of the memory knowledge graph, and map each of the associations to edges of the memory knowledge graph; Based on the selected standardized memory units, first memory enhancement attribute information corresponding to each key entity and each association relationship is generated, wherein the first memory enhancement attribute information includes the multi-dimensional context metadata related to the corresponding key entity or association relationship; Based on each of the standardized memory units and each of the first memory enhancement attribute information, second memory enhancement attribute information corresponding to at least one of the key entities and / or at least one of the association relationships is generated, wherein the second memory enhancement attribute information includes at least one of the target user's user preference information, user fixed behavior pattern information, and user basic attribute information; Based on each of the first memory enhancement attribute information and each of the second memory enhancement attributes, generate each of the memory enhancement attribute information; The memory knowledge graph is constructed based on the nodes, the edges, and the memory enhancement attribute information.
[0018] In some alternative embodiments, the apparatus further includes: The first long-term preference information generation unit is used to analyze the memory knowledge graph in response to the preset knowledge graph autonomous analysis triggering condition, generate at least one first long-term preference information of the target user, and store each first long-term preference information as the memory enhancement attribute information in association with the key entity in the memory knowledge graph corresponding to the target user; A preference attention weight allocation unit is used to allocate preference attention weights to each of the first long-term preference information. The second long-term preference information generation unit is used to generate at least one second long-term preference information of the target user based on the semantic similarity between each of the first long-term preference information and each of the preference attention weights, and to associate and store the second long-term preference information as the memory enhancement attribute information in the memory knowledge graph corresponding to the key entity of the target user. The long-term comprehensive cognitive profile generation unit is used to generate a long-term comprehensive cognitive profile of the target user based on each of the second long-term preference information, and to associate and store the long-term comprehensive cognitive profile as the memory enhancement attribute information in the key entity corresponding to the target user in the memory knowledge graph.
[0019] In some alternative implementations, after generating N standardized memory units based on the real-time dialogue data stream, the apparatus further includes: A memory unit storage unit is used to store each of the standardized memory units into a first data storage area; A memory knowledge graph storage unit is used to store the memory knowledge graph in a second data storage area.
[0020] In some alternative embodiments, the apparatus further includes: A context information stream acquisition unit is used to acquire the context information stream of the target user, wherein the context information stream includes at least one of time information, spatial information, device status information, and user behavior information; A memory information retrieval unit is configured to retrieve memory information associated with the target user from the first data storage area and / or the second data storage area based on the context information flow, wherein the memory information includes short-term memory information and / or long-term memory information, the short-term memory information characterizing the short-term preferences exhibited by the target user in recent interactions, and the long-term memory information characterizing the long-term preferences formed by the target user in historical interactions; The trigger condition judgment unit is used to determine whether the trigger condition for actively serving the target user is met based on the context information stream and the memory information. The AIGC generation unit is used to generate AIGC content for the target user based on the context information stream and the memory information, if the triggering condition is met.
[0021] Thirdly, this disclosure provides an electronic device, including: One or more processors; Storage device, on which one or more programs are stored, When the above-described one or more programs are executed by the above-described one or more processors, the above-described one or more processors implement the method as described in any embodiment of the first aspect of this disclosure.
[0022] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by one or more processors, implements the method described in any embodiment of the first aspect of this disclosure.
[0023] Fifthly, this disclosure provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method described in any embodiment of the first aspect of this disclosure.
[0024] The dynamic hierarchical memory method and related products provided in the embodiments of this disclosure firstly, in response to receiving a real-time dialogue data stream from a target user, generate N standardized memory units based on the real-time dialogue data stream, where N is a positive integer. Each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the relationships between these key entities. Then, according to a preset standardized memory unit selection rule, at least one standardized memory unit is selected in batches from the N standardized memory units. Finally, a memory knowledge graph is constructed based on the selected standardized memory units. Furthermore, whenever at least one new standardized memory unit is selected, the memory knowledge graph is updated based on the newly selected standardized memory units. The memory knowledge graph includes at least two key entities, the relationships between these key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism. This disclosure transforms real-time dialogue data streams into structured, standardized memory units, and builds an augmentable and updatable memory knowledge graph based on these units. Furthermore, by introducing memory-enhancing attribute information that corresponds one-to-one with key entities and their relationships, it not only preserves the contextual details of the original dialogue but also supports the autonomous evolution of higher-order knowledge, thus overcoming the limitations of existing knowledge graph methods in terms of real-time performance and intelligent evolution capabilities. In other words, the dynamic hierarchical memory method provided by this disclosure can achieve structured representation of memory, cross-conversation association, and multi-level abstract evolution while ensuring low-latency response, significantly improving the AI agent's contextual understanding, personalized service level, and deep reasoning capabilities in long-term human-computer interaction. Attached Figure Description
[0025] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a system architecture diagram in which an embodiment of the dynamic hierarchical memory method of this disclosure can be applied; Figure 2 This is a flowchart of an embodiment of the dynamic hierarchical memory method according to the present disclosure; Figure 3 This is a schematic diagram of a structure of an embodiment of the dynamic hierarchical memory device according to the present disclosure; Figure 4 This is a schematic diagram of the structure of a computer system suitable for implementing embodiments of the present disclosure. Detailed Implementation
[0026] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0027] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0028] Figure 1 An exemplary system architecture 100 is shown, in which embodiments of the dynamic hierarchical memory method and related products of this disclosure can be applied.
[0029] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used to provide communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various communication connection types, such as wired communication links, wireless communication links, etc.
[0030] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as dynamic hierarchical memory applications, knowledge graph construction applications, voice interaction applications, video conferencing applications, short video social applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0031] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with microphones and speakers, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), portable computers, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules (e.g., generating N standardized memory units based on the real-time dialogue data stream received from the target user), or as a single software program or software module. No specific limitations are imposed here.
[0032] Server 105 can be a server that provides various services, such as a backend server that, in response to receiving real-time dialogue data streams from terminal devices 101, 102, and 103, generates N standardized memory units for processing based on the real-time dialogue data streams. The backend server can perform corresponding processing based on the real-time dialogue data streams from the terminal devices.
[0033] In some cases, the dynamic hierarchical memory method provided in this disclosure can be jointly executed by terminal devices 101, 102, and 103 and server 105. For example, the step of "generating N standardized memory units based on the real-time dialogue data stream received from the target user" can be executed by terminal devices 101, 102, and 103, and the step of "selecting at least one standardized memory unit from the N standardized memory units in batches according to a preset standardized memory unit selection rule" can be executed by server 105. This disclosure does not limit this. Correspondingly, the dynamic hierarchical memory device can also be respectively disposed in terminal devices 101, 102, and 103 and server 105.
[0034] In some cases, the dynamic hierarchical memory method provided in this disclosure can be executed by server 105, and correspondingly, the dynamic hierarchical memory device can also be set in server 105. In this case, system architecture 100 may not include terminal devices 101, 102, and 103.
[0035] In some cases, the dynamic hierarchical memory method provided in this disclosure can be executed by terminal devices 101, 102, and 103. Accordingly, the dynamic hierarchical memory device can also be set in terminal devices 101, 102, and 103. In this case, the system architecture 100 may not include server 105.
[0036] It should be noted that server 105 can be either hardware or software. When server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 105 is software, it can be implemented as multiple software programs or software modules (for example, used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0037] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0038] All information, data, and signals disclosed herein are authorized by the user or by all parties, and the collection, use, and processing of such data comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0039] Continue to refer to Figure 2 , Figure 2 A flowchart 200 is shown as an embodiment of the dynamic hierarchical memory method according to the present disclosure. Figure 2 The dynamic hierarchical memory method shown can be applied to Figure 1 The terminal device or server shown. This process 200 includes at least the following steps 201-203.
[0040] Step 201: In response to receiving the real-time dialogue data stream from the target user, generate N standardized memory units based on the real-time dialogue data stream.
[0041] In this embodiment, the real-time dialogue data stream can refer to a set of raw dialogue information that is dynamically generated and unprocessed within a specific time range. It typically includes all text or voice content generated by real-time interactions between the target user and other users, chatbots, voice assistants, etc.
[0042] These real-time conversation data streams can come from various sources, such as instant messages on social media platforms, call logs from customer service centers, and voice commands from smart speakers.
[0043] Standardized memory units refer to the smallest memory fragments extracted and structurally represented from the real-time dialogue data stream of the target user, possessing a unified format and semantic integrity. Their core purpose is to transform the unstructured, raw real-time dialogue data stream into machine-understandable, storable, and reasonable knowledge units, providing a foundation for subsequent construction of memory knowledge graphs and the realization of higher-order knowledge.
[0044] Specifically, N standardized memory units can be extracted from the root real-time dialogue data stream, where N is a positive integer. Each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the relationships between the key entities.
[0045] Key entities can be semantically meaningful objects such as people, places, items, and behaviors. Relationships are used to describe the semantic connections between key entities. For example, in the statement "User A likes pizza", "User A" and "pizza" form a "preference" relationship.
[0046] In some alternative implementations, the real-time dialogue data stream includes a dialogue sub-data stream corresponding to at least one dialogue topic.
[0047] In this embodiment, a dialogue topic can refer to a collection of dialogue content that revolves around a central semantic theme in a continuous real-time dialogue data stream.
[0048] Specifically, the sub-data streams of a conversation within a topic are semantically closely related and serve the same goal or intention.
[0049] For example, in a real-time conversation containing multiple topics, the discussion might start with weekend plans and then shift to dietary preferences.
[0050] In some alternative implementations, the original real-time dialogue data stream can be divided into several dialogue sub-data streams based on algorithms such as semantic coherence or topic boundary detection, with each dialogue sub-data stream corresponding to an independent dialogue topic.
[0051] Based on this, N standardized memory units are generated according to the real-time dialogue data stream, which can be implemented through the following A1-A3.
[0052] A1: For each dialogue sub-data stream corresponding to a dialogue topic, extract at least two key entities and analyze the relationships between the key entities.
[0053] For example, in the dialogue sub-dataflow "I want to go hiking on Saturday and bring some sandwiches along the way", the key entities "user", "Saturday", "hiking" and "sandwiches" can be extracted, and the relationships such as "user-plan-hiking" and "user-bring-sandwiches" can be identified.
[0054] A2, based on the key entities and their relationships, generate at least one event type memory unit corresponding to the dialog sub-data stream.
[0055] In this embodiment, each event type memory unit includes two key entities and the relationship between them.
[0056] For example, the above dialogue sub-data stream can generate two event type memory units: (user, plan, climb) and (user, carry, sandwich).
[0057] Each event type memory unit constitutes a structured triple, which serves as the basic unit for subsequently building a knowledge graph.
[0058] A3 generates N standardized memory units based on the memory units of each event type corresponding to each dialogue sub-data stream.
[0059] In this embodiment, the event type memory units generated by all dialogue sub-data streams are aggregated to form a complete set of standardized memory units, the total number of which can be N.
[0060] Step 202: Select at least one standardized memory unit from N standardized memory units in batches according to the preset standardized memory unit selection rules.
[0061] In this embodiment, the preset standardized memory unit selection rules can be flexibly set according to the actual application scenario.
[0062] For example, by time window (processing a batch of standardized memory units every 5 minutes) or by event type (prioritizing standardized memory units that involve user preferences).
[0063] This step enables the filtering and scheduling of massive standardized memory units, avoiding the computational pressure of processing all data at once, while also supporting incremental knowledge construction.
[0064] Step 203: Construct a memory knowledge graph based on the selected standardized memory units, and update the memory knowledge graph based on the newly selected standardized memory units whenever at least one new standardized memory unit is selected.
[0065] In this embodiment, the memory knowledge graph may include at least two key entities, the relationships between the key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through the knowledge evolution mechanism.
[0066] Among them, multi-dimensional contextual metadata can be data related to key entities or relationships and used in real-time dialogue data streams to support semantic understanding and contextual reasoning.
[0067] For example, multi-dimensional contextual metadata may include the number of times the corresponding key entity or relationship is mentioned in the real-time dialogue data stream, the historical occurrence time series, the semantic vector corresponding to the key entity or relationship, the importance score in the real-time dialogue data stream, and the time decay score, etc.
[0068] Higher-order knowledge generated through knowledge evolution mechanisms can be semantic summaries that go beyond the surface information of the original dialogue. This is achieved through in-depth analysis and abstract reasoning of key entities, relationships, and memory-enhancing attributes in a memory knowledge graph.
[0069] For example, higher-order knowledge may include information on users' long-term preferences, information on users' fixed behavioral patterns, and information on users' basic attributes (such as users' age, gender, location, education level, income level or spending power, language preferences, personality tags, value orientations, etc.), without any restrictions.
[0070] In some alternative implementations, the memory knowledge graph is updated based on each newly selected standardized memory unit whenever at least one new standardized memory unit is selected.
[0071] Specifically, key entities in newly selected standardized memory units can be converted into semantic vector representations, and similarity calculations can be performed between these representations and the semantic vectors corresponding to existing key entities in the memory knowledge graph.
[0072] If the similarity between any existing key entity and the new key entity is greater than or equal to a preset similarity threshold, or if the large language model determines that the two are the same key entity, then the information of the new key entity will be integrated into the existing key entity node, including updating its association relationship and memory enhancement attribute information.
[0073] If the similarity between any existing key entity and a new key entity is lower than a preset similarity threshold, or if the large language model determines that the two belong to different key entities, then a new node corresponding to the independent key entity is added to the memory knowledge graph, and corresponding edges and memory enhancement attributes are established, thereby realizing the incremental, semantically consistent and structurally coherent dynamic update of the memory knowledge graph.
[0074] In some alternative implementations, a memory knowledge graph is constructed based on the selected standardized memory units, which can be specifically implemented through the following B1-B5.
[0075] B1 maps at least two key entities contained in each standardized memory unit to nodes of the memory knowledge graph, and maps each relationship to edges of the memory knowledge graph.
[0076] For example, in a standardized memory unit (user, like, pizza), the user and pizza are mapped as two nodes in the memory knowledge graph, and the like is mapped as an edge connecting the user and pizza in the memory knowledge graph.
[0077] B2, based on the selected standardized memory units, generates first memory enhancement attribute information corresponding to each key entity and each relationship.
[0078] In this embodiment, the first memory enhancement attribute information includes the multi-dimensional contextual metadata related to the corresponding key entity or association.
[0079] For example, for the "pizza" node, its first memory enhancement attribute information may include: being mentioned 3 times, last appearing on August 7, 2025, and semantic vector [0.82, -0.31, …].
[0080] B3, based on each standardized memory unit and each first memory enhancement attribute information, generates second memory enhancement attribute information corresponding to at least one key entity and / or at least one association relationship.
[0081] The second memory enhancement attribute information includes at least one of the target user's user preference information, user fixed behavior pattern information, and user basic attribute information.
[0082] For example, based on first memory enhancement attribute information such as "the number of times the target user mentions pizza" and "the number of times the target user chooses a Western restaurant," user preference information such as the target user's preference for Western fast food can be inferred. If the user always orders food at 12 noon, then the user behavior pattern information of a fixed lunch time can be summarized.
[0083] Unlike first-memory augmentation attribute information, second-memory augmentation attribute information does not exist for every key entity and every relationship. This is because second-memory augmentation attribute information is a high-order inductive result generated by cross-event aggregation, pattern mining, or semantic reasoning of multiple standardized memory units and their corresponding first-memory augmentation attribute information. It is usually only associated with key entities (such as target users) or specific types of relationships that have sufficient behavioral support or semantic salience.
[0084] For example, the attribute of a user's preference for Western fast food does not come directly from a single entity or relationship in a conversation. Instead, it is an abstract conclusion drawn from multiple interaction events involving key entities such as pizza, pasta, and Western restaurants, after statistical analysis and semantic generalization. Therefore, it exists only as a secondary memory attribute of the target user, rather than an accessory attribute of each key entity of a dish or the user-like-dish relationship.
[0085] Similarly, fixed lunch times reflect users' behavioral patterns over time, which can only be inferred by accumulating multiple days of order records, and therefore cannot be attached to the edges or nodes of a single order event.
[0086] In other words, the first memory enhancement attribute information is characterized by fine granularity, event binding, and full coverage, while the second memory enhancement attribute information is characterized by coarse granularity, user-centricity, and condition generation. It is only generated and associated with the corresponding key entities (usually user nodes) when conditions such as preset statistical thresholds, behavioral consistency, or inference confidence are met.
[0087] B4 generates memory enhancement attribute information based on each first memory enhancement attribute and each second memory enhancement attribute.
[0088] In this embodiment, the first memory enhancement attribute information and the second memory enhancement attribute information can be merged to form a complete memory enhancement attribute.
[0089] B5 constructs a memory knowledge graph based on nodes, edges, and various memory enhancement attribute information.
[0090] In this embodiment, the final memory knowledge graph not only contains structured facts, but also embeds rich contextual and cognitive information, providing a knowledge foundation for subsequent services.
[0091] In some alternative implementations, the dynamic hierarchical memory method may also include steps 204-208.
[0092] Step 204: In response to meeting the preset knowledge graph autonomous analysis triggering conditions, analyze the memory knowledge graph, generate at least one first long-term preference information of the target user, and store each first long-term preference information as memory enhancement attribute information in the memory knowledge graph corresponding to the key entity of the target user.
[0093] In this embodiment, the preset knowledge graph autonomous analysis triggering conditions may include: the cumulative number of newly added standardized memory units reaching a preset quantity threshold, or the time interval between the last execution of knowledge graph autonomous analysis exceeding a preset time period threshold.
[0094] For example, when 100 new standardized memory units are added, or more than 24 hours have passed since the last analysis, the autonomous analysis process is triggered.
[0095] Here, at least one first long-term preference information is obtained through comprehensive analysis of the key entities, relationships and their corresponding first memory enhancement attribute information in the memory knowledge graph.
[0096] Specifically, recursive algorithms can be run on memory knowledge graphs to identify stable preference patterns of target users across different dimensions, such as the association paths between key entities, interaction frequency, time distribution, sentiment tendencies, and contextual semantics.
[0097] For example, for a real-time dialogue data stream that includes multiple dialogue sub-data streams (such as "dining choices", "leisure activities", "shopping behavior", etc.), multiple primary long-term preference information of the target user in terms of food taste (such as "preferring spicy food"), consumption scenario (such as "preferring online shopping"), and entertainment type (such as "liking outdoor sports") can be inferred.
[0098] Step 205: Assign preference attention weights to each piece of first long-term preference information.
[0099] In this embodiment, the preference attention weight can be calculated based on one or more of the following factors: (1) Importance and stability of preference: reflects the consistency of the preference in historical interactions. For example, if a preference appears repeatedly in multiple rounds of dialogue or multiple time periods, its importance and stability scores are higher.
[0100] (2) Recent activity: measures whether the preference has been frequently triggered or mentioned in a recent period of time. For example, "the target user has ordered coffee multiple times in the past 3 days" has a higher recent activity than "ordered coffee once 3 months ago".
[0101] For example, for the first long-term preference information: a preference for Western fast food, if this first long-term preference information appears in 8 different conversations in the past month (high stability and high importance) and there are 3 related interactions in the most recent week (high recent activity), then it will be assigned a higher preference attention weight (e.g., 0.85). Another first long-term preference information: an occasional attempt at desserts only appeared once two months ago, so it may be given a lower weight (e.g., 0.2).
[0102] This preference attention weight can be used for subsequent aggregation of each first long-term preference information to ensure that high-confidence and high-relevance preferences play a greater role in the construction of second long-term preference information.
[0103] Step 206: Based on the semantic similarity between each first long-term preference information and the preference attention weights, generate at least one second long-term preference information for the target user, and store the second long-term preference information as memory-enhancing attribute information in the memory knowledge graph corresponding to the key entity of the target user.
[0104] In this embodiment, the aggregation process includes generalizing, abstracting, and weighting the first long-term preference information that is semantically similar or thematically related, in order to form a more general and stable higher-order preference expression.
[0105] Specifically, the semantic similarity between each first long-term preference information can be calculated using a semantic embedding model to identify first long-term preference information that can be merged, and then weighted and summarized in combination with its corresponding preference attention weights to generate second long-term preference information with a wider coverage and a higher level of abstraction.
[0106] For example, highly semantically related first long-term preference information such as liking pizza (weight 0.7), frequently visiting Italian restaurants (weight 0.6), and preferring pasta (weight 0.65) can be clustered and semantically generalized into a more abstract and representative second long-term preference information: a preference for Italian-style food.
[0107] This second long-term preference information not only reduces the redundancy of preference expression, but also improves the semantic consistency and reasoning efficiency of user profiles.
[0108] Step 207: Based on each second long-term preference information, generate a long-term comprehensive cognitive profile of the target user, and store the long-term comprehensive cognitive profile as memory enhancement attribute information in the memory knowledge graph corresponding to the key entity of the target user.
[0109] In this embodiment, the long-term comprehensive cognitive profile can be the integration and semantic enhancement of the user's second long-term preference information in various dimensions. It not only covers behavioral preferences such as diet, entertainment, and consumption, but also integrates the target user's personality traits, value orientation, decision-making patterns, and other deep cognitive characteristics.
[0110] For example, if the target user's second long-term preference includes a preference for Italian cuisine, a tendency to choose highly rated services, and a frequent participation in outdoor activities on weekends, it can be inferred that their long-term comprehensive cognitive profile is: an urban explorer who pursues a quality life, values experience and service details, and has both social activity and a sense of ritual in life.
[0111] In some optional implementations, after generating N standardized memory units based on the real-time dialogue data stream, the method further includes storing each standardized memory unit in a first data storage area. The memory knowledge graph is then stored in a second data storage area.
[0112] This approach facilitates efficient access and rapid processing of standardized memory units that are updated frequently and in short periods, meeting the low-latency response requirements of real-time dialogue scenarios. Furthermore, it enables persistent storage and refined management of highly structured, long-evolutionary memory knowledge graphs and their associated memory-enhancing attributes (including first / second long-term preference information, long-term comprehensive cognitive profiles, etc.). By storing these two types of data separately, differentiated data management strategies can be implemented based on their access frequency, update patterns, and semantic characteristics, such as independent backup mechanisms, lifecycle control, security permission configuration, and storage engine optimization.
[0113] Furthermore, with the development of artificial intelligence technology, intelligent assistants and personalized recommendation systems have been widely applied in daily life and work scenarios. However, significant bottlenecks remain in achieving truly "proactive service," making it difficult to provide users with highly personalized, context-aware, and generative service content at the right time.
[0114] Currently, mainstream proactive service mechanisms can be mainly divided into two categories. The first category is systems triggered by simple rules, such as contextual intelligence in mobile operating systems. These systems typically rely on a single or a few contextual signals (such as current time, GPS location, calendar events, or device status) to match preset rules and push fixed services or notifications.
[0115] Despite its low implementation cost and fast response, its fundamental limitation lies in the fact that the decision-making basis only stays on the surface context, lacking an understanding of the user's deep intentions, personal preferences and long-term behavioral patterns. The content pushed is mostly a general template, which cannot integrate the user's unique experience and emotional state, thus making it difficult to establish a true sense of companionship and personalized experience.
[0116] The second type is recommendation systems based on content preference models, commonly found in vertical applications such as news and video. These systems analyze users' historical clicks, browsing, or purchasing behavior to build interest profiles and recommend similar content accordingly. While they possess strong personalization capabilities within specific domains, their initiative has clear limitations: on the one hand, their perception is limited to internal application behavioral data, failing to capture the user's global context across applications, devices, and even the real world (such as schedules, emotional states, and social relationships); on the other hand, their output is merely the filtering and sorting of existing content, lacking the ability to create new content. In other words, the system knows what users like to watch, but doesn't know what users need at this moment, why they need it, or in what semantic form it should be presented. Especially when facing complex, multi-faceted life scenarios, such systems struggle to generate entirely new content that organically integrates users' various interests, recent memories, and the current context.
[0117] In summary, current solutions either rely on superficial rules and rigid, generic content, or are limited to passive recommendations within closed ecosystems. There is a general lack of a unified, proactive service system that can deeply integrate dynamic user memory, real-time context awareness, and generative content creation capabilities.
[0118] Based on this, in some optional implementations, the dynamic hierarchical memory method may further include steps 208-211.
[0119] Step 208: Obtain the context information stream of the target user.
[0120] In this embodiment, the context information stream of the target user can be obtained in real time. The context information stream includes at least one of time information, spatial information, device status information, and user behavior information.
[0121] The time information may include the current time, day of the week, whether it is a holiday, and time of day (such as morning, lunch break, or late night), which is used to determine the user's time context.
[0122] Spatial information can include a user’s geographic location (such as GPS coordinates, city, business district), mobility status (stationary, walking, driving), or environmental semantics (such as at home, in the office, in a shopping mall) to understand the physical scene in which the user is located.
[0123] Device status information can include whether the terminal device type (phone, tablet, smart speaker) is in use; battery level and whether it is charging; network connection status (Wi-Fi / 5G); whether it is connected to a specific Bluetooth device (such as car audio, headphones), etc., to assess the feasibility of service push and interaction methods.
[0124] User behavior information can include whether they are using navigation, whether they have just ended a call, or whether they are listening to music, and is used to capture the user's real-time intentions and behavioral patterns.
[0125] Step 209: Based on the context information flow, retrieve the memory information associated with the target user from the first data storage area and / or the second data storage area.
[0126] Among them, memory information includes short-term memory information and / or long-term memory information. Short-term memory information represents the short-term preferences shown by the target user in recent interactions, while long-term memory information represents the long-term preferences formed by the target user in historical interactions.
[0127] In this embodiment, the first data storage area is used to store standardized memory units generated by real-time dialogue data streams. Its content is highly time-sensitive and fine-grained, mainly reflecting the user's behavior, intentions and temporary preferences in recent interactions (such as in the past few hours or days), thus constituting short-term memory information.
[0128] For example, a target user mentioned yesterday that they wanted to try a new coffee shop, and this morning they searched for weekend camping gear. The second data storage area is used to store structured memory knowledge graphs, which contain memory-enhancing attribute information formed through aggregation, reasoning, and evolution, such as first long-term preference information, second long-term preference information, and long-term comprehensive cognitive profiles, constituting long-term memory information.
[0129] For example, the target users may prefer outdoor activities, have environmental values, or be cautious decision-makers.
[0130] Here, based on the semantic focus of the current context information flow, it can intelligently select to retrieve short-term memory, long-term memory, or a combination of both.
[0131] For example, when the context indicates that the target user is on a Friday evening, in a shopping area, and has a fully charged device, the following information can be retrieved simultaneously: Short-term memory: The user expressed a desire to see a newly released movie three days ago. Long-term memory: The user prefers science fiction and typically makes entertainment purchases on weekends.
[0132] By integrating short-term and long-term memory information, we can gain a more comprehensive understanding of users' current potential needs, providing rich and multi-dimensional knowledge support for triggering subsequent proactive services and generating AIGC content.
[0133] Step 210: Based on the context information flow and memory information, determine whether the current conditions for proactively serving the target user are met.
[0134] In this embodiment, the real-time acquired contextual information stream can be fused and analyzed with memory information retrieved from the first data storage area and / or the second data storage area in a multi-dimensional manner to comprehensively evaluate whether the current situation constitutes a high-value opportunity for proactive service.
[0135] Specifically, the triggering conditions for proactive services can be constructed based on at least one of the following logics: Time-sensitivity matching: Whether the current time closely matches the behavioral patterns recorded in the user's long-term or short-term memory.
[0136] Spatial context fit: Whether the user's current location is related to their historical points of interest, to-do items, or preferred scenarios.
[0137] Behavioral intent alignment: Does the current device state or user behavior indicate that it is in an interactive and demanding state?
[0138] Memory activity support: Whether there are short-term or long-term memories with sufficient confidence to serve as the basis for generating service content.
[0139] The following two typical examples illustrate this judgment mechanism.
[0140] Example 1 (Time-based trigger).
[0141] Contextual information flow: At 8:00 AM on a weekday, the device status is "in use".
[0142] Loaded memory information: Long-term memory information: Habitually drinks coffee at 8 am, has a deep preference for science and technology news.
[0143] Fusion analysis: The current time is highly consistent with the target user's morning habits, and the device is active, indicating that the target user has started their day and has the willingness and ability to receive information.
[0144] Decision result: The trigger condition is met, and it is determined that this is the golden opportunity to push personalized technology news summaries and nearby coffee shop recommendations.
[0145] Example 2 (Location-triggered) Contextual information flow: GPS location shows that the target user has entered a large shopping mall area, and the navigation application is guiding the target user to the mall.
[0146] Loaded memory information: Short-term memory information: The target user searched for a certain brand's new sneakers three days ago. Long-term memory information: The target user owns a car with license plate number XXXX, and the target user's list of followed stores includes a sports brand store in this shopping mall.
[0147] Fusion analysis: The target users actively visited the mall, and their historical interests highly matched those of the merchants in the mall, indicating a clear consumption intention.
[0148] Decision result: The trigger condition is met, and it is determined that the current time is an appropriate time to push out the brand's store discount information, parking navigation and outfit suggestions.
[0149] Through the above mechanism, it is possible to go beyond simple rule matching and achieve intelligent triggering based on deep memory understanding and multi-dimensional context awareness, ensuring that proactive services are both timely and considerate, truly reflecting personalization and contextual intelligence.
[0150] Step 211: If the triggering conditions are met, generate AIGC content for the target user based on the context information stream and memory information.
[0151] In this embodiment, if the triggering conditions are met, a personalized content strategy is dynamically constructed based on the current context information flow and memory information, serving as the instruction for AIGC generation. This content strategy explicitly specifies elements such as the theme, form, style, length, interaction method, and emotional tone of the generated content, ensuring that the output content not only fits the user's current context but also deeply resonates with their long-term cognitive profile and short-term behavioral trajectory.
[0152] For example, Content Strategy 1 could be: "Generate an AI-powered audio podcast of approximately 3 minutes, focusing on today's most important global technology news events. The content should include a brief analysis of the technical principles and an industry impact assessment to satisfy users' preference for in-depth professional content. The speaking speed should be moderate, and the tone calm. Given that the user's historical behavior shows a preference for continuous, uninterrupted broadcasting, no questions or feedback requests should be initiated after the broadcast ends." Content Strategy 2 could be: "Generate a proactive service message integrating multiple elements, including the following three parts: Intelligent navigation guidance: Based on the target user's license plate number XXXX, provide the optimal route to the parking spaces in Zone B of the third basement level of the mall that support automatic license plate recognition. Personalized promotional reminder: Notify the user that a sports brand store they are interested in is currently offering a 30% off sale for a limited time. Emotional interactive bonus: Based on the user's historical shopping records (previously purchasing the same brand of running shoes), generate a lighthearted and humorous message: 'You bought a pair of running shoes here last time; hopefully, you're not here to return them this time.'"
[0153] Then, after receiving the content strategy, the large language model can use short-term memory information and / or long-term memory information that are highly relevant to the current task and extracted from the first data storage area and / or the second data storage area as core context input, and combine it with instructions such as the theme, style, length and interaction constraints specified in the content strategy to generate AIGC content.
[0154] The generated AIGC content can be presented in various forms, such as text, images, videos, and short audio clips (AI podcasts, audiobooks or article summaries, personalized information briefings, etc.).
[0155] Once generated, the AIGC content will be delivered to the target user's terminal device (such as a smartphone, smart speaker, or in-vehicle system) through a secure, low-latency communication channel. Based on the device's capabilities and the user's current status, the appropriate presentation method will be automatically selected, such as playing audio when headphones are connected, displaying a text summary synchronously when the screen is active, or pushing only graphic cards in silent mode.
[0156] In this way, by combining deep memory-driven content strategies with multimodal generation capabilities, we not only achieve delivering the right content to the right people at the right time, but also deliver content in the right way, comprehensively enhancing the naturalness, usability, and emotional resonance of proactive services.
[0157] The dynamic hierarchical memory method provided in the embodiments of this disclosure firstly generates N standardized memory units based on the real-time dialogue data stream received from the target user, where N is a positive integer. Each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the relationships between these key entities. Then, at least one standardized memory unit is selected from the N standardized memory units in batches according to a preset selection rule. Finally, a memory knowledge graph is constructed based on the selected standardized memory units. Whenever at least one new standardized memory unit is selected, the memory knowledge graph is updated based on the newly selected standardized memory units. The memory knowledge graph includes at least two key entities, the relationships between these key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism. This disclosure transforms real-time dialogue data streams into structured, standardized memory units, and builds an augmentable and updatable memory knowledge graph based on these units. Furthermore, by introducing memory-enhancing attribute information that corresponds one-to-one with key entities and their relationships, it not only preserves the contextual details of the original dialogue but also supports the autonomous evolution of higher-order knowledge, thus overcoming the limitations of existing knowledge graph methods in terms of real-time performance and intelligent evolution capabilities. In other words, the dynamic hierarchical memory method provided by this disclosure can achieve structured representation of memory, cross-conversation association, and multi-level abstract evolution while ensuring low-latency response, significantly improving the AI agent's contextual understanding, personalized service level, and deep reasoning capabilities in long-term human-computer interaction.
[0158] Further reference Figure 3 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a dynamic hierarchical memory device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various terminal devices and servers.
[0159] like Figure 3 As shown, the dynamic hierarchical memory device of this embodiment, device 300 includes: The system comprises a memory unit generation unit 301, a selection unit 302, and a knowledge graph construction and update unit 303. The memory unit generation unit 301 generates N standardized memory units (N being a positive integer) in response to receiving a real-time dialogue data stream from a target user. Each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the relationships between these key entities. The selection unit 302 selects at least one standardized memory unit from the N standardized memory units in batches according to a preset selection rule. The knowledge graph construction and update unit 303 constructs a memory knowledge graph based on the selected standardized memory units and updates the memory knowledge graph whenever at least one new standardized memory unit is selected. The memory knowledge graph includes at least two key entities, the relationships between these key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information characterizes multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism.
[0160] In this embodiment, the specific processing of the memory unit generation unit 301, the selection unit 302, and the knowledge graph construction and update unit 303, and the resulting technical effects, can be found in reference to [the relevant documentation]. Figure 2 The relevant descriptions of steps 201 to 203 in the corresponding embodiments will not be repeated here.
[0161] In some optional implementations, the real-time dialogue data stream includes a dialogue sub-data stream corresponding to at least one dialogue topic, and the memory unit generation unit 301 can be further used for: For each dialogue sub-data stream corresponding to a dialogue topic, extract at least two key entities and analyze the relationships between these key entities; and, Based on the key entities and their relationships, at least one event type memory unit corresponding to the dialogue sub-data stream is generated, wherein each event type memory unit includes two key entities and their relationship. Based on the memory units of each event type corresponding to each dialogue sub-data stream, generate N standardized memory units.
[0162] In some optional implementations, the knowledge graph construction and update unit 303 can be further used for: Map at least two key entities contained in each standardized memory unit to nodes of the memory knowledge graph, and map each relationship to edges of the memory knowledge graph; Based on the selected standardized memory units, first memory enhancement attribute information corresponding to each key entity and each relationship is generated. The first memory enhancement attribute information includes multi-dimensional contextual metadata related to the corresponding key entity or relationship. Based on each standardized memory unit and each first memory enhancement attribute information, second memory enhancement attribute information corresponding to at least one key entity and / or at least one association relationship is generated, wherein the second memory enhancement attribute information includes at least one of the target user's user preference information, user fixed behavior pattern information, and user basic attribute information; Based on the information of each first memory enhancement attribute and each second memory enhancement attribute, generate information of each memory enhancement attribute; A memory knowledge graph is constructed based on nodes, edges, and various memory enhancement attributes.
[0163] In some alternative embodiments, the apparatus further includes: First long-term preference information generation unit 304 Figure 3 (Not shown), used to analyze the memory knowledge graph in response to the preset knowledge graph autonomous analysis triggering conditions, generate at least one first long-term preference information of the target user, and store each first long-term preference information as memory enhancement attribute information in the memory knowledge graph corresponding to the key entity of the target user; Preference attention weight allocation unit 305 ( Figure 3 (not shown), used to assign preference attention weights to each first long-term preference information; Second long-term preference information generation unit 306 Figure 3 (not shown), used to generate at least one second long-term preference information of the target user based on the semantic similarity between each first long-term preference information and the preference attention weight of each preference, and to store the second long-term preference information as memory enhancement attribute information in association with the key entity corresponding to the target user in the memory knowledge graph; Long-term comprehensive cognitive profile generation unit 307 ( Figure 3 (Not shown), used to generate a long-term comprehensive cognitive profile of the target user based on each second long-term preference information, and to store the long-term comprehensive cognitive profile as memory enhancement attribute information in association with the key entity corresponding to the target user in the memory knowledge graph.
[0164] In some alternative implementations, after generating N standardized memory units based on the real-time dialogue data stream, the device further includes: Memory unit storage unit 308 ( Figure 3 (Not shown), used to store each standardized memory unit into the first data storage area; Memory Knowledge Graph Storage Unit 309 ( Figure 3(Not shown), used to store the memory knowledge graph in the second data storage area.
[0165] In some alternative embodiments, the apparatus further includes: Context information flow acquisition unit 310 ( Figure 3 (Not shown), used to obtain the context information stream of the target user, wherein the context information stream includes at least one of time information, spatial information, device status information, and user behavior information; Memory information retrieval unit 311 ( Figure 3 (Not shown), used to retrieve memory information associated with the target user from the first data storage area and / or the second data storage area based on the context information flow, wherein the memory information includes short-term memory information and / or long-term memory information, the short-term memory information characterizing the short-term preferences shown by the target user in recent interactions, and the long-term memory information characterizing the long-term preferences formed by the target user in historical interactions; Triggering condition judgment unit 312 ( Figure 3 (Not shown), used to determine whether the triggering conditions for proactively serving the target user are met based on the context information flow and memory information; AIGC generation unit 313 ( Figure 3 (Not shown), used to generate AIGC content for the target user based on contextual information stream and memory information if the triggering conditions are met.
[0166] It should be noted that the implementation details and technical effects of each unit in the dynamic hierarchical memory device provided in the embodiments of this disclosure can be referred to the descriptions of other embodiments in this disclosure, and will not be repeated here.
[0167] The following is for reference. Figure 4 It shows a schematic diagram of the structure of a computer system 400 suitable for implementing the terminal device of this disclosure. Figure 4 The computer system 400 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0168] like Figure 4 As shown, the computer system 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the computer system 400. The processing device 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0169] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows computer system 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 A computer system 400 with various electronic devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0170] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a storage device 408, or installed from a ROM 402. When the computer program is executed by a processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.
[0171] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. 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 of a computer-readable storage medium may include, but are not limited to: 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 disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0172] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0173] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the following functions: Figure 2 The embodiments shown and their alternative implementations illustrate a dynamic hierarchical memory method.
[0174] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and Python, and conventional procedural programming languages such as the "C" language 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).
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0176] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, a memory unit generating unit can also be described as "a unit for generating N standardized memory units".
[0177] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A dynamic hierarchical memory method, characterized by, The method includes: In response to receiving a real-time dialogue data stream from a target user, N standardized memory units are generated based on the real-time dialogue data stream, where N is a positive integer, and each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the association relationship between the key entities. According to the preset standardized memory unit selection rules, at least one of the standardized memory units is selected in batches from the N standardized memory units; A memory knowledge graph is constructed based on the selected standardized memory units. Whenever at least one new standardized memory unit is selected, the memory knowledge graph is updated based on the newly selected standardized memory units. The memory knowledge graph includes at least two key entities, the relationships between the key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism.
2. The method of claim 1, wherein, The real-time dialogue data stream includes a dialogue sub-data stream corresponding to at least one dialogue topic, and the step of generating N standardized memory units based on the real-time dialogue data stream includes: For each dialogue sub-data stream corresponding to the aforementioned dialogue topic, at least two key entities are extracted, and the relationships between these key entities are analyzed; and, Based on the key entities and their relationships, at least one event type memory unit corresponding to the dialogue sub-data stream is generated, wherein each event type memory unit includes two key entities and their relationship. Based on the event type memory units corresponding to each of the dialogue sub-data streams, N standardized memory units are generated.
3. The method of claim 1, wherein, A memory knowledge graph is constructed based on the selected standardized memory units, including: Map at least two key entities contained in each of the standardized memory units to nodes of the memory knowledge graph, and map each of the associations to edges of the memory knowledge graph; Based on the selected standardized memory units, first memory enhancement attribute information corresponding to each key entity and each association relationship is generated, wherein the first memory enhancement attribute information includes the multi-dimensional context metadata related to the corresponding key entity or association relationship; Based on each of the standardized memory units and each of the first memory enhancement attribute information, second memory enhancement attribute information corresponding to at least one of the key entities and / or at least one of the association relationships is generated, wherein the second memory enhancement attribute information includes at least one of the target user's user preference information, user fixed behavior pattern information, and user basic attribute information; Based on each of the first memory enhancement attribute information and each of the second memory enhancement attributes, generate each of the memory enhancement attribute information; The memory knowledge graph is constructed based on the nodes, the edges, and the memory enhancement attribute information.
4. The method of claim 3, wherein, The method further includes: In response to meeting the preset knowledge graph autonomous analysis triggering conditions, the memory knowledge graph is analyzed to generate at least one first long-term preference information of the target user, and each first long-term preference information is used as the memory enhancement attribute information and associated and stored in the memory knowledge graph as the key entity corresponding to the target user; Assign preference attention weights to each of the first long-term preference information; Based on the semantic similarity between each of the first long-term preference information and each of the preference attention weights, at least one second long-term preference information of the target user is generated, and the second long-term preference information is used as the memory enhancement attribute information and associated with and stored in the memory knowledge graph to the key entity corresponding to the target user; Based on each of the second long-term preference information, a long-term comprehensive cognitive profile of the target user is generated, and the long-term comprehensive cognitive profile is used as the memory enhancement attribute information and associated with and stored in the memory knowledge graph to the key entity corresponding to the target user.
5. The method of claim 1, wherein, After generating N standardized memory units based on the real-time dialogue data stream, the method further includes: Each of the standardized memory units is stored in the first data storage area; The memory knowledge graph is stored in the second data storage area.
6. The method of claim 5, wherein, The method further includes: Obtain the context information stream of the target user, wherein the context information stream includes at least one of time information, spatial information, device status information, and user behavior information; Based on the context information flow, memory information associated with the target user is retrieved from the first data storage area and / or the second data storage area, wherein the memory information includes short-term memory information and / or long-term memory information, the short-term memory information represents the short-term preferences exhibited by the target user in recent interactions, and the long-term memory information represents the long-term preferences formed by the target user in historical interactions; Based on the context information stream and the memory information, determine whether the triggering conditions for actively serving the target user are met. If the triggering condition is met, AIGC content for the target user is generated based on the context information stream and the memory information.
7. A dynamic hierarchical memory device, comprising: The device includes: A memory unit generation unit is used to generate N standardized memory units based on the real-time dialogue data stream received from the target user in response to receiving the real-time dialogue data stream, where N is a positive integer, and each standardized memory unit includes at least two key entities extracted from the real-time dialogue data stream and the association relationship between the key entities. The selection unit is used to select at least one of the standardized memory units from the N standardized memory units in batches according to the preset standardized memory unit selection rules; A knowledge graph construction and updating unit is used to construct a memory knowledge graph based on the selected standardized memory units, and to update the memory knowledge graph based on the newly selected standardized memory units whenever at least one of the standardized memory units is newly selected. The memory knowledge graph includes at least two key entities, the relationships between the key entities, and memory enhancement attribute information corresponding to each key entity and each relationship. The memory enhancement attribute information is used to characterize multi-dimensional contextual metadata related to the corresponding key entity or relationship, as well as high-order knowledge generated through a knowledge evolution mechanism.
8. An electronic device, comprising: include: One or more processors; Storage device, on which one or more programs are stored, When one or more programs are executed by one or more processors, the one or more processors implement the method as claimed in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, It stores a computer program thereon, wherein the computer program, when executed by one or more processors, implements the method as claimed in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method as described in any one of claims 1-6.