Robot interaction method and device based on multi-user memory management, equipment and medium

By generating interactive memory text and setting shared attributes, combined with user profile updates and multi-database retrieval, the problems of identity recognition and redundancy in robot memory management in multi-user scenarios are solved, achieving efficient multi-user interactive management and personalized response.

CN122332394APending Publication Date: 2026-07-03DIGITAL HUAXIA (SHENZHEN) TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610797024.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing robot memory management systems cannot distinguish user identities in real time in multi-user scenarios, leading to personal memory confusion and response errors. Furthermore, the memory bank is redundant and has low retrieval efficiency, affecting interaction efficiency and user experience.

Method used

By generating interactive memory text based on user identifiers, setting shared attributes, and distributing the data to shared or personal memory vector libraries, combined with user profile updates and multi-library retrieval, the system achieves hierarchical management of memory content permissions and personalized responses.

Benefits of technology

It achieves the isolation and dedicated management of user interaction data, improves the consistency and personalization of interaction, and enhances the efficiency of robot interaction and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332394A_ABST
    Figure CN122332394A_ABST
Patent Text Reader

Abstract

This application discloses a robot interaction method, apparatus, device, and medium based on multi-user memory management, relating to the field of intelligent interaction technology. The method includes: upon receiving a target interaction instruction, determining the target interaction information and user identifier, and generating interaction memory text; determining the shared attributes of the interaction memory text and updating a preset memory metadata database; storing memory metadata for each interaction memory text, including shared attributes; storing the interaction memory text in a preset memory vector library according to the shared attributes, and updating the target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier; performing memory retrieval on the preset memory metadata database and memory vector library based on the user identifier and target interaction information, while simultaneously loading the updated target user profile; and responding to the target interaction instruction using the retrieval results and the updated target user profile.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent interaction technology, and in particular to robot interaction methods, devices, equipment and media based on multi-user memory management. Background Technology

[0002] With the deep integration of embodied AI and Large Language Model (LLM) technologies, service robots have gradually evolved from simple task execution tools into intelligent companions with natural language interaction capabilities. In long-term robot interaction scenarios, Long Short-Term Memory (LSTM) management systems have become a core technology module to overcome the limitations of large model context windows and achieve personalized services. Existing robot memory management systems are typically built on a Retrieval Augmented Generation (RAG) architecture, generally employing a vector database + embedding model approach. In typical scenarios where multiple users share robotic devices (such as smart home screens and collaborative office robots), the robot cannot distinguish user identities in real time, leading to confusion in personal memories (e.g., misjudging user A's preferences as user B's) and incorrect responses (e.g., sending task reminders to the wrong user), severely undermining the credibility and usability of the robot service. In system architectures where multiple users' personal memories are strictly isolated, tasks, notifications, or to-do items involving multi-party collaboration cannot be accurately and securely transmitted to the target user's memory space while ensuring privacy boundaries. Existing memory banks mostly adopt a linear append-based log storage strategy, which makes the memory bank redundant and static over time, resulting in low retrieval efficiency and inconsistent answers.

[0003] In conclusion, optimizing the multi-user memory management method for robots to improve their interaction efficiency and user experience is a problem that urgently needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a robot interaction method, apparatus, device, and medium based on multi-user memory management, which can optimize the multi-user memory management method of robots to improve the interaction efficiency and user experience of robots. The specific solution is as follows: Firstly, this application provides a robot interaction method based on multi-user memory management, applied to a target robot, including: Upon receiving the target interaction instruction, the target interaction information and user identifier corresponding to the target interaction instruction are determined, and based on the target historical interaction information corresponding to the user identifier and the target interaction information, the interaction memory text of this interaction is generated. The shared attributes of the interactive memory text are determined, and the preset memory metadata database is updated through the interactive memory text; the shared attributes are attributes that characterize whether the interactive memory text is allowed to be shared; the preset memory metadata database is used to store the memory metadata of each interactive memory text, including the shared attributes; The interactive memory text is stored in a preset memory vector library according to the shared attributes, and the target user profile corresponding to the user identifier is updated to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier; Based on the user identifier and the target interaction information, memory retrieval is performed on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database to obtain the corresponding retrieval results, and the updated target user profile is loaded while performing memory retrieval. Using the search results and the updated target user profile, an interactive response is performed to the target interaction command.

[0005] Optionally, generating the interaction memory text for this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information includes: Obtain the target historical interaction information corresponding to the user identifier; Semantic analysis is performed on the target historical interaction information and the target interaction information using a target large language model to generate context-injected text for this interaction and retrieval-optimized text for memory vector retrieval; the interaction memory text includes the context-injected text and the retrieval-optimized text. Accordingly, the process of storing the interactive memory text into a preset memory vector library according to the shared attribute includes: If the interactive memory text includes the search-optimized text, then the search-optimized text is determined as the target vector generation text; if the interactive memory text does not include the search-optimized text, then the context-injected text is determined as the target vector generation text. The target vector is used to generate text, and the target feature vector of the interactive memory text is generated. The target feature vector is normalized to obtain a processed target feature vector, and the processed target feature vector is stored in a preset memory vector library.

[0006] Optionally, determining the shared attributes of the interactive memory text and updating the preset memory metadata database through the interactive memory text includes: The sharing attributes of the interactive memory text are determined according to preset privacy classification rules; Generate a corresponding memory identifier for the interactive memory text, and encapsulate the interpersonal association list, the shared attributes, the user identifier, and the timestamp of the interactive memory text to obtain the target memory metadata; The preset memory metadata database is updated using the target memory metadata.

[0007] Optionally, storing the interactive memory text into a preset memory vector library according to the shared attribute includes: If the shared attribute indicates that the interactive memory text can be shared, then the interactive memory text is stored in the shared memory vector library; If the shared attribute indicates that the interactive memory text is not allowed to be shared, then the interactive memory text is stored in the target personal memory vector library; Accordingly, after storing the interactive memory text into a preset memory vector library according to the shared attribute, the method further includes: The similarity of each memory vector stored in the preset memory vector library is calculated to obtain the corresponding memory similarity. If there is a memory vector pair in the preset memory vector library whose memory similarity is higher than the preset memory similarity threshold, then the first memory vector and the second memory vector in the memory vector pair are determined; the memory timestamp of the first memory vector is greater than the memory timestamp of the second memory vector. The first memory vector is used to overwrite the second memory vector, and the preset memory metadata database is updated synchronously.

[0008] Optionally, updating the target user profile corresponding to the user identifier to obtain the updated target user profile includes: Determine the current user profile corresponding to the user identifier, and after obtaining user authorization, extract the target historical interaction information and the user's personalized information from the target interaction information; Based on the information characteristics of the user's personalized information, the current user profile is updated using an incremental update method or an exponential moving average algorithm to obtain the updated target user profile. Determine the interest intensity score of user preferences in the updated target user profile, and use a preset exponential decay formula to decay the interest intensity score to obtain the decayed interest intensity score; If a target user preference exists in the user preferences, then the target user preference is removed from the updated target user profile; the target user preference is the user preference whose interest intensity score after decay is lower than a preset interest intensity score threshold.

