A method, device, equipment and storage medium for implementing a three-party interactive memory structure

By constructing a three-dimensional interactive memory tensor, the shortcomings of existing systems in capturing the multidimensional characteristics and dynamic changes of parent-child relationships are solved, efficient storage and rapid retrieval of parent-child interaction data are achieved, and personalized educational decision-making is supported.

CN120524010BActive Publication Date: 2025-09-26SHENZHEN BOYUE DOMESTIC GOODS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511023876.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-09-26
Estimated Expiration
2045-07-24

AI Technical Summary

Technical Problem

Existing parent-child interaction assistance systems are unable to effectively capture the multidimensional characteristics of parent-child relationships and the changing patterns over time. They find it difficult to quickly locate memory data that is highly relevant to the current scenario and lack comprehensive modeling of interaction subjects, interaction objects, interaction quality, and temporal dynamics.

Method used

A three-dimensional interactive memory tensor is constructed. By obtaining the set of interactive entities and the set of time steps, the importance score of the memory data is calculated and hierarchical storage is performed to achieve the capture and rapid retrieval of multi-dimensional interactive memory.

Benefits of technology

It realizes multi-dimensional dynamic modeling of parent-child relationships, improves the retrieval efficiency and relevance of memory networks, and provides high-value historical data support for personalized education decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120524010B_ABST
    Figure CN120524010B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for realizing a three-party interactive memory structure. The method includes: obtaining all entities participating in the interaction to obtain an interactive entity set; obtaining discrete time points for recording the interaction to obtain a time step set; constructing a three-dimensional interactive memory tensor based on the interactive entity set and the time step set; calculating the importance score of each memory data in the three-dimensional interactive memory tensor; storing each memory data in layers according to the importance score of each memory data to obtain the hierarchy of each memory data; when searching within the three-dimensional interactive memory tensor, obtaining the current context and searching the current context in the order of the hierarchy to obtain multiple retrieved memory data. The present invention solves the problems of simple memory network structure and incomplete interaction records by constructing a three-dimensional interactive memory tensor, and realizes multi-dimensional dynamic modeling. Through hierarchical storage, the retrieval efficiency and relevance are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for implementing a three-party interactive memory structure. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, intelligent assistance systems are increasingly being used in education. This is particularly true in parent-child interaction scenarios, where these systems record and analyze interactions between family members to provide personalized advice or intervention strategies for parents and children. However, existing parent-child interaction assistance systems have significant limitations in their memory network design, making them difficult to meet the practical needs of complex scenarios.

[0003] Existing systems have simple memory network structures, typically using linear lists or two-dimensional matrices to store parent-child interaction data. These systems only record basic interaction content or timestamps, lacking comprehensive modeling of the interacting subject, interacting object, interaction quality, and temporal dynamics. This flattened storage approach cannot effectively capture the multidimensional characteristics of the parent-child relationship and its evolving patterns over time.

[0004] Secondly, traditional systems focus on the immediate analysis of single interactions, ignoring the relevance and cumulative effects of historical interaction data. For example, they fail to establish interaction sequences across time steps, making it difficult for the system to identify long-term behavioral patterns or key events.

[0005] Furthermore, existing systems often rely on keyword matching or time window filtering when retrieving historical memories, failing to integrate context and memory importance for multi-dimensional sorting. This makes it difficult for the system to quickly locate memory data that is highly relevant to the current scenario, limiting the accuracy of decision support. Summary of the Invention

[0006] The purpose of the present invention is to provide a method, device, equipment and storage medium for realizing a three-party interactive memory structure, aiming to solve the problems that the existing parent-child interaction assistance system cannot effectively capture the multidimensional characteristics of the parent-child relationship and the changing laws that evolve over time, and it is difficult to quickly locate memory data that is highly relevant to the current scene.

[0007] In a first aspect, an embodiment of the present invention provides a method for implementing a three-party interactive memory structure, including:

[0008] Obtain all entities participating in the interaction to obtain an interaction entity set, wherein the entities include parents, children, and virtual characters;

[0009] Get the discrete time points of the recorded interaction to get a set of time steps;

[0010] constructing a three-dimensional interactive memory tensor according to the set of interactive entities and the set of time steps;

[0011] Calculating the importance score of each memory data in the three-dimensional interactive memory tensor;

[0012] Each memory data is hierarchically stored according to its importance score, to obtain a hierarchy of each memory data, wherein the hierarchy includes: a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set;

[0013] When a search is required within the three-dimensional interactive memory tensor, the current context is obtained and the current context is searched in the order of the hierarchy to obtain a plurality of search memory data, wherein the search memory data includes content, timestamps, participating entities and related relationships related to the current context.

[0014] In a second aspect, an embodiment of the present invention provides a device for implementing a three-party interactive memory structure, including:

[0015] An entity acquisition unit, configured to acquire all entities participating in the interaction to obtain an interactive entity set, wherein the entities include parents, children, and virtual characters;

[0016] The time acquisition unit is used to obtain the discrete time points of the recorded interaction and obtain a set of time steps;

[0017] A construction unit, configured to construct a three-dimensional interactive memory tensor according to the set of interactive entities and the set of time steps;

[0018] a calculation unit, configured to calculate an importance score of each memory data in the three-dimensional interactive memory tensor;

[0019] A storage unit, configured to hierarchically store each memory data according to its importance score, to obtain a hierarchy of each memory data, wherein the hierarchy includes a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set;

[0020] A retrieval unit is used to obtain a current context and search the current context in the order of the hierarchy when a retrieval is required within the three-dimensional interactive memory tensor, to obtain a plurality of retrieval memory data, wherein the retrieval memory data includes content, timestamps, participating entities and related relationships related to the current context.

[0021] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for realizing the three-party interactive memory structure described in the first aspect above is implemented.

