Virtual interactive role control method and device, computer device and storage medium

By parsing interactive data and matching the interactive memory bank from multiple dimensions, speech and action signals are generated, solving the problem of inconsistent contextual coherence and multimodal output in traditional digital humans during long-term interactions, and realizing continuous contextual coherence and multimodal collaborative expression.

CN122633144APending Publication Date: 2026-08-25HONG KONG UNIV OF SCI & TECH (GUANGZHOU)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610823725.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Traditional digital humans suffer from poor contextual coherence and inconsistent multimodal outputs during long-term interactions, especially when there are more interaction rounds or cross-session communication. They are prone to forgetting important user information and generating actions that are disconnected from semantics.

Method used

By acquiring the input interaction data of the target interaction object, parsing the object's preference information, interaction relationship information, and interaction time information, and using multi-dimensional matching to query historical memory data from the interaction memory bank, voice interaction signals and action control signals are generated to drive the virtual interaction character to perform collaborative output.

Benefits of technology

It enables continuous maintenance of contextual coherence during long-term interactions and achieves multimodal collaborative output of voice and actions, maintaining the reference of historical events and individual consistency, and avoiding the separation of actions and content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633144A_ABST
    Figure CN122633144A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, computer device, and storage medium for controlling a virtual interactive character. The method includes: acquiring input interaction data from a target interactive object and parsing it to obtain corresponding object preference information, interaction relationship information, and interaction time information; querying at least one target historical memory data matching the input interaction data from an interaction memory bank according to the matching dimensions of the object preference information, interaction relationship information, and interaction time information; generating target prompt information based on the input interaction data and at least one target historical memory data, inputting the target prompt information into a large language model, and outputting interaction feedback information and corresponding behavioral intention interaction information; generating a corresponding voice interaction signal based on the interaction feedback information, and generating a motion control signal for a preset virtual interactive character based on the behavioral intention interaction information, and driving the virtual interactive character based on the voice interaction signal and the motion control signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device and storage medium for controlling virtual interactive characters. Background Technology

[0002] Interactive digital humans are virtual characters built on artificial intelligence technology. Users can initiate interactions through text or voice input. After receiving and parsing the user's text or voice input, the digital human system can engage in real-time, natural, and coherent dialogue and emotional expression with the user through multimodal interaction methods such as speech recognition, natural language understanding, speech synthesis, and action generation.

[0003] In related technologies, the context of past interactions is typically obtained within the current dialogue window to generate relevant responses. However, as the number of interaction rounds increases or cross-session communication occurs, the system suffers from information forgetting, losing important information previously mentioned by the user (such as preferences and experiences). Simultaneously, the generated actions often become semantically disconnected from the responses, making it difficult for actions to form a coherent and consistent multimodal expression with the dialogue content. In summary, traditional digital humans suffer from poor contextual coherence and inconsistent multimodal outputs during long-term interactions. Summary of the Invention

[0004] This application proposes a virtual interactive character control method, device, computer equipment, and storage medium, which can continuously maintain contextual coherence during long-term interaction and realize multimodal collaborative output of voice and action.

[0005] To achieve the above objectives, a first aspect of this application proposes a virtual interactive character control method, the method comprising: Obtain the input interaction data from the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information and interaction time information; Based on the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information, at least one target historical memory data that matches the input interaction data is queried from the interaction memory bank stored for the target interaction object; Based on the input interaction data and the at least one target historical memory data, target prompt information is generated, and the target prompt information is input into the large language model to output the corresponding interaction feedback information and the corresponding behavioral intention interaction information. Based on the interactive feedback information, a corresponding voice interaction signal is generated, and based on the behavioral intention interaction information, an action control signal for a preset virtual interactive character is generated, and the virtual interactive character is driven based on the voice interaction signal and the action control signal.

[0006] Accordingly, a second aspect of the embodiments of this application proposes a virtual interactive character control device, the device comprising: The parsing module is used to acquire the input interaction data input by the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information and interaction time information; The query module is used to query at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interaction object, according to the matching dimensions of the object preference information, the interaction relationship information and the interaction time information. The output module is used to generate target prompt information based on the input interaction data and the at least one target historical memory data, input the target prompt information into the large language model, and output the corresponding interaction feedback information and the corresponding behavioral intention interaction information. The driving module is used to generate corresponding voice interaction signals based on the interaction feedback information, and to generate action control signals for a preset virtual interactive character based on the behavioral intention interaction information, and to drive the virtual interactive character based on the voice interaction signals and the action control signals.

[0007] In some implementations, the query module is further used for: Read multiple historical memory data from a preset interactive memory bank; Based on the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information corresponding to the input interaction data, calculate the matching degree score between the input interaction data and each historical memory data; Based on the matching score between the input interaction data and each historical memory data, at least one target historical memory data that matches the input interaction data is selected from the plurality of historical memory data.

[0008] In some implementations, the query module is further used for: For each piece of historical memory data, obtain the corresponding historical event element information, historical preference information, historical interaction relationship information, and historical time information; For each historical memory data, a first matching degree sub-score is calculated based on the similarity between the historical event element information and the input interaction data; a second matching degree sub-score is calculated based on the similarity between the historical preference information and the object preference information; a third matching degree sub-score is calculated based on the similarity between the historical interaction relationship information and the interaction relationship information; and a fourth matching degree sub-score is calculated based on the difference between the historical time information and the interaction time information. Based on the first matching degree sub-score, the second matching degree sub-score, the third matching degree sub-score, and the fourth matching degree sub-score, the matching degree score between the input interaction data and each historical memory data is calculated.

[0009] In some embodiments, the virtual interactive character control device further includes a storage module for: The input interaction data is divided according to a preset semantic segmentation rule to obtain at least one semantic segment; For each semantic segment, calculate the entity density value of the included entity objects, the corresponding sentiment intensity value, the trigger frequency value of the preset memory trigger words in the current semantic segment, and the context association value between the current semantic segment and other semantic segments included in the input interaction data. Based on the entity density value, the sentiment intensity value, the trigger frequency value, and the context association value, calculate the memory score value corresponding to each semantic segment. When the memory score value corresponding to the semantic fragment is greater than the preset memory score threshold, the semantic fragment is stored as a new historical memory data in the interactive memory bank.

[0010] In some embodiments, the storage module is further configured to: Based on the semantic fragment, conflict detection is performed in the interactive memory to obtain the conflict detection result; When the conflict detection result indicates that there is a content conflict between the conflicting historical memory data in the interactive memory bank and the semantic fragment, the credibility of the historical data source, the recent value of the historical time, the historical trigger frequency value of the memory trigger word in the conflicting historical memory data, and the historical contextual relevance of the conflicting historical memory data are determined. Based on the historical data source credibility, the historical time recent value, the historical trigger frequency value, and the historical context correlation degree corresponding to the conflict history memory data, the corresponding first memory retention value is calculated; Obtain the data source credibility and time relevance value corresponding to the semantic segment, and calculate the second memory retention value corresponding to the semantic segment based on the data source credibility, the time relevance value, the trigger frequency value and the context relevance. When the second memory retention value is greater than the first memory retention value, the conflict history memory data is discarded, and the semantic fragment is stored as a new historical memory data in the interactive memory bank.

[0011] In some embodiments, the storage module is further configured to: Extract event element information corresponding to the semantic fragment, wherein the event element information includes interaction time information, at least one interactive object contained in the semantic fragment, and the behavioral events and sentiment tags of the target interactive object represented by the semantic fragment; Based on the event element information, object preference information, and interaction relationship information corresponding to the semantic fragment, the stored data corresponding to the semantic fragment is generated; The stored data is stored as new historical memory data in the interactive memory bank.

[0012] In some embodiments, the storage module is further configured to: The emotional intensity value corresponding to the target object represented by the semantic fragment, the first interaction frequency value corresponding to the target interactive object and the virtual interactive character, and the second interaction frequency value corresponding to the target interactive object and other interactive objects are obtained. The system obtains a first historical relationship state quantization value between the target interactive object and the virtual interactive character, a second historical relationship state quantization value between the target interactive object and the other interactive objects, a first decay rate parameter between the interaction time information and the first historical time information corresponding to the first historical relationship state quantization value, and a second decay rate parameter between the interaction time information and the second historical time information corresponding to the second historical relationship state quantization value. Based on the first historical relationship state quantification value, the emotion intensity value, the first interaction frequency value, and the first decay rate parameter, calculate the first relationship state quantification value corresponding to the target interaction object and the virtual interaction role; Based on the second historical relationship state quantification value, the emotion intensity value, the second interaction frequency value, and the second decay rate parameter, calculate the second relationship state quantification value corresponding to the target interaction object and the other interaction objects; The step of storing the stored data as new historical memory data in the interactive memory bank includes: The stored data, the first relationship state quantification value corresponding to the target interactive object and the virtual interactive role, and the second relationship state quantification value corresponding to the target interactive object and the other interactive objects are stored as newly added historical memory data in the interactive memory bank.

[0013] Accordingly, a third aspect of the embodiments of this application proposes a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the virtual interactive role control method of any one of the embodiments of the first aspect of this application.

[0014] Accordingly, a fourth aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the virtual interactive role control method of any one of the embodiments of the first aspect of this application.

[0015] This application embodiment acquires input interaction data from a target interactive object and parses the input interaction data to obtain corresponding object preference information, interaction relationship information, and interaction time information. Based on the matching dimensions of object preference information, interaction relationship information, and interaction time information, it queries at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interactive object. Based on the input interaction data and at least one target historical memory data, it generates target prompt information and inputs it into a large language model, outputting corresponding interaction feedback information and corresponding behavioral intention interaction information. Based on the interaction feedback information, it generates corresponding voice interaction signals, and based on the behavioral intention interaction information, it generates action control signals for a preset virtual interactive character, and drives the virtual interactive character based on the voice interaction signals and action control signals. In this way, by performing multi-dimensional matching and explicit retrieval of long-term historical memory before response generation, and by unifying language generation and behavioral intention within the same semantic framework during the output stage, it achieves continuous maintenance of contextual coherence in long-term interactions and multimodal collaborative expression of voice output and body movements. Specifically, compared to related technologies that rely solely on short-term context windows or unstructured caching, leading to information forgetting, this application introduces a matching score mechanism based on preferences, relationships, and time dimensions. This mechanism can accurately retrieve historical information highly relevant to the current context from long-term memory as generation conditions, thus maintaining consistency in referencing historical events across rounds or conversations. Furthermore, addressing the disconnect between action and semantics in related technologies, this application simultaneously generates behavioral intent interaction information when the large language model outputs the text response, and directly generates action control signals based on this intent. This ensures that speech signals and body movements are driven by the same semantic intent from the generation source, avoiding the separation between action and content. In summary, this application can continuously maintain contextual coherence in long-term interactions and achieve multimodal collaborative output of speech and action. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the architecture of the virtual interactive role control system provided in the embodiments of this application; Figure 2 This is a flowchart of the virtual interactive role control method provided in the embodiments of this application; Figure 3 This is an overall flowchart of the virtual interactive role control method provided in the embodiments of this application; Figure 4This is an example diagram of the user-digital human interaction mode provided in the embodiments of this application; Figure 5 This is a diagram showing the evaluation results of factors influencing the realism of digital humans and their interactive experience, provided in an embodiment of this application. Figure 6 This is a schematic diagram of the functional modules of the virtual interactive character control device provided in the embodiments of this application; Figure 7 This is a schematic diagram of the hardware structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0020] Interactive digital humans are virtual characters built on artificial intelligence technology. Users can initiate interactions through text or voice input. After receiving and parsing the user's text or voice input, the digital human system can engage in real-time, natural, and coherent dialogue and emotional expression with the user through multimodal interaction methods such as speech recognition, natural language understanding, speech synthesis, and action generation.

[0021] In related technologies, the context of past interactions is typically obtained within the current dialogue window to generate relevant responses. However, as the number of interaction rounds increases or cross-session communication occurs, the system suffers from information forgetting, losing important information previously mentioned by the user (such as preferences and experiences). Simultaneously, the generated actions often become semantically disconnected from the responses, making it difficult for actions to form a coherent and consistent multimodal expression with the dialogue content. In summary, traditional digital humans suffer from poor contextual coherence and inconsistent multimodal outputs during long-term interactions.

[0022] Based on this, embodiments of this application provide a virtual interactive character control method, device, computer equipment, and storage medium, which can continuously maintain contextual coherence during long-term interaction and realize multimodal collaborative output of voice and action.

[0023] The virtual interactive role control method, device, computer equipment, and storage medium provided in this application are specifically described through the following embodiments. First, the virtual interactive role control system in the embodiments of this application is described.

[0024] Please refer to Figure 1 In some embodiments, this application provides a virtual interactive role control system, including a terminal 11 and a server 12.