[0009] Optionally, the step of performing memory retrieval on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database based on the user identifier and the target interaction information to obtain corresponding retrieval results includes: The preset memory metadata database is traversed to match the user identifiers and obtain a first candidate memory set; the first candidate memory set includes memories whose shared attribute indicates that they can be shared and whose interpersonal association list contains the user identifiers. Generate a target retrieval vector for the target interaction information, and perform semantic similarity matching on the target personal memory vector library and the shared memory vector library based on the target retrieval vector to obtain a second candidate memory set; The first candidate memory set and the second candidate memory set are organized to obtain the corresponding retrieval results.

[0010] Optionally, the step of using the search results and the updated target user profile to respond to the target interaction command includes: The updated target user profile is formatted and injected into a preset system prompt word template to obtain the target system prompt word; The search results are injected into a preset user suggestion template to obtain target user suggestion words; The target system prompt, the target user prompt, and the target interaction information are input into a preset interaction response model, so as to use the obtained output results to perform an interaction response to the target interaction command.

[0011] Secondly, this application provides a robot interaction device based on multi-user memory management, applied to a target robot, comprising: The text generation module is used to determine the target interaction information and user identifier corresponding to the target interaction instruction after receiving the target interaction instruction, and generate the interaction memory text of this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information. The metadata database update module is used to determine the sharing attributes of the interactive memory text and update the preset memory metadata database through the interactive memory text; the sharing attributes are attributes that characterize whether the interactive memory text is allowed to be shared; the preset memory metadata database is used to store the memory metadata of each interactive memory text, including the sharing attributes; The profile update module is used to store the interactive memory text into a preset memory vector library according to the shared attributes, and update the target user profile corresponding to the user identifier to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier; The profile loading module is used to perform memory retrieval on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database based on the user identifier and the target interaction information, respectively, to obtain the corresponding retrieval results, and load the updated target user profile while performing the memory retrieval; The interactive response module is used to respond to the target interactive command by utilizing the search results and the updated target user profile.