[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for implementing the three-party interactive memory structure described in the first aspect above is implemented.

[0023] The present invention discloses a method, device, equipment and storage medium for implementing a three-party interactive memory structure. The method includes: obtaining all entities participating in the interaction to obtain an interactive entity set, wherein the entities include parents, children and virtual characters; obtaining discrete time points for recording the interaction to obtain a time step set; constructing a three-dimensional interactive memory tensor based on the interactive entity set and the time step set; calculating the importance score of each memory data in the three-dimensional interactive memory tensor; storing each memory data in layers according to the importance score of each memory data to obtain a hierarchy of each memory data, wherein the hierarchy includes a short-term interactive memory set, a medium-term interactive memory set and a long-term interactive memory set; when searching within the three-dimensional interactive memory tensor, obtaining the current context and searching the current context in the order of the hierarchy to obtain multiple retrieval memory data, wherein the retrieval memory data includes content, timestamps, participating entities and related relationships related to the current context. By constructing a three-dimensional tensor memory structure, the present invention enables the memory network to not only record the interaction between the two parties, but also capture the complex relationship of the three-party interaction, providing more comprehensive historical information for the intelligent agent, and realizing multi-dimensional dynamic modeling of the parent-child relationship. Through hierarchical storage, retrieval efficiency and relevance are significantly improved, providing high-value historical data support for personalized educational decision-making and enhancing the system's intelligence and scenario adaptability. The present invention also provides a device for implementing a three-party interactive memory structure, a computer-readable storage medium, and a computer device, all of which have the aforementioned beneficial effects and will not be further elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 This is a flowchart of the implementation method of the three-party interactive memory structure;

[0026] Figure 2 A schematic block diagram of a device for implementing a three-party interactive memory structure. DETAILED DESCRIPTION

[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0028] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0029] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0031] See also Figure 1 This embodiment provides a method for implementing a three-party interactive memory structure, including:

[0032] S101: Acquire all entities participating in the interaction to obtain an interactive entity set, where the entities include parents, children, and virtual characters;

[0033] Specifically, all entities involved in the interaction are extracted from the interaction record, including parents, children, and virtual characters. For example, in a parent-child interaction scenario, if an interaction involves a father, child A, and virtual character B, the three entities are identified as e1 (father), e2 (child A), and e3 (virtual character B), respectively.

[0034] Then, by traversing all interaction records, all entities that appear are collected and duplicates are removed. For example, if an interaction record contains a mother, child A, and virtual character C, then entities e4 (mother) and e5 (virtual character C) are added, and finally a complete interaction entity set Entities = {e1, e2, ..., e n}.

[0035] In the parent-child interactive virtual universe system, usually Entities = {parents, children, virtual characters}; each entity can have its own attributes and status, such as attr(e i )={age, gender, role, ...}.

[0036] The entity set can be expanded to include more family members or virtual characters.

[0037] S102: Obtaining discrete time points of recorded interactions to obtain a time step set;

[0038] This embodiment records the discrete time points at which the interaction occurs and constructs a time step set TimeSteps={t1, t2, ..., t m} to support dynamic storage and time dimension analysis of interactive data.

[0039] Specifically, extract timestamp information from the interaction record. Timestamps can come from system logs, sensor data, or user input. Then, based on the distribution characteristics of timestamps, choose the time step division method:

[0040] The time steps can be divided into equal intervals, such as ,in is a fixed time interval.

[0041] Time steps can also be divided into unequal intervals. Specifically, a time step set is directly generated according to the actual interaction time without forced alignment.

[0042] The granularity of the time step can be adjusted according to application requirements and can be seconds, minutes, hours or days.

[0043] Furthermore, each time step can be associated with a timestamp and context information, such as context(t k )={timestamp, scene, activity type, ...}.

[0044] S103: Constructing a three-dimensional interactive memory tensor according to the interactive entity set and the time step set;

[0045] In this embodiment, a three-dimensional interaction memory tensor structure is the foundational component of the three-party interaction memory network, used to represent and store the interaction history between the parent, child, and virtual character. This structure, represented as a three-dimensional tensor, captures the bidirectional interactions between entities and their evolution over time. This mathematical representation enables the system to comprehensively record complex multi-party interaction patterns, providing rich historical information support for the intelligent agent.

[0046] Specifically, the mathematical expression of the three-dimensional interactive memory tensor structure is as follows:

[0047] ;

[0048] Among them, M is a three-dimensional interactive memory tensor, which represents all interactive memories stored in the system. A tensor is a high-dimensional generalization of a matrix. Here, a three-dimensional tensor is used to represent three-party interactive memory. Each element of the tensor represents the interaction record of a specific entity pair at a specific point in time. The tensor can be sliced ​​to obtain a sub-tensor of a specific dimension, such as M i:k represents the interaction between entity i and all entities at time k.

[0049] Further, is an element in the tensor, representing the interactive memory between entity i and entity j at time step k; D represents the data type of the interactive memory, which can be a vector, structured data, or embedded representation;

[0050] Transactive memory can be represented as a structured data:

[0051] M ijk =(c ijk ,q ijk , e ijk , r ijk );

[0052] in, represents the interaction content, which can be text, image, audio or multimodal data; qijk∈[0,1] is the interaction quality, which indicates the effectiveness and positivity of the interaction; is the emotion vector, which represents the emotional state in the interaction. For example, when d=3, it can be expressed as (valence, arousal, dominance). ijk ∈R is a relationship marker, which indicates the type of relationship reflected in the interaction, such as guidance, support, conflict, etc.

[0053] Entities={e1, e2, ..., e n} is the set of interaction entities, representing all entities participating in the interaction. TimeSteps={t1, t2, ..., t m} is a set of time steps, representing the discrete time points at which interactions are recorded.

[0054] In this embodiment, the tripartite interactive memory tensor supports multiple operations for storing, accessing, and analyzing memories:

[0055] Specifically, the memory storage and update process is as follows:

[0056] New interactive memories can be added to a tensor via:

[0057] ;

[0058] Among them, m newRepresents new interactive memory data; UpdateMemory represents the update function, which can be a simple replacement, weighted average, or a more complex fusion function.

[0059] For the expansion of a time series, new time steps can be added in the following ways:

[0060] M ij(m+1) =m new ;

[0061] Here, m+1 represents the new time step index.

[0062] In some embodiments, the memory slicing and filtering process is as follows:

[0063] You can use tensor slicing to get a sub-tensor of a specific dimension:

[0064] All interaction history of entity i: ;

[0065] Interaction history of entity pair (i, j): ;

[0066] All interactions at time step k: ;

[0067] You can also filter based on content or attributes:

[0068] Filter(M, condition)={M ijk |condition(M ijk )=true};

[0069] For example, to filter out all high-quality positive interactions:

[0070] PositiveInteractions={M ijk |q ijk >0.7 and e ijk [valence]>0.5}.

[0071] In some embodiments, the process of tensor decomposition and pattern extraction is as follows:

[0072] The interaction patterns can be extracted by tensor decomposition methods:

[0073] ;

[0074] in, represents the outer product operation; is the factor vector obtained by decomposition; R is the rank of decomposition, which indicates the number of patterns extracted;

[0075] This decomposition can reveal the interaction patterns and temporal evolution laws between entities.

[0076] In some embodiments, since the three-way interaction memory tensor is usually sparse (not all pairs of entities interact at every time step), a sparse representation method can be used:

[0077] ;

[0078] in Indicates empty memory (no interaction).

[0079] In some embodiments, to improve memory access efficiency, multiple indexes can be established:

[0080] Entity index: EntityIndex[i]={(j, k, M ijk )|j∈Entities, k∈TimeSteps};

[0081] Time index: TimeIndex[k]={(i, j, M ijk )|i, j∈Entities};

[0082] Content index: ContentIndex[c]={(i, j, k, M ijk )|c∈c ijk};

[0083] Emotion index: EmotionIndex[e]={(i, j, k, M ijk )|sim(e,e ijk )>θ e}.

[0084] The following is an example of the application of the three-party interactive memory structure in a parent-child interaction scenario:

[0085] 1. Interaction mode analysis:

[0086] Scenario: Analyze the interaction patterns between parents and children in different types of activities;

[0087] Operation: Extract parent-child interaction sub-tensors and group them by activity type:

[0088] Mparent-child={M ijk |i=parent, j=child, k∈TimeSteps};

[0089] Mactivity={M ijk ∈Mparent-child|activity(t k )=activity};

[0090] Application: Identify the most effective interaction patterns and provide parents with personalized interaction suggestions;

[0091] 2. Relationship development tracking:

[0092] Scenario: Tracking the development and changes in children’s relationships with virtual characters;

[0093] Operation: Extract the child-virtual character interaction sub-tensor and calculate the time series indicators;

[0094] Mchild-virtual={M ijk |i=child,j=virtual,k∈TimeSteps};

[0095] ;

[0096] in, represents the set of child-avatar interactions at time step k;

[0097] Application: Monitor relationship development trends and adjust the interaction strategies of virtual characters;

[0098] 3. Three-party collaborative analysis:

[0099] Scenario: Analyze the effect of collaborative interaction among parents, children, and virtual characters;

[0100] Operation: Extract interaction records involving three parties simultaneously;

[0101] ;

[0102] Application: Evaluate the effectiveness of tripartite collaboration and optimize the auxiliary role of virtual characters in parent-child interactions;

[0103] 4. Emotional connection analysis:

[0104] Scenario: Analyze changes in the emotional connection between parents and children;

[0105] Operation: Extract the emotion vector sequence and calculate the emotion synchronization;

[0106] ;

[0107] ;

[0108] ;

[0109] Where corr represents the correlation coefficient function;

[0110] Application: Identify changes in the strength of emotional connections and provide interaction suggestions to enhance emotional connections;

[0111] In this way, the three-dimensional interactive memory tensor structure can comprehensively capture and represent the complex multi-party interaction history, provide rich historical information support for the intelligent agent, and realize personalized and contextualized parent-child interaction assistance.

[0112] S104: Calculating the importance score of each memory data in the three-dimensional interactive memory tensor;

[0113] In this embodiment, the memory flow mechanism importance scoring function is a core component of the three-party interactive memory network. It is used to assess the importance of memory data and determine its flow path between memory levels. This function comprehensively considers the relevance, frequency of use, and emotional intensity of the memory, assigning an importance score to each memory data, thereby achieving a natural transition from short-term to long-term memory and efficient retrieval. This mathematical representation enables the system to simulate the selective retention mechanism of human memory, providing intelligent agents with more accurate historical information support.

[0114] Specifically, calculating the importance score of each memory data in the three-dimensional interactive memory tensor includes:

[0115] The importance score of each memory data in the three-dimensional interactive memory tensor is calculated according to the following formula:

[0116] I(m)=α·R(m)+β·F(m)+γ·E(m);

[0117] Among them, I(m)∈[0,1] represents the importance score of memory data m; R(m)∈[0,1] represents the relevance function; F(m)∈[0,1] represents the usage frequency function; E(m)∈[0,1] represents the emotion intensity function; α, β, γ∈[0,1] represent the weight coefficients.

[0118] Furthermore, I(m)∈[0, 1] represents the importance score of the memory data m, which is used to show the retention and retrieval priority of the memory in the system.

[0119] High-importance memories (i.e., I(m)>0.7) will be retained in long-term memory and receive higher priority when retrieved. Medium-importance memories (i.e., 0.3≤I(m)≤0.7) will be retained for a moderate period of time and may be upgraded or downgraded based on subsequent use. Low-importance memories (i.e., I(m)<0.3) will be forgotten in the short term unless they are frequently accessed or associated with high-importance memories.

[0120] Furthermore, memory data m∈M represents a specific memory unit stored in the system; M represents the set of all memory data;

[0121] Memory data can be represented as a structured data:

[0122] m=(c m , t m , e m , r m );

[0123] Among them, c m Represents memory content, which can be text, image, audio or multimodal data; m is the memory timestamp, indicating the time point when the memory is formed; e m Represents a collection of memory-related entities, such as e m ={e1, e2, ..., e k}, where e i Indicates the entity participating in the memory; r m Represents a set of memory-related relations, such as r m ={r1, r2, ..., r l}, where r j Indicates the relationships involved in this memory.

[0124] Furthermore, R(m) represents the relevance function, which is used to evaluate the degree of relevance between the memory data m and the current context and other important memories.

[0125] Specifically, the correlation function is calculated based on the following formula:

[0126] ;

[0127] Among them, sim (m, C t ) represents the memory data m and the current context C t Similarity of M imp Represents a set of memory data that has been determined to be important; sim(m, m′) represents the similarity between memory data m and memory data m′; λ1, λ2∈[0, 1] represent weight coefficients, satisfying λ1+λ2=1.