[0025] In some implementations, the terminal 11 can be used to collect interaction data input by the target interactive object and to render and present the virtual interactive character in real time. For example, it can be a smartphone, tablet, smart speaker, augmented reality glasses, or an embedded device with a microphone and display screen.

[0026] Furthermore, the terminal 11 can collect the user's voice signal through the built-in microphone or receive text input through the touch screen, and use the local speech recognition module to convert the speech into text. At the same time, it sends the collected interaction data and its corresponding timestamp, identity identifier and other information to the server 12, and receives the voice interaction signal and action control signal returned by the server 12. It plays the synthesized speech through the speaker, and drives the three-dimensional model of the virtual interactive character to perform corresponding body movements and facial expressions through the graphics rendering engine.

[0027] In some implementations, the server 12 can be used to perform memory retrieval and update, semantic understanding and response generation, and collaborative synthesis of multimodal signals. For example, it can be a cloud server, an edge computing node, or a high-performance computing cluster.

[0028] Specifically, server 12 can achieve the following functions by deploying a large language model, vector database, speech synthesis model, and a mapping module from behavioral intent to action parameters: based on the interaction data and user identifier uploaded by terminal 11, it parses the object preference information, interaction relationship information, and interaction time information, and queries the target historical memory data from the interaction memory bank stored for the user according to multi-dimensional matching rules; it combines the current input with the retrieved historical memory into target prompt information and inputs it into the large language model, outputting interactive feedback text and behavioral intent interaction information; then it calls the speech synthesis unit to generate speech interaction signals, calls the action generation unit to convert behavioral intent into skeletal animation control signals, and sends both types of signals back to terminal 11.

[0029] In some implementations, terminal 11 and server 12 can communicate in real-time bidirectionally via wireless networks (such as 5G or Wi-Fi) or wired networks. Specifically, the collaboration method is as follows: in each round of interaction, terminal 11 collects user input, adds a timestamp and user identifier, and uploads it to server 12. Server 12 performs a closed-loop process of memory retrieval, response generation, and memory update. Memory retrieval reads from a long-term stored interaction memory bank; response generation outputs text and behavioral intent simultaneously; the updated memory is then written back to the memory bank, and the generated voice interaction signal and action control signal are sent to terminal 11. Afterward, terminal 11 synchronously plays the voice and drives the virtual character's animation, thereby ensuring long-term contextual coherence and multimodal collaboration while reducing the computational burden on terminal 11 and achieving centralized memory management and model inference.

[0030] The virtual interactive character control method in this application can be illustrated through the following embodiments.

[0031] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user will be obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent will the necessary user-related data for the normal operation of the embodiments of this application be obtained.

[0032] In this embodiment, the description will focus on the virtual interactive character control device, which can be integrated into a computer device. See also... Figure 2 , Figure 2 This is a flowchart illustrating the steps of the virtual interactive role control method provided in this application embodiment. Taking the virtual interactive role control device specifically integrated into a terminal or server as an example, the specific process when the processor on the terminal or server executes the program instructions corresponding to the virtual interactive role control method is as follows: Step 101: Obtain the input interaction data from the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information, and interaction time information.

[0033] In some implementations, structured information can be obtained by multi-dimensionally parsing the user's input interaction data, and this structured information can be used as multi-dimensional matching conditions for subsequent memory retrieval to accurately recall historical memories that are highly relevant to the current context and user identity, thereby improving the coherence of the interaction and the consistency of personalized expression.

[0034] The target interaction object can be a user entity that interacts with a virtual interactive character, such as an individual who converses with a digital human through voice or text, or a specific user who establishes a long-term interactive relationship with a digital human through an application.

[0035] The input interaction data can be multimodal input content generated during the interaction between the user and the virtual interactive character, such as the user's voice signal, text statement or video stream containing facial expressions, which can be obtained by the speech recognition module or text input interface.

[0036] Among them, object preference information can be a set of structured tags parsed from input interaction data that represent the preferences, habits or topic biases of the target interaction object, such as the types of activities the user likes, the topics discussed, or the types of content the user avoids.

[0037] Among them, the interaction relationship information can be a quantitative indicator or state variable that is parsed from the input interaction data and represents the evolution of the interaction state between the target interaction object and the virtual interaction character, or between the target interaction object and other objects, such as intimacy value, trust score, interaction frequency or emotional tendency intensity.

[0038] The interaction time information can be timestamp data extracted from the input interaction data, which identifies the time sequence or recentity of the current interaction, such as the system time when the interaction occurred, the dialogue round number, or the time interval relative to the previous interaction.

[0039] Specifically, the virtual interactive avatar runs on electronic devices (such as smartphones, tablets, personal computers with cameras, or dedicated interactive terminals). It acquires the user's voice signals in real time through the device's microphone array, or receives text content typed by the user through a text input interface (such as a dialog box or chat window), thereby obtaining the input interaction data. For example, when a user says to the digital avatar, "I'm so tired from work today, I want to go to the beach to relax," the system captures the voice signal through the microphone and, after voice activity detection and noise reduction preprocessing, obtains the raw audio stream. For voice input, the system can send it to a pre-deployed Automatic Speech Recognition (ASR) module, such as a Whisper or Conformer model based on an end-to-end deep neural network, to convert the audio signal into the corresponding text string "I'm so tired from work today, I want to go to the beach to relax." If the user directly inputs text, no ASR conversion is needed, and the input interaction data is obtained directly.

[0040] In some implementations, the input interaction data may also include image or video information, such as selfies uploaded by the user or facial expressions captured by a real-time camera, as a supplement to the multimodal input to assist in subsequent emotion recognition and preference analysis.

[0041] Furthermore, after obtaining the input interaction data (especially user statements in text form), the input interaction data can be further semantically parsed to extract three types of structured information: object preference information, interaction relationship information, and interaction time information.

[0042] Specifically, pre-trained natural language understanding models (such as BERT-based fine-tuned classifiers or extractive prompts based on Large Language Models (LLMs)) can be used to extract information from user text. Object preference information can be used to represent a user's likes, habits, or attitudes. This can be achieved by identifying explicit preference expressions in the sentence (such as "I like," "I don't like," "My habit is") and implicit preferences (such as repeatedly mentioned keywords). For example, when a user inputs "I love watching science fiction movies, especially *Interstellar*", the system can parse the preference tags "movie genre: science fiction" and "specific work: *Interstellar*", and compress this information into a fixed-length preference vector or tag set as object preference information.

[0043] For example, interaction relationship information can be used to characterize the evolution parameters of the interaction state between the user and the virtual interactive character, or between the user and other mentioned third-party objects, including intimacy, trust, emotional intensity, and interaction frequency. Emotional words (such as "so tired" corresponding to low-intensity negative emotion, and "so happy" corresponding to positive emotion) can be identified from the current input and incrementally updated in conjunction with accumulated relationship state variables from the dialogue history. For instance, if the user says "You (referring to the virtual character) always understand me," the system can parse out a positive relationship increment and accordingly increase the current relationship intimacy score.

[0044] Specifically, interaction time information can be metadata identifying the time sequence or relevance of the current input, such as a Unix timestamp automatically recorded by the system, a dialogue turn number (e.g., the 5th turn), or time words explicitly mentioned in the user's statement (e.g., "yesterday" or "last Wednesday"). For example, when a user says, "Yesterday I had a fight with Xiaoming," in addition to recording the system time of the current interaction, the system will extract "yesterday" from the statement as the time offset of the event, align it with the current time, and generate an absolute time label. Through the above parsing, the system transforms the raw user input into a structured feature tuple that can be matched by subsequent memory retrieval, providing input conditions for subsequent multi-dimensional matching.

[0045] By constructing multi-dimensional matching conditions through the above methods, subsequent memory queries no longer rely on a single semantic similarity, but instead integrate user personalized preferences, relationship evolution status, and time decay factors for comprehensive evaluation, thereby providing a reliable data foundation for accurately recalling historical memories most relevant to the current context.

[0046] Step 102: Based on the matching dimensions of object preference information, interaction relationship information, and interaction time information, query at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interaction object.

[0047] In some implementations, in order to accurately retrieve information that is highly relevant to the current user state and context from a massive historical memory during the interaction process, object preference information, interaction relationship information, and interaction time information can be used as multi-dimensional matching dimensions to jointly score and filter each memory in the interaction memory bank. This comprehensively measures semantic similarity, preference consistency, relationship evolution matching degree, and temporal relevance, thereby retrieving at least one target historical memory data that is most relevant to the current input interaction data and has high diversity. This provides contextual conditions that are both personalized and timely for subsequent response generation.

[0048] The interaction memory bank can be a structured database created for specific virtual interaction characters or target interaction objects to persistently store historical interaction information. It can be a collection of memories organized in an explicit storage manner. Each memory contains attributes such as semantic content, event elements, preference tags, quantitative values ​​of relationship status, and timestamps. It can be classified and indexed according to memory type (such as stable facts, preference items, episodic events, and relationship cues). It can be used to support the retrieval, updating, deletion, and sharing management of memories to achieve consistency of personality and behavior in long-term interactions.

[0049] The target historical memory data can be at least one historical memory record that is retrieved from the interactive memory bank and has the highest comprehensive score across multiple matching dimensions compared to the current input interactive data.

[0050] For example, during retrieval, the system can first read all historical memory data belonging to the current target interaction object from the interaction memory bank (or read the candidate set based on strategies such as time windows and importance sampling). Then, for each historical memory data, the system calculates its matching score with the current input interaction data based on the following four matching dimensions: semantic matching dimension (the similarity between the semantic content of the historical memory and the current input text); preference matching dimension (the degree of matching between the user preference tags stored in the historical memory and the object preference information); relationship matching dimension (the degree of fit between the quantified relationship state value recorded in the historical memory and the currently parsed interaction relationship information); and time matching dimension (the recency between the timestamp of the historical memory and the current interaction time information).

[0051] In some implementations, the matching score can be calculated using a weighted summation method, expressed as: ; Where m represents a historical memory data point; The cosine similarity between the current input interaction data and the semantic content of the memory, or the vector similarity based on the pre-trained encoder; The intersection-union ratio or embedding similarity of the preference label set; Normalize the score for the difference in the quantified values ​​of the relational state; The value is an exponential decay function based on the timestamp difference, such as , The interval between the current time and the time of memory; , , , These are preset weighting coefficients for each dimension, which can be dynamically adjusted according to the application scenario. For example, in scenarios emphasizing long-term personalization, increasing... and Improve in scenarios that focus on recent events wait.

[0052] Furthermore, the system calculates for each candidate memory in the interactive memory bank. Then, the memories can be sorted from highest to lowest score, and the top-ranked memory(s) can be selected as the target historical memory data. If multiple memories have similar scores, they can be selected together to enhance contextual diversity.

[0053] For example, suppose the target interaction object (user A) has stored the following historical memory data in previous interactions: Memory 1 (Semantic: "User A likes to go hiking on weekends", Preference tag: "Sports: Hiking", Relationship status: Intimacy 7 / 10, Timestamp: 5 days ago); Memory 2 (Semantic: "User A mentioned arguing with friend B", Preference tag: none, Relationship status: Trust level for friend B: 3 / 10, Timestamp: 2 days ago); Memory 3 (Semantic: "User A said he was under a lot of work pressure", Preference tag: "Work: High pressure", Relationship status: Intimacy with virtual character 5 / 10, Timestamp: 1 day ago).

[0054] The current user input is "I feel much better today, I want to go outdoors to relax." The parsed object preference information is "outdoor activity preference," the interaction relationship information is an increasing trend intimacy with the virtual character (currently estimated at 6 / 10), and the interaction time information is the current moment. The system calculates the matching score for each memory: For memory 1, the semantic similarity is high ("outdoor" matches "hiking"), the preference matching is high, the time recentity is moderate, and the overall score is the highest; for memory 3, the semantic similarity is low ("stress" is the opposite of "relaxation"), but the relationship matching and time recentity are good, and the score is moderate; for memory 2, both semantic and relationship matching are low, and the score is the lowest. If only one historical memory data needs to be selected, the system can ultimately select memory 1 as the target historical memory data for subsequent prompt information generation. Through the above multi-dimensional matching mechanism, the system can accurately recall historical information that is highly relevant to the current context and user state in long-term interactions, avoiding retrieval bias caused by simply relying on semantic similarity and ignoring preference, relationship, and time factors.

