A virtual character personality dynamic evolution method and device based on emotional entropy deposition

By constructing a multi-dimensional intrinsic parameter matrix and a personality-embedded attention layer, combined with emotional entropy and plasticity decay function, the problem of maintaining the stability and dynamic growth of virtual character personalities in long-term interaction is solved, thereby improving the realism of the interactive experience and user satisfaction.

CN122197974APending Publication Date: 2026-06-12YUANYU HUANYU ARTIFICIAL INTELLIGENCE TECHNOLOGY (SUZHOU) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUANYU HUANYU ARTIFICIAL INTELLIGENCE TECHNOLOGY (SUZHOU) CO LTD
Filing Date
2026-02-04
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies struggle to ensure the stability of virtual characters' personalities while enabling their non-linear, progressive, and dynamic growth based on interactive experiences. This results in increasingly mechanical interactive experiences that lack the fun and realism of character development.

Method used

By constructing a multi-dimensional dynamic intrinsic parameter matrix, introducing emotional entropy deposition and plasticity decay functions, and combining personality embedding attention layer, the attention weight calculation of the Transformer model is modulated to achieve the natural evolution of virtual character personality.

🎯Benefits of technology

This approach enables virtual characters to develop stable and natural personalities through long-term interaction, enhancing the realism of emotional companionship and user satisfaction, and ensuring the rationality and ultimate stability of personality changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197974A_ABST
    Figure CN122197974A_ABST
Patent Text Reader

Abstract

The application discloses a virtual character personality dynamic evolution method and device based on emotional entropy deposition, and belongs to the technical field of artificial intelligence. The method drives a multi-dimensional internal parameter matrix to iteratively update by calculating a user input emotional driving force index, and simulates the natural growth law of personality from high plasticity to stability by using a plasticity decay function. Then, the updated matrix is converted into a bias signal and embedded in the attention calculation of a Transformer model in an additive term manner to form a personality embedded attention layer, so that personality modulation is realized at the bottom of language generation. The application solves the problems of static personality or easy splitting of existing virtual characters, enables the virtual characters to maintain personality stability while realizing natural and coherent dynamic growth in long-term interaction, and significantly improves the realism of emotional companionship and user satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and virtual character technology, specifically to a method and device for the dynamic evolution of virtual character personality based on emotional entropy deposition, which is particularly suitable for scenarios that require long-term interaction and reflect character growth, such as emotional companionship, intelligent customer service, and game NPCs. Background Technology

[0002] With the rapid development of deep learning and metaverse technology, virtual digital humans have been widely used in fields such as emotional companionship, intelligent customer service, and game interaction. However, existing core technologies for constructing virtual character personalities have significant limitations, mainly falling into two categories: Fixed-parameter mapping method: This method typically maps static values ​​of psychological models (such as the Big Five personality traits) to an emotional space (such as the PA space) to control the tone or emotional intensity of the generated text. Although it achieves the setting of the initial personality and the controllability of emotional intensity, its core personality parameters remain unchanged after initialization. AI characters cannot undergo substantial personality evolution through long-term interaction with users, resulting in a gradually mechanical interactive experience that lacks the fun and realism of character development.

[0003] The memory retrieval-based simulation method utilizes a vector database to store historical dialogue records and employs Retrieval-Enhanced Generation (RAG) technology to retrieve relevant historical fragments to maintain character consistency. Essentially, this method involves the reproduction or role-playing of past words and actions, relying on piecing together external memories rather than the development of the character's inner personality. Its drawbacks include high computational cost and the potential for inconsistencies and splits in character portrayal due to the retrieval of contradictory or fragmented historical data.

[0004] In conclusion, existing technologies struggle to achieve non-linear, gradual, and dynamic character growth based on interactive experiences while maintaining the stability of a character's personality. Therefore, a new technological solution is urgently needed to enable virtual characters to evolve their personalities naturally, like living organisms, while preserving the consistency of their core traits. Summary of the Invention