[0128] Furthermore, the similarity function sim can be calculated based on multiple dimensions such as semantic similarity, temporal proximity, and entity overlap:

[0129] sim(m1,m2)=ω1·sim sem (c m1 , c m2 )+ω2·sim temp (t m1 , t m2 )+ω3·sim ent (e m1 , e m2 );

[0130] Among them, sim semRepresents a semantic similarity function, such as cosine similarity or similarity based on a pre-trained language model;

[0131] sim temp Represents a temporal similarity function, such as sim temp (t1, t2) = exp(-|t1-t2| / τ), where τ is the time scale parameter.

[0132] sim ent Represents entity overlap function, such as Jaccard similarity coefficient sim ent (e1, e2)=|e1∩e2| / |e1∪e2|;

[0133] ω1, ω2, ω3∈[0, 1]: weight coefficients, satisfying ω1+ω2+ω3=1.

[0134] Furthermore, F(m) represents the usage frequency function, which is used to evaluate the frequency with which the memory data m is accessed and used;

[0135] Specifically, the frequency function is calculated based on the following formula:

[0136] ;

[0137] in, Indicates that the memory data m is in the past The number of times a resource is accessed within a specified time period; N0 represents a normalization parameter used to control the rate of frequency growth; exp represents a natural exponential function.

[0138] In some embodiments, the time decay of accesses may also be taken into account using a frequency function:

[0139] ;

[0140] Among them, N total (m) represents the total number of times the memory data m is accessed; t i (m) represents the time when the memory data m is accessed for the first time; t now Indicates the current time; τ F Represents the time decay parameter.

[0141] Furthermore, E(m)∈[0, 1] represents the sentiment intensity function, which is used to evaluate the sentiment intensity associated with the memory data m.

[0142] The sentiment intensity function is calculated based on the following formula:

[0143] ;

[0144] Among them, valence(m)∈[−1, 1] is the sentiment value of memory data m, indicating the positive or negative polarity of the sentiment; arousal(m)∈[0, 1] is the emotional arousal of memory data m, indicating the intensity of the sentiment; |.| represents the absolute value function, ensuring that both positive and negative sentiments are given more importance.

[0145] In some embodiments, sentiment intensity may also take into account the sentiment states of multiple entities:

[0146] ;

[0147] Among them, E e (m) represents the sentiment intensity score of entity e on memory data m; max represents the maximum function, reflecting that the strong sentiment of any entity may make the memory important.

[0148] Furthermore, α, β, γ∈[0, 1] represent weight coefficients, which are used to control the relative contributions of relevance, usage frequency, and sentiment intensity to the importance score.

[0149] It satisfies the normalization condition: α+β+γ=1;

[0150] Among them, the weights can be dynamically adjusted according to different types of memory and application scenarios:

[0151] For educational memories: the relevance weight α may be increased;

[0152] For skill-based memory: the usage frequency weight β may be increased;

[0153] For social-emotional memories: the emotional intensity weight γ may be increased;

[0154] The weights can also be adaptively adjusted over time to optimize the performance of the memory system.

[0155] In this embodiment, the retention time of the memory data and its importance score have the following relationship:

[0156] T retention (m)=T base ·exp(k·I(m));

[0157] Among them, Tretention(m) represents the expected retention time of memory data m; Tbase represents the basic retention time; k represents the scaling parameter, which controls the influence of importance on retention time.

[0158] In this embodiment, during the memory retrieval process, the importance score also affects the retrieval priority. Specifically:

[0159] P retrieval(m|q)=sim(m,q)·(1+λ·I(m));

[0160] Among them, P retrieval (m|q) represents the priority of retrieving the memory data m when a query q is given; sim(m,q) represents the similarity between the memory data m and the query q; λ represents the importance influencing factor, which controls the degree of influence of importance on the retrieval priority.

[0161] The following is an example of how the memory flow mechanism can be applied in parent-child interaction scenarios:

[0162] 1. Important milestones memory:

[0163] Scenario: The child completes a task independently for the first time;

[0164] Memory content: task type, completion method, parental response, and child's emotions;

[0165] Importance rating: Due to its high emotional intensity (E(m)≈0.9) and high correlation with developmental milestones (R(m)≈0.8), its overall importance is still high even though its frequency of use is not high (F(m)≈0.2);

[0166] Memory flow: directly enters long-term memory and is preferentially retrieved when relevant interaction suggestions are generated;

[0167] 2. Daily interactive memory:

[0168] Scenario: Daily parent-child reading activities;

[0169] Memory content: books read, interaction methods, children's reactions;

[0170] Importance rating: The relevance is moderate (R(m)≈0.5), the emotional intensity is average (E(m)≈0.4), but if similar activities are frequently performed, the frequency of use may be high (F(m)≈0.7);

[0171] Memory flow: initially enters medium-term memory and may be upgraded to long-term memory as the frequency of use increases;

[0172] 3. Negative interactive memory:

[0173] Scenario: Parent-child conflict or improper parenting incidents;

[0174] Memory content: causes of conflict, behaviors of both parties, solutions, and subsequent impacts;

[0175] Importance score: high sentiment intensity (E(m)≈0.8, despite negative sentiment), likely high relevance (R(m)≈0.6), likely low frequency of use (F(m)≈0.3);

[0176] Memory flow: Due to their high overall importance, they enter long-term memory and serve as a reference for patterns to avoid when the system generates interaction suggestions.

[0177] In this way, the memory flow mechanism can simulate the selective retention characteristics of human memory, ensuring that the system retains the most valuable interactive memories, providing more accurate historical information support for the intelligent agent, and thus generating more personalized and effective parent-child interaction suggestions.

[0178] S105: storing each memory data in layers according to the importance score of each memory data to obtain a hierarchy of each memory data, wherein the hierarchy includes: a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set;

[0179] In this embodiment, a hierarchical storage strategy can be adopted based on the importance and access frequency of the memory:

[0180] M=(M short , M medium , M long );

[0181] Among them, M short Represents the short-term interaction memory set, which is used to store the most recent interactions; M medium represents the medium-term interaction memory set, which is used to store interactions of medium importance; M long Represents a long-term interaction memory set, used to store high-importance interactions.