[0055] In some implementations, to handle situations with large amounts of data in the interactive memory bank, a hierarchical retrieval strategy can be adopted: First, a coarse screening is performed based on interaction time and relationship information, for example, only historical memories within the past week or with an affinity score higher than a threshold are retrieved to form a candidate subset; then, the candidate subset is finely ranked using object preference information and semantic similarity. This significantly reduces the computational complexity of a single retrieval while ensuring that key memories are not lost, making it particularly suitable for long-duration, high-frequency real-time interaction scenarios. Furthermore, for object preference information and interaction relationship information, a vector index (such as a FAISS index) can be pre-constructed, concatenating the preference embedding and relationship embedding of each memory into a high-dimensional vector, and then performing an approximate nearest neighbor search with the corresponding embedding of the current input. This allows for rapid retrieval of tens of thousands of memories in milliseconds, meeting the low-latency requirements of real-time interaction.

[0056] By employing the above methods, the retrieved target historical memory data can not only be semantically related to the current input content, but also reflect the user's long-term personalized characteristics, the dynamic relationship with the digital human, and the impact of the timeliness of memory. This significantly improves the accuracy and contextual fit of the retrieval results, thereby providing high-quality historical information support for the subsequent generation of response content with coherence, individual consistency, and relationship awareness by the large language model.

[0057] In some implementations, the parsed object preference information, interaction relationship information, and interaction time information can be used as multi-dimensional matching conditions to calculate a comprehensive matching score between each historical memory data and the current input. Then, at least one target historical memory data is selected based on the score ranking to prioritize the retrieval of the most relevant historical memories while ensuring retrieval diversity, providing high-quality contextual enhancement information for subsequent response generation. For example, step 102 may include: (102.1) Read multiple historical memory data from a preset interactive memory bank; (102.2) Calculate the matching score between the input interaction data and each historical memory data according to the matching dimensions of object preference information, interaction relationship information and interaction time information corresponding to the input interaction data; (102.3) Based on the matching score between the input interaction data and each historical memory data, select at least one target historical memory data that matches the input interaction data from multiple historical memory data.

[0058] Among them, historical memory data can be structured records stored in the interactive memory bank that represent key information extracted during past interactions. Each piece of historical memory data can be stored in an explicit structured manner and accompanied by semantic content, timestamps, and attribute indexes.

[0059] Among them, the matching score can be a quantitative value used to measure the overall similarity between historical memory data and current input interaction data across multiple matching dimensions.

[0060] In some implementations, the target interaction object can first be indexed and located using its unique identifier (such as a user ID), and then all historical memory data corresponding to that object in the interaction memory bank can be read in full. Alternatively, multiple historical memory data can be obtained based on a time decay threshold (such as reading only memories from the last 30 days) or importance sampling (such as prioritizing reading memories with intimacy scores higher than a threshold); or, the memory data can be grouped and read according to memory type (stable facts, preferences, episodic events, relationship cues) to ensure that subsequent matching scores can cover diverse information categories.

[0061] Specifically, for each piece of historical memory data retrieved, object preference information, interaction relationship information, and interaction time information can be parsed. These, combined with the historical event element information, historical preference information, historical interaction relationship information, and historical time information inherent in the historical memory itself, are used to calculate sub-scores from four matching dimensions. These sub-scores are then weighted and fused to obtain a comprehensive matching score. Specifically, for a piece of historical memory data m, the following calculation can be performed: Based on the similarity between the historical event element information and the input interaction data, a first matching sub-score is calculated. For example, cosine similarity can be calculated by semantically encoding historical event elements in historical memory data with current input interaction data (e.g., using Sentence-BERT); and a second matching degree sub-score can be calculated based on the similarity between historical preference information and object preference information. The third matching degree sub-score can be calculated using the Jaccard coefficient or the dot product of preference embedding vectors; it can also be calculated based on the similarity between historical and current interaction relationship information. ,For example ,in It could be historical intimacy, This could be the current estimated intimacy level. It can be the larger of the two; based on the difference between historical time information and current interaction time information (time recentity), the fourth matching degree sub-score is calculated. Using an exponential decay function , For time intervals, This is the attenuation coefficient.

[0062] Furthermore, a weighted summation can be used to calculate the overall matching score: ; in , , , The system uses preset weights (e.g., 0.4, 0.2, 0.2, 0.2 respectively). For example, if the current input is "I feel much better today and want to relax outdoors," the parsed object preference information is "outdoor activities," the interaction relationship information is an increasing trend intimacy, and the interaction time information is the current moment. The system calculates a historical memory "User A went hiking last weekend and expressed liking it" (its event elements: behavioral event "hiking," emotion "liking"; preference: "outdoor sports"; relationship: intimacy 7 / 10; time: 2 days ago). =0.9, =0.95, =0.8, =0.82, after weighting =0.87; Another memory "User A and friend B had an argument" (Event elements: behavior "argument", emotion "anger"; no matching preference; relationship: trust in B 3 / 10) score =0.32.

[0063] For example, all candidate historical memory data can be sorted according to... Sort the data from highest to lowest, and then determine the target set according to a preset selection strategy. For example, the top-ranked memory can be selected. Alternatively, to provide richer context, the top K highest-rated memories can be selected (e.g., K=3).

[0064] In some implementations, in addition to the selection method based on weighted summation and diversity penalty described above, a memory retrieval method enhanced by Graph Neural Network (GNN) can be introduced. Specifically, the system constructs a heterogeneous graph, where nodes include historical memory nodes, object preference nodes, interaction relationship state nodes, and time nodes, and edges represent the association strength between memory and preference, memory and relationship, and memory and time. When a query is needed, the object preference information, interaction relationship information, and interaction time information parsed from the current input interaction data can be embedded as query nodes into the graph. Information is iteratively propagated through a graph attention mechanism, and finally, the comprehensive correlation probability between each historical memory node and the query node is calculated. This method can capture higher-order associations between memories (for example, a memory about "hiking" is not only related to the current query through preference, but may also be indirectly associated with the memory of "camping" through the intermediate preference node of "outdoor activities"), thereby recalling historical memories that do not have direct semantic overlap with the current input but are related at a higher semantic level, further improving the depth of retrieval.

[0065] By employing the above methods, it is possible to accurately select target historical memory data from unstructured or semi-structured memory sets that best match the current context, user preferences, relationship status, and time order. This overcomes the limitations of relying solely on short-term context windows, significantly improves the relevance and diversity of retrieval results, and provides high-quality historical information support for subsequent large language models to generate interactive feedback with long-term coherence and personalized features.

[0066] In some implementations, to comprehensively measure the matching degree between historical memory and current interaction from multiple dimensions, a comprehensive matching score can be obtained by calculating the similarity or difference of each historical memory data and the current input interaction data across various dimensions. This comprehensively and quantitatively assesses the correlation strength between historical memory and current input, thereby providing a multi-dimensional fusion scoring basis for subsequent accurate selection of target historical memory data. For example, (102.2) may include: (102.2.1) For each historical memory data, obtain the corresponding historical event element information, historical preference information, historical interaction relationship information, and historical time information; (102.2.2) For each historical memory data, a first matching degree sub-score is calculated based on the similarity between historical event element information and input interaction data; a second matching degree sub-score is calculated based on the similarity between historical preference information and object preference information; a third matching degree sub-score is calculated based on the similarity between historical interaction relationship information and interaction relationship information; and a fourth matching degree sub-score is calculated based on the difference between historical time information and interaction time information. (102.2.3) Based on the first matching degree sub-score, the second matching degree sub-score, the third matching degree sub-score and the fourth matching degree sub-score, calculate the matching degree score between the input interaction data and each historical memory data.

[0067] Among them, historical event element information can be structured semantic information recorded in historical memory data that describes the core content of past interaction events, such as key entities and event descriptions extracted from historical interaction texts.

[0068] Historical preference information can be a set of structured tags stored in historical memory data that represents the long-term stable preferences or habits of the target interaction object in past interactions, such as the user's preferred topic categories, favorite activity types, or frequently avoided content. It can be stored in the form of a summary or a fixed-length set of preference tags.

[0069] Among them, historical interaction relationship information can be recorded in historical memory data, which represents the relationship description and interaction status quantification indicators between the target interaction object and the virtual interaction character or between the target interaction object and other objects at past moments, such as relationship description and corresponding intimacy value, trust score, interaction frequency or emotional tendency intensity.

[0070] Among them, historical time information can be timestamps or round identifiers attached to historical memory data, used to indicate the time sequence or relevance of the interactive events corresponding to the historical memory data.

[0071] The first matching score can be a numerical value used to quantify the degree of semantic matching between historical event element information and current input interaction data.

[0072] The second matching score can be a numerical value used to quantify the degree of matching between historical preference information and the currently parsed object preference information. It can be used to measure the degree of fit between historical memory and current interaction at the level of user long-term preferences.

[0073] Among them, the third matching degree sub-score can be a numerical value used to quantify the degree of matching between historical interaction relationship information and currently parsed interaction relationship information. It can be used to measure the consistency between historical memory and current interaction at the level of relationship evolution state.

[0074] Among them, the fourth matching degree sub-score can be a numerical value used to quantify the time difference between historical time information and the currently parsed interaction time information. It can be used to reflect the timeliness of historical memory and give more weight to recently occurring memory in the matching.

[0075] In some implementations, for each historical memory data read from the interaction memory bank, its pre-stored structured information across four dimensions can be extracted. Specifically, historical event element information can be a semantic core stored in the form of event tuples, including the time of the interaction, the participants, the user's behavioral event, and the emotional tags labeled by the system or user, such as the tuple (Time: "2025-05-20", Participants: "User A", Behavioral Event: "Argued with friend Xiaoming", Emotional Tag: "Anger"). Historical preference information can be the user's long-term preferences or habits recorded in the memory, stored in the form of a set of tags or an embedded vector, such as {"Movie Genre: Sci-Fi", "Sports: Hiking", "Diet: Vegetarian"}. Historical interaction relationship information can be one or more quantified values ​​representing the intimacy, trust, or emotional connection strength between the user and the virtual character or between the user and a third-party object at the time the memory occurred, such as User A's intimacy score with the virtual interaction character being 7.2 (out of 10). Historical time information can be the system timestamp or dialogue round number when the memory occurred, such as 2025-05-20 19:32:15 or round #128. The system can directly read this information by accessing the field index of the interactive memory bank, thus providing a data foundation for subsequent multi-dimensional matching and scoring. For example, when the system reads a memory marked as "important event", it obtains the event elements (behavior: "confiding work pressure to the digital human", emotion: "anxiety"), preference {"work status: high pressure"}, the intimacy of the relationship between the user and the digital human is 6.5, and the time is 2025-05-21 09:15:00.

[0076] In some implementations, a first matching score can be calculated for each piece of historical memory data based on the semantic similarity between its historical event element information and the current input interaction data, denoted as... Specifically, the historical event elements and the current input interaction data can be encoded using the same text encoding. A pre-trained semantic encoding model (such as Sentence-BERT or an LLM-based embedding layer) can be used to map the two texts to a high-dimensional vector space. Then, the cosine similarity between the two vectors is calculated, and the result is normalized to the [0,1] interval. If the historical event elements also contain the names of the participants, they can be included in the encoding to enhance matching accuracy. For example, if the current input "I feel much better today and want to relax outdoors" has a cosine similarity of 0.87 with the historical memory event element "hiking, enjoying" from "the user went hiking last weekend," then... =0.87; while the similarity to "arguing with friends, angry" is only 0.12. Through this sub-rating, the system can measure the relevance of historical events to the current topic at the content level.

[0077] Furthermore, historical preference information can be stored as a set of tags (e.g., {"Sports: Hiking", "Music: Rock"}), and current object preference information can also be a set of tags (e.g., {"Outdoor Activities", "Relaxation"}). The Jaccard similarity coefficient between the two sets can be calculated, which is the number of elements in the intersection divided by the number of elements in the union. If preferences are represented using embedded vectors (e.g., fixed-dimensional vectors obtained through Word2Vec or BERT), the cosine similarity between the vectors is calculated. Additionally, a weighting strategy can be introduced: certain important preferences (e.g., the user-explicitly confirmed "favorite foods") can be assigned higher weights. For example, the intersection of the historical preference set {"Outdoor Sports", "Hiking"} and the current object preference {"Outdoor Activities", "Relaxation", "Nature"} is {"Outdoor Sports"} (which can be mapped to "Outdoor Activities" as a synonym), with a union size of 4 and a similarity of 0.25, which is used as the first matching score. If embedded similarity is used, the cosine value of the two vectors can reach 0.68. The system can select one or combine both methods according to preset methods and output the result. The value is between 0 and 1.