[0005] This invention proposes a method and apparatus for the dynamic evolution of virtual character personality based on emotional entropy deposition. The core of this invention lies in constructing a multi-dimensional dynamic intrinsic parameter matrix and designing a personality-embedded attention layer. By transforming the intrinsic parameter matrix into a bias signal and injecting it into the attention weight calculation of the Transformer model, the generation process is modulated. Simultaneously, by calculating emotional driving force indicators (such as emotional entropy) during the interaction process and introducing a plasticity decay function (such as a time decay factor), nonlinear iteration of the intrinsic parameter matrix is ​​achieved, thereby enabling the virtual character to exhibit stable and natural personality growth over long-term interaction.

[0006] According to one aspect of the present invention, a method for dynamic evolution of virtual character personality based on emotional entropy deposition is provided, comprising: During user interactions, an emotion-driven indicator is calculated based on user input. Based on the aforementioned emotional drive index, an intrinsic parameter matrix for characterizing the personality of the virtual character is iteratively updated. The intrinsic parameter matrix includes parameters in at least three dimensions: core personality traits, cognitive state, and interpersonal relationship state. When generating a response to the user input, the language generation process is modulated based on the updated intrinsic parameter matrix.

[0007] As a further technical solution, the emotional driving force index is an emotional entropy calculated based on the emotional analysis results of user input.

[0008] As a further technical solution, when iteratively updating the intrinsic parameter matrix, the update amplitude is adjusted according to a plasticity decay function, and the output value of the plasticity decay function decreases as the total number of interaction rounds increases.

[0009] As a further technical solution, the language generation process is modulated by converting the intrinsic parameter matrix into a bias signal and injecting it into the attention weight calculation of the Transformer language model.

[0010] As a further technical solution, the bias signal participates in the scaled dot product attention calculation as an additive term, and the modulated attention calculation formula is as follows: , in, The bias signal is... It is a learnable gating scalar.

[0011] As a further technical solution, the method also includes: after the interaction session ends, saving the updated intrinsic parameter matrix for the initial personality state of the virtual character in subsequent interactions.

[0012] According to one aspect of the present invention, a device for dynamic evolution of virtual character personality is provided, comprising: The sentiment analysis module is used to calculate sentiment driving force indicators based on user input; A personality evolution engine is used to iteratively update an intrinsic parameter matrix based on the emotional drive index and by adjusting the update magnitude according to a plasticity decay function. The intrinsic parameter matrix includes parameters in at least three dimensions: core personality traits, cognitive state, and interpersonal relationship state. The personality perception generation module includes a personality embedding attention layer, which is used to inject the updated intrinsic parameter matrix as a bias signal into the attention calculation to modulate the language generation process.

[0013] According to one aspect of the present invention, a virtual character emotional companionship system is provided, which integrates the aforementioned virtual character personality dynamic evolution device.

[0014] According to one aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned method for dynamic evolution of virtual character personality based on emotional entropy deposition.

[0015] According to one aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for dynamic evolution of virtual character personality based on emotional entropy deposition.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a method and device for the dynamic evolution of virtual character personalities based on emotional entropy deposition. By creatively introducing emotional driving force indicators (such as emotional entropy) and plasticity decay functions (such as time decay factors), it achieves dynamic growth while ensuring the stability of AI personality, further improving the effect of virtual emotional companionship. Details are as follows: 1. A dynamic intrinsic parameter matrix covering three dimensions—core personality traits, cognitive state, and interpersonal relationship state—was designed, enabling the virtual character's intrinsic state to be dynamically updated in a multi-dimensional and structured manner during the interaction process.

[0017] 2. From the perspective of simulating the growth characteristics of organisms, the parameter update amplitude is adjusted by introducing a plasticity decay function, so that the evolution curve of the intrinsic parameter matrix conforms to the natural law of transition from high plasticity to a stable state, thus ensuring the rationality and final stability of the personality change.