[0182] Memory data can flow between different levels based on importance ratings;

[0183] ;

[0184] Among them, Layer(m) represents the memory layer to which the memory data m belongs; θ short and θ long Represent the short-term threshold and long-term threshold respectively, usually θ short ≈0.3,θ long ≈0.7.

[0185] Specifically, each memory data is stored in layers according to its importance score, and the layers of each memory data include:

[0186] Determine whether the importance score of the memory data is less than the short-term threshold;

[0187] If the importance score of the memory data is less than the short-term threshold, the memory data will be stored in the short-term interactive memory set. The short-term interactive memory set is suitable for high-frequency but low-value memories (such as temporary conversation fragments). The storage period is short, which facilitates the rapid cleaning of inefficient data.

[0188] If the importance score of the memory data is greater than or equal to the short-term threshold, then determine whether the importance score of the memory data is less than the long-term threshold;

[0189] If the importance score of the memory data is less than the long-term threshold, the memory data will be stored in the medium-term interactive memory set. The medium-term interactive memory set is used to store memories of medium value (such as records of regular educational activities) with a moderate storage period to support medium- and long-term analysis needs.

[0190] If the importance score of the memory data is greater than or equal to the long-term threshold, the memory data will be stored in the long-term interactive memory set. The long-term interactive memory set can retain high-value memories (such as key milestone events or emotionally intense interactions) and has a longer storage period to support long-term relationship modeling and decision support.

[0191] S106: When it is necessary to search within the three-dimensional interactive memory tensor, obtain the current context and search the current context in the order of the hierarchy to obtain multiple retrieval memory data, wherein the retrieval memory data includes content, timestamps, participating entities and related relationships related to the current context.

[0192] Specifically, when searching is required within the three-dimensional interactive memory tensor, the current context is obtained and searched in the order of the hierarchy to obtain a plurality of search memory data including:

[0193] Get the current context and preset search quantity;

[0194] Initialize the short-term interactive memory set, the medium-term interactive memory set, and the long-term interactive memory set;

[0195] Retrieve memory data that matches the current context from the short-term interactive memory set to generate a short-term candidate result set;

[0196] Determine whether the number of memory data in the short-term candidate result set is less than the preset retrieval number;

[0197] If the number of memory data in the short-term candidate result set is greater than or equal to the preset search number, then the preset search number of memory data are selected from the short-term candidate result set according to the preset sorting rule to obtain multiple search memory data;

[0198] If the number of memory data in the short-term candidate result set is less than the preset search quantity, the medium-term interactive memory set is supplemented with searches to generate a medium-term candidate result set;

[0199] Determine whether the total number of stored data in the short-term candidate result set and the mid-term candidate result set is less than the preset retrieval number;

[0200] If the total number of memory data in the short-term candidate result set and the mid-term candidate result set is greater than or equal to the preset search number, then the preset search number of memory data are selected from the short-term candidate result set and the mid-term candidate result set according to the preset sorting rule to obtain multiple search memory data;

[0201] If the total number of memory data in the short-term candidate result set and the medium-term candidate result set is less than the preset search quantity, then a supplementary search is performed from the long-term interactive memory set to generate a long-term candidate result set;

[0202] The short-term candidate result set, the mid-term candidate result set and the long-term candidate result set are merged to obtain a final result set, and a preset number of retrieval memory data are selected from the final result set according to a preset sorting rule to obtain multiple retrieval memory data.

[0203] More specifically, obtain the current context c (including query content, entity set, timestamp, etc.) and the preset number of retrievals k, and initialize the short-term interactive memory set M short , medium-term interactive memory set M medium and the long-term transactive memory set M long .

[0204] Next, the memory data matching the context c is retrieved from the short-term interactive memory set to generate a short-term candidate result set Rshort. The specific method is: short For each memory data m in , calculate the product of its similarity sim(c, m) with c and the importance score imp(m) as the comprehensive score s(m), and select the k1 memory data with the highest scores to form Rshort. Then determine whether |Rshort|≥k is true:

[0205] If so, directly sort in descending order by the comprehensive score s(m), and select the first k memory data as the final result.

[0206] If not, then supplement the search from the medium-term interactive memory set to generate the medium-term candidate result set Rmedium. medium Repeat the above scoring and screening process for the memory data in , and select k2 memory data to form Rmedium. Then judge whether |Rshort|+|Rmedium|≥k is true:

[0207] If so, merge Rshort and Rmedium, sort by comprehensive score, and select the top k memory data.

[0208] If not, then supplement the search from the long-term interactive memory set to generate a long-term candidate result set Rlong. long The memory data in are scored and screened, and k3 memory data are selected to form Rlong.

[0209] Finally, Rshort, Rmedium, and Rlong are combined into the final result set R, and the top k memory data are selected after sorting in descending order by the comprehensive score s(m). The allocation strategy for the preset number of retrievals k is: k1=min(k, |Mshort|), k2=min(k-k1, |Mmedium|), k3=k-k1-k2, thus ensuring a balance between priority and efficiency in the retrieval process. This method, through a hierarchical retrieval and dynamic supplementation mechanism, balances the rapid response of high-priority memories with the comprehensive coverage of low-priority memories, significantly improving the relevance of retrieval results and system performance.

[0210] In some embodiments, the usage frequency of each memory data in the final result set R is updated.

[0211] In this embodiment, a context-based multi-level memory retrieval algorithm is the core function of the three-party interactive memory network. It is used to efficiently retrieve the most relevant memory data for the current context from a large amount of stored memory. This algorithm comprehensively considers semantic similarity and memory importance, providing critical historical information support for the agent's decision-making. This mathematical representation enables the system to simulate the human associative memory mechanism, achieving intelligent memory retrieval and utilization.

[0212] Specifically, the mathematical expression of the multi-level memory retrieval algorithm is as follows:

[0213] ;

[0214] Among them, R(c)∈M is the retrieval result for a given context c, which represents the most relevant memory data retrieved from the memory set. In practical applications, the k memory data with the highest scores are usually returned, that is, Rk(c)={m1, m2, ..., mk}. The choice of k depends on the application scenario and is usually between 3 and 10 to balance information richness and processing efficiency.

[0215] Furthermore, c∈C is the current context, which represents the current interaction situation of the system;