[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned robot interaction method based on multi-user memory management.

[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned robot interaction method based on multi-user memory management.

[0014] In this application, upon receiving a target interaction instruction, the target interaction information and user identifier corresponding to the target interaction instruction are determined. Based on the target historical interaction information corresponding to the user identifier and the target interaction information, an interaction memory text for this interaction is generated. The sharing attribute of the interaction memory text is determined, and a preset memory metadata database is updated using the interaction memory text. The sharing attribute is an attribute that characterizes whether the interaction memory text is allowed to be shared. The preset memory metadata database is used to store the memory metadata of each interaction memory text, including the sharing attribute. The interaction memory text is stored in a preset memory vector library according to the sharing attribute, and the target user profile corresponding to the user identifier is updated to obtain an updated target user profile. The preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier. Based on the user identifier and the target interaction information, memory retrieval is performed on the preset memory metadata database, the target personal memory vector library, and the shared memory vector library respectively to obtain corresponding retrieval results. The updated target user profile is loaded while performing the memory retrieval. An interactive response is performed on the target interaction instruction using the retrieval results and the updated target user profile. As can be seen from the above, after receiving the target interaction command, the target robot of this application determines the corresponding target interaction information and user identifier, generates interaction memory text by combining the user's target historical interaction information and the current target interaction information, determines the shared attribute of the interaction memory text and updates the preset memory meta-database accordingly, stores the interaction memory text in the shared memory vector library or the target personal memory vector library of the corresponding user according to the shared attribute, and updates the target user profile corresponding to the user identifier to obtain the updated target user profile. Then, based on the user identifier and the target interaction information, it synchronously performs memory retrieval on the preset memory meta-database, the target personal memory vector library and the shared memory vector library and loads the updated target user profile. Finally, it combines the retrieval results and the updated user profile to complete the interactive response to the target interaction command.In this way, through the process described above in this application, after receiving the interaction instruction, the interaction information and user identifier are determined, enabling the binding of interaction behavior with a unique user identity, achieving the isolation and exclusive management of user interaction data; by combining the target's historical interaction information with the current interaction information to generate interaction memory text, the user's dialogue context and historical preferences can be continued, allowing the memory content to have complete temporal correlation; by setting sharing attributes for the interaction memory text and distinguishing whether it is shared or not, hierarchical control of the access rights of the memory content can be achieved, taking into account both personal privacy isolation and public memory sharing and reuse; by synchronously updating the memory metadata database through the interaction memory text, the metadata and sharing attributes of each memory can be completely retained, providing a basis for subsequent retrieval and permission verification; and the data is distributed and stored to the personal memory vector according to the sharing attributes. A shared memory vector library enables categorized and hierarchical storage of memory data, improving storage organization and retrieval efficiency. After generating memory text, user profiles are updated iteratively and synchronously, allowing for the real-time accumulation of user preferences, interaction habits, and other characteristics, ensuring the profiles remain up-to-date. Joint memory retrieval across multiple databases, with simultaneous loading of the latest user profiles, takes into account individual memories, shared public memories, and real-time user characteristics, fully leveraging contextual information. The fusion of retrieval results and updated user profiles facilitates interactive responses, ensuring that replies align with users' historical habits, current interaction context, and personalized characteristics, enhancing the coherence, personalization, and intelligent adaptation of interactions. This, in turn, optimizes the robot's multi-user memory management methods to improve the robot's interaction efficiency and user experience. Attached Figure Description

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

[0016] Figure 1 This is a flowchart of a robot interaction method based on multi-user memory management disclosed in this application; Figure 2 This is a schematic diagram of the system architecture of a robot interaction method based on multi-user memory management disclosed in this application; Figure 3 This is a schematic diagram of the structure of a robot interaction device based on multi-user memory management disclosed in this application; Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

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

[0018] In long-term robot interaction scenarios, long short-term memory (LSTM) management systems have become a core technology module to overcome the limitations of large model context windows and achieve personalized services. Existing robot memory management systems are typically built on a retrieval-enhanced generative architecture, generally employing a vector database + embedded model approach. In typical scenarios where multiple users share robot devices (such as smart home screens and collaborative office robots), the robot cannot distinguish user identities in real time, leading to personal memory confusion (e.g., misjudging user A's preferences as user B's) and response errors (e.g., sending task reminders to the wrong user), severely weakening the credibility and usability of robot services. In system architectures where multiple users' personal memories are strictly isolated, tasks, notifications, or to-do items involving multi-party collaboration cannot be accurately and securely transmitted to the target user's memory space while ensuring privacy boundaries. Existing memory banks mostly adopt a linear append-based log storage strategy, which leads to redundancy and static characteristics over time, resulting in low retrieval efficiency and inconsistent responses.

[0019] To overcome the aforementioned technical problems, this application provides a robot interaction method based on multi-user memory management, which can optimize the robot's multi-user memory management method to improve the robot's interaction efficiency and user experience.

[0020] See Figure 1 As shown, this embodiment of the invention discloses a robot interaction method based on multi-user memory management, applied to a target robot, including: Step S11: After receiving the target interaction instruction, determine the target interaction information and user identifier corresponding to the target interaction instruction, and generate the interaction memory text of this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information.

[0021] In this embodiment, upon receiving the target interaction command, the target interaction information input by the user is determined, and the identity authentication module is invoked to perform facial recognition, lock the current user ID, and obtain a user identifier. Subsequently, the semantic analysis and privacy triage module intervenes, combining the target historical interaction information associated with the user identifier and the target interaction information to generate the interaction memory text corresponding to this interaction. The target historical interaction information consists of recent messages, serving as the analysis context.

[0022] It should be noted that, addressing the pain points of current robot memory management methods, such as single user identity recognition, complete isolation of multi-user memories, static and redundant memories, and a single triggering mechanism leading to poor robot interaction experience, this application provides a robot interaction method based on multi-user memory management, such as... Figure 2The diagram shows a system architecture diagram of a robot interaction method based on multi-user memory management provided in this application. It is implemented based on a memory management system with identity awareness, privacy triage, and self-evolution capabilities. The system architecture mainly includes the following core functional modules: Multimodal input and identity authentication module: configured to receive multimodal user messages and integrate a biometric recognition unit (such as face recognition). This module uses biometric recognition (such as face recognition) to replace traditional account login, binding the current interactive user ID in real time. It is responsible for confirming the unique identity (User ID) of the current interactive user in real time during the session initiation phase, providing a basis for subsequent memory isolation and permission verification; Semantic analysis and privacy triage module: It has a built-in Large Language Model (LLM) processor, using recent historical messages as input context. This module is configured with structured prompt word templates and privacy classification rules. It is responsible for the overall semantic analysis of historical dialogue context, executing a "dual text separation strategy" to generate "high-density factual text" for context injection and "optimized tag text" for vector retrieval. Simultaneously, it determines the sharing attributes (shareable / non-shareable) of information based on content attributes, deciding the data routing direction. A dual-track heterogeneous storage module includes a shared knowledge base and a personal memory bank. A dual-track storage architecture is constructed, including a private personal memory bank and a shared memory bank for multiple users. Data is physically or logically isolated based on user identity, achieving privacy protection from the storage layer. The shared knowledge base is built based on a vector database, storing collaborative information, public notifications, and task assignments marked as "shareable," supporting cross-user access permissions. The personal memory bank stores event memories, opinions, and user profile data marked as "non-shareable." Each memory is encapsulated with a globally unique identifier, user isolation identifier, interpersonal relationship list (People List), and timestamp metadata. A memory evolution and profile management engine is responsible for the lifecycle management of the memory bank, implementing a dynamic memory update strategy. This includes conflict resolution mechanisms (timestamp-based overwriting of old and new memories), forgetting decay mechanisms (interest weight decay based on exponential moving average algorithm), and periodic summary mechanisms (compressing fragmented conversations into stable personality traits) to ensure the timeliness and consistency of the memory bank. A conflict resolution unit is configured, employing a timestamp-first strategy to handle conflicts between old and new memories; a profile update unit is configured, using a "only increase, no decrease" strategy for static profiles, employing an exponential moving average algorithm for weighted fusion of dynamic interests, and performing forgetting cleanup based on exponential decay laws to achieve dynamic evolution of user profiles; a hybrid triggering and dual-database retrieval engine is configured to support two independent triggering and retrieval modes. Mode 1 (Interpersonal association triggering): matching is performed based on the interpersonal association list (People List) in the memory metadata. Mode 2 (Dual-database vector retrieval): vector similarity calculations are performed in parallel or selectively in the shared knowledge base and the personal memory bank. Abandoning single semantic retrieval, a hybrid retrieval chain of hard rule filtering + vector semantic retrieval + re-ranking is adopted.Hard rules pre-validate user permissions and relationship chains, while vector retrieval ensures semantic generalization. Event / relationship triggers are introduced, based on a people list and temporal context, to proactively recall memories and initiate interactions under specific conditions. A dynamic context building module employs a separate context injection strategy to assemble data before response generation. A dual-channel injection mechanism is used: channel one injects a structured user profile (preferences, style constraints), formatting it into system prompts to constrain response style; channel two injects retrieved memory fragments (facts, to-dos), formatting them into user prompts to provide factual support. Both are independently encoded and then merged into a larger model, driving the LLM to generate personalized responses, ensuring that replies conform to the user's personalized style while being based on accurate historical facts.

[0023] It should be noted that the process of generating the interaction memory text for this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information is as follows: Obtain the target historical interaction information corresponding to the user identifier; perform semantic analysis on the target historical interaction information and the target interaction information using a target large language model to generate context-injected text and retrieval-optimized text for memory vector retrieval; the interaction memory text includes the context-injected text and the retrieval-optimized text. That is, obtaining the target historical interaction information corresponding to the user identifier involves extracting recent historical messages as the analysis context, using a target large language model and pre-set structured prompts to perform semantic analysis on the target historical interaction information and the target interaction information, to comprehensively analyze the historical dialogue context, extract objective facts and subjective opinions, and generate two sets of data: context-injected text for context injection and retrieval-optimized text for memory vector retrieval. It should be further noted that the template for the structured prompts includes the following technical constraints: Role definition: The large language model is defined as a "dialogue data structuring and opinion mining engine," clearly defining the task boundary as extracting complete information fragments and mining user opinions. Dual-text separation strategy: Context-injected text: Requires both objective facts (time, place, people, events) and subjective expressions (feelings, attitudes, evaluations, speculations), with high information density and completeness, for subsequent direct injection into the model context. Retrieval-optimized text: Requires generating topic tags plus coherent paragraphs. Even if users express implicit opinions, explicit viewpoints are expressed using phrases such as "user thinks," "user feels," and "user tends," specifically for vector space clustering. Privacy classification rules: Conditions marked as shareable: Involving multi-party collaboration, public announcements, task assignments, meeting arrangements, decision conclusions, and user-submitted feedback. Conditions marked as non-shareable: Personal emotional expressions, details of private life, private complaints, immature ideas, purely casual conversation, and personal preferences. In this way, this embodiment generates interactive memory text by combining the user's target historical interaction information with the current interaction information. It can link the user's past dialogue context, behavioral preferences and current interaction content, so that the generated interactive memory text has temporal coherence and contextual relevance, providing a memory foundation for subsequent interactions. It generates context-injected text and retrieval-optimized text separately, one type adapting to dialogue context continuation injection and the other type adapting to vector library semantic retrieval scenarios, adapting to different business call requirements. It introduces facial recognition technology to replace the single account login mechanism. In scenarios where multiple people share devices, the system can confirm the identity of the current interactive user in real time and without being noticed, fundamentally avoiding personal memory confusion and response errors caused by the lack of identity recognition.

[0024] Step S12: Determine the sharing attribute of the interactive memory text, and update the preset memory metadata database through the interactive memory text; the sharing attribute is an attribute that characterizes whether the interactive memory text is allowed to be shared; the preset memory metadata database is used to store the memory metadata of each interactive memory text, including the sharing attribute.

[0025] In this embodiment, the sharing attribute (shareable / non-shareable) of the interactive memory text is determined to determine whether the interactive memory text is allowed to be shared. At the same time, the interactive memory text is used to update the preset memory metadata database, which is used to store the memory metadata of each interactive memory text, and the metadata includes the corresponding sharing attribute.

[0026] Specifically, the shared attributes of the interactive memory text are determined according to preset privacy classification rules; a corresponding memory identifier is generated for the interactive memory text, and the interpersonal association list, the shared attributes, the user identifier, and the timestamp of the interactive memory text are encapsulated to obtain target memory metadata; the preset memory metadata is then used to update the preset memory metadata database. That is, the shared attributes of the interactive memory text are determined according to preset privacy classification rules, a globally unique memory identifier is generated for the interactive memory text, and metadata information such as the interpersonal association list, the shared attributes (privacy triage flag is_shareable), the user identifier or name user_id, the creation timestamp, original_context_snippet used for injection context, and embedding_summary used for vector generation are encapsulated into target memory metadata, and the preset memory metadata is then used to update the preset memory metadata database. The metadata format is as follows: { "user id": string, "is_shareable": boolean, "people list": [string], "original_context_snippet": string, "embedding_summary": string, "memory id": string, } In this way, this embodiment configures shared attributes independently for interactive memory texts, enabling fine-grained definition of sharing permissions for each interactive memory. This achieves hierarchical control over private personal memories and shareable public memories, ensuring user privacy and security. A pre-set memory metadata database is built to store memory metadata, allowing for unified management of all interactive memories and centralized retention of each memory's basic attributes and sharing permission identifiers. A unique memory identifier is generated for each interactive memory text, enabling precise location and unique traceability of a single memory, facilitating subsequent retrieval, management, and version maintenance. While ensuring privacy boundaries, tasks, notifications, or to-do items involving multi-party collaboration are routed to a shared knowledge base. Through metadata encapsulation of interpersonal relationship lists, secure cross-user information transmission is achieved, enabling the robot not only to serve individuals but also to become a hub for team collaboration, improving collaboration efficiency in multi-user environments.

[0027] Step S13: Store the interactive memory text in a preset memory vector library according to the shared attribute, and update the target user profile corresponding to the user identifier to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier.

[0028] In this embodiment, data routing is performed based on the shared attributes of the interactive memory text, and the data is distributed and stored in a shared memory vector library or a target personal memory vector library corresponding to the user identifier. Simultaneously, the target user profile corresponding to the user identifier is updated, generating an updated target user profile. The target user profile includes static profile update items, dynamic interest update items, emotional state, rule requirements, and dialogue state. The static profile includes basic information items, long-term hobbies, and stable habits. Dynamic interests include recent interests or conversation topics extracted from the dialogue. Specific tags for static profile update items and dynamic interest update items are autonomously generated by the profile building model based on the dialogue fragments. Rule requirements represent specific requirements the user has for the robot's responses, including response style or specific catchphrases, while the dialogue state marks the dialogue intent of the segment.

[0029] It should be noted that the process of storing the interactive memory text in a preset memory vector library according to the sharing attribute is as follows: if the sharing attribute indicates that the interactive memory text can be shared, then the interactive memory text is stored in the shared memory vector library; if the sharing attribute indicates that the interactive memory text cannot be shared, then the interactive memory text is stored in the target personal memory vector library. That is, the storage is determined based on the sharing attribute of the interactive memory text: if it is determined to be shareable, it is stored in the shared memory vector library, ignoring user isolation restrictions; if it is determined to be non-shareable, it is stored in the target personal memory vector library of the corresponding user, and the current user ID is forcibly bound.

[0030] It should be further noted that, for the vector storage process, the stored content includes vector values ​​and associated metadata. Retrieval optimization: Privacy triage marking supports pre-filtering. When marked as shareable, retrieval requests can ignore user isolation conditions, enabling cross-user shared memory queries. The processing flow is as follows: If the interactive memory text includes the retrieval optimization text, then the retrieval optimization text is determined as the target vector generation text; if the interactive memory text does not include the retrieval optimization text, then the context-injected text is determined as the target vector generation text; using the target vector generation text, a target feature vector of the interactive memory text is generated; the target feature vector is normalized to obtain a processed target feature vector, and the processed target feature vector is stored in a preset memory vector library. That is, the retrieval optimization text is preferentially selected from the interactive memory text as the target vector generation text; if this field is empty, i.e., there is no retrieval optimization text, then the context-injected text is used as a fallback. The target feature vector of the interactive memory text is generated by generating text from the selected target vector, and then normalized to ensure that the vector lies on a unit hypersphere, thereby improving the stability and accuracy of subsequent cosine similarity calculation. The processed target feature vector is then stored in a preset memory vector library. The normalization process specifically includes: assuming the input feature vector is v = [v1, v2,..., vn]∈R... n First, calculate its L2 norm ||v||_2 = sqrt(v1) 2 + v2 2 + ... + vn 2 Then, an element-wise division operation v_hat_i = vi / ||v||_2 is performed to obtain the normalized vector v_hat. This operation is equivalent to projecting the original vector onto the unit hypersphere, eliminating the influence of the vector's absolute magnitude on subsequent calculations.

[0031] It is understandable that after storing the interactive memory text in a preset memory vector library, memory merging and conflict resolution can be performed. Similar memories are merged based on event relevance, and the process is as follows: The similarity of each memory vector stored in the preset memory vector library is calculated to obtain the corresponding memory similarity. If there is a pair of memory vectors in the preset memory vector library with a similarity higher than a preset memory similarity threshold, then the first memory vector and the second memory vector in the pair are identified. The memory timestamp of the first memory vector is greater than the memory timestamp of the second memory vector. The first memory vector is used to overwrite the second memory vector, and the preset memory metadata database is updated synchronously. That is, the similarity of all memory vectors in the preset memory vector library is calculated to obtain the memory similarity. Memory vector pairs with similarities exceeding a preset threshold are selected. When there is a conflict between new and old memories, the new first memory vector and the earlier second memory vector are distinguished by their memory timestamps. A "new overwrites old" strategy is executed, replacing the old second memory vector with the first memory vector, and the preset memory metadata database is updated synchronously.

[0032] It should be noted that the process of updating the target user profile corresponding to the user identifier to obtain the updated target user profile is as follows: Determine the current user profile corresponding to the user identifier, and after obtaining user authorization, extract the target historical interaction information and the user's personalized information from the target interaction information; based on the information characteristics of the user's personalized information, update the current user profile using incremental updates or an exponential moving average algorithm to obtain the updated target user profile; determine the interest intensity score of the user's preferences in the updated target user profile, and use a preset exponential decay formula to decay the interest intensity score to obtain a decayed interest intensity score; if the user preferences include a target user preference, remove the target user preference from the updated target user profile; the target user preference is the user preference whose decayed interest intensity score is lower than a preset interest intensity score threshold. That is, extract interest and habit information from the current conversation. For long-term interests, an exponential moving average algorithm is used to merge old and new scores; for dynamic interests, the exponential decay formula is periodically scanned and applied, and the interest is automatically removed when the score is lower than the threshold. The specific user profile update thread retrieves the dialogue history and the current user profile corresponding to the user identifier from the task queue. It then calls the user profile building model interface. With user authorization, it extracts personalized user information from the target historical interaction information and the target interaction information. Based on the personalized information characteristics, it updates the current user profile using an incremental update method or an exponential moving average algorithm, outputting a hierarchical structured updated profile, i.e., the updated target user profile. Specifically, incremental updates are performed on the static profile: Basic information: If a key does not exist, it is added; if it already exists, its original value is maintained to ensure stability. Long-term preferences: An exponential moving average algorithm is used to fuse new and old scores. The default weight for new information is 0.3 to avoid excessive influence of a single dialogue on long-term preferences. The corresponding fusion formula is as follows: S_new = α × S_input + (1 - α) × S_old; Wherein, S_new is the fused interest intensity score, ranging from [0.0, 1.0]; S_old is the historical interest intensity score before fusion, ranging from [0.0, 1.0]; S_input is the newly extracted interest intensity score in the current dialogue, ranging from [0.0, 1.0]; α is the new information weight coefficient (smoothing factor), ranging from (0.0, 1.0), with a default value of 0.3. Stable habits: only increases, never decreases, avoiding frequent changes. Time-aware fusion of dynamic profiles: a time-priority weighted fusion strategy is adopted: Interest intensity: the exponential moving average algorithm is used to fuse new and old scores, with a default new information weight of 0.3, avoiding excessive impact of a single dialogue on interest intensity. Emotional state: directly covered, as emotions have strong timeliness. Dialogue state: real-time synchronization of the latest topics and intentions. In addition, a forgetting strategy and automatic cleanup are implemented. Each update scans the interest dictionary in the dynamic profile. The decay of interest intensity over time follows an exponential decay law, and the expression for the preset exponential decay formula is as follows: S_new = S_old × e -λ × d ; Where S_new is the new interest intensity score after decay, with a value range of [0.0, 1.0]; S_old is the old interest intensity score before decay, with a value range of [0.0, 1.0]; e is the natural constant, approximately equal to 2.71828; λ (lambda) is the decay rate coefficient, controlling the forgetting speed, with a value range of (0.0, 1.0); d is the time interval in days, equal to the difference between the current date and the last updated date of the interest. Specifically, the interest intensity score of each user preference in the updated user profile is calculated, and the score is decayed using a preset exponential decay formula to obtain the decayed interest intensity score. If there is a target user preference whose decayed score is lower than a preset minimum threshold, it is automatically removed, realizing self-cleaning of the profile. In addition, an international standard organization format timestamp is added to each rule. In case of conflict, the timestamps are compared, and the new rule automatically overwrites the old rule. When timestamp parsing fails, a conservative overwrite strategy is adopted to avoid rule loss due to anomalies. After the profile is updated, the memory cache and persistent storage are updated simultaneously. The memory update ensures that subsequent requests take effect immediately, and the persistence ensures data reliability.In this way, this embodiment distinguishes between storing personal memory vectors and shared memory vectors based on shared attributes, physically or logically isolating personal memories from shared knowledge from the source. This achieves layered isolation and storage of interactive memories according to privacy permissions, ensuring the security of personal privacy data when multiple people share a device, and enhancing the credibility of the robot service and user security. The corresponding user profile is updated synchronously with memory storage, ensuring the user profile remains up-to-date with each interaction. Text generation is based on conditional selection of vectors, prioritizing the use of dedicated text for vector retrieval. If no dedicated text is available, context-injected text is automatically used as a fallback, ensuring stable generation of usable vectors in any scenario, with stronger adaptability and robustness. Normalization is performed on the target feature vector to ensure the vector lies on a unit hypersphere, eliminating the influence of the vector's absolute amplitude on subsequent calculations and improving the stability and accuracy of subsequent cosine similarity calculations. In case of memory conflicts, a new memory vector replaces the old one, ensuring the timeliness and consistency of information in the memory bank. It avoids information contradictions; it obtains user authorization before extracting personalized information, strictly adheres to privacy compliance requirements, and collects user interaction and personalized data within the legal authorization boundaries, ensuring user information security and compliance; it allows users to choose incremental updates or exponential moving average algorithms to adapt profile updates, flexibly adapting update strategies according to different information characteristics, achieving a smooth integration of new features while retaining effective features of historical profiles, avoiding sudden distortion of profiles; it sets interest intensity scores to quantitatively represent user preferences, transforming abstract user preferences into calculable numerical indicators, facilitating quantitative assessment of preference strength; it uses a preset exponential decay formula to decay interest intensity scores, simulating the natural fading of user interests over time, automatically weakening outdated preferences that have not been interacted with for a long time; it sets interest intensity score thresholds and removes low-scoring target user preferences, automatically cleaning up invalid and weakened expired preferences, simplifying user profile dimensions, making retained user preferences more in line with the user's current real needs, and improving the accuracy of subsequent personalized interactions and memory matching.

[0033] Step S14: Based on the user identifier and the target interaction information, perform memory retrieval on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database respectively to obtain the corresponding retrieval results, and load the updated target user profile while performing memory retrieval.

[0034] In this embodiment, based on the user identifier and the target interaction information, a multi-dimensional memory retrieval is performed on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database to obtain corresponding retrieval results. During the memory retrieval process, the updated target user profile is loaded in parallel (step S4), prioritizing reading from the memory cache; if the cache is missing, it is loaded asynchronously from persistent storage. Profile loading is independent of the retrieval process and does not block retrieval execution. After loading is complete, the system waits for the retrieval results and then enters the injection phase.

[0035] Understandably, when a user initiates a query or the system detects specific conditions, the system selects one of the following two triggering methods for memory retrieval based on the scenario: Method 1: Active triggering based on the People List. The system traverses the metadata of the memory bank and performs specific condition matching: a successful trigger is determined only if the privacy tag of the memory is shareable and the ID of the current user exists in the interpersonal association list (People List) of that memory. This method is mainly used for accurately pushing collaborative tasks or notifications involving the current user. Method 2: Dual-database query based on vector retrieval. The system performs retrieval in two parts in parallel or independently: Shared knowledge base retrieval: Semantic similarity matching is performed in the global shared vector database without verifying user identity, obtaining public collaborative information. Personal memory database retrieval: Semantic similarity matching is performed in the personal vector database subspace corresponding to the current user, strictly verifying user isolation identifiers, obtaining private memory information. After deduplication and re-sorting, the retrieval results form the final candidate memory set.

[0036] It should be noted that the processing flow for memory retrieval to obtain the corresponding retrieval results is as follows: The preset memory metadata database is traversed to match the user identifier, resulting in a first candidate memory set; the first candidate memory set includes memories whose shared attribute representation allows sharing and whose interpersonal association list contains the user identifier; a target retrieval vector for the target interaction information is generated, and semantic similarity matching is performed on the target personal memory vector library and the shared memory vector library based on the target retrieval vector to obtain a second candidate memory set; the first candidate memory set and the second candidate memory set are organized to obtain the corresponding retrieval results. In other words, a hard rule matching condition is first performed, traversing the preset memory metadata database and performing a three-level condition check on each memory. Memory records that are allowed to be shared and whose interpersonal association list contains the user identifier are filtered out by the user identifier matching, forming a first candidate memory set. Specifically, the first-level shared attribute check is performed by reading the privacy triage flag field of the memory. Only memories marked as shareable proceed to the next level of check; non-shareable memories are skipped to ensure personal privacy isolation. Then, the second-level interpersonal association check is performed by extracting the interpersonal association list field of the memory and checking whether the current user identifier exists in the list. Only when the user is a designated participant is it considered a hard rule hit. The list only contains target individuals who need to relay messages or have pending assignments, avoiding interference from irrelevant personnel. In addition, a third-level additional filtering check can be performed. If the caller passes in additional filtering conditions, the user identifier field is excluded, and each item is compared. All additional conditions must be met for a match to be found. Multi-dimensional filtering based on event type, entity tag, and other dimensions is supported. To avoid insufficient final results due to filtering operations, an extended search strategy is adopted: actual search quantity = recall multiplied by the extension coefficient. The expansion coefficient defaults to five and can be dynamically adjusted according to recall requirements. Batch similarity calculation is performed using the vector index, returning a list of candidate results sorted in descending order of score. This generates the target retrieval vector for the target interaction information. Based on this retrieval vector, semantic similarity matching is performed in the target personal memory vector library and the shared memory vector library to obtain a second candidate memory set. Deduplication and filtering are then performed, and the first and second candidate memory sets are integrated and sorted. Specifically, it checks whether the candidate memory identifier already exists in the hard rule result set; if so, it is skipped. Additional conditions for non-user identifiers are checked first, followed by user identifier permission verification. User identifier verification uses a shared exemption strategy: if a memory is marked as shareable, the user identifier matching requirement is exempted; if it is marked as non-shareable, the user identifier is strictly matched to obtain vector retrieval results. Context-injected text fields are extracted from the vector retrieval results to construct a list of texts to be encoded. The encoding interface of the re-ranking model is called to generate document vectors in batches. The cosine similarity between the re-ranked query vector and each document vector is calculated, and the calculated fine-ranking score is updated to the score field of the result object.The vector search results list is sorted in descending order of the ranking score to ensure that highly relevant results are displayed first. The results with the highest recall count are then used as the final ranking output to form the final search results. In this way, this embodiment performs joint retrieval based on user identifiers binding multiple memory banks, which can simultaneously cover personal exclusive memories and public shared memories, broadening the data source range of memory retrieval and avoiding information omissions caused by searching a single database. Traversing the memory meta-database and filtering by multiple conditions such as user identifier, shared attributes, and interpersonal association lists can identify compliant and accessible memories from the perspective of permissions and association relationships, controlling the privacy permissions and access boundaries of memory retrieval from the source, and preventing unauthorized access to non-related memories. Based on the target retrieval vector, semantic similarity matching is performed in the personal and shared dual memory vector databases, which can overcome the limitations of keyword matching, recall historical memories with similar content from the semantic level, and improve the semantic relevance of the retrieval. Combining hard rule matching (whether it is shared, personnel association, additional filtering) and vector retrieval (semantic similarity), and introducing re-ranking and fine-tuning optimization, hard rule pre-filtering ensures permission compliance, vector retrieval ensures semantic generalization, and re-ranking ensures the relevance of the final results. The triggering mechanism based on interpersonal associations prevents unauthorized access to privacy, and can proactively provide reminders or services based on relationships or event associations when the user has not given explicit instructions, which significantly enhances the intelligent service level of the system.

[0037] Step S15: Using the search results and the updated target user profile, perform an interactive response to the target interaction command.

[0038] In this embodiment, after the retrieval is completed, the dynamic context construction module loads the latest user profile and the retrieval results of step S4 in parallel, and combines the retrieval results with the updated target user profile to generate and output the corresponding interactive response for the target interactive instruction (step S5).

[0039] Specifically, the updated target user profile is formatted and injected into a preset system prompt word template to obtain target system prompt words; the search results are injected into the preset user prompt word template to obtain target user prompt words; the target system prompt words, target user prompt words, and target interaction information are input into a preset interaction response model to use the output results to respond to the target interaction commands. That is, from the profile channel, the updated target user profile is formatted into natural language description, user preferences, habits, and rule requirements are formatted into natural language, injected into the role setting area of ​​the preset system prompt word template, and target system prompt words are generated, including basic preferences, interest tags, rule requirements, and other dimensions, which serve as global style constraints to guide response style and content boundaries. From the memory channel, the search results are formatted into reference context and injected into the end area of ​​the preset user prompt word template to generate target user prompt words. Each memory entry is accompanied by a timestamp and source marker, and arranged in descending order of relevance. This serves as a dynamic reference context, providing specific content support. Finally, the target system prompt, the target user prompt, and the target interaction information are input into a preset interaction response model. The model combines the information injected through the dual channels with the current user query to generate a response that is both consistent with the user's personality traits and has factual accuracy. The model outputs the response to the target interaction command. In this way, this embodiment simultaneously incorporates memory retrieval results into the generation of interactive responses, enabling the retrieval of users' historical interaction memories, related scene information, and compliant shared memories, thus ensuring that the response possesses complete contextual coherence and historical context continuity. Integrating the updated target user profile into the interactive response allows for adaptive expression and content matching to align with users' real-time preferences, behavioral characteristics, and personalized needs, avoiding generic and rigid replies. Formatting the updated target user profile before injecting it into the system prompt word template can organize fragmented user preferences and behavioral characteristics into standardized language that the model can recognize. System role settings constrain the model's output style and adaptation direction, ensuring that the response matches the user's individual characteristics. Injecting retrieval results into the user prompt word template integrates historical interaction memories and related contextual structures into the dialogue input, providing complete contextual memory support for the large model, enabling continuous dialogue with memory, and improving the personalization, contextual coherence, and naturalness of the interactive response. Dual-channel prompt word injection avoids interference from long contexts, ensuring that the final response conforms to user habits, is factually consistent and accurate, and improves the naturalness and satisfaction of human-computer interaction.

[0040] As can be seen from the above, after receiving the target interaction command, the target robot in this embodiment of the application determines the corresponding target interaction information and user identifier, generates interaction memory text by combining the user's target historical interaction information and the current target interaction information, determines the shared attribute of the interaction memory text and updates the preset memory meta-database accordingly, stores the interaction memory text in the shared memory vector library or the target personal memory vector library of the corresponding user according to the shared attribute, and updates the target user profile corresponding to the user identifier to obtain the updated target user profile. Then, based on the user identifier and the target interaction information, it synchronously performs memory retrieval on the preset memory meta-database, the target personal memory vector library and the shared memory vector library and loads the updated target user profile. Finally, it combines the retrieval results and the updated user profile to complete the interactive response to the target interaction command. In this way, through the above-described process of this application embodiment, after receiving the interaction instruction, the interaction information and user identifier are determined, which can bind the interaction behavior with the exclusive user identity, and realize the isolation and exclusive management of user interaction data; by combining the target historical interaction information and the current interaction information to generate interaction memory text, the user's dialogue context and historical preferences can be continued, so that the memory content has complete temporal correlation; by setting sharing attributes for the interaction memory text and distinguishing whether it is shared or not, the access control of memory content can be realized, taking into account both personal privacy isolation and public memory sharing and reuse; by synchronously updating the memory metadata database through the interaction memory text, the metadata and sharing attributes of each memory can be completely retained, providing a basis for subsequent retrieval and permission verification; and the data is distributed and stored according to the sharing attributes to the personal memory. A large-scale database or shared memory vector library enables categorized and hierarchical storage of memory data, improving storage organization and retrieval efficiency. After generating memory text, user profiles are updated iteratively and synchronously, allowing for the real-time accumulation of user preferences, interaction habits, and other characteristics, ensuring the profiles remain up-to-date. Joint memory retrieval across multiple databases, with simultaneous loading of the latest user profiles, takes into account individual memories, shared public memories, and real-time user characteristics, fully leveraging contextual information. The fusion of retrieval results and updated user profiles facilitates interactive responses, ensuring that replies align with users' historical habits, current interaction context, and personalized characteristics. This enhances the coherence, personalization, and intelligent adaptation capabilities of the interaction, thereby optimizing the robot's multi-user memory management methods to improve the robot's interaction efficiency and user experience.

[0041] Accordingly, see Figure 3 As shown in the illustration, this application also provides a robot interaction device based on multi-user memory management, applied to a target robot, comprising: The text generation module 11 is used to determine the target interaction information and user identifier corresponding to the target interaction instruction after receiving the target interaction instruction, and generate the interaction memory text of this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information. Metadatabase update module 12 is used to determine the sharing attribute of the interactive memory text and update the preset memory metadatabase through the interactive memory text; the sharing attribute is an attribute that characterizes whether the interactive memory text is allowed to be shared; the preset memory metadatabase is used to store the memory metadata of each interactive memory text, including the sharing attribute; The profile update module 13 is used to store the interactive memory text into a preset memory vector library according to the shared attributes, and update the target user profile corresponding to the user identifier to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier. The profile loading module 14 is used to perform memory retrieval on the preset memory meta-database, the target personal memory vector database and the shared memory vector database based on the user identifier and the target interaction information, so as to obtain the corresponding retrieval results, and load the updated target user profile while performing memory retrieval; The interactive response module 15 is used to respond to the target interactive command by utilizing the search results and the updated target user profile.

[0042] In some specific embodiments, the text generation module 11 may specifically include: The information acquisition unit is used to acquire the target historical interaction information corresponding to the user identifier; The semantic analysis unit is used to perform semantic analysis on the target historical interaction information and the target interaction information through the target large language model, so as to generate the context-injected text of the current interaction and the retrieval-optimized text for memory vector retrieval; the interaction memory text includes the context-injected text and the retrieval-optimized text. Accordingly, the image update module 13 may specifically include: The text determination unit is configured to determine the retrieval-optimized text as the target vector generation text if the interactive memory text includes the retrieval-optimized text; and to determine the context-injected text as the target vector generation text if the interactive memory text does not include the retrieval-optimized text. A vector generation unit is used to generate text using the target vector, and to generate the target feature vector of the interactive memory text. The vector storage unit is used to normalize the target feature vector to obtain the processed target feature vector, and to store the processed target feature vector in a preset memory vector library.

[0043] In some specific embodiments, the metadata update module 12 may specifically include: An attribute determination unit is used to determine the shared attributes of the interactive memory text according to a preset privacy classification rule; A text encapsulation unit is used to generate a corresponding memory identifier for the interactive memory text, and encapsulate the interpersonal association list, the shared attributes, the user identifier and the timestamp of the interactive memory text to obtain target memory metadata; The metadata update unit is used to update the preset memory metadata database using the target memory metadata.

[0044] In some specific embodiments, the image update module 13 may specifically include: The first text storage unit is used to store the interactive memory text in the shared memory vector library if the shared attribute indicates that the interactive memory text is allowed to be shared. The second text storage unit is used to store the interactive memory text in the target personal memory vector library if the shared attribute indicates that the interactive memory text is not allowed to be shared. Accordingly, the robot interaction device based on multi-user memory management may further include: The similarity calculation unit is used to calculate the similarity of each memory vector stored in the preset memory vector library to obtain the corresponding memory similarity. The vector determination unit is used to determine the first memory vector and the second memory vector in the memory vector pair if there is a memory vector pair in the preset memory vector library whose memory similarity is higher than the preset memory similarity threshold; the memory timestamp of the first memory vector is greater than the memory timestamp of the second memory vector. The metadata update unit is used to overwrite the second memory vector with the first memory vector and synchronously update the preset memory metadata database.

[0045] In some specific embodiments, the image update module 13 may specifically include: The information extraction unit is used to determine the current user profile corresponding to the user identifier, and after obtaining user authorization, extract the target historical interaction information and the user personalized information in the target interaction information; The profile update unit is used to update the current user profile based on the information characteristics of the user's personalized information, either through incremental updates or by an exponential moving average algorithm, to obtain the updated target user profile. The score decay unit is used to determine the interest intensity score of user preferences in the updated target user profile, and to decay the interest intensity score using a preset exponential decay formula to obtain the decayed interest intensity score. The preference removal unit is used to remove the target user preference from the updated target user profile if the user preferences contain a target user preference; the target user preference is the user preference whose decayed interest intensity score is lower than a preset interest intensity score threshold.

[0046] In some specific embodiments, the image loading module 14 may specifically include: The metadata database traversal unit is used to traverse the preset memory metadata database to match the user identifier and obtain a first candidate memory set; the first candidate memory set includes memories whose shared attribute representation allows sharing and whose interpersonal association list contains the user identifier; A similarity matching unit is used to generate a target retrieval vector for the target interaction information, and to perform semantic similarity matching between the target personal memory vector library and the shared memory vector library based on the target retrieval vector to obtain a second candidate memory set; The collection and sorting unit is used to sort the first candidate memory set and the second candidate memory set to obtain the corresponding retrieval results.

[0047] In some specific embodiments, the interactive response module 15 may specifically include: The profile injection unit is used to format the updated target user profile and inject it into a preset system prompt word template to obtain the target system prompt word. The result injection unit is used to inject the search results into a preset user suggestion word template to obtain the target user suggestion word; The prompt input unit is used to input the target system prompt, the target user prompt, and the target interaction information into a preset interaction response model, so as to use the obtained output results to perform an interaction response to the target interaction command.

[0048] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the robot interaction method based on multi-user memory management disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0049] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0050] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0051] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the robot interaction method based on multi-user memory management disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0052] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned robot interaction method based on multi-user memory management. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0053] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0054] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0055] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0056] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0057] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A robot interaction method based on multi-user memory management, characterized in that, Applied to target robots, including: Upon receiving the target interaction instruction, the target interaction information and user identifier corresponding to the target interaction instruction are determined, and based on the target historical interaction information corresponding to the user identifier and the target interaction information, the interaction memory text of this interaction is generated. The shared attributes of the interactive memory text are determined, and the preset memory metadata database is updated through the interactive memory text; the shared attributes are attributes that characterize whether the interactive memory text is allowed to be shared; the preset memory metadata database is used to store the memory metadata of each interactive memory text, including the shared attributes; The interactive memory text is stored in a preset memory vector library according to the shared attributes, and the target user profile corresponding to the user identifier is updated to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier; Based on the user identifier and the target interaction information, memory retrieval is performed on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database to obtain the corresponding retrieval results, and the updated target user profile is loaded while performing memory retrieval. Using the search results and the updated target user profile, an interactive response is performed to the target interaction command.