[0018] 3. Innovatively, a personality embedding attention layer is introduced into the attention mechanism of the Transformer model. The updated intrinsic parameter matrix is ​​used as a bias signal and is embedded into the scaling dot product attention calculation in an additive manner. This allows personality features to influence attention allocation from the bottom layer of the model, thereby generating responses with a deep consistency in language style, natural and personalized. Attached Figure Description

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

[0020] Figure 1 This is a flowchart of the overall process of the method for dynamic evolution of virtual character personality based on emotional entropy deposition provided in this embodiment of the invention.

[0021] Figure 2 This is a schematic diagram illustrating the variation of the plasticity decay function with the number of interaction rounds provided in an embodiment of the present invention.

[0022] Figure 3 This is a comparative diagram of the standard Transformer attention mechanism provided in this embodiment of the invention and the improved personality-weighted attention mechanism of this invention.

[0023] Figure 4 This is a block diagram of the module structure of the virtual character personality dynamic evolution device provided in the embodiments of the present invention.

[0024] Figure 5 This is a schematic diagram of an application scenario for the virtual character emotional companionship system integrating the device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form new technical solutions. Such combinations are not bound by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0026] The terms used in this specification and claims have the following meanings: Words such as “include,” “contain,” and “have” are used to indicate an open-ended meaning, meaning that in addition to the listed elements, other elements not explicitly listed may be included, or elements inherent to the process, method, system, product, or equipment.

[0027] The aforementioned emotional drive index refers to a scalar or vector value calculated based on the emotional analysis of user input, used to quantify the intensity or complexity of the potential impact of an interaction on the internal state of a virtual character. Its core function is to transform abstract emotional interactions into control signals that can drive parameter updates.

[0028] The intrinsic parameter matrix is ​​a dynamic, multi-dimensional data structure used to comprehensively represent the intrinsic state of a virtual character. It includes at least a core layer representing relatively stable personality traits, a cognitive state layer representing variable mental and cognitive patterns, and an interpersonal relationship layer representing the relationship state with specific interactive objects. This matrix carries all the character's intrinsic state variables.

[0029] In the context of language generation, the modulation specifically refers to the process of changing the internal computation of the model (such as attention distribution or hidden state) by introducing external or internal signals (such as the bias signal of this invention) through addition, multiplication, or other fusion methods, thereby affecting the style, sentiment, or content tendency of the final output text.

[0030] The personality-embedded attention layer is an improved attention computation layer integrated into the Transformer architecture. Its core feature is that it can receive the intrinsic parameter matrix as input and transform it into a bias term that directly affects the attention weight allocation. Example 1

[0031] like Figure 1 As shown, this embodiment provides a method for the dynamic evolution of virtual character personality based on emotional entropy deposition. This method can be executed by a server, terminal device, or cloud computing platform, and specifically includes the following steps: S101: Calculate the emotional drive index.

[0032] Get the user's input text in the current round and the virtual character's previous reply text (Regarding the first round of interaction,) (Can be empty or have a preset opening). The concatenated dialogue context is input into a pre-trained sentiment analyzer (e.g., a BERT-based sentiment classification model). The sentiment analyzer outputs a sentiment probability distribution vector. ,in This represents the probability that the input text belongs to the i-th emotion category (such as joy, anger, sorrow, fear, surprise, etc.), where k is the total number of emotion categories.

[0033] Based on this distribution, the emotional driving force index for this interaction is calculated. As a preferred embodiment, this index is emotional entropy (…). The calculation formula is as follows: , in, The larger the value, the more uniform the probability distribution of the user's emotions (usually meaning that their emotional expression is more complex or mixed), the higher the uncertainty of their emotional state, and the stronger the potential driving force on the virtual character's personality.

[0034] As another embodiment of the quantitative indicator of emotion-driven force, those skilled in the art can also use emotion intensity variance, emotion confidence level, etc., as quantitative indicators. Those skilled in the art will understand that any quantitative indicator that can reflect the uncertainty, complexity, or intensity of emotion can be used as the emotion-driven force indicator of this invention.

[0035] S102: Update the intrinsic parameter matrix.