[0216] C represents the space of all possible contexts;

[0217] The context can be represented as a structured data:

[0218] c=(q c , e c , t c , s c );

[0219] Among them, q c The query content can be text, image or multimodal data, indicating the information needs to be retrieved;c The entity set of the current interaction, such as e c ={e1, e2, ..., e n}, where e i Indicates the entity participating in the current interaction; t c is the current timestamp, indicating the time when the retrieval occurs; s c Indicates the current system state, including emotional state, cognitive state, etc.

[0220] Furthermore, m∈M is memory data, which represents a specific memory unit stored in the system;

[0221] Furthermore, sim(c, m)∈[0, 1] represents a similarity function, which is used to evaluate the correlation between the context c and the memory data m;

[0222] The similarity function can be calculated based on the following dimensions:

[0223] ;

[0224] Among them, sim i (c, m) represents the similarity measure of the i-th dimension; w i ∈[0,1] represents the corresponding weight, satisfying ; n represents the number of similarity dimensions.

[0225] Furthermore, commonly used similarity dimensions include:

[0226] Content similarity: sim content (c, m) = sim sem (q c , c m ); cosine similarity, Jaccard similarity, or semantic similarity based on a pre-trained language model can be used; for multimodal content, a multimodal embedding model can be used to calculate similarity;

[0227] Entity Similarity: ; Use the Jaccard coefficient to calculate the degree of overlap of entity sets; you can also consider the relationship between entities or attribute similarity;

[0228] Time similarity: ; τ is the time scale parameter, which is used to control the influence of time difference on similarity; a smaller τ value makes the temporal similarity decay faster with time difference;

[0229] State similarity: sim state (c, m) = sim vec (s c , s m );s mis the system state when the memory is formed; sim vec is a vector similarity function, such as cosine similarity.

[0230] Furthermore, imp(m)∈[0,1] represents an importance function, which is used to evaluate the importance of the memory data m. The importance function is consistent with the importance scoring function I(m) in the memory flow mechanism mentioned above, so we will not elaborate on it in detail.

[0231] In memory retrieval, the role of the importance function is to: increase the retrieval priority of important memories to ensure that key information is not ignored; balance similarity and importance to avoid retrieval based solely on similarity that may ignore important but less similar memories; and personalize memory retrieval, and different types of interaction scenarios can adjust the weight of importance.

[0232] argmax m∈M To maximize the operation, we select the item that maximizes sim(c, m)·imp(m) from all the memory data. In actual implementation, we usually do not traverse all the memory data, but instead use an efficient index structure and retrieval algorithm. We can first perform a rough screening based on content similarity, and then perform a fine sorting based on importance. For large-scale memory libraries, we can use an approximate nearest neighbor search algorithm to improve efficiency.

[0233] The following is an example of the application of the context-based multi-level memory retrieval algorithm in a parent-child interaction scenario:

[0234] 1. Interactive suggestion generation:

[0235] Context c: Parents requesting advice on how to guide their 3-year-old child in block play;

[0236] Retrieval process: Systematically retrieve historical interactive memories related to block play and the developmental characteristics of 3-year-old children;

[0237] Search results: Include past records of successful block play interactions, children's responses to different block activities, and relevant developmental milestone information;

[0238] Application: Based on the search results, the system generates personalized suggestions for interactive building block games that take into account children’s interests and ability levels;

[0239] 2. Behavioral understanding and interpretation:

[0240] Context c: Parents ask why the child behaves resistantly in a particular situation;

[0241] Retrieval process: Systematically retrieve historical memories associated with similar behavior patterns and possible triggers;

[0242] Search results: including past records of similar behaviors, related emotional states, possible causes, and effective coping strategies;

[0243] Application: The system provides explanations for children's behavior and suggests appropriate responses, helping parents understand their children's needs and emotions;

[0244] 3. Development trajectory analysis:

[0245] Context c: Parents want to know about their children's progress in language development;

[0246] Retrieval process: Systematically retrieve historical memories related to language development, including key milestones and interaction records;

[0247] Search results: Includes records of children's language development, interactive activities that effectively promote language development, and possible future development directions;

[0248] Application: The system generates language development trajectory analysis reports to demonstrate progress, provide targeted suggestions, and set reasonable expectations.

[0249] In this way, the context-based multi-level memory retrieval algorithm can extract the most relevant and important information from massive interactive memories, provide key support for the decision-making of intelligent agents, and realize personalized and contextualized parent-child interaction assistance.

[0250] This embodiment constructs a three-dimensional tensor memory structure, enabling the memory network to not only record two-party interactions but also capture the complex relationships of three-party interactions, providing the intelligent agent with more comprehensive historical information and enabling multi-dimensional dynamic modeling of parent-child relationships. Through hierarchical storage, retrieval efficiency and relevance are significantly improved, providing high-value historical data support for personalized educational decision-making and enhancing the system's intelligence and scenario adaptability. The design of the memory flow mechanism enables the system to achieve a natural transformation from short-term to long-term memory based on the importance of memory.

[0251] See also Figure 2 This embodiment provides a device 200 for implementing a three-party interactive memory structure, including:

[0252] An entity acquisition unit 201 is used to acquire all entities participating in the interaction to obtain an interactive entity set, where the entities include parents, children, and virtual characters;

[0253] A time acquisition unit 202 is used to acquire discrete time points of recorded interactions to obtain a set of time steps;

[0254] A construction unit 203, configured to construct a three-dimensional interaction memory tensor according to the set of interaction entities and the set of time steps;

[0255] A calculation unit 204 is used to calculate the importance score of each memory data in the three-dimensional interactive memory tensor;

[0256] The storage unit 205 is used to store each memory data in a hierarchical manner according to the importance score of each memory data, thereby obtaining a hierarchy of each memory data, wherein the hierarchy includes a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set;

[0257] The retrieval unit 206 is used to obtain the current context and search the current context in the order of the hierarchy when a retrieval is required within the three-dimensional interactive memory tensor to obtain multiple retrieval memory data, wherein the retrieval memory data includes content, timestamps, participating entities and related relationships related to the current context.

[0258] Furthermore, the calculation unit 204 includes:

[0259] The scoring calculation subunit is used to calculate the importance score of each memory data in the three-dimensional interactive memory tensor according to the following formula:

[0260] I(m)=α·R(m)+β·F(m)+γ·E(m);

[0261] Among them, I(m)∈[0,1] represents the importance score of memory data m; R(m)∈[0,1] represents the relevance function; F(m)∈[0,1] represents the usage frequency function; E(m)∈[0,1] represents the emotion intensity function; α, β, γ∈[0,1] represent the weight coefficients.

[0262] Furthermore, the correlation function is calculated based on the following formula:

[0263] ;

[0264] Among them, sim (m, C t ) represents the memory data m and the current context C t Similarity of M imp Represents a set of memory data that has been determined to be important; sim(m, m′) represents the similarity between memory data m and memory data m′; λ1, λ2∈[0, 1] represent weight coefficients, satisfying λ1+λ2=1.

[0265] Furthermore, the usage frequency function is calculated based on the following formula:

[0266] ;

[0267] in, Indicates that the memory data m is in the past The number of times a query is accessed within a certain time period; N0 represents the normalization parameter; exp represents the natural exponential function.

[0268] Furthermore, the emotion intensity function is calculated based on the following formula:

[0269] ;

[0270] Among them, valence(m)∈[-1, 1] is the emotional value of memory data m, indicating the positive or negative polarity of emotion; arousal(m)∈[0, 1] is the emotional arousal of memory data m, indicating the intensity of emotion; |.| represents the absolute value function.

[0271] Furthermore, the storage unit 205 includes:

[0272] A first judging subunit, configured to judge whether the importance score of the memory data is less than a short-term threshold;

[0273] a first storage subunit, configured to store the memory data in a short-term interactive memory set if the importance score of the memory data is less than a short-term threshold;

[0274] a second judging subunit, configured to judge whether the importance score of the memory data is less than a long-term threshold if the importance score of the memory data is greater than or equal to the short-term threshold;

[0275] a second storage subunit, configured to store the memory data in a medium-term interactive memory set if the importance score of the memory data is less than a long-term threshold;

[0276] The third storage subunit is configured to store the memory data in a long-term interactive memory set if the importance score of the memory data is greater than or equal to a long-term threshold.

[0277] Furthermore, the retrieval unit 206 includes:

[0278] A quantity acquisition subunit, configured to acquire the current context and a preset search quantity;

[0279] an initialization subunit, configured to initialize the short-term interaction memory set, the medium-term interaction memory set, and the long-term interaction memory set;

[0280] A data retrieval subunit, configured to retrieve memory data matching the current context from a short-term interactive memory set, and generate a short-term candidate result set;

[0281] A quantity determination subunit, configured to determine whether the number of stored data in the short-term candidate result set is less than the preset retrieval number;

[0282] a short-term selection subunit, configured to select a preset number of memory data from the short-term candidate result set according to a preset sorting rule if the number of memory data in the short-term candidate result set is greater than or equal to the preset retrieval number, to obtain a plurality of retrieval memory data;

[0283] a mid-term supplementary search subunit, configured to perform a supplementary search from the mid-term interactive memory set to generate a mid-term candidate result set if the number of memory data in the short-term candidate result set is less than the preset search number;

[0284] A total quantity determination subunit, configured to determine whether the total quantity of stored data in the short-term candidate result set and the mid-term candidate result set is less than the preset retrieval quantity;

[0285] a mid-term selection subunit, configured to select a preset number of memory data from the short-term candidate result set and the mid-term candidate result set according to a preset sorting rule to obtain a plurality of retrieved memory data if the total number of memory data in the short-term candidate result set and the mid-term candidate result set is greater than or equal to the preset retrieval number;

[0286] a long-term supplementary search subunit, configured to perform a supplementary search from the long-term interactive memory set to generate a long-term candidate result set if the total number of memory data in the short-term candidate result set and the mid-term candidate result set is less than the preset search number;

[0287] The long-term selection subunit is used to merge the short-term candidate result set, the mid-term candidate result set and the long-term candidate result set to obtain a final result set, and select a preset number of retrieval memory data from the final result set according to a preset sorting rule to obtain multiple retrieval memory data.

[0288] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-mentioned devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0289] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed, the computer program can implement the methods provided in the above embodiments. The storage medium may include a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.

[0290] The present invention further provides a computer device that may include a memory and a processor. The memory stores a computer program, and the processor, when invoking the computer program in the memory, can implement the method provided in the above embodiment. Of course, the computer device may also include various network interfaces, a power supply, and other components.

[0291] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0292] It should also be noted that, in this specification, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprising" or any other variations thereof are intended to cover non-exclusive.

[0293] Inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A method for implementing a three-party interactive memory structure, characterized in that: include: Obtain all entities participating in the interaction to obtain an interaction entity set, wherein the entities include parents, children, and virtual characters; Get the discrete time points of the recorded interaction to get a set of time steps; constructing a three-dimensional interactive memory tensor according to the set of interactive entities and the set of time steps; Calculating the importance score of each memory data in the three-dimensional interactive memory tensor; Each memory data is hierarchically stored according to its importance score, to obtain a hierarchy of each memory data, wherein the hierarchy includes: a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set; When a search is required within the three-dimensional interactive memory tensor, a current context is obtained and the current context is searched in the order of the hierarchy to obtain a plurality of search memory data, wherein the search memory data includes content, timestamps, participating entities, and related relationships related to the current context; When a search is required in the three-dimensional interactive memory tensor, the current context is obtained and the current context is searched in the order of the levels to obtain a plurality of search memory data including: Obtaining the current context and the preset search quantity; Initializing the short-term interaction memory set, the medium-term interaction memory set, and the long-term interaction memory set; Retrieving memory data matching the current context from a short-term interactive memory set to generate a short-term candidate result set; Determining whether the number of stored data in the short-term candidate result set is less than the preset search number; If the number of memory data in the short-term candidate result set is greater than or equal to the preset search number, selecting the preset search number of memory data from the short-term candidate result set according to a preset sorting rule to obtain a plurality of search memory data; If the number of memory data in the short-term candidate result set is less than the preset search number, supplementary search is performed from the medium-term interactive memory set to generate a medium-term candidate result set; Determining whether the total number of stored data in the short-term candidate result set and the mid-term candidate result set is less than the preset retrieval number; If the total number of memory data in the short-term candidate result set and the mid-term candidate result set is greater than or equal to the preset retrieval number, selecting the first preset retrieval number of memory data from the short-term candidate result set and the mid-term candidate result set according to a preset sorting rule to obtain a plurality of retrieval memory data; If the total number of memory data in the short-term candidate result set and the mid-term candidate result set is less than the preset search quantity, supplementary search is performed from the long-term interactive memory set to generate a long-term candidate result set; The short-term candidate result set, the mid-term candidate result set and the long-term candidate result set are combined to obtain a final result set, and a preset number of retrieval memory data are selected from the final result set according to a preset sorting rule to obtain a plurality of retrieval memory data.