2. The robot interaction method based on multi-user memory management according to claim 1, characterized in that, The step of generating the interaction memory text for this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information includes: Obtain the target historical interaction information corresponding to the user identifier; Semantic analysis is performed on the target historical interaction information and the target interaction information using a target large language model to generate context-injected text for this interaction and retrieval-optimized text for memory vector retrieval; the interaction memory text includes the context-injected text and the retrieval-optimized text. Accordingly, the process of storing the interactive memory text into a preset memory vector library according to the shared attribute includes: If the interactive memory text includes the search-optimized text, then the search-optimized text is determined as the target vector generation text; if the interactive memory text does not include the search-optimized text, then the context-injected text is determined as the target vector generation text. The target vector is used to generate text, and the target feature vector of the interactive memory text is generated. The target feature vector is normalized to obtain a processed target feature vector, and the processed target feature vector is stored in a preset memory vector library.

3. The robot interaction method based on multi-user memory management according to claim 1, characterized in that, The step of determining the shared attributes of the interactive memory text and updating the preset memory metadata database through the interactive memory text includes: The sharing attributes of the interactive memory text are determined according to preset privacy classification rules; Generate a corresponding memory identifier for the interactive memory text, and encapsulate the interpersonal association list, the shared attributes, the user identifier, and the timestamp of the interactive memory text to obtain the target memory metadata; The preset memory metadata database is updated using the target memory metadata.