[0078] Furthermore, a third matching degree sub-score can be calculated based on the similarity or consistency between historical interaction relationship information and currently parsed interaction relationship information, denoted as... Historical interaction information is typically one or more consecutive numerical values, such as the intimacy rating between a user and a virtual character. (Assuming a range of 0-10). The current interaction relationship information is also an estimated intimacy value. (For example, dynamically obtained through the accumulation of emotions and interaction frequency in the previous rounds of interaction). The system calculates the degree of closeness between the two: ,in The maximum possible difference (e.g., 10). If the relationship information includes multiple dimensions (e.g., intimacy and trust), they can be calculated separately and then averaged. This sub-score ensures that relationship states have a higher match with current historical memories, thus maintaining the coherence of relationship evolution.

[0079] Furthermore, let the current interaction timestamp be... The timestamp of historical memory is Time interval (Units are hours or days). The system uses an exponential decay function: ,in This is a preset decay coefficient (e.g., 0.1 / day). When the memory occurs near the current time, , As time progresses, the scoring index decreases. This sub-scoring ensures that the system prioritizes recent historical memories, reducing the interference of outdated information on response generation.

[0080] In some implementations, a comprehensive matching score between each historical memory data m and the current input interaction data can be calculated by weighted summation based on the four matching sub-scores mentioned above. The specific calculation formula is as follows: ; Among them, the first weight Second weight Third weight Fourth weight These are the weight coefficients for the corresponding sub-ratings, satisfying... + + + =1 and all are non-negative real numbers.

[0081] In some implementations, the weighting coefficients can be preset according to the application scenario, for example, increasing them in dialogues that emphasize semantic coherence. Improvement through long-term personalized companionship and Improve in scenarios that focus on recent events The default example value can be: =0.4, =0.2, =0.2, =0.2. The system can calculate this for each piece of historical memory data. This yields comparable quantitative scores (matching degree sub-scores).

[0082] In some implementations, the four weighting coefficients mentioned above are not fixed but can be dynamically adjusted in real time based on the interaction context or user feedback, thereby adaptively optimizing the matching effect. Specifically, the weighting coefficients can be dynamically switched according to the dialogue scenario: when the system detects that the user is narrating a new event (with frequent use of first-person past tense verbs), the system temporarily increases the weighting coefficients. (Event similarity) and (Recency); when users express emotions or relationship needs (such as "Do you understand me?"), it increases... and (Preferences and Relationships). For example, if the system identifies the current topic as "reminiscing about last year's trip," it will automatically... (Recentness) decreases, while... (Event similarity) is improved to recall earlier but semantically relevant memories. Through this dynamic adjustment mechanism, the system's memory retrieval strategy can adaptively match different interaction stages and user intentions, thereby further improving the flexibility and intelligence of long-term interactions.

[0083] The above methods enable a refined quantification of the multi-dimensional relationship between historical memory and current input, avoiding bias caused by single-dimensional evaluation. Furthermore, by weighted fusion of four sub-scores, a comprehensive matching score is obtained, which can comprehensively and objectively reflect the overall matching degree between each historical memory and the current interaction. This provides a scientific and quantifiable basis for subsequent precise selection of the optimal target historical memory data from multiple historical memory data sets.

[0084] Step 103: Based on the input interaction data and at least one target historical memory data, generate target prompt information, input the target prompt information into the large language model, and output the corresponding interaction feedback information and the corresponding behavioral intention interaction information.

[0085] In some implementations, in order to fully utilize the retrieved historical memory information during the response generation process and to ensure that the generated text response and body movements are semantically consistent, the current input interaction data can be integrated with at least one target historical memory data to generate target prompt information containing personalized contextual enhancement information. This prompt information is then input into a large language model, enabling the model to simultaneously output structured behavioral intent interaction information while generating interactive feedback text. This achieves joint generation of speech content and action instructions within the same semantic framework, thereby improving the naturalness of the interaction and the consistency of multimodal expression.

[0086] Among them, the target prompt information can be an enhanced contextual text that is constructed based on the current input interaction data and the retrieved target historical memory data and is used to input into the large language model.

[0087] Among them, a large language model can be a large-scale pre-trained language model based on deep learning, such as a generative model based on the Transformer architecture, including but not limited to the GPT series, the LLaMA series, or a general language model with dialogue understanding and generation capabilities.

[0088] The interactive feedback information can be text content generated by the large language model based on the target prompt information, used to respond to the user's current input.

[0089] Among them, behavioral intention interaction information can be structured instruction data that describes the actions that the virtual interactive character should perform, which is output synchronously by the large language model while generating interactive feedback text. For example, it can be a control tuple containing intention type, action primitive sequence, amplitude parameters of each action primitive, duration, and emotion intensity value. The intention type can be comforting, encouraging, celebrating, or responding to a request, etc. The action primitive sequence can include predefined action units such as leaning forward, raising a hand, and nodding, which can be used to drive the animation system to generate body movements consistent with the semantics of the interactive feedback.

[0090] In some implementations, a structured, enhanced prompt construction method can be employed: The system first uses the current input interaction data as the core query statement; then, each target historical memory data is converted into a natural language statement according to its type (e.g., preference-based, event-based, relational). For example, the preference-based memory "The user likes science fiction movies" is converted into "You previously told me that your favorite science fiction movie is..."; the event-based memory "The user argued with a friend last Friday" is converted into "You mentioned having an argument with a friend last Friday"; and the relational memory "The intimacy score increased from 6.5 to 7.2" can be converted into "Our relationship has recently become closer." Afterward, the system concatenates these converted memory statements in a preset order (e.g., by matching score from high to low), adds a system role prompt at the beginning (e.g., "You are an understanding digital assistant; please respond to the user based on the following memories about the user"), and adds an output format constraint at the end (e.g., "Please attach a behavioral intent instruction after the reply, in the format <action: intent type, primitive sequence, amplitude, duration, emotional intensity>"), thus forming a complete target prompt message. In this way, the target prompts not only include the current conversation content, but also explicitly incorporate historical memories that are highly relevant to the current context in natural language. This allows the large language model to fully perceive the user's long-term preferences and recent events, thereby generating more personalized and coherent responses.

[0091] Furthermore, the constructed target prompt information can be input into a pre-deployed large language model. After inference, the model outputs a text response, which can contain two parts: interactive feedback information and behavioral intention interactive information.

[0092] In some implementations, the model can automatically generate structured behavioral intent instructions at the end of the response using a designed prompt template. The system then extracts the instructions from the text using parsing rules. For example, the interactive feedback information can be natural language text responding to the user, such as "You sound like you're in a good mood today. Since you like hiking, how about we go for a walk in the countryside this weekend? Breathing fresh air will make you more relaxed." The behavioral intent interactive information can be a structured action control tuple, such as (Intent type: "encourage", Action primitive sequence: ["lean forward", "nod", "smile"], Amplitude parameter: [0.6, 0.4, 0.8], Duration: [1.2 seconds, 0.8 seconds, 1.5 seconds], Emotion intensity value: 0.7).

[0093] In some preferred embodiments, the large language model can be fine-tuned to directly output a compact, domain-specific language, for example...<action:encourage,lean_forward=0.6, nod=0.4,smile=0.8,duration=1.5s,valence=0.7> This facilitates subsequent analysis. For example, when the target prompt information includes the user's memory of outdoor sports preferences, the model-generated interactive feedback will proactively recommend activities related to mountain climbing. Simultaneously, the behavioral intent instructions include positive actions such as "leaning forward" and "smiling," enabling the digital human to simultaneously display encouraging and friendly body language during voice responses. Through this end-to-end joint generation method, semantic consistency and synchronization between language content and behavioral expression are achieved, significantly improving the naturalness and realism in multi-turn interactions.

[0094] In some implementations, a thought-chain-guided behavioral intent generation strategy can also be employed. The system explicitly requires the large language model to output reasoning steps before generating behavioral intent instructions, for example: "Please first consider the user's current mood and memory content, then decide on the most appropriate action." The model output might be something like: "Thinking: The user's mood has improved and they enjoy outdoor activities; they should be encouraged and supported. A forward lean and smiling posture are suitable. Action: Encourage, forward lean 0.5, smile 0.9." By forcing the model to explicitly perform intermediate reasoning, the consistency between behavioral intent and interactive feedback at a deeper semantic level can be improved, reducing potential conflicts between actions and text, and further enhancing the rationality and naturalness of the interaction.

[0095] Through the above methods, more personalized, coherent, and relation-aware interactive feedback text can be output. At the same time, the model synchronously outputs structured behavioral intention interaction information during the same reasoning process, realizing the unity of language generation and behavioral decision-making. This provides a semantically consistent dual driving condition for the subsequent collaborative generation of speech signals and action control signals, avoiding the problem of separation between action and speech in related technologies.

[0096] Step 104: Generate corresponding voice interaction signals based on interactive feedback information, and generate action control signals for preset virtual interactive characters based on behavioral intention interaction information, and drive the virtual interactive characters based on voice interaction signals and action control signals.

[0097] In some implementations, in order to achieve semantic coordination between voice output and body movements in digital human interaction, interactive feedback information can be converted into voice interaction signals via a speech synthesis module, while behavioral intention interaction information can be parsed into action control signals for the virtual interactive character. Both can be synchronously driven to drive the virtual interactive character under the same semantic constraints, thereby achieving joint expression of voice and action, and thus improving the naturalness and overall expressiveness of multimodal output.

[0098] Among them, voice interaction signals can be audio data generated by a speech synthesis module based on interactive feedback information, used to drive virtual interactive characters to make sounds. For example, text-to-speech technology can be used to convert text-based interactive feedback into speech waveforms with specific timbre, intonation and rhythm, which can be used to enable virtual interactive characters to respond to users in the form of voice, enhancing the naturalness and immersion of the interaction.

[0099] Among them, virtual interactive characters can be digital human entities with a drivable skeletal structure and appearance generated based on 3D modeling technology. For example, a digital human with a 3D head model reconstructed from images uploaded by the user and with skeletal binding completed, or a virtual avatar generated based on parametric style. These can be used to present voice output, facial expression changes and body movements during the interaction process, serving as the subject for multimodal interaction with the user.

[0100] Among them, the motion control signal can be a sequence of instructions generated based on behavioral intention interaction information to drive the skeletal structure of the virtual interactive character to perform specific limb movements. For example, it can contain control data including motion primitive types (such as nodding, raising hands, leaning forward), amplitude parameters, duration and emotional intensity values. It can be used to enable digital humans to perform limb movements consistent with semantics while speaking, thereby enhancing the consistency and expressiveness of expression.

[0101] In some implementations, the generated interactive feedback information (i.e., the text response output by the large language model, such as "You sound like you're in a good mood today. Since you like hiking, how about we go for a walk in the countryside this weekend?") can be fed into the speech synthesis module. This speech synthesis module employs an end-to-end text-to-speech (TTS) model based on deep neural networks, such as FastSpeech 2 or VITS architectures. The model first converts the text into a phoneme sequence, then predicts the Mel spectrum using an acoustic model, and finally synthesizes it into waveform audio data via a vocoder (such as HiFi-GAN), thus obtaining the speech interaction signal.

[0102] Optionally, to enhance the personalized features of the digital human, the system can pre-train or load a speech model with a specific timbre. For example, speaker adaptation can be performed using a small number of user-uploaded speech samples to match the synthesized speech in terms of timbre, speech rate, and rhythm with the digital human's set personality or user preferences. For instance, if the digital human is set as a "gentle and intellectual female assistant," the speech synthesis module will select the corresponding female voice model and adjust the speech rate to a moderate level and the tone to a soft tone, ultimately outputting a 16kHz sampling rate PCM audio stream. This voice interaction signal is then sent to an audio playback device to drive the virtual interactive character to speak.

[0103] In some implementations, motion control signals for driving the limb movements of a virtual interactive character can be generated in parallel based on the output behavioral intention interaction information. The behavioral intention interaction information can be a structured control tuple, such as (Intention type: "encourage", Action primitive sequence: ["lean forward", "nod", "smile"], Amplitude parameter: [0.6, 0.4, 0.8], Duration: [1.2 seconds, 0.8 seconds, 1.5 seconds], Emotion intensity value: 0.7).

[0104] In some implementations, to quickly map abstract semantic intents to specific skeletal animation parameters, an intent control library can be pre-built and stored. This intent control library is a mapping table or lightweight database that stores skeletal control information corresponding to different preset behavioral intent interaction information. Each piece of skeletal control information includes at least: the identifier of the target bone node (such as "spine", "head", "left_arm"), the rotation angle or displacement offset, the interpolation curve type (such as linear, Bezier), and the execution duration. For example, the preset "encourage" intent can correspond to a set of skeletal control information: {spine: tilt forward 15 degrees, head: nod action loop 2 times, left_arm: raise to horizontal, mouth_corner: raise 0.3 arcs}.