[0036] Maintain a dynamic intrinsic parameter matrix (This embodiment can also be referred to as a personality parameter matrix), its dimensions are: . It contains at least three levels of parameter subsets: core trait layer (Such as openness, conscientiousness, extraversion, agreeableness, neuroticism, etc.), cognitive state level (Such as humor threshold, curiosity index, memory recall rate, associative divergence, rationality-empathy bias, etc.), interpersonal relationship layer (Such as intimacy, trust, dominance, tacit understanding, and reciprocity balance for specific users). That is... , where “;” indicates a vector concatenation operation.

[0037] The dynamic intrinsic parameter matrix needs to be initialized when the virtual character is created. The goal of initialization is to establish a neutral, balanced starting point so that it can evolve based on emotional drives in subsequent interactions. As a preferred and easily implemented embodiment, a uniform distribution can be used for initialization. For example, for a personality matrix containing three levels (core trait level, cognitive state level, and interpersonal relationship level), with five parameters in each level, it can be initialized as follows: ,

[0038] This state indicates that the character shows no particular bias in any aspect of their traits and is in a fully malleable state. As the number of interaction rounds increases, the values ​​in the matrix will undergo non-uniform changes driven by emotional entropy and the decay function, thus forming unique personality tendencies and ultimately achieving a highly personalized dialogue experience. Those skilled in the art will understand that the above uniform initialization is merely an example. Depending on the application scenario, other initialization strategies may also be adopted. Regardless of the initialization strategy used, the core is to provide an iterative starting point for the emotional entropy-driven dynamic evolution process described in this invention. The scope of protection of this invention is not limited to any specific initialization method.

[0039] Calculate the update amount of personality parameters The update volume is determined by sentiment entropy. The semantic vector of the current dialogue (Obtainable through the encoder) and the current intrinsic parameter matrix The decision is made jointly. An example update formula is as follows: , in, For learning rate, and For learnable parameters, Calculate the similarity between the input semantics and the current personality. The greater the difference between the user input and the current personality, and the higher the emotional entropy, the larger the update amount, which will lead to drastic personality correction.

[0040] To ensure a smooth transition from high plasticity to a stable state in personality evolution, a plasticity decay function is introduced to adjust the update amplitude, making the personality evolution process more in line with natural laws. As a preferred embodiment, a plasticity decay function based on a logarithmic function is employed. : , in, This represents the initial plasticity (usually set to 1.0). The decay rate is an adjustable parameter (also known as the decay factor, which can be set to 0.1, 0.5, 2.0, etc. depending on the scenario), and N is the total number of historical interaction rounds.

[0041] like Figure 2 As shown in Table 1, the output values ​​of this function The decay factor monotonically decreases as the total number of interaction rounds N increases, where the decay factor is... It can be configured to simulate different growth curves (such as rapid settling or slow adaptation).

[0042] Table 1. Attenuation variations for different attenuation factors .

[0043] like Figure 2 As shown in Table 1, the plasticity decay function In, attenuation factor It is key to regulating personality evolution patterns.

[0044] when When = 0, the function value is always 0. There is no decay effect. This means that each interaction has an equal impact on personality parameters. Virtual characters lack long-term memory, and their personalities can be completely changed by a single conversation, similar to an AI without a stable personality.

[0045] when When the value is 0.1, the function value decays slowly, and the plasticity remains at a high level for a long time. This makes the personality of the virtual character easy to continuously adjust based on user feedback, making it suitable for scenarios that require a high degree of adaptation to user preferences.

[0046] when When the value is 0.5, the function value exhibits a reasonable decay trend of initially rapid decline followed by a slower decline. This setting best reflects the social adaptation process of organisms from unfamiliarity to familiarity—early interaction can trigger significant personality adjustments, which gradually stabilize as interaction deepens, making it the preferred parameter for achieving long-term natural companionship.

[0047] when When the value is 2, the function value decays rapidly, and the personality tends to be fixed after very few rounds of interaction, making it extremely difficult to change later. This mode is suitable for task-oriented digital humans that require a highly stable and consistent personality (such as meticulous customer service).