4. The robot interaction method based on multi-user memory management according to claim 1, characterized in that, The step of storing the interactive memory text into a preset memory vector library according to the shared attributes includes: If the shared attribute indicates that the interactive memory text can be shared, then the interactive memory text is stored in the shared memory vector library; If the shared attribute indicates that the interactive memory text is not allowed to be shared, then the interactive memory text is stored in the target personal memory vector library; Accordingly, after storing the interactive memory text into a preset memory vector library according to the shared attribute, the method further includes: The similarity of each memory vector stored in the preset memory vector library is calculated to obtain the corresponding memory similarity. If there is a memory vector pair in the preset memory vector library whose memory similarity is higher than the preset memory similarity threshold, then the first memory vector and the second memory vector in the memory vector pair are determined; the memory timestamp of the first memory vector is greater than the memory timestamp of the second memory vector. The first memory vector is used to overwrite the second memory vector, and the preset memory metadata database is updated synchronously.

5. The robot interaction method based on multi-user memory management according to claim 1, characterized in that, The step of updating the target user profile corresponding to the user identifier to obtain the updated target user profile includes: Determine the current user profile corresponding to the user identifier, and after obtaining user authorization, extract the target historical interaction information and the user's personalized information from the target interaction information; Based on the information characteristics of the user's personalized information, the current user profile is updated using an incremental update method or an exponential moving average algorithm to obtain the updated target user profile. Determine the interest intensity score of user preferences in the updated target user profile, and use a preset exponential decay formula to decay the interest intensity score to obtain the decayed interest intensity score; If a target user preference exists in the user preferences, then the target user preference is removed from the updated target user profile; the target user preference is the user preference whose interest intensity score after decay is lower than a preset interest intensity score threshold.