[0105] Furthermore, based on the intent type field (such as "encourage") in the output behavioral intent interaction information, a precise match or similarity search can be performed in the intent control library to obtain the target skeletal control information that best matches the intent. If the behavioral intent interaction information also contains fine-grained control values ​​such as amplitude parameters and duration, the system can overlay these parameters onto the baseline skeletal control information retrieved from the intent control library to achieve dynamic adjustment. For example, an amplitude parameter of 0.6 means reducing the baseline action amplitude to 60%, and a duration of 1.2 seconds overrides the baseline default duration. In this way, the same intent can generate a rich variety of action expressions, avoiding mechanical repetition.

[0106] For example, suppose the behavioral intention interaction information is (Intention type: "Encourage", Amplitude parameter: 0.6, Duration: 1.2 seconds). The system retrieves the "Encourage" entry from the intention control library to obtain the baseline skeletal control information: {spine: forward tilt 25 degrees, head: nod amplitude 0.5 rad, left_arm: raise angle 90 degrees, duration default 1.5 seconds}. Subsequently, the system linearly scales the baseline according to the amplitude parameter 0.6: the forward tilt angle of the spine becomes 25° × 0.6 = 15°, the nod amplitude becomes 0.5 × 0.6 = 0.3 rad, and the arm raise angle becomes 90° × 0.6 = 54°; at the same time, the execution duration is uniformly adjusted to 1.2 seconds. The final generated motion control signal is a sequence of instructions for the skeletal tree of the virtual interactive character, such as (bone:spine,rotation:(15°,0°,0°),duration:1.2s,easing:out-quad) sent per frame. If the behavioral intent interaction information also includes an emotion intensity value of 0.7, the system can map it to facial expression parameters (such as eyebrow raising and eye opening / closing), enabling coordinated changes in movement and facial expression. In this way, the system achieves efficient and controllable conversion from high-level semantic intent to low-level animation parameters.

[0107] Specifically, after generating voice interaction signals and motion control signals, they can be synchronously sent to the driving engine of the virtual interactive character. The driving engine can include a real-time animation player and an audio output buffer. To ensure precise synchronization between voice and motion, a timestamp synchronization mechanism can be used: the voice synthesis module attaches a time tag to each phoneme when outputting audio, and the motion control signals are arranged into a sequence of animation keyframes along the timeline. While playing the audio stream, the driving engine updates the skeletal transformation matrix of the virtual interactive character frame by frame according to the keyframe timestamps and refreshes the rendered screen. For example, when the digital human says, "Let's go for a walk in the countryside this weekend," the forward leaning motion corresponding to the intention of "encouragement" starts exactly 0.2 seconds before the word begins, and the nodding motion reaches its maximum amplitude at the stressed syllable "walk," thus achieving rhythmic alignment between voice stress and body movement. Through the above end-to-end collaborative driving, the virtual interactive character can respond to the user in a natural, synchronous, multimodal manner, significantly improving the realism and immersive experience of the interaction.

[0108] In some implementations, in addition to employing an intent control library based on precise intent type retrieval, an end-to-end action synthesis method based on a generative action model can be introduced. Specifically, behavioral intent interaction information (including intent type, amplitude, emotional intensity, etc.) and the semantic embedding of the current interaction feedback text can be jointly input into a lightweight diffusion model or variational autoencoder. This model directly outputs a continuous sequence of action control signals (e.g., the rotational angular trajectory of all skeletal nodes within the next second). This generative model is pre-trained on a large human dialogue-action dataset, enabling the synthesis of more natural, non-template-based actions. For example, "encouragement" can produce subtle gesture changes or asymmetrical shoulder movements, avoiding the repetitiveness that may result from traditional retrieval methods. In some implementations, personalized adaptation of action styles can also be introduced: the generative model can be fine-tuned using a small number of user-preferred action samples (e.g., users prefer exaggerated or subtle actions) to align the digital human's body expression style with the user's aesthetic preferences, further enhancing the friendliness and personalization of the interaction.

[0109] This application embodiment acquires input interaction data from a target interactive object and parses the input interaction data to obtain corresponding object preference information, interaction relationship information, and interaction time information. Based on the matching dimensions of object preference information, interaction relationship information, and interaction time information, it queries at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interactive object. Based on the input interaction data and at least one target historical memory data, it generates target prompt information and inputs it into a large language model, outputting corresponding interaction feedback information and corresponding behavioral intention interaction information. Based on the interaction feedback information, it generates corresponding voice interaction signals, and based on the behavioral intention interaction information, it generates action control signals for a preset virtual interactive character, and drives the virtual interactive character based on the voice interaction signals and action control signals. In this way, by performing multi-dimensional matching and explicit retrieval of long-term historical memory before response generation, and by unifying language generation and behavioral intention within the same semantic framework during the output stage, it achieves continuous maintenance of contextual coherence in long-term interactions and multimodal collaborative expression of voice output and body movements. Specifically, compared to related technologies that rely solely on short-term context windows or unstructured caching, leading to information forgetting, this application introduces a matching score mechanism based on preferences, relationships, and time dimensions. This mechanism can accurately retrieve historical information highly relevant to the current context from long-term memory as generation conditions, thus maintaining consistency in referencing historical events across rounds or conversations. Furthermore, addressing the disconnect between action and semantics in related technologies, this application simultaneously generates behavioral intent interaction information when the large language model outputs the text response, and directly generates action control signals based on this intent. This ensures that speech signals and body movements are driven by the same semantic intent from the generation source, avoiding the separation between action and content. In summary, this application can continuously maintain contextual coherence in long-term interactions and achieve multimodal collaborative output of speech and action.

[0110] In some implementations, to automatically filter out key information with long-term storage value from the current interaction process and write it into the memory bank, while avoiding memory bank expansion and noise accumulation, the input interaction data can be divided into several semantic segments according to preset semantic segmentation rules, and the memory score of each segment can be calculated comprehensively. When the score is greater than a preset memory score threshold, the corresponding segment is converted into structured memory data, thereby achieving incremental updates and quality filtering of historical memory, and ensuring the conciseness and effectiveness of the memory bank content. For example, after step 104, that is, after "driving virtual interactive characters based on voice interaction signals and motion control signals", the following is also included: (A.1) Divide the input interaction data according to the preset semantic segmentation rules to obtain at least one semantic segment; (A.2) For each semantic segment, calculate the entity density value of the included entity object, the corresponding sentiment intensity value, the trigger frequency value of the preset memory trigger word in the current semantic segment, and the context association value between the current semantic segment and other semantic segments included in the input interaction data. Based on the entity density value, sentiment intensity value, trigger frequency value and context association value, calculate the memory score value corresponding to each semantic segment. (A.3) When the memory score value corresponding to the semantic fragment is greater than the preset memory score threshold, the semantic fragment is stored as a new historical memory data in the interactive memory bank.

[0111] Among them, semantic segmentation rules can be a set of predefined criteria for dividing continuous interactive text into the smallest semantic units. For example, it can be a set of rules for segmentation based on punctuation marks, clause boundaries, semantic integrity, or dialogue behavior turning points.

[0112] Among them, a semantic fragment can be a continuous text unit with a relatively complete semantic meaning obtained by segmenting the input interactive data according to semantic segmentation rules. For example, a short sentence containing a subject, verb, and object, a clause expressing a complete event or viewpoint, or an emotional expression unit can be used as the smallest analytical unit for memory value assessment.

[0113] The entity density value can be a numerical value used to quantify the richness of information contained in a semantic fragment. For example, it can be a ratio calculated based on the number of entity objects (such as names of people, places, items, event keywords, etc.) identified in the fragment to the length of the fragment text. The more entity objects there are and the shorter the length, the higher the density value.

[0114] Among them, the emotional intensity value can be a numerical value used to quantify the intensity of emotional expression in a semantic segment, such as the absolute value of emotional polarity score or emotional fluctuation amplitude value calculated by an emotional analysis model. The more intense the emotional expression (such as extreme joy, sadness or anger), the higher the intensity value, which can be used to reflect the significance of the segment in the emotional dimension.

[0115] Among them, memory trigger words can be a predefined set of words or phrases used to indicate that the current interactive content has long-term storage value. For example, words that explicitly express user preferences, events, or relationship states, such as "I remember," "I like," "I don't like," "My habit is," and "Important things," can be used to detect whether there is key information that should be remembered in semantic fragments.

[0116] The trigger frequency value can be a numerical value used to quantify the frequency of memory trigger words in a semantic segment. For example, it can be a ratio calculated based on the number of preset memory trigger words in the segment to the total number of words in the segment, or it can be the result of normalizing the number of hits. The denser the trigger words appear, the higher the trigger frequency value, which can be used to reflect the possibility that the segment is actively marked as worth remembering.

[0117] The contextual association value can be a numerical value used to quantify the semantic coherence or relevance between the current semantic segment and other semantic segments in the input interaction data. For example, it can be a value calculated based on the semantic vector similarity between the segment and the segments before and after it, the topic continuity score, or the coherence of reference. The higher the degree of relevance, the larger the contextual association value. It can be used to avoid extracting incomplete information in isolation and to make memory writing more inclined to include segments that are closely related to the overall dialogue context.

[0118] Among them, the memory score can be a quantitative value that comprehensively measures whether a semantic fragment has long-term storage value. The higher the score, the more worthy the fragment is to be written into the interactive memory.

[0119] The memory scoring threshold can be a preset numerical threshold used to determine whether the memory score of a semantic segment meets the minimum standard for being written into the interactive memory.

[0120] In some implementations, semantic segmentation rules can be a set of logical criteria for dividing continuous interactive text into the smallest independent semantic units. Specifically, these may include: segmentation based on punctuation marks (such as periods, question marks, exclamation marks, and semicolons); segmentation based on clause boundaries (such as the position of conjunctions in complex sentences like "because...therefore..." or "although...but..."); segmentation based on semantic integrity detection (such as using lightweight sequence labeling models to identify sentence boundaries, or locating nodes where the subject-verb structure is completed through dependency parsing); and segmentation based on dialogue behavior transition points (e.g., when a user switches topics within the same round of input, such as "I'm very tired today. By the way, do you remember the project I mentioned last time?", segmenting at the "by the way" part). For example, if a user inputs "I went hiking yesterday, and it was very fun. By the way, are you free next week? I'd like to go again," the system segments the text into two semantic segments based on the period: segment 1 "I went hiking yesterday, and it was very fun," and segment 2 "Are you free next week? I'd like to go again." In this way, user input can be decomposed into multiple analysis units with appropriate granularity and relatively complete semantics, laying the foundation for subsequent segment-by-segment evaluation of memory value.

[0121] Furthermore, for each semantic segment obtained from the segmentation, four quantitative indicators can be calculated to comprehensively measure the memory storage potential of that segment. Specifically, these may include: Entity density value: Extracting entity objects (including names of people, places, time words, event keywords, etc.) from semantic segments can be achieved through named entity recognition models. The entity density value can be calculated by dividing the number of entity objects identified in the segment by the total number of words (or characters) in the segment, and normalizing the result to the interval [0,1].

[0122] Emotional intensity score: This can be the intensity of the emotional polarity of a segment calculated by a sentiment analysis model (such as a sentiment classifier fine-tuned based on BERT or a dictionary-based weighted score), taking the absolute value or the normalized result of the intensity score. For example, the emotional intensity score of "I am very angry" is close to 1.0, while "Okay, I understand" is close to 0.1.

[0123] Trigger frequency value: A pre-defined dictionary of trigger words can be used, containing words or phrases that explicitly express changes in preferences, events, commitments, or relationships, such as "I like," "I hate," "I remember," "My habit is," "Something important happened," and "I decided." For each semantic segment, the frequency of each trigger word is counted (considering synonym expansion), and then divided by the total number of words in the segment to obtain the trigger frequency value. For example, in the segment "I remember I especially like rainy days," "I remember" and "especially like" are two trigger words, resulting in a high frequency value.

[0124] Contextual relevance value: This value calculates the semantic coherence or topic relevance between the current semantic segment and other semantic segments in the same input interaction data. Specifically, it can be obtained by calculating the mean cosine similarity between the segment embedding vector (e.g., using Sentence-BERT) and the embedding vectors of neighboring segments or all other segments. For example, if segment 1 talks about climbing mountains and segment 2 talks about next week's plans, and their semantic similarity is 0.6, then the relevance value is high; if segment 1 talks about work troubles and segment 2 talks about the weather, and their similarity is 0.1, then the relevance value is low.

[0125] Through the quantification of the above four dimensions, the system can evaluate each semantic segment from four perspectives: information density, emotional salience, explicit memory markers, and contextual integrity.

[0126] In some implementations, a memory score is calculated for each semantic segment. The calculation formula can be: ; in, , , , For the preset weighting coefficients, satisfy + + + =1, and all are non-negative real numbers; Represents the density value of the entity. Indicates the intensity of emotion. Indicates the trigger frequency value. This indicates a context-dependent value. For example, the default value could be... =0.3, =0.2, =0.3, =0.2, to reflect the importance of entity density and trigger words in judging memory value. Through this score, the system can quantitatively distinguish between high-value memories and low-value temporary conversations.