2. The method for implementing a three-party interactive memory structure according to claim 1, characterized in that: Calculating the importance score of each memory data in the three-dimensional interactive memory tensor includes: The importance score of each memory data in the three-dimensional interactive memory tensor is calculated according to the following formula: I(m)=α·R(m)+β·F(m)+γ·E(m); Among them, I(m)∈[0,1] represents the importance score of memory data m; R(m)∈[0,1] represents the relevance function; F(m)∈[0,1] represents the usage frequency function; E(m)∈[0,1] represents the emotion intensity function; α, β, γ∈[0,1] represent the weight coefficients.

3. The method for implementing a three-party interactive memory structure according to claim 2, characterized in that: The correlation function is calculated based on the following formula: ; Among them, sim (m, C t ) represents the memory data m and the current context C t Similarity of M imp Represents a set of memory data that has been determined to be important; sim(m, m′) represents the similarity between memory data m and memory data m′; λ1, λ2∈[0, 1] represent weight coefficients, satisfying λ1+λ2=1.

4. The method for implementing a three-party interactive memory structure according to claim 2, characterized in that: The usage frequency function is calculated based on the following formula: ; Where N(m, ∆t) represents the number of times the memory data m has been accessed in the past ∆t time; N0 represents the normalization parameter; and exp represents the natural exponential function.

5. The method for implementing a three-party interactive memory structure according to claim 2, characterized in that: The sentiment intensity function is calculated based on the following formula: ; Among them, valence(m)∈[-1, 1] is the emotional value of memory data m, indicating the positive or negative polarity of emotion; arousal(m)∈[0, 1] is the emotional arousal of memory data m, indicating the intensity of emotion; |.| represents the absolute value function.

6. The method for implementing a three-party interactive memory structure according to claim 1, characterized in that: The memory data are stored in layers according to their importance scores, and the layers of the memory data are as follows: Determining whether the importance score of the memory data is less than a short-term threshold; If the importance score of the memory data is less than the short-term threshold, storing the memory data in the short-term interactive memory set; If the importance score of the memory data is greater than or equal to the short-term threshold, determining whether the importance score of the memory data is less than the long-term threshold; If the importance score of the memory data is less than the long-term threshold, storing the memory data in the medium-term interactive memory set; If the importance score of the memory data is greater than or equal to the long-term threshold, the memory data is stored in the long-term interactive memory set.

7. A device for realizing a three-party interactive memory structure, characterized in that: include: An entity acquisition unit, configured to acquire all entities participating in the interaction to obtain an interactive entity set, wherein the entities include parents, children, and virtual characters; The time acquisition unit is used to obtain the discrete time points of the recorded interaction and obtain a set of time steps; A construction unit, configured to construct a three-dimensional interactive memory tensor according to the set of interactive entities and the set of time steps; a calculation unit, configured to calculate an importance score of each memory data in the three-dimensional interactive memory tensor; A storage unit, configured to hierarchically store each memory data according to its importance score, to obtain a hierarchy of each memory data, wherein the hierarchy includes a short-term interactive memory set, a medium-term interactive memory set, and a long-term interactive memory set; a retrieval unit, configured to, when a retrieval is required within the three-dimensional interactive memory tensor, obtain a current context and search the current context in the order of the hierarchies to obtain a plurality of retrieval memory data, wherein the retrieval memory data includes content, timestamps, participating entities, and related relationships related to the current context; The retrieval unit includes: A quantity acquisition subunit, configured to acquire the current context and a preset search quantity; an initialization subunit, configured to initialize the short-term interaction memory set, the medium-term interaction memory set, and the long-term interaction memory set; A data retrieval subunit, configured to retrieve memory data matching the current context from a short-term interactive memory set, and generate a short-term candidate result set; A quantity determination subunit, configured to determine whether the number of stored data in the short-term candidate result set is less than the preset retrieval number; a short-term selection subunit, configured to select a preset number of memory data from the short-term candidate result set according to a preset sorting rule if the number of memory data in the short-term candidate result set is greater than or equal to the preset retrieval number, to obtain a plurality of retrieval memory data; a mid-term supplementary search subunit, configured to perform a supplementary search from the mid-term interactive memory set to generate a mid-term candidate result set if the number of memory data in the short-term candidate result set is less than the preset search number; A total quantity determination subunit, configured to determine whether the total quantity of stored data in the short-term candidate result set and the mid-term candidate result set is less than the preset retrieval quantity; a mid-term selection subunit, configured to select a preset number of memory data from the short-term candidate result set and the mid-term candidate result set according to a preset sorting rule to obtain a plurality of retrieved memory data if the total number of memory data in the short-term candidate result set and the mid-term candidate result set is greater than or equal to the preset retrieval number; a long-term supplementary search subunit, configured to perform a supplementary search from the long-term interactive memory set to generate a long-term candidate result set if the total number of memory data in the short-term candidate result set and the mid-term candidate result set is less than the preset search number; The long-term selection subunit is used to merge the short-term candidate result set, the mid-term candidate result set and the long-term candidate result set to obtain a final result set, and select a preset number of retrieval memory data from the final result set according to a preset sorting rule to obtain multiple retrieval memory data.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for implementing a three-party interactive memory structure according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute the method for implementing a three-party interactive memory structure according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Memory retrieval method for enhancing multi-modal long-context dialogue ability of large language model

    CN119293139A

  • Techniques for Preserving Memories and Experiences Through a Non-Fungible Token (NFT) Engine

    US20250217860A1