[0048] Therefore, by configuring different γ values, this invention can flexibly simulate various personality evolution trajectories, ranging from high plasticity to rapid saturation. Figure 2 The curve and the data in Table 1 together provide an intuitive basis for verification and selection.

[0049] As another embodiment for adjusting the update magnitude, those skilled in the art can also use methods such as functions based on exponential decay or linear decay to adjust the update magnitude.

[0050] Finally, the update formula for the intrinsic parameter matrix is: .

[0051] S103: Personality Modulation Generates a Response.

[0052] The updated intrinsic parameter matrix This is integrated into a Transformer-based language generation model to generate responses that reflect the current personality. In this embodiment, the language generation model employs a Large Language Model (LLM) based on a Transformer decoder architecture. It should be understood that the personality embedding attention layer of this invention can also be applied to other language model architectures that include attention generation mechanisms.

[0053] First, Through a linear projection layer The mapping yields a personality bias matrix that corresponds to the attention head dimension. : .

[0054] Then, in the Self-Attention layer of the Transformer decoder, the standard Scaled Dot-Product Attention is improved to form the Character Embedded Attention layer.

[0055] This invention improves upon the standard attention mechanism by introducing personality bias. For example... Figure 3 As shown, in the standard scaled dot product calculation path (left side), this invention adds the bias signal derived from the intrinsic parameter matrix as an additive term (right side). This directly modulates the distribution of attention weights, thereby achieving the integration of personality at the underlying generation level.

[0056] The standard formula for attention is: This invention improves upon it into a personality-weighted attention formula: Where Q, K, and V are the query, key, and value matrices, respectively. Let Ω be the dimension of the key vector, and let Ω be a learnable gating scalar used to dynamically control the intensity of the personality bias intervention in the current generation. This operation involves incorporating personality bias as an additive factor into the attention calculation.

[0057] The decoder performs decoding based on a modulated attention mechanism, and finally outputs the vocabulary probability distribution through a softmax layer to generate the response text. : ,in, This represents the weight matrix of the output projection layer, used to transform the high-dimensional vector output by the decoder. Linear projection onto the dimension of vocabulary size.

[0058] S104: Persistent personality state.

[0059] After this round of interaction, the updated intrinsic parameter matrix will be... The data is serialized and stored in a local or cloud database. When a user initiates another interaction session with the same virtual character, the system loads this stored matrix as the initial value for the current session. This ensures the long-term continuity of character development and consistency across conversations, keeping the overall emotion coherent.

[0060] Example 2 like Figure 4 As shown, this embodiment provides a device for the dynamic evolution of a virtual character's personality to implement the above method. This device can exist in the form of a software module, a hardware circuit, or a combination of both, and includes: Sentiment Analysis Module: Used to receive user input, call sentiment analysis models, and calculate sentiment driving force indicators (such as sentiment entropy) based on sentiment probability distribution.

[0061] Personality Evolution Engine: Used to maintain and store intrinsic parameter matrices Based on the emotional drive index, semantic vector, and plasticity decay function, it calculates and performs [the following]: Iterative updates.

[0062] Personality perception generation module: Includes a built-in Transformer language generation model with a personality embedding attention layer. This module receives updated... This signal is then converted into a bias signal and injected into attention calculations to generate the final personalized response.

[0063] Persistence module: Used to save and load intrinsic parameter matrices between sessions.

[0064] This embodiment of the device solidifies the innovative process of emotion-driven updating and personality modulation generation into a dedicated functional module, achieving an engineering improvement in technical effectiveness. It transforms the algorithm into an efficient and stable computational closed loop, ensuring the convergence and consistency of the personality evolution process; the modular design significantly improves system performance, maintainability, and ease of integration and deployment; simultaneously, its structured design provides a clear foundation for system status monitoring, debugging, and optimization, thereby reliably transforming the core ideas of this invention into a standardized personality engine with commercial value.