[0127] For example, a preset memory scoring threshold T (e.g., 0.35) can be used to determine whether a semantic fragment is worth writing into the interactive memory. When a certain semantic fragment... When the value is >T, the fragment can be stored as a new historical memory in the interactive memory bank; otherwise, the fragment is discarded and not stored.

[0128] If a data entry fails, the semantic fragments can be structurally transformed before storage. This includes extracting event element information (time, participants, behavioral events, sentiment tags), preference tags, and quantitative values ​​of relationship states, and then encapsulating them according to the field structure of the interaction memory. For example, they can be encapsulated according to dimensions such as historical event element information, historical preference information, historical interaction relationship information, and historical time information.

[0129] The above methods enable the automatic filtering of valuable information in interactive content. Furthermore, by controlling the writing conditions through preset memory scoring thresholds, only high-scoring fragments are converted into structured memory data, thereby avoiding the writing of irrelevant, redundant, or low-value information, maintaining the refinement and long-term stability of the interactive memory bank, and thus providing a higher-quality source of historical information for memory retrieval in subsequent interactions.

[0130] In some implementations, to avoid inconsistencies or error accumulation in the memory bank due to information conflicts, the semantic fragment to be written can be compared with existing conflict history memory data in the interactive memory bank from multiple dimensions. A comprehensive retention value is calculated for both based on data source reliability, time relevance, trigger frequency, and contextual relevance. When the retention value of the new memory is higher than that of the old memory, a replacement update is performed to achieve deduplication and optimal storage of conflicting information, thereby maintaining the accuracy and logical consistency of the memory bank. For example, "storing the semantic fragment as new historical memory data in the interactive memory bank" in (A.3) can include: (A.3.a1) Conflict detection is performed in the interactive memory based on semantic fragments to obtain conflict detection results; (A.3.a2) When the conflict detection result indicates that there is a content conflict between the conflicting historical memory data in the interactive memory bank and the semantic fragment, determine the credibility of the historical data source, the recent value of the historical time, the historical trigger frequency value of the memory trigger words in the conflicting historical memory data, and the historical contextual relevance of the conflicting historical memory data. (A.3.a3) Calculate the corresponding first memory retention value based on the credibility of the historical data source, the recent value of the historical time, the historical trigger frequency value, and the historical context correlation of the conflict history memory data; (A.3.a4) Obtain the data source credibility and time recent value corresponding to the semantic segment, and calculate the second memory retention value corresponding to the semantic segment based on the data source credibility, time recent value, trigger frequency value and contextual relevance. (A.3.a5) When the second memory retention value is greater than the first memory retention value, the conflict history memory data is discarded, and the semantic fragment is stored as a new history memory data in the interactive memory bank.

[0131] The conflict detection result can be a judgment information used to indicate whether there is a content conflict between the semantic fragment to be written and the historical memory data already stored in the interactive memory bank. For example, it can be a conflict or non-conflict indicator output after analysis based on semantic similarity, attribute slot consistency or event logic contradiction, or it can further include the conflict type (such as different values ​​of the same attribute, contradictory event timing, etc.), which can be used to determine whether the conflict resolution process needs to be initiated.

[0132] Among them, the credibility of historical data sources can be a quantitative value used to quantify the reliability of the information source corresponding to conflict history memory data. For example, it can be obtained based on the authority of the information collection channel (such as information actively confirmed by users being higher than information automatically inferred), the number of times the information is repeatedly confirmed, or the accuracy of the information source in historical interactions. The higher the credibility, the more worthwhile the memory is to be retained.

[0133] Among them, the recent value of historical time can be a value used to reflect how close the time of the generation of conflict history memory data is to the present. For example, it can be a normalized value calculated based on the time difference between the timestamp of the memory and the current time through a decay function (such as exponential decay or linear decay). The smaller the time difference, the higher the recent value.

[0134] Among them, the historical trigger frequency value can be the frequency of occurrence of memory trigger words in the semantic fragment on which the conflict history memory data is based when it is written, or the normalized result of the frequency of the memory being retrieved and hit in subsequent interactions. The higher the frequency, the more times the memory is actively mentioned or verified in the interaction.

[0135] Among them, the historical contextual relevance can be the contextual relevance value calculated when conflict history memory data is written, that is, the degree of semantic coherence between the original semantic fragment corresponding to the memory and other fragments in the same input interaction data.

[0136] The first memory retention value can be a comprehensive quantitative value obtained by weighting and fusing the historical data source credibility, historical time recent value, historical trigger frequency value and historical context relevance of conflict history memory data.