6. The robot interaction method based on multi-user memory management according to claim 1, characterized in that, The step of performing memory retrieval on the preset memory metadata database, the target personal memory vector database, and the shared memory vector database based on the user identifier and the target interaction information to obtain corresponding retrieval results includes: The preset memory metadata database is traversed to match the user identifiers and obtain a first candidate memory set; the first candidate memory set includes memories whose shared attribute indicates that they can be shared and whose interpersonal association list contains the user identifiers. Generate a target retrieval vector for the target interaction information, and perform semantic similarity matching on the target personal memory vector library and the shared memory vector library based on the target retrieval vector to obtain a second candidate memory set; The first candidate memory set and the second candidate memory set are organized to obtain the corresponding retrieval results.

7. The robot interaction method based on multi-user memory management according to any one of claims 1 to 6, characterized in that, The step of using the search results and the updated target user profile to respond to the target interaction command includes: The updated target user profile is formatted and injected into a preset system prompt word template to obtain the target system prompt word; The search results are injected into a preset user suggestion template to obtain target user suggestion words; The target system prompt, the target user prompt, and the target interaction information are input into a preset interaction response model, so as to use the obtained output results to perform an interaction response to the target interaction command.

8. A robot interaction device based on multi-user memory management, characterized in that, Applied to target robots, including: The text generation module is used to determine the target interaction information and user identifier corresponding to the target interaction instruction after receiving the target interaction instruction, and generate the interaction memory text of this interaction based on the target historical interaction information corresponding to the user identifier and the target interaction information. The metadata database update module is used to determine the sharing attributes of the interactive memory text and update the preset memory metadata database through the interactive memory text; the sharing attributes are attributes that characterize whether the interactive memory text is allowed to be shared; the preset memory metadata database is used to store the memory metadata of each interactive memory text, including the sharing attributes; The profile update module is used to store the interactive memory text into a preset memory vector library according to the shared attributes, and update the target user profile corresponding to the user identifier to obtain the updated target user profile; the preset memory vector library is a shared memory vector library, or a target personal memory vector library corresponding to the user identifier; The profile loading module is used to perform memory retrieval on the preset memory meta-database, the target personal memory vector database, and the shared memory vector database based on the user identifier and the target interaction information, respectively, to obtain the corresponding retrieval results, and load the updated target user profile while performing the memory retrieval; The interactive response module is used to respond to the target interactive command by utilizing the search results and the updated target user profile.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the robot interaction method based on multi-user memory management as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the robot interaction method based on multi-user memory management as described in any one of claims 1 to 7.