[0065] Example 3 To verify the practical effect of the proposed method for dynamic evolution of virtual character personality based on emotional entropy deposition, especially its advantages in maintaining personality consistency in long-term interaction, the inventors designed and conducted a comparative experiment.

[0066] 1. Experimental Objective The performance of the traditional Large Language Model (LLM) and the system enhanced by the method of this invention in maintaining character consistency in multi-turn dialogues is compared, and the difference in performance is quantified by expert scoring.

[0067] 2. Experimental Setup Test data: Construct 100 simulated multi-turn dialogue data streams covering a variety of topics, with each data stream containing at least 50 consecutive user-AI interactions.

[0068] Comparison System: The baseline system (normal LLM) employs a mainstream open-source large language model (such as the LLaMA series), with its context window limited to the most recent 10 rounds of dialogue. This system lacks a specific long-term personality memory mechanism.

[0069] The system of this invention integrates the personality dynamic evolution method described in Example 1 on the basis of a large language model of the same scale. The emotional driving force index is emotional entropy, and the plasticity decay function parameter γ is set to 0.5 (simulating the natural social adaptation process).

[0070] Evaluation Method: Five experts with experience in human-computer interaction or psychology were invited to serve as judges. For each round of AI responses, the judges scored the AI ​​from 1 to 5 points based on whether it conformed to the pre-defined role and evolving personality traits (such as maintaining a consistent sense of humor, values, and relationship intimacy). A score of 3 or higher was considered satisfactory.

[0071] Evaluation metrics: Statistical analysis of the percentage of responses (satisfaction rate) that received satisfactory evaluations from the two systems under different interaction rounds N.

[0072] 3. Experimental Results The satisfaction comparison data obtained from the experiment are shown in Table 2.

[0073] Table 2 Comparison of Satisfaction Levels .

[0074] 4. Results Analysis Short-term interaction performance: In the early stages of interaction (N≤10), both systems were able to generate responses that matched the current conversational personality based on limited context, and the satisfaction rate remained at a high level (>88%), with the method of this invention being slightly better.

[0075] Significant divergence in long-term interaction performance emerges: when the number of interaction rounds exceeds the context window of the baseline system (N>10), the performance difference between the two systems widens sharply, as detailed below: Normal LLM system: Because it can only remember the most recent 10 rounds of conversation and cannot access earlier personality interaction history, when there is a topic shift in the conversation or when it is necessary to rely on long-established personality preferences to respond, its response is prone to personality inconsistency, contradiction or lack of depth, resulting in a significant drop in expert satisfaction to about 60%.

[0076] The system of this invention benefits from the continuous deposition and evolution of long-term emotional interaction through a dynamic intrinsic parameter matrix, and the reasonable regulation of personality stability by a plasticity decay function, enabling virtual characters to establish a solid personality foundation. Therefore, even with an increase in the number of dialogue rounds, their responses maintain a high degree of personality consistency and coherence, with satisfaction consistently remaining above 93% and exhibiting minimal fluctuations.

[0077] 5. Experimental Conclusions The comparative experimental data fully demonstrates that the method proposed in this invention, through emotional entropy-driven power transformation, dynamic updating of the intrinsic parameter matrix, and personality modulation of the attention layer, effectively solves the problems of personality splitting and decreased long-term interaction satisfaction caused by the limitations of context length or the lack of an intrinsic state evolution mechanism in existing technologies. This invention enables virtual characters to exhibit stable, consistent, and naturally evolving personality traits during long-term interaction, significantly improving the realism of emotional companionship and user satisfaction, thus achieving the invention's objective.

[0078] Example 4 like Figure 5 As shown, this embodiment provides a virtual character emotional companionship system, which integrates the virtual character personality dynamic evolution device described in Embodiment 2. This system can be deployed in mobile applications, smart hardware, or a metaverse platform. Through interaction with the system, users can experience a virtual partner whose personality naturally evolves with the depth of interaction, offering both a fun nurturing experience and ultimately becoming stable and reliable, significantly improving the effectiveness of long-term emotional companionship and user engagement.