[0137] Among them, the credibility of the data source can be a quantitative value used to quantify the reliability of the information source corresponding to the current semantic fragment. For example, it can be obtained based on the source type of the semantic fragment (such as the user's explicit preference is higher than the event automatically extracted by the system), the user's willingness to confirm the information, or the accuracy of similar source information in historical interactions. The higher the credibility, the more worthwhile the new memory is to be written. It can be used as a positive factor to judge the retention value of new memories when resolving conflicts.

[0138] Among them, the recent value can be a value used to reflect how close the current semantic segment was to the present time.

[0139] The second memory retention value can be a comprehensive quantitative value obtained by weighting and fusing the data source credibility, time relevance, trigger frequency, and contextual association value of the current semantic fragment.

[0140] In some implementations, when preparing to write a new semantic fragment as a candidate memory into the interaction memory bank, a conflict detection operation can first be performed on the current target interaction object in the memory bank. Specific detection may include: attribute slot-based comparison (e.g., the preference slot "favorite movies"), event logic consistency analysis (e.g., a person cannot be in two locations at the same time), and semantic implication relationship judgment (e.g., "likes outdoor sports" conflicts with "dislikes going out"). The system converts the new fragment into structured attribute-value pairs or event tuples, then iterates through existing memories of the same type or in the same slot in the memory bank, calculating the semantic conflict score between them. If the conflict score exceeds a preset threshold (e.g., 0.7), a conflict is determined to exist; otherwise, no conflict is determined.

[0141] Furthermore, when the conflict detection result indicates the existence of one or more historical memory data in the interactive memory bank that conflict with the current semantic fragment content, the system extracts the pre-stored attribute values ​​of four dimensions for each conflicting historical memory data (hereinafter referred to as old memory) for subsequent retention value assessment. Specifically, this includes: Historical data source reliability: A quantitative value in the range [0,1], representing the reliability of the source of old memories. For example, the reliability of memories generated by user active confirmation or explicit user statement is set to 1.0; memories automatically extracted by the system without user confirmation are set to 0.6; and memories indirectly obtained from third parties are set to 0.4.

[0142] Recent historical time: the interval between the timestamp of old memories and the current time. Through the exponential decay function Calculations show that the shorter the interval, the closer the most recent value is to 1.

[0143] Historical trigger frequency value: The frequency of memory trigger words in the semantic fragment on which the old memory was written (i.e., the ratio of the number of trigger words in that fragment to the total number of words in the fragment), or the normalized number of times the memory was retrieved in subsequent interactions. The higher the frequency, the more frequently the memory was verified or mentioned in the interaction, and the higher its importance.

[0144] Historical contextual relevance: The contextual relevance value calculated when an old memory is written, that is, the degree of semantic coherence between the original semantic fragment corresponding to the memory and other fragments in the same round of input. The higher the relevance, the more likely the memory is not isolated noise, but closely related to the overall context.

[0145] In some implementations, the first memory retention value can be calculated by weighted summation based on the four-dimensional attributes of the old memory. This is used to quantify the priority of preserving the conflicting old memory during conflict resolution. In some implementations, the calculation formula is: ; in , , , These are the preset weight coefficients for each dimension, which sum to 1. Indicates the credibility of historical data sources. Indicates the most recent value in history. Indicates the historical trigger frequency value. Indicates the degree of historical context relevance.

[0146] In some implementations, the calculation method for the second memory retention value is the same as that for the first memory retention value. The only difference is the data used (conflict history memory data and current semantic fragments). When it is necessary to calculate the second memory retention value, the calculation method for the first memory retention value can be referred to, which will not be elaborated here.

[0147] In some implementations, when the second memory retention value is greater than the first memory retention value, it indicates that the new semantic fragment has a higher overall retention value than the old memory (more reliable source, stronger timeliness, higher triggering importance, or better contextual integrity). In this case, the system performs a discard operation (delete or mark as expired) on the conflict history memory data (i.e., the old memory) and stores the current semantic fragment as newly added history memory data in the interactive memory bank. Conversely, if the second memory retention value is less than or equal to the first memory retention value, the old memory is retained, the new fragment is discarded, and no writing is performed.

[0148] In some implementations, for cases where the same attribute slot reflects state evolution rather than absolute conflict (e.g., "intimacy increases from 5 to 6"), instead of directly deleting the old memory, the old and new memories can coexist and the evolutionary chain can be recorded (e.g., adding fields such as "previous value: 5, current value: 6, transition time: 2025-06-01 14:30:00"), so that the system can retain the evolutionary relationship from the past state to the current state.

[0149] In some implementations, besides conflict resolution methods based on weighted summation and comparison of retained values, a progressive memory fusion strategy based on temporal evolution maps can be introduced. Specifically, for certain non-binary conflicts (such as "I like sweets" versus "I'm giving up sugar"), the system does not directly delete old memories. Instead, it creates a "state evolution node," marking the old memory as "historical preference" and the new memory as "current preference," and establishing a timestamp and causal edge between them. During subsequent retrievals, the system dynamically selects which preference to provide based on the current time and the time distance between the two nodes, or provides both while noting "You used to like sweets, but you're currently giving up sugar." This approach preserves the complete evolutionary trajectory of user preferences while avoiding absolute information loss, making it particularly suitable for scenarios where user habits or attitudes change gradually, thus enhancing the memory system's ability to model complex human behavior.

[0150] By using the above methods, high-value information can be retained while low-value or outdated conflicting memories are eliminated, thereby maintaining the logical consistency and information quality of the interactive memory bank, and providing more accurate and reliable personalized historical evidence for memory retrieval in subsequent interactions.

[0151] In some implementations, to transform unstructured interactive text into a structured memory representation that can be subsequently retrieved and updated, stored data with a unified structural form can be generated to achieve efficient organization, classification, indexing, and long-term evolution management of historical information, thereby improving the retrieval and operability of the memory bank. For example, "storing semantic fragments as new historical memory data in the interactive memory bank" in (A.3) may further include: (A.3.b1) Extract event element information corresponding to the semantic fragment, wherein the event element information includes interaction time information, at least one interactive object contained in the semantic fragment, and the behavioral events and sentiment tags of the target interactive object represented by the semantic fragment; (A.3.b2) Generate the stored data corresponding to the semantic fragment based on the event element information, object preference information, and interaction relationship information corresponding to the semantic fragment; (A.3.b3) Store the data as new historical memory data in the interactive memory bank.

[0152] Among them, event element information can be a structured data set extracted from semantic fragments to describe the core elements of a complete interactive event. For example, it may include the time information of the interaction, the identifier of at least one interactive object involved in the interaction, the description of the behavior event performed by the interactive object, and the sentiment tag corresponding to the event. It can be used to transform unstructured text into atomic memory units that are easy for machines to understand and retrieve.

[0153] The interaction object can be an entity involved in the interaction within the semantic fragment, such as the target interaction object itself, a virtual interaction character, or a third party mentioned in the dialogue (e.g., "my friend A"). It can be extracted from the semantic fragment using named entity recognition or coreference resolution techniques to identify the relational participants in the event memory, so that memory retrieval and relation modeling can be performed on the interaction object dimension in the future.

[0154] Among them, behavioral events can be specific actions performed by an interactive object or events described in semantic fragments, such as a user going for a walk in the park, a user expressing their liking for a movie, or a user confiding a troublesome matter to a digital human, expressed in the form of verb phrases or event phrases.

[0155] Among them, the emotion label can be a classification of the emotion tendency expressed by the semantic fragment or an indicator of the emotion intensity, such as discrete emotion categories such as joy, sadness, anger, and surprise, or a continuous representation combined with the emotion intensity value (such as high intensity joy).

[0156] The stored data can be a data object obtained by integrating the event element information, object preference information and interaction relationship information of semantic fragments according to a preset structured format, and used for persistent writing into the interaction memory.

[0157] In some implementations, for semantic segments that have passed memory scoring (and optional conflict detection; if no conflict is detected or the system is configured to skip conflict detection and store directly), structured event element information can be extracted first. Specifically, the following four sub-elements can be extracted from the semantic segments using a natural language understanding pipeline (including dependency parsing, semantic role labeling, and named entity recognition): Interaction time information: including time words explicitly mentioned in the segment (such as yesterday, last Friday), and automatically appended with the system timestamp of the current interaction for subsequent retrieval by timeline; At least one interaction object: identifying the subject performing the behavior or the object affected, such as the target interaction object itself (I, the user), a virtual interaction role (you), or a third party (my friend M); Behavioral event: extracting the core action or event described in the segment, represented by verb phrases or event phrases, such as going for a run in the park or expressing dissatisfaction with work; Emotional label: outputting the emotional tendency expressed by the segment (such as joy, sadness, anger, neutral) through an emotional classification model, and potentially appending an emotional intensity value.

[0158] Furthermore, the aforementioned event element information can be integrated with object preference information and interaction relationship information to generate a complete and structured stored data. The stored data can adopt a preset composite data structure, such as JavaScript Object Notation (JSON) format, and may include the following fields: event (event element sub-object, containing time, participants, action, and emotion), preferences (a set of newly extracted or updated preference tags from the current semantic fragment), relation (quantified value of the relationship state involved in the current interaction, such as the increment or latest value of the user's intimacy with the virtual character), source_credibility (data source credibility, such as 0.9 if explicitly stated by the user), timestamp (system time at the time of storage), and access_count (a counter for the number of subsequent retrieval hits, initially set to 0), etc.

[0159] Furthermore, after generating and storing the data, it can be written as a new historical memory record to the interaction memory maintained for the current target interaction object. During the write process, an index can be automatically built based on the timestamps and event elements in the stored data, including indexes by time range, by interaction object (participant), and by preference tags, to accelerate subsequent retrieval queries. If the interaction memory has implemented a database sharding or table partitioning strategy (e.g., partitioned by week or month), the data can be written to the corresponding partition based on the timestamp.

[0160] For example, after a successful write, the system can update the metadata of the interactive object in the memory bank, such as the total number of memories and the latest memory time.

[0161] In some implementations, a progressive compression strategy for memories can be employed to balance storage space and retrieval efficiency. When a historical memory record is not retrieved for an extended period (e.g., more than 30 days and with a zero access count), it can be converted into a summary form—retaining the core actions and times from the event elements, but discarding specific details and sentiment tags, and merging preference and relationship fields into high-level statistics (e.g., "prefers outdoor activities" rather than the specific "hiking"). When the compressed memory is retrieved again and its importance increases, the system can trigger reverse decompression (e.g., generating a more detailed description based on context using a large language model). In this way, the storage hierarchy of the memory bank can be dynamically managed during long-term interactions, avoiding infinite expansion, while ensuring that frequently used memories maintain high resolution and that low-frequency memories retain historical traces in a compact form.

[0162] The above methods enable explicit and component-based storage of memory content, ensuring that each memory in the interactive memory bank has a unified field structure. This facilitates subsequent classification, indexing, and efficient retrieval based on the interaction object dimension, memory type dimension, or time dimension, thereby providing a clear and computable memory foundation for personalized response generation and relationship evolution modeling in long-term interactions.

[0163] In some implementations, to synchronously update the dynamic relationship states between the user and virtual interactive characters, and between the user and other interactive objects, during memory writing, quantified values ​​of new relationship states between the user and virtual characters, and between the user and other interactive objects, can be calculated. These quantified values, along with the stored data, are then written into the interaction memory bank. This enables continuous evolution modeling of the relationship context during the interaction process, thereby providing dynamically updated relationship-aware information for subsequent response generation. For example, before (A.3.b3), that is, before "storing the stored data as newly added historical memory data into the interaction memory bank," the following may also be included: (B.1) Obtain the emotional intensity value corresponding to the target object represented by the semantic fragment, the first interaction frequency value corresponding to the target interactive object and the virtual interactive character, and the second interaction frequency value corresponding to the target interactive object and other interactive objects; (B.2) Obtain the first historical relationship state quantization value between the target interactive object and the virtual interactive role, the second historical relationship state quantization value between the target interactive object and other interactive objects, the first decay rate parameter between the interaction time information and the first historical time information corresponding to the first historical relationship state quantization value, and the second decay rate parameter between the interaction time information and the second historical time information corresponding to the second historical relationship state quantization value. (B.3) Based on the first historical relationship state quantification value, emotion intensity value, first interaction frequency value and first decay rate parameter, calculate the first relationship state quantification value corresponding to the target interaction object and the virtual interaction role; (B.4) Based on the second historical relationship state quantification value, emotion intensity value, second interaction frequency value, and second decay rate parameter, calculate the second relationship state quantification value corresponding to the target interaction object and other interaction objects; The stored data will then be stored as new historical memory data in the interactive memory bank, including: The stored data, the first relationship state quantification value corresponding to the target interactive object and the virtual interactive role, and the second relationship state quantification value corresponding to the target interactive object and other interactive objects are stored as newly added historical memory data in the interactive memory bank.

[0164] The first interaction frequency value can be a numerical value used to quantify the density of interaction between the target interaction object and the virtual interaction character in historical interactions. For example, it can be a normalized statistical value based on the total number of dialogue rounds, interaction duration, or number of event triggers within a preset time window. The more frequent the interaction, the higher the frequency value.

[0165] The second interaction frequency value can be a numerical value used to quantify the density of interactions between the target interaction object and other interaction objects (such as third parties, such as the user's friends or family) in historical interactions.

[0166] Among them, the first historical relationship state quantification value can be the relationship state value between the target interaction object and the virtual interaction character stored in the interaction memory bank before the current interaction occurs, such as intimacy score, trust score or emotional connection strength value.

[0167] The second historical relationship state quantification value can be the relationship state value between the target interactive object and other interactive objects (such as a third party) stored in the interaction memory bank before the current interaction occurs. When there are multiple other interactive objects, there will also be multiple second historical relationship state quantification values.

[0168] Among them, the first historical time information can be the interaction timestamp or update time corresponding to the quantitative value of the first historical relationship state.

[0169] The first decay rate parameter can be a preset weight coefficient used to control how quickly the relationship between the target interactive object and the virtual interactive character decays over time.

[0170] The second historical time information can be the interaction timestamp or update time corresponding to the quantified value of the second historical relationship state.

[0171] The second decay rate parameter can be a preset weighting coefficient used to control how quickly the relationship between the target interactive object and other interactive objects decays over time.

[0172] Among them, the first relationship state quantification value can be a numerical value that represents the latest relationship state between the target interaction object and the virtual interaction role after this round of interaction.

[0173] The second relationship state quantification value can be a numerical value that represents the latest relationship state between the target interaction object and other interaction objects after this round of interaction.

[0174] In some implementations, once the system has determined through memory scoring and conflict detection (or direct storage process) that the current semantic fragment should be written to the memory, the relationship state between the user and the virtual character, as well as between the user and other objects, needs to be updated synchronously. First, three basic values ​​can be obtained: Emotional intensity value The value is derived from the emotional intensity value calculated for the semantic fragment above (e.g., the score in the [0,1] interval output by the emotional classification model, where 0.9 represents extreme joy and 0.1 represents slight negativity). First interaction frequency value This refers to the interaction frequency between the target interactive object and the virtual interactive character, such as a normalized value based on the total number of dialogue turns in the past 30 days, or obtained by dividing the average number of daily interactions within a sliding time window (e.g., the last 7 days) by the expected maximum frequency. The system can maintain a counter in the interaction memory bank, which increments after each interaction and decays exponentially by day. Second interaction frequency value : The frequency of interaction between the target interactive object and other interactive objects (such as the third party "friend Xiaoming" mentioned in the dialogue). This value can be extracted from the interaction descriptions mentioned in the semantic fragment. For example, if the user says "I have been chatting with Xiaoming a lot lately", the system can estimate a higher frequency value (such as 0.7); if it is mentioned only once, a lower value (such as 0.1) is taken.

[0175] In some implementations, the four core parameters required for relation updates can be further obtained: First historical relationship status quantification value The most recently updated relationship status value between the user and the virtual character (such as intimacy score, ranging from 0 to 10) stored in the interactive memory. First historical time information The last update timestamp corresponding to the quantified value of the first historical relationship status; Second historical relationship status quantification value : The historical relationship status value between the user and other interactive objects (such as Xiaoming). If there is no historical record, the initial default value (e.g., 5.0) will be used. Second historical time information : The last update timestamp corresponding to the quantified value of the second historical relationship status.

[0176] In addition, the system can also obtain the first decay rate parameter. Second decay rate parameter These parameters are used to control the rate at which the relationship between the target interactive object and the virtual interactive character, and between the target interactive object and other interactive objects, decays over time. The decay rate parameter can be a preset global constant (e.g., 0.05 / day) or dynamically adjusted according to the interaction frequency (the more frequent the interaction, the smaller the decay rate).

[0177] In some implementations, the first relationship state quantification value between the user and the virtual character can be calculated using the relationship state update formula based on the parameters obtained above. In some implementations, the update formula may be as follows: ; in, This represents a quantified value of the historical relationship between the target interactive object and the virtual interactive character before the update (i.e., before the current interaction occurred), which can be read from the interaction memory. This represents the intensity of emotion expressed by the current semantic segment. Indicates the interaction frequency value. This represents the time interval between the current interaction time information and the first historical time information corresponding to the first historical relationship state quantification value. and For the preset emotional contribution coefficient and interaction frequency contribution coefficient (e.g.) =0.3, =0.2), (Unit: days) The decay term is directly multiplied by the decay rate using the time interval, without introducing an additional independent term. Variables are used to simplify calculations. The minus sign in the formula indicates that the relationship decays naturally over time. If... If the result is negative, it is clamped to 0; if it exceeds the maximum value (e.g., 10), it is clamped to 10. This demonstrates that positive emotions and high-frequency interactions increase intimacy, while long time intervals lead to natural estrangement.

[0178] Similarly, the second relationship state quantification value between the user and other interactive objects (such as the third party "Xiaoming") can be calculated. The calculation method is the same as that of the first relationship state quantification value, with only the specific numerical difference. Therefore, when calculating the second relationship state quantification value, the calculation method of the first relationship state quantification value can be referred to, which will not be elaborated here.

[0179] In some implementations, after calculating two new relational state quantification values, they can be written to the interaction memory along with previously generated stored data (event elements, preferences, etc.). During storage, the relational state values ​​can be updated separately in the relational state table corresponding to the target interaction object, or used as a field in the stored data.

[0180] Through the above updates, the system can dynamically detect the evolution of the relationship between the user and different objects, providing real-time and accurate relational status basis for multidimensional memory retrieval in interaction (especially the matching degree calculation based on interaction relationship information), thereby enhancing the relationship coherence and personalized expression consistency of digital humans in long-term interaction.

[0181] Please refer to Figure 3 The following is combined with Figure 3 The overall process of the embodiments of this application will be introduced.

[0182] In some implementations, the overall workflow of this application can be summarized into the following four stages. First, in the interaction initiation stage, the user can provide voice or text input interaction data through a microphone or text input interface. The interaction module receives this input, and if it is a voice signal, it converts it into text through the built-in speech recognition module (Automatic Speech Recognition, ASR), thereby forming a unified text representation. Simultaneously, the avatar creation branch (C1) of the avatar module performs a one-time process during system initialization: receiving the image uploaded by the user, generating a 3D mesh model of the virtual interactive character through 3D reconstruction technology, and completing skeletal binding and skinning to form a drivable digital human skeleton. This pre-calculated avatar will be cached in the system for real-time use during subsequent interactions.

[0183] Furthermore, during the memory retrieval phase before response generation, the chat agent controller can invoke the memory module to perform memory retrieval operations along the reading path. Specifically, the system can prepare the current interaction context, search the interaction memory bank for historical memory data related to the current input semantics, user preferences, historical relationships, and temporal relevance, and use a weighted fusion strategy to concatenate at least one selected target historical memory data with the current input text to form an enhanced prompt. This enhanced prompt is then input into the core of the large language model. The large language model generates natural language interaction feedback to respond to the user and simultaneously performs behavioral intent analysis, outputting structured behavioral intent interaction information (e.g., control tuples containing intent type, action primitive sequence, amplitude parameters, duration, and sentiment intensity values).

[0184] Subsequently, in the multimodal output stage, the system can process two signals in parallel: one signal sends interactive feedback information to the text-to-speech (TTS) module, synthesizing it into a speech interaction signal and outputting it through a player; the other signal sends behavioral intent interaction information to the animation system. The animation system, based on the intent type and parameters, drives a pre-bound digital skeleton to generate corresponding body movements (such as nodding, waving, leaning forward, etc.), thereby achieving synchronized and coordinated expression of speech output and body movements. During this process, the chat proxy controller coordinates the timing and data flow between the three modules, ensuring consistency between the visual and auditory channels.

[0185] Furthermore, during the memory update phase after the response is completed, the system performs memory persistence operations along the write path. The memory module saves the complete current dialogue record and, through a background fact extraction and filtering mechanism, extracts key information with long-term storage value (such as user preferences, important events, relationship status changes, etc.) from the current interaction. After conflict detection and deduplication, the structured memory data is written into the interaction memory bank. Through the above-mentioned closed-loop mechanism of "retrieval-generation-update," the system can dynamically accumulate and utilize historical information in continuous multi-round interactions, thereby maintaining the personalized characteristics and behavioral consistency of the digital human in long-term interactions.

[0186] Please refer to Figure 4 and Figure 5 , Figure 4 This is an example diagram of the user-digital human interaction mode provided in the embodiments of this application. Figure 5 This is a diagram showing the evaluation results of factors influencing the realism of digital humans and their interactive experience, provided in an embodiment of this application.

[0187] like Figure 4As shown, through analysis of the topic distribution of user interaction content, the interactive digital human system constructed in this application exhibits several typical interaction modes in practical use, including AI as a MemoryBuffer interaction, AI-mediated Relational Self-Disclosure interaction, AI as a Proxy for Understanding Companion interaction, and Casual Engagement interaction. From the overall topic distribution, user interaction content mainly focuses on self-expression, relational interaction, and passive response, indicating that the system has a high frequency of practical application in supporting user expression and relationship building.

[0188] Among these, memory-buffered interactions involve users using the digital human as a temporary information recording tool to store daily experiences or thoughts for later retrieval in subsequent interactions; relational expression interactions reveal users' tendency to express emotions or private information that are difficult to express directly in real-world scenarios; proxy-understanding interactions reflect users using the digital human as a relational proxy to obtain feedback through interaction and understand their own or others' states; and lightweight entertainment interactions mainly focus on cognitive exploration and entertainment interaction dimensions. Combining the citations of typical interaction examples (e.g., self-expression accounts for 47% in 1A, and relational interaction accounts for 38% in 2B), it can be seen that different types of interactions have significant differences in semantic distribution, and users actively adjust their interaction methods according to the interaction goals. This confirms that the dynamic memory mechanism introduced in this application not only supports information recording but also supports multi-level interpersonal interaction and emotional expression needs. Furthermore, due to the continuous participation of memory in multiple rounds of interaction, the system can maintain consistent semantic and behavioral performance across different interaction modes, effectively promoting the user's transition from simple information interaction to deep relational interaction.

[0189] Further reference Figure 5 This application provides a quantitative assessment of the key factors that influence the realism of digital humans. Figure 5 (a) indicates that among the three modalities of voice, personification (role), and appearance, voice and personification have a higher weight in constructing the realism perceived by users, with most users rating them as the most important or second most important factors, while the influence of appearance factors is relatively low. This suggests that personalized expression based on language generation and memory plays a decisive role in interactive systems. This invention, through the long-term retention of user preferences and dynamic updating of interaction history by the memory module, can significantly enhance the naturalness of digital human voice output and the consistency of role personality. Figure 5(b) The user ratings (1-7 points) across multiple experience dimensions are shown, all of which are at a high level (average close to 5.5 or above), indicating that the present invention has received good user feedback in terms of speech generation quality, individual consistency and natural interaction, and verifying the effectiveness of the combination of multimodal collaborative generation and memory mechanism. Figure 5 (c) Further quantification of the long-term interaction effect of the system was carried out through user experiments (sample size 12, 6 pairs): The left subplot shows that after the introduction of the dynamic memory mechanism, the user's intimacy score after the interaction was significantly higher than before the interaction (the social connection scale score improved significantly), indicating that the system can enhance the emotional connection between the user and the digital human; the middle subplot shows that during the continuous multi-round dialogue, the user's familiarity with the system and memory perception gradually increased with the number of interaction rounds, proving that the dynamic memory mechanism can play a continuous role in the time dimension; the right subplot shows that the user gave a high score to the transparency and controllability of the system (the average score is close to 6 points), indicating that the explicit memory management mechanism adopted in this application (including the editability, deletion and sharing strategy control of memory) has good comprehensibility and operability at the user level.

[0190] Please see Figure 6 This application also provides a virtual interactive character control device, which can implement the above-described virtual interactive character control method. The virtual interactive character control device includes: The parsing module 61 is used to obtain the input interaction data of the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information and interaction time information; The query module 62 is used to query at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interaction object, according to the matching dimensions of object preference information, interaction relationship information and interaction time information. Output module 63 is used to generate target prompt information based on input interaction data and at least one target historical memory data, input the target prompt information into the large language model, and output the corresponding interaction feedback information and the corresponding behavioral intention interaction information. The driving module 64 is used to generate corresponding voice interaction signals based on interactive feedback information, and to generate action control signals for preset virtual interactive characters based on behavioral intention interaction information, and to drive the virtual interactive characters based on the voice interaction signals and action control signals.

[0191] The specific implementation of the virtual interactive character control device is basically the same as the specific embodiment of the virtual interactive character control method described above, and will not be repeated here. Subject to meeting the requirements of the embodiments of this application, the virtual interactive character control device may also be equipped with other functional modules to implement the virtual interactive character control method in the above embodiments.

[0192] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned virtual interactive role control method. This computer device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0193] Please see Figure 7 , Figure 7 The hardware structure of a computer device according to another embodiment is illustrated. The computer device includes: The processor 71 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 72 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 72 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 72 and is called and executed by the processor 71 using the virtual interactive role control method of the embodiments of this application. Input / output interface 73 is used to implement information input and output; The communication interface 74 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 75 transmits information between various components of the device (e.g., processor 71, memory 72, input / output interface 73, and communication interface 74); The processor 71, memory 72, input / output interface 73, and communication interface 74 are connected to each other within the device via bus 75.

[0194] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described virtual interactive role control method.

[0195] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0196] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0197] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0198] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0199] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0200] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0201] It should be understood that in this application, "at least one" and "several" refer to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0202] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0203] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0204] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0205] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0206] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for controlling a virtual interactive character, characterized in that, The method includes: Obtain the input interaction data from the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information and interaction time information; Based on the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information, at least one target historical memory data that matches the input interaction data is queried from the interaction memory bank stored for the target interaction object; Based on the input interaction data and the at least one target historical memory data, target prompt information is generated, and the target prompt information is input into the large language model to output the corresponding interaction feedback information and the corresponding behavioral intention interaction information. Based on the interactive feedback information, a corresponding voice interaction signal is generated, and based on the behavioral intention interaction information, an action control signal for a preset virtual interactive character is generated, and the virtual interactive character is driven based on the voice interaction signal and the action control signal.

