A companion interaction active memory triggering method, system, device and equipment based on a relationship stage perception model
Patent Information
- Application Number
- CN202611216322.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-27
AI Technical Summary
[0011]其有益效果在于:本申请旨在显著提升陪伴式机器人的主动情感表达能力:使机器人不再局限于“用户问什么答什么”,而能够在恰当时机主动想起用户此前提及的经历、承诺、情绪与共同记忆,营造“被惦记、被看见”的陪伴体验。此外,触发丰富度与频次可控性并重:多模式并行判定使触发场景覆盖全面,统一优先级+冷却调度使总量可控,解决了现有方案“要么不触发、要么频繁触发”的两极问题。
Smart Images

Figure CN122985997A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent human-computer interaction and companion robot technology, and in particular to a method, system, device and equipment for triggering active memory in companion interaction based on a relationship stage perception model. Background Technology
[0002] Existing long-term memory management solutions for companion robots typically employ the following technical approach: a large language model extracts facts from user input, generating structured memory entries, and assigning each memory an information importance score and an emotional arousal score; based on these scores, the initial memory strength is calculated, and the memory entries are stored in a long-term memory bank in vector form, maintaining metadata including initial memory strength, last activation time, and reinforcement count; when the user subsequently initiates a query or engages in dialogue, candidate memory entries are retrieved from the long-term memory bank, and the candidates are comprehensively scored and ranked based on vector similarity and the current memory strength calculated based on time decay and reinforcement count, selecting the target memory entry to participate in response generation; when newly written facts conflict with existing entries, they are overwritten or archived according to the current strength threshold of the existing entries.
[0003] The aforementioned existing technologies are essentially a passive, single-layer memory intensity management mechanism, which has the following objective drawbacks: The interaction mode is passive and lacks proactive triggering capabilities. Existing solutions are essentially a passive response chain of "user initiates query—retrieves memory—participates in reply." Unless the user actively mentions a topic, related memory items cannot be proactively recalled by the robot at the appropriate time and naturally incorporated into the conversation, making it difficult for companion robots to create an emotional experience of "being remembered and seen."
[0004] The triggering rules are singular and lack unified scheduling across multiple modes: Even though some existing solutions achieve simple proactive reminders through "expiration reminders" or "periodic checks", they generally only cover a single dimension. They do not form independent judgment logic for multiple emotional triggering scenarios, nor do they perform unified priority sorting and cooling-off scheduling for multiple types of triggering candidates, which easily leads to the two-way problem of "either not triggering or triggering frequently".
[0005] Fixed cooling / frequency control, unable to perceive the relationship between user and robot: The "familiarity" between the user and the robot of a companion robot evolves over time. The cooling parameters in the existing solution are fixed once set, and cannot perceive the relationship between user and robot, which further leads to a rigid experience.
[0006] The disconnect between active triggering and memory retrieval: Even if the system outputs an "actively triggered memory prompt", if the specific memory entry referenced by the prompt is not synchronously injected into the context visible to the language model, the language model only sees the prompt but not the corresponding specific facts, which can easily lead to free interpretation, vague avoidance or even fabrication, and cannot accurately and naturally reflect the memory effect in the response.
[0007] The existing solution lacks a distinction between tone and intensity for triggering: different types of proactive triggers should have significant differences in emotional intensity, speech length, and degree of tone restraint. The existing solution uses the same injection method for all proactive reminders, making it difficult to create a distinct emotional expression. Summary of the Invention
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution: A method for triggering active memories in companionship interaction based on a relationship stage perception model includes: constructing an independent multi-mode active triggering engine based on a pre-set long-term memory bank; pre-defining triggers including time echo, detail capture, and emotional arc; configuring independent candidate selection logic, basic priority, and basic cooling duration for each type of trigger; ensuring that each trigger runs in parallel, is decoupled, and is scalable; online statistics of the total number of active user memories; perceiving the human-computer relationship stage and dynamically adjusting cooling parameters; using the number of active memory entries as a proxy indicator to divide the relationship into initial acquaintance, familiarity, and stable stages, and matching differentiated cooling coefficients; the effective cooling duration for each mode is the product of the basic cooling duration and the stage coefficient, with the "remembering regression" mode undergoing special processing in the initial acquaintance stage, where the cooling coefficient is close to 0, and only the interaction interval is used as the trigger gate; multiple triggers generate candidates in parallel, and the results are uniformly scheduled and output. The current Aha trigger set is generated. After all candidates are aggregated, cooling-off filtering and in-session deduplication are performed sequentially. A comprehensive priority is calculated by combining semantic relevance, scarcity, and recent trigger penalty. The final trigger items are selected by sorting according to the trigger limit per session, and the trigger log is recorded for subsequent cooling-off determination. Aha-memory linkage replenishment is performed to connect the active trigger and semantic recall link. Based on the current user input, regular semantic recall is completed to obtain the top-N memory set. It is verified whether the specific memory associated with each trigger candidate is already in the recall set. If not, it is automatically added to form an expanded recall set to avoid the disconnect between trigger prompts and memory facts. The trigger mode is divided into levels according to perceived intensity, and differentiated tone, length, and restraint guidance are matched. The expanded recall memory and trigger prompt are then injected into the system prompt words by type partitioning, driving the language model to generate hierarchical companion replies.
[0009] A companion interaction active memory triggering system based on a relationship stage perception model is provided. The system is used to execute executable instructions to perform the aforementioned companion interaction active memory triggering method based on the relationship stage perception model.
[0010] A companion interaction active memory triggering device based on a relationship stage perception model is provided. The device is used to execute executable instructions to perform the aforementioned companion interaction active memory triggering method based on a relationship stage perception model.
[0011] Its beneficial effects are as follows: This application aims to significantly enhance the proactive emotional expression capabilities of companion robots, enabling them to move beyond simply "answering what the user asks" and proactively recall previously mentioned experiences, promises, emotions, and shared memories at appropriate times, creating a companionship experience of "being remembered and seen." Furthermore, it emphasizes both the richness and controllability of triggers: multi-mode parallel judgment ensures comprehensive coverage of trigger scenarios, while unified priority and cooldown scheduling ensure controllable total triggers, resolving the polarized problem of existing solutions that either "don't trigger at all or trigger frequently."
[0012] This application dynamically adjusts the cooling-off period using the total amount of long-term memory as a proxy indicator, enabling users in the initial stage to quickly establish emotional connections through frequent active triggers, and avoiding excessive disturbance to users in the stable stage, thus overcoming the limitations of fixed parameters in existing solutions. The Aha-memory item linkage and replenishment mechanism ensures that the language model can see the specific memory content corresponding to the active prompts when generating responses, significantly reducing the probability of the robot "talking in generalities" or "fabricating details" in its responses.
[0013] The tiered injection of perception intensity allows different types of proactive prompts to carry their own tone and restraint guidance, presenting a layered expression of the robot in different scenarios. The proactive triggering engine and relationship stage perception module can be deployed independently of any passive response long-term memory management solution, serving as enhancement modules on top of it, making it engineering-friendly and highly compatible. The trigger history provided by the trigger history log, and the pattern type and prompt content carried by the partition injection template can all be used as evaluation criteria, facilitating A / B testing and iterative optimization of the proactive triggering effect. Attached Figure Description
[0014] Figure 1 A flowchart of a method for triggering active memory in companionship interaction based on a relationship stage perception model provided in an embodiment of the present invention; Figure 2 A schematic diagram of the overall system architecture provided in an embodiment of the present invention; Figure 3 A flowchart illustrating the pattern coordination and scheduling of an active memory triggering engine provided in this embodiment of the invention; Figure 4 A schematic diagram of dynamic cooling in a relational stage is provided as an embodiment of the present invention; Figure 5 This is a schematic diagram of Aha-memory entry linkage and replenishment provided in an embodiment of the present invention; Figure 6 A schematic diagram of a device module provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a companion interaction active memory triggering system based on a relationship stage perception model, provided in an embodiment of this application. Detailed Implementation
[0015] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention. Figure 1 This application describes a method for triggering active memory in companion interaction based on a relationship stage perception model, according to an exemplary embodiment of the present application.
[0016] In this application embodiment, a method for triggering active memory in companionship interaction based on a relationship stage perception model is provided, such as... Figure 1 As shown: S101 is based on a pre-defined long-term memory library and builds an independent multi-mode active triggering engine. It predefines triggers including time echo, detail capture, and emotional arc. It configures independent candidate selection logic, basic priority, and basic cooldown time for each type of trigger. The triggers run in parallel and are decoupled and scalable.
[0017] In one implementation, the multi-mode proactive triggering engine is built on a pre-defined long-term memory and operates as an independent functional unit, working in parallel with the conventional semantic recall chain. The engine internally predefines multiple types of triggers with independent decision-making capabilities. Each type of trigger is configured with its own candidate filtering logic, a fixed basic priority value, and a fixed basic cooldown time. All triggers adopt a parallel operating architecture, with decoupled structures, supporting the addition, replacement, or removal of corresponding trigger modes as needed.
[0018] Each trigger operates based on a unified input data source. The input data includes the current user's input text, the history of recent conversations, the user's full long-term memory, the current session's operational status data, and the current time information. The session operational status data includes the set of patterns triggered in this session and the number of triggers, used to assist in candidate filtering and deduplication. Each memory entry in the long-term memory carries standardized metadata, specifically including the memory content text, memory type tag, event occurrence time, last mentioned time, basic importance score, reinforcement count, associated entity set, sentiment tag, memory status identifier, and vector representation data. Memory types cover five categories: events, sentiment, knowledge, to-dos, and milestones; memory status covers four categories: active, expired, archived, and completed.
[0019] Each trigger type calculates the input data using its own filtering logic, outputting two parts. The first part is a candidate memory set, containing one or more memory entries that meet the triggering conditions of that pattern. The second part is a triggering context hint, used to guide the subsequent language model to elicit the corresponding memory in an appropriate direction. The base priority serves as the sorting criterion after multiple candidates are aggregated; a higher value indicates a greater triggering weight for that pattern. The base cooldown time controls the triggering frequency of the corresponding pattern; after a successful trigger, a corresponding cooldown period is required before another valid candidate can be generated, avoiding repeated triggering of the same content within a short period.
[0020] The proactive triggering engine and the regular semantic recall link are two parallel and independent functional links that can run, be configured, and evaluated independently. They only interact through a linkage and replenishment mechanism in the subsequent memory injection stage, and do not affect each other's core operating logic.
[0021] The core criterion for the time echo trigger is the matching relationship between the occurrence time of the memory entry and the current date. Algorithmically, it first iterates through all active event and milestone memory entries in the long-term memory bank, extracting the occurrence time field for each memory. It then calculates the month-day overlap between the occurrence date and the current date, as well as the integer multiples of the time interval (week, month, year). When the date is the same month and day, or the interval is an integer multiple of 7 days, 30 days, or 365 days, the memory entry is added to the candidate set. Simultaneously, the algorithm calculates a time matching score based on the interval length; the closer the interval is to a complete cycle, the higher the matching score. The trigger context hints will indicate the corresponding commemorative attributes, such as "this day last year," or "this day a month ago."
[0022] The typical base priority for this mode is 95, and the typical base cooldown time is 168 hours. A specific example is as follows: The current date is July 15th. The user's long-term memory contains an active event that occurred on July 15th of last year, detailing the user's first solo long-distance cycling trip. When the time echo trigger reaches this entry, it calculates that the occurrence date completely overlaps with the current date (month and day), resulting in the highest matching score. Therefore, this entry is included in the candidate set, and the generated trigger context prompt naturally mentions the long-distance cycling experience from this day last year. Once this mode is successfully triggered, no valid candidates will be generated for the same mode within 168 hours.
[0023] The input source for the detail capture trigger consists of the top set of memory entries from the regular semantic recall output. The algorithm first filters entries of event or knowledge type from the semantic recall results, then calculates three feature values for each entry. The first is semantic relevance, which is the cosine similarity between the entry and the vector of the current user input. The second is importance, directly reading the basic importance score of the memory entry. The third is scarcity, calculated by taking the reciprocal of the number of times the memory entry has been reinforced; the fewer the reinforcement times, the higher the scarcity. The algorithm ultimately selects entries with semantic relevance higher than a preset threshold, basic importance lower than a preset threshold, and scarcity higher than a preset threshold as candidates. The trigger contextual hint is that the detail can be naturally mentioned in the current topic without deliberate emphasis.
[0024] The typical base priority for this mode is 100, and the typical base cooldown time is 72 hours. A specific example is shown below. The user's current input is that they plan to take a walk in the park this weekend. The top results of the regular semantic recall include a memory from 3 days ago where the user casually mentioned liking a cat cafe in a corner of the park. This memory has a high semantic relevance to the current input, a low base importance score, only one reinforcement attempt, and high scarcity. Based on this, the detail capture trigger includes this item in the candidate list, generating a suggestion that the cat cafe-related content can be naturally mentioned when discussing the park. Once this mode is successfully triggered, similar detail captures will not be triggered again within 72 hours.
[0025] The Emotional Arc Trigger performs temporal analysis on emotional memory entries. The algorithm first extracts the most recent active emotional memory entries in reverse chronological order, forming an emotional temporal sequence. Then, it maps the emotional tags in the sequence numerically: positive emotions are mapped to positive values, negative emotions to negative values, and neutral emotions to 0. Next, it extracts trend features from the sequence, identifying three typical patterns. When multiple consecutive memories in the sequence have negative emotional tags, it is determined to be a continuous negative pattern. When the emotional tag of the latest memory shows a significant negative shift compared to the previous state, it is determined to be a sudden negative pattern. When the sequence as a whole shows a trend of changing from negative to positive, it is determined to be a transition from negative to positive. Memory sets that match any of these patterns are added to the candidate list, triggering contextual hints to label the corresponding emotional trend and direction of concern.
[0026] The typical base priority for this mode is 85, and the typical base cooldown time is 48 hours. A specific example is shown below. A user's emotional memories from the past week are, in order: high work stress, fatigue from overtime, being criticized for a project error, continuous insomnia, and improved mood after having dinner with colleagues today. The emotional arc trigger extracts the corresponding emotional memory sequence, quantifies it, and analyzes the overall trend. It finds that the preceding sequence consistently showed a negative state, while the recent state turned positive, indicating a shift from negative to positive. The trigger includes the corresponding memory set as a candidate, generating a suggestion to gently affirm the improved mood. Once this mode is successfully triggered, the emotional arc judgment and trigger will not be repeated within 48 hours.
[0027] In addition to the three core trigger types mentioned above, the engine can also predefine triggers for various other categories, including "To Be Continued," "Revisited Memories," "Growth Witness," "Shared Memories," "Contrast Discovery," "Thoughts on," and "Active Topics." Each trigger type follows the same architectural specifications, with independently configured filtering logic, basic priority, and basic cooldown time. For example, the "To Be Continued" trigger focuses on filtering event-type memories that are active within the last 1 to 7 days and carry ongoing semantic signals. Its typical basic priority is 70, and its typical basic cooldown time is 24 hours. The "Revisited Memories" trigger activates when the interval between the last interaction and the last interaction is greater than or equal to 3 days, selecting different amounts of memory entries based on the interval duration. Its typical basic priority is 80, and its typical basic cooldown time is 24 hours.
[0028] Growth Witness Trigger: By comparing recent emotional trajectories or event progressions, this feature identifies positive changes "from negative to positive" or "from impossible to accomplished," extracts corresponding memory entries before and after the change as candidates, and triggers contextual prompts to label positive growth attributes, providing users with positive affirmation and encouragement. The typical base priority for this mode is 65, and the typical base cooldown time is 72 hours.
[0029] Shared Memory Trigger: When a user is detected to be emotionally distressed or actively recalling related semantics, positive shared memory items of the milestone type are selected as candidates, and the trigger contextual prompt is to warmly recall events experienced together by both parties. The typical base priority value for this mode is 50, and the typical base cooldown time is 48 hours.
[0030] Contrast Discovery Trigger: Compares the semantics of the current user input with the user's existing profile and historical memory entries regarding preferences, attitudes, habits, etc., identifies content with significant contradictions or changes, generates corresponding candidates, and triggers contextual prompts allowing users to inquire about the reasons for the changes, but not using an interrogative tone. The typical base priority value for this mode is 45, and the typical base cooldown time is 48 hours.
[0031] The "Things in Mind" trigger: When the system detects a user asking about the robot's recent situation, it selects one item from its most important memories of the past 14 days as a candidate, representing "something the AI has been thinking about." The trigger contextual prompt is a natural expression of the AI's concern for the user's relevant matters. The typical base priority for this mode is 110, and the typical base cooldown time is 12 hours.
[0032] Proactive Topic Trigger: As a fallback mode, this mode combines information such as the user's recent knowledge preferences, unfinished tasks, and seasonal events to generate naturally suggested topics. Triggering contextual prompts can easily introduce new topics. The typical base priority for this mode is 20, and the typical base cooldown time is 12 hours.
[0033] All triggers operate in parallel within the engine. At the start of each dialogue round, all triggers simultaneously receive input data and independently perform filtering calculations without interference. The engine uses a unified candidate aggregation interface to collect the candidate sets output by all triggers and then sends them to the subsequent priority and cooldown scheduling module. Since each trigger only relies on a standardized input data format and output interface, there is no logical dependency between them, thus exhibiting complete decoupling. Business-side applications can add triggers according to scenario requirements. They only need to write the filtering logic according to the unified specifications and configure the corresponding priority and cooldown parameters to integrate with the engine and run normally, without modifying the configuration and execution logic of existing triggers. Similarly, unnecessary trigger modes can be directly removed without affecting the overall operational stability of the engine. The engine is not limited by the specific number of trigger modes; its core structural feature is multi-mode parallel independent judgment plus unified aggregation.
[0034] The typical values for the basic priority and basic cooldown time of the above ten trigger modes are as follows: * **Remembering:** P0=110, CD0=12h; * **Detail Capture:** P0=100, CD0=72h; * **Time Echo:** P0=95, CD0=168h; * **Emotional Arc:** P0=85, CD0=48h; * **Remembering Return:** P0=80, CD0=24h; * **To Be Continued:** P0=70, CD0=24h; * **Growth Witness:** P0=65, CD0=72h; * **Shared Memories:** P0=50, CD0=48h; * **Contrast Discovery:** P0=45, CD0=48h; * **Initial Topic:** P0=20, CD0=12h. The parameter design follows these principles: modes with higher user perception intensity are configured with longer cooldown times to create a sense of scarcity, while backup modes with lower perception intensity are configured with shorter cooldown times to ensure a basic interactive experience.
[0035] ,in, Input for the current user; M represents the most recent k rounds of dialogue history; M is the long-term memory of the corresponding user, containing profile memories and itemized memory sets. ; This represents the current session runtime state, including the set of patterns that have been triggered in this session and the number of times they have been triggered; This refers to the current moment.
[0036] Each entry is memorized. The metadata includes: memory content Memory type Time of occurrence Last time mentioned The importance of the foundation Number of reinforcements Related entities Emotional tags Memory state Vector representation .
[0037] ,in, This is a list of memory entries to be recalled in this round; This is the set of active trigger candidates selected in this round; This is for the final injection of the partitioned context into the language model.
[0038] S102, online statistics of total active user memory, perception of human-computer relationship stage and dynamic adjustment of cooling parameters, using the number of active memory entries as a proxy indicator, divide the relationship into initial acquaintance stage, familiarity stage and stable stage, and match differentiated cooling coefficients; the effective cooling time of each mode is the product of the basic cooling time and the stage coefficient, among which the memory regression mode is specially processed in the initial acquaintance stage, with a cooling coefficient close to 0, and only the interaction interval is used as the trigger gate.
[0039] In one implementation, the total number of active memory entries in the target user's long-term memory bank is statistically analyzed online. The number of active memory entries is used as a proxy indicator for the human-computer relationship stage. Preset threshold ranges for the number of active entries corresponding to the initial acquaintance stage, familiarity stage, and stable stage are established. The system automatically determines the user's current relationship stage and outputs a relationship stage identifier and a set of basic cooling-off parameters for the full-trigger mode. Using the total number of active memory entries in the long-term memory bank as a proxy indicator for the relationship stage, three relationship stages are divided through preset threshold ranges, completing automatic stage determination and outputting corresponding identifiers.
[0040] During execution, the system first iterates through the entire long-term memory database corresponding to the target user, filtering out active entries and counting the total number of active entries. The system presets two thresholds: a low threshold and a high threshold, dividing the number of active entries into three consecutive intervals. When the total number of active memories is less than the low threshold, the system is determined to be in the initial stage of the human-computer relationship. When the total number of active memories is greater than or equal to the low threshold but less than the high threshold, the system is determined to be in the familiar stage of the human-computer relationship. When the total number of active memories is greater than or equal to the high threshold, the system is determined to be in the stable stage of the human-computer relationship. After the determination is completed, the system outputs the current relationship stage identifier and simultaneously retrieves the basic cooldown duration parameter set for all trigger modes for subsequent cooldown coefficient calculations.
[0041] Pick , , , , At this time, for any triggering mode Its cooldown period for activation under the current relationship phase is: The core function of the relationship stage perception module is to: in the initial acquaintance stage, users need more frequent proactive triggers to quickly establish an emotional connection; in the stable stage, users need more restrained triggers to avoid the companion robot appearing programmed. Compared to the fixed cooling parameters of existing solutions, this invention makes the cooling time a dynamically adjusted quantity as the relationship evolves.
[0042] The typical parameter configuration for this step is as follows: a low threshold of 15 and a high threshold of 50. A specific running example is as follows: After a new user uses the companion system for the first week, their long-term memory bank contains 8 active memory entries. The total active entries are 8, which is less than the low threshold of 15, so the system automatically determines that the user is in the initial familiarization phase. After one month of system use, the number of active memory entries accumulates to 32, falling within the range of 15 to 50, so the system determines that the user has entered the familiarization phase. After six months of long-term use, the number of active memory entries accumulates to 68, exceeding the high threshold of 50, so the system determines that the user has entered the stable phase.
[0043] In addition to the total number of active memory entries, the agent indicator can also be replaced by quantifiable objective data such as the number of interaction days, the number of milestone events, and the total number of rounds of dialogue between the two parties, or the relationship stage can be calculated by weighted fusion of multiple indicators. The core logic is to characterize the degree of familiarity between humans and machines through objective behavioral data.
[0044] A mapping rule is established between relationship stages and cooling coefficients. Differentiated cooling coefficients are matched to each of the three relationship stages. The base cooling duration of each triggering mode is multiplied by the corresponding cooling coefficient of the current stage to calculate the effective cooling duration of each general triggering mode, generating a set of general mode effective cooling parameters. The system configures differentiated cooling coefficients for each of the three relationship stages: the cooling coefficient for the initial stage is less than 1, the cooling coefficient for the familiar stage is between the initial stage coefficient and 1, and the cooling coefficient for the stable stage is equal to 1. The effective cooling duration is used to constrain the minimum time interval between two successful triggers of the corresponding mode. When the coefficient is less than 1, the effective cooling duration of the corresponding mode is shortened, increasing the trigger frequency; when the coefficient is equal to 1, the original base cooling duration is maintained, and the trigger frequency remains at the baseline level. For each type of general triggering mode, the system uses the same calculation method: multiplying the base cooling duration of the mode by the cooling coefficient corresponding to the current stage to calculate the effective cooling duration of the mode under the current relationship stage. After all modes are calculated, they are summarized to form a set of general mode effective cooling parameters.
[0045] The typical parameter configuration for this step is as follows: a cooling coefficient of 0.3 for the initial learning phase, 0.6 for the familiarization phase, and 1.0 for the stable phase. A specific running example is as follows: The base cooldown time for the detail capture mode is 72 hours. When the user is in the initial learning phase, the effective cooldown time is 72 multiplied by 0.3, resulting in 21.6 hours, significantly shorter than the base time and a significantly increased trigger frequency. When the user is in the familiarization phase, the effective cooldown time is 72 multiplied by 0.6, resulting in 43.2 hours, with the trigger frequency remaining at a moderate level. When the user is in the stable phase, the effective cooldown time is 72 multiplied by 1.0, maintaining the base cooldown time of 72 hours, with the trigger frequency remaining restrained. Similarly, the base cooldown time for the time echo mode is 168 hours, with an effective cooldown time of 50.4 hours for the initial learning phase, 100.8 hours for the familiarization phase, and 168 hours for the stable phase.
[0046] For the "Remembering Return" trigger mode, a special calibration is performed during the initial recognition period. When a user is determined to be in the initial recognition period, the mode's cooling coefficient is adjusted to near 0, making its effective cooling time approach 0. Simultaneously, the trigger gate condition is adjusted to an interval of ≥24 hours from the last interaction. Outside the initial recognition period, the general cooling parameter calculation rules are used. The final output is the full-mode effective cooling parameter configuration and trigger judgment rules. The original trigger gate for the "Remembering Return" mode itself is an interval of ≥3 days from the last interaction, with a base cooling time of 24 hours. Under normal circumstances, both the interaction interval trigger threshold and the mode-level cooling window requirement must be met simultaneously to enter the candidate selection. During execution, the current relationship stage identifier is first read. If the current stage is the initial recognition period, the general calculation method of multiplying the base cooling time by the stage coefficient is no longer used. Instead, the mode's cooling coefficient is adjusted to near 0, making its effective cooling time approach 0, almost unrestricted by the mode-level cooling window. Simultaneously, the system adjusts the trigger gate conditions for this mode, replacing the core trigger condition from the original 3-day interaction interval to an interval greater than or equal to 24 hours since the last interaction. Only the user's regression interval is used as the gate for whether to allow candidate generation. If the current stage is not the initial recognition period, the cooling calculation rules of the general mode are directly used, calculating the effective cooling duration by multiplying the base cooling duration by the corresponding stage coefficient. The trigger gate maintains the original 3-day interaction interval standard. After calibration, the system summarizes the cooling parameters of all general and special modes, outputting a complete configuration of all-mode effective cooling parameters and corresponding trigger judgment rules, which are then provided to the subsequent priority cooling scheduling module as the basis for cooling filtering.
[0047] The specific operational example is as follows. A user is in the initial acquaintance stage. The basic cooldown period for the "Return to Familiarity" mode is 24 hours. According to general rules, the effective cooldown period is 24 multiplied by 0.3, which is 7.2 hours, and it requires meeting a trigger threshold of 3 days since the last interaction. After special calibration, the effective cooldown period of this mode approaches 0, no longer constrained by the mode's cooldown window, and the trigger interaction interval threshold is also reduced to 24 hours. As long as the user's time since the last interaction reaches 24 hours, initiating a conversation again will trigger the "Return to Familiarity" mode, ensuring that the user receives a corresponding emotional response with each return. When the user enters the familiarity stage, the special calibration rules automatically become invalid, and the "Return to Familiarity" mode adopts the general calculation rules. The effective cooldown period is adjusted to 14.4 hours, the trigger threshold returns to a 3-day interval, and the trigger frequency gradually becomes more restrained as the relationship deepens.
[0048] S103: Multiple triggers generate candidates in parallel. The Aha trigger set for this round is output through unified scheduling. After all candidates are aggregated, cooling filtering and in-session deduplication are performed in sequence. The comprehensive priority is calculated by combining semantic relevance, scarcity, and recent trigger penalty. The final trigger entries are selected by sorting according to the trigger limit per session, and the trigger log is recorded for subsequent cooling determination.
[0049] In one implementation, the candidate sets output in parallel from each independent trigger are aggregated, with each candidate containing an associated memory entry and a corresponding trigger context hint. The user's historical trigger records and in-session trigger states are read, and mode-level cooldown checks and in-session memory deduplication are performed sequentially. All candidates corresponding to modes that have not reached their effective cooldown period, as well as memory entries that have already been actively triggered in this session, are removed, generating the valid candidate set for this round. The candidate sets output in parallel from all independent triggers are received, and combined with the user's historical trigger records and in-session trigger states, mode-level cooldown checks and in-session memory deduplication are performed sequentially, removing candidates that do not meet the trigger conditions, generating the valid candidate set for this round.
[0050] The execution logic of mode-level cooldown verification is as follows: It reads the timestamp of the last successful trigger of each mode from the trigger history, calculates the time interval between the current time and the last trigger time, and compares the interval with the corresponding mode's effective cooldown duration. If the time interval for a mode is less than its effective cooldown duration, all candidate entries output by that mode are discarded and will not proceed to the next filtering process. If the time interval is greater than or equal to the effective cooldown duration, the candidate for that mode is retained and proceeds to the next round of verification.
[0051] The execution logic for deduplication of in-session memories is as follows: It iterates through all candidates that have passed the cooldown check, extracts the memory entry identifier associated with each candidate, and compares it with the set of memory entries that have been actively triggered in the current session. If a candidate references a memory entry that has already been actively triggered in the current session, the candidate is discarded to avoid repeatedly mentioning the same memory within the same session. After the double filtering is completed, all remaining candidates constitute the set of valid candidates for this round, and proceed to the subsequent priority ranking stage.
[0052] The specific operation example is as follows. A user is in the initial acquaintance phase. After the current dialogue is initiated, the proactive trigger engine outputs three types of candidates: the "Return to Familiarity" mode, the "To Be Continued" mode, and the "Detail Capture" mode. The system first reads the trigger history and checks the last trigger time and effective cooldown period for each mode. The "Return to Familiarity" mode was last triggered 2 days ago. Its effective cooldown period in the initial acquaintance phase is close to 0, meeting the time interval requirement, and all candidates pass the cooldown verification. The "To Be Continued" mode was last triggered 10 hours ago. Its base cooldown period is 24 hours, the initial acquaintance phase cooldown coefficient is 0.3, and its effective cooldown period is 7.2 hours. Since 10 hours is greater than 7.2 hours, it meets the cooldown requirement, and the candidate passes the verification. The "Detail Capture" mode was last triggered 15 hours ago. Its base cooldown period is 72 hours, and its effective cooldown period is 21.6 hours. Since 15 hours is less than 21.6 hours, it does not meet the cooldown requirement, and all candidates for this mode are eliminated.
[0053] Subsequently, in-session memory deduplication is performed. This round is the first round of dialogue in this user's session, and there are no triggered memory entries in the session. Therefore, the remaining two categories of candidates, namely, "returning to the memory" and "to be continued," all pass the deduplication check and together constitute the valid candidate set for this round.
[0054] A comprehensive priority scoring rule is constructed, using the basic priority of each triggering mode as the scoring base. For each valid candidate, three evaluation dimensions are matched: semantic relevance, trigger scarcity, and recent reference penalty. A comprehensive priority score for each candidate is calculated using preset weighting coefficients. Candidates are then sorted in descending order of score to generate a ranked candidate list. The semantic and entity relevance dimensions are used to measure the degree of matching between the candidate's associated memory and the current user input. The semantic dimension is obtained by calculating the cosine similarity between the memory entry vector and the user input vector, while the entity dimension is obtained by comparing the number and weight of shared entities. The two dimensions are fused to obtain the final relevance score, ranging from 0 to 1, with higher values indicating a stronger match.
[0055] The trigger scarcity dimension is used to measure the rarity of the corresponding trigger pattern or associated memory item. It is calculated based on the historical cumulative number of triggers for the pattern or item. The fewer the number of triggers, the higher the scarcity value, with a value range from 0 to 1.
[0056] The recent reference penalty dimension is used to suppress memory entries that are repeatedly referenced in the short term. It is calculated based on the time since the memory entry was last referenced. The more recent the reference time, the higher the penalty value, and the value ranges from 0 to 1.
[0057] A comprehensive priority scoring rule is constructed, using the basic priority of each triggering mode as the scoring base. Two positive scoring dimensions are awarded for each valid candidate match: semantic relevance and trigger scarcity; one negative scoring dimension is awarded for recent citation penalty. The comprehensive priority score is calculated as follows: ,in, The basic priority of the corresponding pattern is defined by relevance, which represents the semantic and entity relevance, and novelty, which represents the trigger scarcity. Due to recent citation penalties, , , Set the preset weight coefficients; sort the candidates in descending order of scores to generate a sorted candidate list.
[0058] The specific operation example is as follows. There are two valid candidates. The first one is the memory regression pattern candidate, with a basic priority of 80. Its associated memory has a low semantic and entity relevance to the current user input, a high trigger scarcity, and the corresponding memory has not been referenced recently, with a recent penalty of 0. After weighting, the overall priority score is high.
[0059] The second candidate is the "To be continued" mode candidate, with a base priority of 70. Its associated memory has a high semantic and entity relevance to the current user input, and its trigger scarcity is at a medium level. The corresponding memory has been recently referenced, resulting in a certain penalty score. After weighting, its overall priority score is slightly lower than the first candidate. The two candidates are arranged in descending order of score, with the "Regression" candidate ranked first and the "To be continued" candidate ranked second, generating a ranked candidate list.
[0060] Based on a preset threshold for the maximum number of triggers per session, the candidate list is truncated to determine the final Aha trigger entries for this round. Simultaneously, the trigger mode, associated memory identifier, and trigger time are written to the trigger history log for subsequent cooldown determination and session deduplication. The final Aha trigger set for this round is then output. The execution logic is as follows: candidates are selected sequentially from highest to lowest sorting. Truncation stops when the number of selected entries reaches the maximum trigger count threshold per session, and the remaining candidates are no longer selected. After selection, the trigger mode name, associated memory entry identifier, and trigger timestamp of all selected entries are written to the trigger history log as data for subsequent cooldown verification and deduplication determination. Finally, the selected Aha trigger set is output and passed to the subsequent linkage and recovery module.
[0061] The specific operation example is as follows. The system presets a maximum trigger count threshold of 2 per session. The current sorted candidate list has 2 valid candidates, which does not exceed the threshold. Therefore, both candidates are selected as the final Aha trigger entries for this round.
[0062] The system then performs a trigger record writing operation, simultaneously storing the memory return mode, corresponding memory identifier, and current trigger time, as well as the incomplete / to-be-continued mode, corresponding memory identifier, and current trigger time into the trigger history. After recording is complete, the system outputs a final Aha trigger set containing two candidate sets, which are used in subsequent memory linkage replenishment and prompt assembly stages.
[0063] S104 executes Aha-memory linkage replenishment, connecting the active trigger and semantic recall link. Based on the current user input, it completes regular semantic recall to obtain the top-N memory set, and verifies whether the specific memory associated with each trigger candidate is already in the recall set. If not, it is automatically added to form an expanded recall set, avoiding the separation between trigger prompts and memory facts.
[0064] In one implementation, conventional semantic retrieval is performed on the long-term memory bank based on the current user input. A comprehensive retrieval score is calculated by combining vector similarity, dynamic memory strength, and typified half-life timeliness. The top-N memory entries are then selected in descending order of score to generate the basic retrieval memory set for this round. The comprehensive retrieval score is obtained by fusing three core dimensions. The first is vector similarity, calculated by the cosine similarity between the vector representation of the current user input and the vector representation of each memory entry, with a value ranging from 0 to 1; a higher value indicates a stronger semantic match. The second is dynamic memory strength, calculated by combining the basic importance score of the memory entry, the number of historical reinforcements, and the time decay factor, reflecting the activity level of the memory at the current moment; a higher strength indicates a higher information value. The third is typified half-life timeliness. The system configures differentiated half-life parameters for different types of memories; event-type memories have shorter half-lives, while profile and milestone-type memories have longer half-lives. The timeliness score is calculated based on the interval between the memory occurrence time and the current moment; a shorter interval results in a higher score. The recall score for each memory is obtained by integrating the three dimensions. All memories are sorted in descending order of their recall scores, and the top N memories are selected to form the basic recall memory set for this round.
[0065] The specific operation example is as follows. The current user inputs "I'm so tired lately," and the system performs semantic recall based on the user's long-term memory, setting the retrieval quantity to 5. The system calculates the overall recall score for each active memory. One memory, an emotional one about recent consecutive overtime work, has a high semantic match with the current input, strong memory activity, and a relatively recent occurrence, resulting in a high overall score after fusion calculation. Another memory, an event-related one about a weekend hiking plan, has a moderate semantic match with the current input, resulting in a relatively low overall score. After all memories are scored and sorted, the system selects the top 5 memory entries to generate the basic recall memory set for this round.
[0066] Establish a linkage verification rule between Aha trigger candidates and recalled memories. It iterates through all Aha trigger candidates finalized in this round, verifying the existence of the specific memory entry associated with each candidate in the basic recall set, and outputs the hit determination result and the list of memories to be added for each candidate. The verification execution logic is as follows: First, read all Aha trigger candidates finalized in this round and extract the specific memory entry associated with each candidate. Then, compare each memory with the memories in the basic recall set one by one. If a completely matching memory entry is found, it is considered a hit, and the corresponding memory does not need to be added. If no matching memory entry is found, it is considered a miss, and the memory is added to the list of memories to be added. After all candidates have been verified, the system outputs complete hit result statistics and the list of memories to be added.
[0067] The specific execution example is as follows. In this round, two Aha trigger candidates were ultimately selected. The first was a "remembering" regression candidate, associated with the memory entry of a user mentioning preparing for an interview 3 days prior. The second was an "incomplete" candidate, also associated with the same interview event memory. The system compared the memories corresponding to these two candidates with the 5 memories in the basic recall set. It was found that the semantic matching results of the basic recall set did not include this interview memory, so both candidates were determined to be misses. The system added this interview memory to the list of memories to be added, ultimately outputting a list containing one memory to be added.
[0068] The system automatically appends memory entries from the list to be added, adding them to the basic recall set to form an expanded recall memory set. This ensures that the memory facts corresponding to the proactively triggered prompts are synchronously included in the visible context of the language model. The expanded recall set is then output for subsequent partitioning and injection assembly. The execution logic is as follows: all memory entries in the list to be added are read and completely appended to the basic recall memory set. During the appending process, all metadata and vector information of the memory are preserved, and the order and content of the entries in the original basic recall set are not modified. The expanded recall memory set formed after appending includes both memories with high matching scores in regular semantic recall and specific memories required for proactive triggering, covering all memory content that needs to enter the language model context. The system outputs the expanded recall set to the injection assembly module, where it works with the proactively triggered prompts to complete the subsequent assembly of prompt words.
[0069] The specific operation example is as follows. The memory list to be added contains one interview event memory. The system completely appends the entire content of this memory and its metadata to the original five basic recalled memories, forming an expanded recalled memory set containing six memories. In the subsequent injection and assembly process, all six memories will be included in the recalled memory area and injected into the system prompt words of the language model along with the Aha trigger prompt partition. This allows the language model to see the specific memory content of the user mentioning interview preparation three days ago while receiving guidance to actively introduce the interview topic, thereby generating a detailed, accurate, and naturally expressed response.
[0070] S105 categorizes trigger patterns into levels based on perceived intensity, matches them with differentiated tone, length, and restraint guidelines, and then injects extended recall memories and trigger prompts into system prompt words by type, driving the language model to generate hierarchical companion responses.
[0071] In one implementation, a trigger pattern perception intensity grading system is established. Various trigger patterns are divided into five intensity levels based on the strength of user perception. Each level is matched with differentiated tone styles, length constraints, and rules of restraint in expression, forming a tiered injection template library. Trigger patterns of the same level reuse corresponding expression norms. The configuration rules for the five intensity levels from highest to lowest are as follows: The highest perception intensity level corresponds to the two trigger patterns of detail capture and time echo. The injection template emphasizes using natural connecting phrases to introduce the memory content, without revealing the internal memory operation mechanism, and maintaining restraint in overall length, corresponding to the trigger scenarios with the strongest user perception. The second perception intensity level corresponds to the two trigger patterns of emotional arc and lingering memories. The injection template emphasizes a gentle and caring expression style, avoiding a didactic tone, and focusing on emotional resonance and emotional connection. The third perception intensity level corresponds to the two trigger patterns of "to be continued" and "growth testimonials." The injection template emphasizes a relaxed questioning or positive affirmation tone, with the core direction of following up on the topic's progress and encouraging user expression. The fourth level of perception intensity corresponds to two trigger modes: shared memories and contrast discovery. The injection template emphasizes a relaxed and curious expression, and should not use a questioning tone to avoid provoking user resistance. The lowest level of perception intensity corresponds to the proactive topic trigger mode. As the bottom-line level, it uses the lightest tone and is only used to naturally introduce new topics to avoid abruptness.
[0072] All trigger modes match corresponding templates according to their respective levels, eliminating the need for separate expression rules. This ensures consistent expression standards within the same level and reduces the configuration cost for future expansion of new modes. Specific operational examples are as follows: When the Time Echo mode is triggered, the system automatically matches the template for the highest perception intensity level, requiring responses to naturally incorporate anniversary-related memories without deliberately emphasizing memory abilities, maintaining overall restraint in expression. When the Proactive Topic mode is triggered, the system matches the template for the lowest perception intensity level, introducing the topic with a simple question without forcibly binding memory content, ensuring a natural transition.
[0073] The extended recall memory set and the current round of Aha trigger prompts are categorized and partitioned. Specific memory facts are assigned to the recall memory area, while trigger guidance instructions and corresponding tone restraint guidelines are assigned to the Aha trigger prompt area. Content is organized according to a preset partition format, generating structured system prompt words for injection. The three partitions have distinct roles: the profile memory area is a permanent partition, storing core profile information of the user's fixed attributes, which is retained throughout the system prompts as background. The recall memory area is a dynamic partition, carrying itemized memories obtained from each round of regular semantic recall and linked supplementation, serving as the factual basis for the language model's response generation. The Aha trigger prompt area is also a dynamic partition, carrying the selected active trigger guidance and corresponding expression rules from each round, serving as the behavioral expression guide for the language model.
[0074] During execution, the system first reads the complete extended recall memory set, classifying all memory entries into the recall memory area, and fully preserving metadata such as the content, type, and occurrence time of each memory. Then, the system reads all Aha trigger candidates for this round, extracting the trigger guidance instructions corresponding to each candidate, as well as the tone restraint guidelines of the corresponding level. All guidance and constraint content are then classified into the Aha trigger prompt area, clearly marking the pattern type and expression requirements corresponding to each trigger. The three areas are clearly separated by partition markers to avoid confusion between different types of information and ensure that the language model can accurately distinguish the role of each type of information.
[0075] The specific operation example is as follows. This round of expanded memory recall contains 6 memory entries, 5 from regular semantic recall and 1 from a linked supplementary interview event memory. The system organizes all 6 memories into the memory recall area, listing the corresponding memory content for each. The two selected trigger candidates, "Return of Remembrance" and "To Be Continued," correspond to the second and third perception intensity levels, respectively. The system organizes the guidance instructions for these two triggers and their respective tone requirements into the "Aha" trigger prompt area, clearly indicating that "Return of Remembrance" requires a gentle and caring tone, and "To Be Continued" requires a relaxed and questioning tone. These two areas, combined with the resident profile memory area in a fixed format, form a complete system prompt injection material.
[0076] By injecting system prompts into the language model's context, the model is guided to generate responses based on accurate memory of facts and following expression rules corresponding to the intensity level. This results in a companion-style dialogue with distinct emotional layers and accurate, natural details. After receiving system prompts and current user input, the language model first reads the user's basic attribute information from the profile memory area and extracts factual details related to the current topic from the recall memory area. All expressions involving memory are based on the factual content in the recall area, avoiding vague statements or fabricated details. Subsequently, the model reads the guidance instructions and tone constraints from the Aha trigger prompt area, organizing the language according to the length and restraint requirements of the corresponding intensity level, naturally integrating the memory content into the response without exposing the internal triggering mechanism. Different intensity levels of triggers present different emotional concentrations in the same response. High-perception intensity mode content is concise and clear in its memory points, while low-perception intensity mode content transitions naturally and has a weaker presence, forming a well-structured and layered expression.
[0077] Here's a specific example of how it works. The user inputs "I'm so tired lately." The system-injected contextual clues include persistent user profile information, six memories from the recall memory area (such as interview events), and requests for gentle, caring feedback from the "Aha" context area, as well as follow-up questions for relaxed engagement. The language model generates a response based on the remembered facts and expression rules: "It's been a while since we talked. I've been wondering how your interview from last week went. If you're tired, take a break and tell me about it." The "remembering" greeting conveys a gentle, caring tone, while the follow-up question reflects a relaxed, supportive approach. The remembered details are accurate, and the overall expression is natural and unforced, presenting a layered sense of companionship.
[0078] The following specific scenario illustrates the complete operational loop of this method: Scenario: User "Xiaoyu" is a new user with 8 active entries in her long-term memory bank, currently in the initial acquaintance stage; her last interaction was 3 days ago; in the conversation 3 days ago, Xiaoyu mentioned "I have an interview next week," corresponding to an event-type memory. The status is active.
[0079] Step 1: Xiaoyu inputs "I'm so tired lately" for the first time in this round, triggering the active memory triggering process; Step 2: The semantic recall module retrieves the top-5 memories based on "I've been so tired lately," and hits the target. In addition to these, several other emotional and event-related memories constitute the basic recall set. ; Step 3: Parallel determination of triggers in the active trigger engine: To be continued trigger: Detected The interview is an ongoing process that takes 1–7 days to generate candidates. , reference memory ; Regression trigger: Detects a 3-day interval since the last interaction, generating candidate variables. ; Emotional Arc Trigger: Detects a negative trend in recent emotional memory sequences and generates candidate triggers. ; Step 4: The total number of active memories counted by the relationship stage perception module is 8, which is less than the low threshold of 15, so it is determined to be in the initial recognition stage, with a cooling coefficient of 0.3; special processing is performed on the memory regression pattern, and its effective cooling time is close to 0. Step 5: Scheduler pair , , Cooling filtering and in-session deduplication were performed sequentially, both of which passed validation. Scores were then calculated and ranked according to a comprehensive priority formula, and the final selection was made. and There are a total of 2 Aha triggers for this round (the maximum number of triggers per session is 2); Step 6: Aha—Memory Linkage Completion Module Check , Are the referenced memories in the basic recall set? In the middle, if Not in If the middle part is added, it forms an expanded recall set; Step 7: The injection assembly module assembles the extended recall memory and the two triggered differentiated prompts into a system prompt word according to the partition format; Step 8: The language model generates natural and accurate responses based on the partitioned prompts, such as: "It's been a while since we chatted. I've been wondering how your interview preparation from last week went? If you're tired, take a break and tell me about it."
[0080] like Figure 2 As shown, Figure 2 This is a schematic diagram of the overall system architecture, which fully illustrates the entire process of active memory triggering during the operation of the companion robot. The entire process is within the dashed box. The core is to add a complete link that actively selects memories and naturally integrates them into the conversation, based on the original passive mechanism of "memory is retrieved only when the user speaks". The overall process proceeds sequentially from left to right.
[0081] Long-term memory bank: It is the data foundation of the entire system, storing all memory content such as user profile information, experience events, emotional records, to-do items, etc., while providing data for active triggering and regular memory retrieval.
[0082] Current user input: This refers to what the user said in this round, which includes information such as topic content, emotional tendency, current time, and interval since the last chat. It is the starting point for triggering the entire process.
[0083] Regular semantic recall top-N: This is the original passive memory retrieval step. Based on what the user is currently saying, the top N most semantically relevant memories are found from the memory bank. The results are specifically provided for verification in the subsequent linkage and replenishment step.
[0084] Multi-mode trigger engine: This is the core judgment link for proactive triggering. It has multiple independent trigger rules built in, including time echo, detail capture, unfinished business, emotional arc, and memory return. Each rule will match it separately in the long-term memory bank to find memories that match the corresponding scenario and are suitable for being proactively brought up in the current round of conversation, and output candidate results.
[0085] Priority / Cooldown Scheduler: This is responsible for the unified management of all candidate memories. First, it filters out patterns that are still in the cooldown period and cannot be triggered repeatedly. Then, it removes memories that have already been actively mentioned in the current round of dialogue. Next, it scores and sorts all the remaining candidates. Finally, according to the maximum number of triggers per round of dialogue, it selects the 1-2 most suitable memories as the final memories to be actively triggered in this round.
[0086] The Relationship Stage Perception Module dynamically adjusts the frequency of triggers. Based on the user's current active memory volume, it determines the relationship stage between the user and the robot—divided into three categories: initial acquaintance, familiarity, and stable. Different stages correspond to different cooling-off coefficients. The initial acquaintance stage has a short cooling-off time and more frequent active triggers to facilitate the rapid establishment of emotional connections; the stable stage has a longer cooling-off time and more restrained triggers to avoid making the user feel that it is programmed.
[0087] Aha—Memory Linkage and Completion: This is the key link connecting active triggers and memory content. It checks whether the previously selected active trigger memories have already appeared in the top-N results of regular semantic retrieval; if not, it fills in the specific content of the memory to ensure that when generating a response later, the model can see both the prompt "you should actively mention this matter" and the specific details of the matter, and will not fabricate it out of thin air.
[0088] Assemble the prompt: Organize user profiles, routine recall memories, actively triggered prompts, and corresponding memory content into system prompt words by region, and at the same time, match different types of triggers with corresponding tone and length requirements.
[0089] Response generation: The language model generates the final response based on the prepared prompts, naturally integrating the remembered content into the conversation, making the user feel that the robot has proactively recalled the relevant information.
[0090] like Figure 3 As shown, Figure 3 This is a flowchart illustrating the pattern coordination and scheduling process of an active memory triggering engine. It explains the complete workflow of the active memory triggering engine: first, multiple sets of triggering rules generate candidates in parallel, then a unified scheduling rule is used to filter them layer by layer, and finally the active triggering content to be executed in this round is selected, while the results are recorded to form a closed loop.
[0091] The process begins with the "current dialogue context," then proceeds to the parallel decision area within the dotted box. Ten independent trigger rules are set up here, each corresponding to a specific active trigger scenario. Each rule runs its own independent decision logic, producing corresponding candidate memories, as follows: The first row contains six: Time Echo (candidate C1), Detail Capture (candidate C2), Emotional Arc (candidate C3), To Be Continued (candidate C4), Return of Memory (candidate C5), Witness to Growth (candidate C6). The second row contains four: Shared Memory (candidate C7), Contrast Discovery (candidate C8), Longing in One's Heart (candidate C9), Active Topic (candidate C10). Each trigger is independent and can be added, deleted, or adjusted individually. Finally, all eligible candidates are aggregated and output.
[0092] All candidates are first aggregated into a total candidate pool, CandSet. Then, they undergo four layers of filtering in sequence, gradually narrowing the pool. Specifically: Cooling-off filtering: Candidates whose cooldown period for each trigger mode is not yet over are removed to prevent the same content from appearing repeatedly in a short period. Dynamic adjustment based on relationship stage: The strictness of the cooldown is dynamically adjusted based on the relationship stage between the user and the bot—relatively lenient during the initial acquaintance stage to ensure sufficient trigger frequency and quickly establish emotional connection; relatively strict during the stable stage to reduce triggers and avoid disturbing the user. Priority ranking: The remaining candidates are ranked using a comprehensive scoring rule, considering factors such as the relevance of the candidate to the current conversation, the rarity of the content, and whether it has been mentioned recently (penalty). Higher scores result in higher priority. Maximum limit per conversation: Candidates are selected from highest to lowest score, with a maximum of K candidates selected per round of conversation to control the total number of proactive triggers and prevent too much proactive content from being mentioned in a single conversation. After these four rounds of filtering, the final trigger candidates to be executed in this round are output. The selected trigger results are simultaneously written to the trigger history table. This serves as the basis for subsequent rounds of cooling-off judgment and repeated verification, allowing the entire scheduling rule to run continuously in a loop.
[0093] like Figure 4 As shown, Figure 4 This diagram illustrates the dynamic cooling-off period of a relationship stage, explaining the complete logic of "dynamically adjusting the cooling-off period of a relationship stage": the user's total active memory is used to determine the familiarity between the user and the robot, and then the original cooling-off time of the mode is converted into the actual effective cooling-off time through the cooling coefficient of the corresponding stage. The more unfamiliar the relationship and the less memory, the shorter the cooling-off time and the more frequent the active triggering. The more stable the relationship and the more memory, the longer the cooling-off time and the more restrained the triggering.
[0094] The core calculation process is as follows. The top section shows the complete calculation chain, divided into four steps from left to right: Step 1: Data Acquisition: The user's current total long-term active memory is used as the core basis for determining the relationship; Step 2: Determination Stage: ... , Two thresholds divide the relationship between users and robots into three stages: initial acquaintance, familiarity, and stability. The third step is to match the coefficient: each relationship stage corresponds to a unique cooling coefficient. The fourth step is to calculate the effective duration: multiply the original cooling duration of the trigger mode by the cooling coefficient of the current stage to obtain the actual effective cooling duration.
[0095] The middle section uses a horizontal axis to visually illustrate the stage division rules and corresponding coefficients. The horizontal axis represents a gradual increase in the total amount of information to be memorized from left to right. Initial learning stage: The total amount of information to be memorized is between 0 and 15 items. =15), with a cooling coefficient of 0.3. The actual cooling time is only 30% of the original value, with the most frequent active triggering, aiming to quickly establish an emotional connection with new users. Familiarization period: Total number of memorized items is between 15 and 50 ( =50), with a cooldown coefficient of 0.6. The actual cooldown time is 60% of the original value, with a moderate trigger frequency, balancing a sense of companionship and restraint. Stable period: when the total number of memories exceeds 50, the cooldown coefficient is 1.0. The original cooldown time is fully utilized, with the most restrained active triggering, avoiding frequent disturbance to familiar users and reducing the sense of routine.
[0096] The bottom provides a quantitative calculation formula: the effective cooldown time of a certain trigger mode = the base cooldown time of that mode × the relationship stage cooldown coefficient corresponding to the current total memory, thus putting the above logic into a directly executable calculation rule.
[0097] like Figure 5 As shown, Figure 5 This is a schematic diagram of Aha-memory item linkage and replenishment, used to describe the linkage and replenishment logic of actively triggered candidates and regular memory recall. The core is to solve the problem of "only telling the model to actively mention something, but not giving the corresponding memory details, causing the model to talk in generalities or even fabricate content". The whole process is a closed loop of judgment and replenishment.
[0098] The process has two independent input sources: conventional semantic retrieval, which performs semantic matching based on the user's current input to obtain a list of the top N memory results. This refers to the memory content that was originally retrieved passively. Selecting Aha candidates: These are the actively triggered entries ultimately chosen in the previous scheduling phase; each candidate corresponds to a specific associated memory. .
[0099] After aggregating the two sets of data, perform an existence check: determine the specific memory of this Aha candidate association. Has it already appeared in the memory list for regular recall? If it already exists: No additional processing is done; the original recall list is maintained. Unchanged. If it does not exist: remove this associative memory. Added to the recall list to form an expanded new recall list. This ensures that the corresponding memory content actively triggered can be obtained by the model.
[0100] The processed recall list, along with the Aha trigger prompt, will be injected into the system prompt words according to the partitioning rules. Ultimately, the language model will see two types of information simultaneously: first, the guiding prompt "you should actively bring up this matter in this round," and second, the specific memory facts corresponding to this matter, ensuring that the memory content in the response is accurate and truthful, and not arbitrary or unfounded.
[0101] like Figure 6 As shown, Figure 6 This is a schematic diagram of a device module, showing the complete modular composition of the companion robot's active memory triggering device, as well as the data flow relationship between each module. All functional units of the entire device are within the dashed box, corresponding to the physical implementation scheme of the method flow.
[0102] The long-term memory storage module serves as the data foundation for the entire device, storing three types of core data: user core profile memory, indexed itemized memory, and active trigger history. On one hand, it provides the active trigger engine with full memory data; on the other hand, it interacts bidirectionally with the semantic recall module—semantic recall retrieves memories from here for retrieval, and the trigger records generated during the process are also stored back here.
[0103] The semantic recall module is responsible for traditional passive memory retrieval: it matches the top N memories most relevant to the current input semantics from the long-term memory. Its results go in two ways: either they are fed into the linkage replenishment module for existence verification, or they directly participate in the final context assembly.
[0104] The active triggering engine module has multiple independent trigger sub-units built in, covering various triggering scenarios such as time, details, emotions, and regression. It filters candidate memories that meet the corresponding rules from the long-term memory bank in parallel and outputs the candidate results to the scheduling module in a unified manner.
[0105] The relationship stage perception module is used to count the total amount of active memories of users, determine the relationship stage based on this, calculate the corresponding cooling coefficient, and pass the parameters to the scheduling module to realize the dynamic adjustment of the cooling rules.
[0106] The priority / cooling scheduling module is the scheduling core of the entire device. It receives all candidates output by the active triggering engine, combines the cooling parameters of the relationship stage, and sequentially completes cooling filtering, priority sorting, single session trigger quantity limit, and finally selects the active triggering candidate to be executed in this round and passes it to the linkage feedback module.
[0107] The Aha-Memory Linkage and Replenishment Module is used to check whether the actively triggered memories selected by the schedule have appeared in the semantic recall results. If not, it adds the specific facts corresponding to the memory to ensure that the active prompts and memory content are bound together, and that there is no problem of "only giving directions but no details".
[0108] The injection assembly module is used to assemble the completed recall memories and active trigger prompts into structured system prompt words according to the partitioning rules, and output them to the language model.
[0109] The language model / response generation module receives the assembled prompts and generates the final dialogue response. Simultaneously, the trigger result of this round is written back to the trigger history of the long-term memory storage module, providing a basis for cooling-off judgments in subsequent rounds, forming a complete operational loop.
[0110] like Figure 7 As shown, this application also provides a companion interaction active memory triggering system based on a relationship stage perception model, including: The active triggering engine module 701 is used to build a decoupled and scalable parallel triggering architecture based on the long-term memory library. It predefines multiple types of triggers such as time echo, detail capture, and emotion arc, and configures exclusive candidate selection logic, basic priority and basic cooldown time for each trigger, and outputs multiple sets of memory candidates in parallel. The relationship stage perception module 702 is used to count the total number of active memory items of users as a stage judgment indicator, divide the initial stage, familiar stage and stable stage and match differentiated cooling coefficients. The general mode effective cooling time is calculated by multiplying the basic cooling time and the stage coefficient. The initial stage memory regression mode is specially adapted, the cooling coefficient is close to 0, and only the interaction interval is used as the trigger gate. The priority cooling unified scheduling module 703 is used to summarize all trigger candidates, perform cooling filtering and in-session memory deduplication in sequence, and calculate the comprehensive priority by combining semantic relevance, scarcity, and recent trigger penalty weighted calculation. It also extracts the Aha trigger entries of the current round according to the single session trigger limit and writes them to the trigger log for subsequent cooling verification. The Aha-Memory Linkage and Replenishment Module 704 is used to complete the regular semantic recall based on user input to obtain the top-N memory set, verify the existence of triggering candidate associated memories in the recall list one by one, and automatically add unmatched memories to generate an extended recall set, thus connecting the active triggering and passive semantic recall links and eliminating the problem of the separation between prompts and facts. The graded prompt assembly and response generation module 705 is used to grade the triggering mode according to the intensity of perception and configure the corresponding tone, length and restraint constraints. It organizes the extended recall memory and trigger guidance prompts into system prompt words and injects them into the language model to generate response text with emotional layers and in line with the human-computer companionship relationship.
[0111] A companion interaction active memory triggering device based on a relationship stage perception model is provided. The device is used to execute executable instructions to perform the aforementioned companion interaction active memory triggering method based on a relationship stage perception model.
[0112] A computing device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute any of the companion interaction active memory triggering methods based on a relationship stage perception model.
[0113] The methods and / or embodiments in this application 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 flowchart. When the computer program is executed by a processing unit, it performs the functions defined in the methods of this application.
[0114] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium or a computer-readable storage medium, 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 application, a computer-readable medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0115] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application.
Claims
1. A method for triggering active memory in companionship interaction based on a relationship stage perception model, characterized in that, include: Based on a pre-defined long-term memory library, an independent multi-mode active triggering engine is built. Predefined triggers include time echo, detail capture, and emotional arc. Each type of trigger is configured with independent candidate selection logic, basic priority, and basic cooldown time. Each trigger runs in parallel, is decoupled, and is scalable. The system tracks the total number of active user memories online, perceives the stage of the human-computer relationship, and dynamically adjusts cooling parameters. Using the number of active memory entries as a proxy indicator, the relationship is divided into the initial acquaintance stage, the familiarity stage, and the stable stage, and a differentiated cooling coefficient is matched. The effective cooling time for each mode is the product of the basic cooling time and the stage coefficient. The memory regression mode is specially processed in the initial acquaintance stage, with a cooling coefficient close to 0, and the interaction interval is used as the trigger gate. Multiple triggers generate candidates in parallel, and the Aha trigger set for this round is output through unified scheduling. After all candidates are aggregated, cooling filtering and in-session deduplication are performed in sequence. The comprehensive priority is calculated by combining semantic relevance, scarcity, and recent trigger penalty. The final trigger entries are selected by sorting according to the trigger limit per session, and the trigger log is recorded for subsequent cooling determination. Execute Aha-memory linkage replenishment to connect the active triggering and semantic recall links. Based on the current user input, complete the regular semantic recall to obtain the top-N memory set. Verify whether the specific memory associated with each trigger candidate is already in the recall set. If not, it will be automatically added to form an expanded recall set to avoid the separation between trigger prompts and memory facts. Trigger patterns are categorized by perceived intensity, and differentiated tone, length, and restraint guidelines are matched. Extended recall memories and trigger prompts are then injected into system prompt words by type, driving the language model to generate hierarchical companion responses.
2. The method for triggering active memory in companionship interaction based on a relationship stage perception model according to claim 1, characterized in that, The system tracks the total number of active user memories online, perceives the stage of the human-computer relationship, and dynamically adjusts cooling parameters. Using the number of active memory entries as a proxy indicator, the relationship is divided into initial acquaintance, familiarity, and stable stages, with differentiated cooling coefficients applied. The effective cooling time for each mode is the product of the base cooling time and the stage coefficient. The "Remembering Regression" mode undergoes special processing during the initial acquaintance stage, with a cooling coefficient close to 0, and is triggered solely by the interaction interval. This includes: The system counts the total number of active memory entries in the target user's long-term memory bank online. It uses the number of active memory entries as a proxy indicator of the human-computer relationship stage, presets the threshold range of the number of active entries corresponding to the initial acquaintance stage, familiarity stage, and stable stage, automatically determines the current relationship stage of the user, and outputs the relationship stage identifier and the basic cooling parameter set of the full trigger mode. Establish a mapping rule between relationship stages and cooling coefficients, match differentiated cooling coefficients for the three relationship stages respectively, perform a product operation on the base cooling duration of each trigger mode and the corresponding cooling coefficient of the current stage, calculate the effective cooling duration of each general trigger mode, and generate a set of effective cooling parameters for general modes; Special calibration is performed for the initial recognition period of the recall trigger mode. When the user is determined to be in the initial recognition period, the cooling coefficient of the mode is adjusted to close to 0, so that the effective cooling time is close to 0. At the same time, the trigger gate condition is adjusted to the interval from the last interaction ≥ 24 hours. The general cooling parameter calculation rules are used in the non-initial recognition period. Finally, the configuration of the effective cooling parameters and the trigger judgment rules for all modes are output.
3. The method for triggering active memory in companionship interaction based on a relationship stage perception model according to claim 1, characterized in that, Multiple triggers are generated in parallel to create candidates. A unified scheduling process outputs the current round's Aha trigger set. All candidates are then aggregated and sequentially subjected to cooling-off filtering and in-session deduplication. A comprehensive priority is calculated based on semantic relevance, scarcity, and recent trigger penalty. The final trigger entries are selected by sorting according to the trigger cap per session, and trigger logs are recorded for subsequent cooling-off determination, including: The candidate set output by each independent trigger in parallel is summarized. Each candidate contains an associated memory entry and a corresponding trigger context prompt. The user's historical trigger records and in-session trigger status are read. Mode-level cooldown verification and in-session memory deduplication are performed in sequence. All candidates corresponding to modes that have not reached the effective cooldown time, as well as memory entries that have been actively triggered in this session, are removed to generate the effective candidate set for this round. Construct a comprehensive priority scoring rule, using the basic priority of each triggering mode as the scoring base, and match three evaluation dimensions for each valid candidate: semantic relevance, trigger scarcity, and recent reference penalty. Calculate the comprehensive priority score of each candidate by weighting it according to preset weight coefficients, and sort the candidates in descending order of score to generate a sorted candidate list. Based on the preset maximum trigger count threshold per session, the candidate list is truncated to determine the final Aha trigger entries for this round. Simultaneously, the trigger mode, associated memory identifier, and trigger time are written to the trigger history log for subsequent cooldown determination and session deduplication. The final Aha trigger set for this round is then output.
4. The method for triggering active memory in companionship interaction based on a relationship stage perception model according to claim 3, characterized in that, The Aha-memory linkage replenishment is executed, connecting the active triggering and semantic recall links. Based on the current user input, a top-N memory set is obtained through regular semantic recall. It verifies whether the specific memory associated with each trigger candidate is already in the recall set; if not, it is automatically added to form an expanded recall set, avoiding a disconnect between trigger prompts and actual memory facts. This includes: Based on the current user input, a regular semantic recall is performed on the long-term memory bank. The recall score is calculated by combining vector similarity, dynamic memory strength and typified half-life timeliness. The top-N memory entries are truncated in descending order of the score to generate the basic recall memory set for this round. Establish a linkage verification rule between Aha trigger candidates and recall memories. Iterate through all Aha trigger candidates finally determined in this round, verify whether the specific memory entries associated with each candidate exist in the basic recall set, and output the hit judgment result and the list of memories to be added for each candidate. Automatic appending is performed on the memory entries in the supplementary list, adding them to the basic recall set to form an expanded recall memory set. This ensures that the memory facts corresponding to the actively triggered prompts are synchronously included in the visible context of the language model, and the expanded recall set is output for subsequent partition injection and assembly.
5. The method for triggering active memory in companionship interaction based on a relationship stage perception model according to claim 4, characterized in that, Trigger patterns are categorized by perceived intensity, and differentiated tone, length, and restraint guidelines are matched accordingly. Extended recall memories and trigger cues are then injected into system prompts by type, driving the language model to generate hierarchical companion responses, including: Establish a trigger pattern perception intensity grading system, divide various trigger patterns into five intensity levels according to the strength of user perception, match each level with differentiated tone style, length constraints and expression restraint rules, form a graded injection template library, and reuse corresponding expression norms for trigger patterns of the same level. The extended recall memory set and the current round of Aha trigger prompts are divided into zones and categorized. Specific memory facts are assigned to the recall memory zone, and trigger guidance instructions and corresponding tone restraint instructions are assigned to the Aha trigger prompt zone. The content is organized according to the preset zone format, and structured system prompt words are generated and injected into the material. By injecting regionalized system prompts into the context of the language model, the model is guided to generate responses based on accurate memory of facts and in accordance with the expression rules of corresponding intensity levels, outputting companion-style dialogue content with clear emotional layers and accurate and natural details.
6. A companion interaction active memory triggering system based on a relationship stage perception model, characterized in that, The system is used to execute executable instructions to perform the companion interaction active memory triggering method based on the relationship stage perception model as described in any one of claims 1 to 5.
7. A companion interaction active memory triggering device based on a relationship stage perception model, characterized in that, The device is used to execute executable instructions to perform the companion interaction active memory triggering method based on the relationship stage perception model as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, include: First processor; And a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the companion interaction active memory triggering method based on the relationship stage perception model according to any one of claims 1 to 5 by executing the executable instructions.
9. A computing device, the device comprising a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein, When the computer program instructions are executed by the processor, the device is triggered to execute the companion interaction active memory triggering method based on the relationship stage perception model as described in any one of claims 1 to 5.