[0079] Figure 5In this system, the long-term personality memory bank and the virtual character personality dynamic evolution device work together. At the start of each new dialogue session, the device loads the corresponding character's intrinsic parameter matrix from the memory bank into memory; during the session, the device iteratively updates the matrix in memory; at the end of the session, the device writes the updated matrix back to the memory bank for persistent storage. This achieves continuous evolution and accumulation of personality states across sessions.

[0080] Example 5 This invention also provides an electronic device, which includes at least one processor and at least one memory, wherein the memory stores computer program instructions, and when the processor executes the program instructions, it implements the method described in Embodiment 1.

[0081] Example 6 This invention also provides a computer-readable storage medium, such as a USB flash drive, a portable hard drive, ROM, RAM, a magnetic disk, or an optical disk, which stores computer program instructions that, when executed by a processor, implement the method described in Embodiment 1.

[0082] In summary, the core of this invention lies in quantifying the emotional impact of interaction by calculating the emotional driving force index (such as emotional entropy) of user input, and introducing a plasticity decay function to simulate the natural growth cycle of personality transitioning from a highly plastic state to a stable state, thereby driving a multi-dimensional dynamic intrinsic parameter matrix to undergo nonlinear iteration; furthermore, through an innovative personality-embedded attention layer, this matrix is ​​transformed into a bias signal and directly implanted into the self-attention calculation of the Transformer model in an additive manner, thereby achieving the modulation of language generation by personality from the underlying mechanism.

[0083] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for dynamic evolution of virtual character personality based on emotional entropy deposition, characterized in that, include: During user interactions, an emotion-driven indicator is calculated based on user input. Based on the aforementioned emotional drive index, an intrinsic parameter matrix for characterizing the personality of the virtual character is iteratively updated. The intrinsic parameter matrix includes parameters in at least three dimensions: core personality traits, cognitive state, and interpersonal relationship state. When generating a response to the user input, the language generation process is modulated based on the updated intrinsic parameter matrix.

2. The method for dynamic evolution of virtual character personality based on emotional entropy deposition according to claim 1, characterized in that, The emotional drive index is an emotional entropy calculated based on the emotional analysis results of user input.

3. The method for dynamic evolution of virtual character personality based on emotional entropy deposition according to claim 1 or 2, characterized in that, When iteratively updating the intrinsic parameter matrix, the update magnitude is adjusted according to a plasticity decay function, the output value of which decreases as the total number of interaction rounds increases.

4. The method for dynamic evolution of virtual character personality based on emotional entropy deposition according to claim 1, characterized in that, Modulating the language generation process is achieved by converting the intrinsic parameter matrix into a bias signal and injecting it into the attention weight calculation of the Transformer language model.

5. The method for dynamic evolution of virtual character personality based on emotional entropy deposition according to claim 4, characterized in that, The bias signal is used as an additive term in the scaled dot product attention calculation, and the modulated attention calculation formula is as follows: , in, The bias signal is... It is a learnable gating scalar.

6. The method for dynamic evolution of virtual character personality based on emotional entropy deposition according to claim 1, characterized in that, The method further includes: after the interaction session ends, saving the updated intrinsic parameter matrix for the initial personality state of the virtual character in subsequent interactions.

7. A device for dynamic evolution of a virtual character's personality, characterized in that, include: The sentiment analysis module is used to calculate sentiment driving force indicators based on user input; A personality evolution engine is used to iteratively update an intrinsic parameter matrix based on the emotional drive index and by adjusting the update magnitude according to a plasticity decay function. The intrinsic parameter matrix includes parameters in at least three dimensions: core personality traits, cognitive state, and interpersonal relationship state. The personality perception generation module includes a personality embedding attention layer, which is used to inject the updated intrinsic parameter matrix as a bias signal into the attention calculation to modulate the language generation process.

8. A virtual character emotional companionship system, characterized in that, It integrates the virtual character personality dynamic evolution device as described in claim 7.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.