2. The virtual interactive character control method according to claim 1, characterized in that, The step of querying at least one target historical memory data matching the input interaction data from the interaction memory bank stored for the target interaction object, based on the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information, includes: Read multiple historical memory data from a preset interactive memory bank; Based on the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information corresponding to the input interaction data, calculate the matching degree score between the input interaction data and each historical memory data; Based on the matching score between the input interaction data and each historical memory data, at least one target historical memory data that matches the input interaction data is selected from the plurality of historical memory data.

3. The virtual interactive character control method according to claim 2, characterized in that, The step of calculating the matching score between the input interaction data and each historical memory data point according to the matching dimensions of the object preference information, the interaction relationship information, and the interaction time information corresponding to the input interaction data includes: For each piece of historical memory data, obtain the corresponding historical event element information, historical preference information, historical interaction relationship information, and historical time information; For each historical memory data, a first matching degree sub-score is calculated based on the similarity between the historical event element information and the input interaction data; a second matching degree sub-score is calculated based on the similarity between the historical preference information and the object preference information; a third matching degree sub-score is calculated based on the similarity between the historical interaction relationship information and the interaction relationship information; and a fourth matching degree sub-score is calculated based on the difference between the historical time information and the interaction time information. Based on the first matching degree sub-score, the second matching degree sub-score, the third matching degree sub-score, and the fourth matching degree sub-score, the matching degree score between the input interaction data and each historical memory data is calculated.

4. The virtual interactive character control method according to claim 1, characterized in that, After driving the virtual interactive character based on the voice interaction signal and the motion control signal, the method further includes: The input interaction data is divided according to a preset semantic segmentation rule to obtain at least one semantic segment; For each semantic segment, calculate the entity density value of the included entity objects, the corresponding sentiment intensity value, the trigger frequency value of the preset memory trigger words in the current semantic segment, and the context association value between the current semantic segment and other semantic segments included in the input interaction data. Based on the entity density value, the sentiment intensity value, the trigger frequency value, and the context association value, calculate the memory score value corresponding to each semantic segment. When the memory score value corresponding to the semantic fragment is greater than the preset memory score threshold, the semantic fragment is stored as a new historical memory data in the interactive memory bank.

5. The virtual interactive character control method according to claim 4, characterized in that, The step of storing the semantic fragment as new historical memory data in the interactive memory bank includes: Based on the semantic fragment, conflict detection is performed in the interactive memory to obtain the conflict detection result; When the conflict detection result indicates that there is a content conflict between the conflicting historical memory data in the interactive memory bank and the semantic fragment, the credibility of the historical data source, the recent value of the historical time, the historical trigger frequency value of the memory trigger word in the conflicting historical memory data, and the historical contextual relevance of the conflicting historical memory data are determined. Based on the historical data source credibility, the historical time recent value, the historical trigger frequency value, and the historical context correlation degree corresponding to the conflict history memory data, the corresponding first memory retention value is calculated; Obtain the data source credibility and time relevance value corresponding to the semantic segment, and calculate the second memory retention value corresponding to the semantic segment based on the data source credibility, the time relevance value, the trigger frequency value and the context relevance. When the second memory retention value is greater than the first memory retention value, the conflict history memory data is discarded, and the semantic fragment is stored as a new historical memory data in the interactive memory bank.

6. The virtual interactive character control method according to claim 4, characterized in that, The step of storing the semantic fragment as new historical memory data in the interactive memory bank includes: Extract event element information corresponding to the semantic fragment, wherein the event element information includes interaction time information, at least one interactive object contained in the semantic fragment, and the behavioral events and sentiment tags of the target interactive object represented by the semantic fragment; Based on the event element information, object preference information, and interaction relationship information corresponding to the semantic fragment, the stored data corresponding to the semantic fragment is generated; The stored data is stored as new historical memory data in the interactive memory bank.

7. The virtual interactive character control method according to claim 6, characterized in that, Before storing the stored data as new historical memory data in the interactive memory bank, the method further includes: The emotional intensity value corresponding to the target object represented by the semantic fragment, the first interaction frequency value corresponding to the target interactive object and the virtual interactive character, and the second interaction frequency value corresponding to the target interactive object and other interactive objects are obtained. The system obtains a first historical relationship state quantization value between the target interactive object and the virtual interactive character, a second historical relationship state quantization value between the target interactive object and the other interactive objects, a first decay rate parameter between the interaction time information and the first historical time information corresponding to the first historical relationship state quantization value, and a second decay rate parameter between the interaction time information and the second historical time information corresponding to the second historical relationship state quantization value. Based on the first historical relationship state quantification value, the emotion intensity value, the first interaction frequency value, and the first decay rate parameter, calculate the first relationship state quantification value corresponding to the target interaction object and the virtual interaction role; Based on the second historical relationship state quantification value, the emotion intensity value, the second interaction frequency value, and the second decay rate parameter, calculate the second relationship state quantification value corresponding to the target interaction object and the other interaction objects; The step of storing the stored data as new historical memory data in the interactive memory bank includes: The stored data, the first relationship state quantification value corresponding to the target interactive object and the virtual interactive role, and the second relationship state quantification value corresponding to the target interactive object and the other interactive objects are stored as newly added historical memory data in the interactive memory bank.

8. A virtual interactive character control device, characterized in that, The device includes: The parsing module is used to acquire the input interaction data input by the target interactive object, and parse the input interaction data to obtain the corresponding object preference information, interaction relationship information and interaction time information; The query module is used to query at least one target historical memory data that matches the input interaction data from the interaction memory bank stored for the target interaction object, according to the matching dimensions of the object preference information, the interaction relationship information and the interaction time information. The output module is used to generate target prompt information based on the input interaction data and the at least one target historical memory data, input the target prompt information into the large language model, and output the corresponding interaction feedback information and the corresponding behavioral intention interaction information. The driving module is used to generate corresponding voice interaction signals based on the interaction feedback information, and to generate action control signals for a preset virtual interactive character based on the behavioral intention interaction information, and to drive the virtual interactive character based on the voice interaction signals and the action control signals.

9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the virtual interactive character control method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the virtual interactive character control method according to any one of claims 1 to 7.