Personality adaptive training and dynamic evolution method of character large model and related products
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LIANGSHENG DIGITAL CREATIVE DESIGN (HANGZHOU) CO LTD
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-26
Smart Images

Figure CN121766484B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and human-computer interaction technology, and in particular to a method for personality adaptive training and dynamic evolution of a large-scale character model and related products. Background Technology
[0002] With the widespread application of large language models (LLMs) in intelligent dialogue, a major challenge has been how to imbue these large language models with realistic, consistent, and sustainably evolving personalities. Current dialogue agents typically employ pre-defined, fixed personalities or single-domain fine-tuning models, leading to several limitations:
[0003] Personality rigidity: Traditional methods involve developers pre-defining a set of personality traits (such as tone of voice and attitude), and the model always responds in this style. After prolonged use, users may feel that the character lacks growth, is unresponsive to feedback, and experiences a decline in the novelty of the interaction. For example, an AI assistant might maintain a monotonous and polite tone, unable to become more humorous or friendly based on user preferences.
[0004] Multi-scenario adaptation is challenging: In reality, an intelligent agent may need to provide services across multiple scenarios (e.g., acting as both a medical consultant and a legal advisor). Existing technologies typically require training independent models for different scenarios or manually switching preset prompts within the dialogue context, resulting in resource redundancy (each personality maintains a large set of model parameters, consuming several times the storage) and adaptation delays (switching scenarios requires loading new models or configurations, leading to sluggish responses). More seriously, the personalities in each scenario are independent of each other, lacking a unified core personality. Once the scenario changes, the role's performance in different scenarios may be inconsistent, affecting user trust.
[0005] Lack of dynamic evolution mechanisms: Currently, most personality customization remains at a static level—either adjusting the model to the target personality once and then not changing it, or relying on manually written rules (such as "adjust tone if the user is angry") to limit changes in response style. This means that the AI character will not learn autonomously after deployment. Even with rich feedback from long-term user interaction, the model cannot use this data to optimize its own personality. However, the academic community has recognized the importance of continuous learning and gradual evolution for intelligent agents. Summary of the Invention
[0006] This invention provides a method for personality adaptive training and dynamic evolution of a large character model and related products to solve the problems of personality rigidity, scene fragmentation and lack of self-evolution mechanism in the prior art.
[0007] A method for personality adaptive training and dynamic evolution of a large-scale character model, including:
[0008] When the adaptive optimization conditions are met, acquire the interaction log data of the character's large model interaction process;
[0009] The interaction log data is scored based on a personality indicator system to determine the indicator score vector corresponding to the interaction log data. Based on the indicator score vector and the target score vector corresponding to the personality indicator system, the deviation vector corresponding to the interaction log data is determined. Based on the deviation vectors corresponding to all the interaction log data within a preset time window, a deviation report is determined.
[0010] Based on the deviation report, dialogue segments with personality defects are identified, and training samples are determined based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses. The reference responses are responses to the user input under the ideal personality.
[0011] Based on the training samples, a small-step incremental update is performed on the current personality configuration profile. The backbone parameters of the basic language generation model are frozen, at least one of the evolvable personality vector and the scene sub-personality incremental module set is updated, and core personality attribute anchoring constraints, distribution difference constraints, and rule constraints are applied to determine the target personality configuration profile. The core personality attribute anchoring constraints are used to restrict the core personality attributes in the personality configuration profile from being updated. The distribution difference constraints are used to restrict the output distribution difference before and after the personality configuration profile is updated. The rule constraints are used to restrict the value attributes and forbidden attributes in the personality configuration profile.
[0012] The target personality configuration file is subjected to security verification. If the security verification passes, the target personality configuration file is used to update and replace the current personality configuration file. If the security verification fails, the current personality configuration file is rolled back.
[0013] The log acquisition module is used to acquire interaction log data of the character's large model interaction process when the adaptive optimization conditions are met.
[0014] The log evaluation module is used to score the interaction log data based on the personality indicator system, determine the indicator score vector corresponding to the interaction log data, determine the deviation vector corresponding to the interaction log data based on the indicator score vector and the target score vector corresponding to the personality indicator system, and determine the deviation report based on the deviation vectors corresponding to all the interaction log data within a preset time window.
[0015] The training sample determination module is used to determine dialogue segments with personality defects based on the deviation report, and to determine training samples based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses, wherein the reference responses are responses to the user input under the ideal personality.
[0016] The incremental update module is used to perform small-step incremental updates on the current personality configuration profile based on the training samples, freeze the backbone parameters of the basic language generation model, update at least one of the evolving personality vector and scene sub-personality incremental module sets, and apply core personality attribute anchoring constraints, distribution difference constraints, and rule constraints to determine the target personality configuration profile; the core personality attribute anchoring constraints are used to restrict the core personality attributes in the personality configuration profile from being updated, the distribution difference constraints are used to restrict the output distribution difference before and after the personality configuration profile is updated, and the rule constraints are used to restrict the value attributes and forbidden attributes in the personality configuration profile;
[0017] The security verification module is used to perform security verification on the target personality configuration file. If the security verification passes, the target personality configuration file is used to update and replace the current personality configuration file; if the security verification fails, the current personality configuration file is rolled back.
[0018] An electronic device includes 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 personality adaptive training and dynamic evolution of a large role model.
[0019] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for personality adaptive training and dynamic evolution of a large role model.
[0020] The aforementioned personality adaptive training and dynamic evolution method and related products for the large-scale character model have the following beneficial effects:
[0021] Personality evolution closed loop: Construct a personality adaptive closed loop process based on interaction logs, including interaction data collection, quantitative assessment of personality indicators, sample extraction, and incremental update and deployment; the assessment stage outputs a computable personality deviation vector and drives subsequent training and updates, enabling the model to achieve cumulative incremental optimization based on real feedback during the deployment period.
[0022] Multiple constraint mechanisms: During the incremental personality update process, core personality attribute anchoring constraints, distribution difference constraints, and rule constraints are applied simultaneously. Core personality attribute anchoring constraints are used to mark identity attributes, value attributes, forbidden attributes, and stable traits as immutable sets, and to freeze or projectively suppress the corresponding parameters / configurations during training updates; distribution difference constraints are used to measure the difference between the old and new output distributions and limit the magnitude of a single update; rule constraints are used to verify the generated results and update direction, and to trigger rollback in case of anomalies.
[0023] Lightweight personality loading: Lightweight sub-personality incremental modules and prompt templates are maintained for different scenarios. The probability distribution of scene recognition output is used to calculate fusion weights for fast mounting and smooth transition. Multi-scene style adaptation is achieved without replacing the basic language generation model, while maintaining the consistency of core personality attributes. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of the personality adaptive training and dynamic evolution method of the large character model in this invention embodiment;
[0026] Figure 2 yes Figure 1 A flowchart of step S102;
[0027] Figure 3 yes Figure 1 A flowchart of step S103;
[0028] Figure 4 yes Figure 1 A flowchart preceding step S102;
[0029] Figure 5 yes Figure 4 A flowchart of step S404;
[0030] Figure 6 This is another flowchart of the personality adaptive training and dynamic evolution method of the large character model in this invention embodiment;
[0031] Figure 7 This is a schematic diagram of the personality adaptive training and dynamic evolution system of the large character model in an embodiment of the present invention;
[0032] Figure 8This is a schematic diagram of the data structure corresponding to the personality configuration profile;
[0033] Figure 9 This is a schematic diagram of a multiple constraint mechanism. Detailed Implementation
[0034] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0035] This invention provides a method for adaptive training and dynamic evolution of a large-scale character model. This method is applicable to mobile phones, computers, or other electronic devices. Through a user-interaction-driven closed-loop personality evolution mechanism, the method enables the basic language generation model to autonomously learn and adjust its personality over long-term use. Multiple constraint mechanisms ensure stable and secure personality evolution. Furthermore, a lightweight personality configuration loading technology is employed to achieve rapid switching and adaptation of the same large-scale character model in different scenarios. In this way, the large-scale character model will evolve from a static preset to a dynamic growth model, becoming increasingly closer to user needs over time.
[0036] For ease of understanding, the following uses and explains some of the terms and symbols used in the embodiments of the present invention.
[0037] A personality profile refers to a machine-readable data structure used to describe the output behavior of a large character model in different scenarios. For example... Figure 8 As shown, the data structure of this personality configuration profile includes at least a profile identifier, version number, timestamp, and a set of core personality attributes. (Read-only) Evolvable Personality Vector Scene Subpersonality Incremental Module Collection Personality indicator system and the set of constraint parameters Current Personality Configuration Profile This refers to the personality configuration profile at the current moment, i.e., the personality configuration profile before the change. Target personality configuration profile. This refers to the updated personality profile.
[0038] Core personality attributes set This is a read-only field used to define the boundaries of personality evolution. It must contain the boundaries of at least one or more of the following: identity attributes, value attributes, forbidden attributes, and stable trait attributes. Core personality attribute set. This is an immutable set of attributes used to constrain the boundaries of personality evolution, including at least one of the following: identity attributes, value attributes, prohibited attributes, and stable trait attributes. Identity attributes record role identity, service responsibilities, and service boundaries. Value attributes record compliance bottom lines and behavioral guidelines. Prohibited attributes limit the topics or behaviors that are not allowed to be output or learned. Stable trait attributes record long-term, consistent interaction traits. During the initialization phase, the role setting text of the large-scale role model is mapped to structured entries and, after rule validation or manual review, solidified into a core set of personality attributes. The corresponding read-only fields; in subsequent training and updates, any data on the core personality attribute set... All modifications were rejected or triggered a rollback.
[0039] Evolvable personality vector This represents an evolving and changeable personality vector. It is a collection of scene-specific sub-personality incremental modules. It is a collection of sub-personality incremental modules corresponding to multiple scenarios, including but not limited to scenario identifiers and priority LoRA parameter prompt templates for scenario sub-personality incremental modules (optional).
[0040] Personality Index System It is a system of personality indicators tailored to specific roles and identities, built upon a basic language generation model. Specifically, it includes the value ranges and target values of multiple indicators, fusion coefficients, and other related parameters. Personality Indicator System Include Measurable indicators Each indicator Set the value range and target value, for example, for each indicator. The score range is Each indicator The target value is In the personality indicator system, let Indicates the first The metric score vector of the log round. Represents the target score vector. Represents the deviation vector; within the window Internally summarizing deviations to obtain a deviation report . In the context of the dialogue Personality Configuration Profile The inference configuration mapping below; Representing a scene The degree of match with the current personality state; This indicates the fusion weight.
[0041] Constraint parameter set This is a set of records for different constraint parameters, specifically including various national values, smoothing coefficients, adaptive national value core parameter mask mapping tables, etc.
[0042] Symbol conventions: Indicates the turn of the dialogue. Indicates the first A round-based dialogue context, containing a sequence of user input and model output for the t-th round. The basic language generation model is represented in the first... The output text generated by the round. This represents a preset set of scene labels, where, For a single scene tag. Indicates the first The context of a turn-based dialogue belongs to the scenario. The posterior probability distribution. Indicates the first A personality profile at each stage of a cycle; among them, for The core set of personality attributes; for Evolvable personality vectors in ; This is a collection of sub-personality incremental modules for each scene, with one sub-personality incremental module corresponding to each scene. ; for The personality indicator system in China for The set of constraint parameters in. This indicates the amount of parameter adjustment caused by incremental updates, such as the update amount of LoRA parameters and / or the evolutionary personality vector.
[0043] This invention provides a method for personality adaptive training and dynamic evolution of a large character model, illustrated by taking its application in electronic devices as an example. Figure 1 As shown, it includes:
[0044] S101: When the adaptive optimization conditions are met, obtain the interaction log data of the character's large model interaction process;
[0045] S102: The interaction log data is scored based on the personality indicator system to determine the indicator score vector corresponding to the interaction log data. Based on the indicator score vector and the target score vector corresponding to the personality indicator system, the deviation vector corresponding to the interaction log data is determined. Based on the deviation vectors corresponding to all the interaction log data within a preset time window, a deviation report is determined.
[0046] S103: Based on the deviation report, identify dialogue segments with personality defects, and determine training samples based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses. The reference responses are responses to the user input under ideal personality conditions.
[0047] S104: Based on the training samples, perform small-step incremental updates on the current personality configuration profile, freeze the backbone parameters of the basic language generation model, update at least one of the evolvable personality vector and the scene sub-personality incremental module set, and apply core personality attribute anchoring constraints, distribution difference constraints, and rule constraints to determine the target personality configuration profile; the core personality attribute anchoring constraints are used to constrain the core personality attributes in the personality configuration profile from being updated, the distribution difference constraints are used to constrain the output distribution difference before and after the personality configuration profile is updated, and the rule constraints are used to constrain the value attributes and forbidden attributes in the personality configuration profile;
[0048] S105: Perform a security check on the target personality configuration file. If the security check passes, update and replace the current personality configuration file with the target personality configuration file. If the security check fails, roll back to the current personality configuration file.
[0049] The adaptive optimization condition is a pre-set condition used to trigger the basic language generation model to perform adaptive optimization. This adaptive optimization condition can be, but is not limited to, the current optimization interval being greater than a preset interval, or the cumulative number of dialogue rounds being greater than a preset number of dialogue rounds. The current optimization interval refers to the time since the last optimization. The preset interval is a pre-set time used to evaluate whether adaptive optimization is needed. The cumulative number of dialogue rounds refers to the number of dialogue rounds accumulated since the last optimization. The preset number of dialogue rounds is a pre-set number of dialogue rounds used to evaluate whether adaptive optimization is needed.
[0050] As an example, in step S101, the electronic device monitors the interaction status of the large character model in real time, monitoring the current optimization interval or the cumulative number of dialogue rounds. When the current optimization interval exceeds a preset interval or the cumulative number of dialogue rounds exceeds a preset number of dialogue rounds, it determines its adaptive optimization conditions. At this time, it needs to read the interaction log data of the large character model's interaction process from the interaction log database. In this example, the large character model continuously interacts with the user and responds to user requests. After each round of dialogue, it records the interaction log data for each round, including: dialogue context. Model output Scene tags User feedback information User feedback information here These interactions can be explicit (such as user likes and ratings) or implicit (using sentiment analysis models to determine user satisfaction). All of this interaction log data is appended and stored in an interaction log database. Over time, a large number of dialogue examples and corresponding feedback covering various scenarios can be obtained, providing a solid basis for subsequent personality optimization.
[0051] As an example, in step S102, the electronic device is based on a pre-set personality indicator system. The interaction log data is scored to determine the corresponding indicator score vector. Next, the indicator score vector corresponding to the interaction log data is... With personality indicator system Predetermined target score vector Perform deviation calculation to determine the deviation vector corresponding to the interaction log data. ,Right now The target score vector here It is a personality indicator system middle, Individual indicators The vector formed by the target value; Includes indicators The deviation amount, each deviation amount is an index The difference between the measured value and its target value. Finally, for the preset time window. Deviation vectors corresponding to all the aforementioned interaction log data Perform weighted fusion processing to determine the corresponding deviation report. ,in, For bias fusion weights, It is determined by the intensity of user feedback, the importance of the scene, and the time decay factor.
[0052] As an example, in step S103, the electronic device determines the deviation report. Afterwards, it is necessary to refer to the deviation report. The feedback information is used to filter out dialogue fragments from the interaction log database that indicate personality defects. These dialogue fragments include user input. Scene tags and the original reply Next, obtain a reference response written directly by an expert. Alternatively, the original response can be transformed according to pre-set transformation rules. Make adjustments and determine the reference response. Then, based on the user input Scene tags and reference reply Determine the training sample set The original reply here. This refers to the response output by a basic language generation model after processing user input. (See reference response.) For the ideal personality, the user input The reply.
[0053] As an example, in step S104, the electronic device determines the training sample set. Then, it is necessary to base it on the training sample set. Current personality configuration profile Perform small incremental updates to obtain the target personality configuration profile. and parameter adjustment amount Based on parameter adjustment amount The base language generation model is adjusted to determine the updated model. In this example, the core parameters of the base language generation model are adjusted during the small incremental update process. Freezed, only allowing updates to the evolvable personality vectors in the current personality configuration profile. Parameters of the scene sub-personality incremental module (e.g., LoRA parameters) to reduce training costs and lower the risk of catastrophic forgetting. In this example, in the current personality configuration profile... During the small-step incremental update process, multiple constraint mechanisms need to be constructed to constrain the features and parameters involved in the incremental update process, including but not limited to core personality attribute anchoring constraints, distribution difference constraints, and rule constraints. The core personality attribute anchoring constraints are used to constrain the core personality attributes in the personality configuration file from being updated. The distribution difference constraints are used to constrain the output distribution difference before and after the personality configuration file is updated. The rule constraints are used to constrain the value attributes and forbidden attributes in the personality configuration file.
[0054] As an example, in step S105, after determining the target personality configuration profile, the electronic device needs to compare the differences between the target personality configuration profile and the current personality configuration profile, focusing on checking whether each core personality attribute is still within the allowable range. For example, comparing the dimensions representing value attributes in the target personality configuration profile and the current personality configuration profile to confirm that their changes have not exceeded the threshold. For example, in simulating several key dialogue scenarios, responses are generated using the target personality profile and compared with responses from the current personality profile or the expected correct answers. Furthermore, if an abnormal tendency is found in the target personality profile regarding restricted attributes (e.g., an originally neutral AI suddenly exhibiting strong bias), this is considered an adverse mutation. In response to this, the invention stipulates that the update can be rejected, the model parameters rolled back to the current personality profile, or some problematic incremental update values can be discarded. Simultaneously, the anomaly is recorded, and the training hyperparameters or dataset are adjusted to correct it during the next training session, ensuring that personality evolution develops in a healthy direction. Through the above monitoring and calibration, a safe boundary for personality evolution is guaranteed: the character AI can gradually change, but will not deviate from the preset core personality design.
[0055] In this embodiment, repeating the above steps enables closed-loop iteration of the personality configuration profile. After each iteration, the target personality configuration profile that has passed security verification is... Stored as the current personality configuration profile for the next round of reasoning and evaluation. As the number of iterations increases, the evaluation module outputs a deviation report. norm Gradually decreasing or stabilizing within a preset threshold, thus characterizing personality within the personality indicator system. The target value converges downwards; simultaneously, due to the core personality attribute set... During training, update suppression is achieved through masking / projection and is subject to rule-based verification, keeping core attributes stable and avoiding value deviations and inconsistencies caused by cross-domain migration and long-term updates.
[0056] In one embodiment, the interaction log data includes dialogue context, model output, scene tags, and user feedback information;
[0057] like Figure 2 As shown, step S102, namely, scoring the interaction log data based on the personality indicator system to determine the indicator score vector corresponding to the interaction log data, includes:
[0058] S201: Based on the dialogue context, the model output, and the scene label, determine the text scene vector, process the text scene vector based on the personality index system, and determine the text scene score corresponding to the interaction log data;
[0059] S202: Normalize the user feedback information to determine the user feedback score corresponding to the interaction log data;
[0060] S203: Perform a weighted fusion process on the text scene score and user feedback score corresponding to the interaction log data to determine the fusion score corresponding to the interaction log data;
[0061] S204: Perform partitioned discrete mapping on the fusion score corresponding to the interaction log data to determine the indicator score vector corresponding to the interaction log data.
[0062] As an example, in step S201, when the electronic device detects that the adaptive optimization conditions are met, it needs to obtain the interaction log data from the interaction log database during the interaction process of the large model of the role, and extract the dialogue context from the interaction log data. Model output and scene tags Construct text scene vectors ,in This can be obtained by pooling a pre-trained encoder or an intermediate layer representation generated from a base language model. Next, the electronic device can process the text scene vector based on the scoring rules corresponding to the personality indicator system to determine the text scene score. Specifically, this can be achieved by: The text scene vector is processed to determine its corresponding text scene score, wherein, Score the text scene. For text scene vectors, For the Sigmoid function, No. The weight vector of each indicator For the first Bias vectors for each index.
[0063] As an example, in step S202, after acquiring the interaction log data, the electronic device can extract user feedback information from the interaction log data. Regarding the user feedback information Normalization is performed to determine the user feedback score, for example, in the user feedback information. When evaluating metrics such as likes, star ratings, and satisfaction levels, these can be normalized into user feedback scores. If there is no user feedback information If the value is not specified, then the dimension information is set to empty or other default values.
[0064] As an example, in step S203, the electronic device may employ... Text scene score for each of the aforementioned interaction log data And user feedback score Perform weighted fusion processing to determine the fusion score corresponding to the interaction log data. ,when When empty, take .
[0065] As an example, in step S204, the electronic device calculates the fusion score corresponding to the interaction log data. Perform partitioned discrete mapping to determine the metric score vector corresponding to the interaction log data. In this example, for ease of threshold determination and statistics, it is necessary to determine the discrete levels corresponding to different score intervals based on the fusion score corresponding to each metric, and then perform discrete mapping based on the discrete levels for each metric. The measured values, for example, are pre-set as follows: five score intervals corresponding to discrete levels: extremely low lower ,medium higher Extremely high In this example, based on the fusion score corresponding to the interaction log data... Perform partitioned discrete mapping to determine its index score vector. , Score as indicator The measured value.
[0066] In one embodiment, such as Figure 3 As shown, step S103, namely, determining dialogue segments with personality defects based on the deviation report and determining training samples based on the dialogue segments, includes:
[0067] S301: Based on the deviation report, determine a subset of indicators to be corrected, and identify the dialogue segments corresponding to the subset of indicators to be corrected as dialogue segments with personality defects. The dialogue segments include user input and original response, and the original response is the response of the basic language generation model to the user input.
[0068] S302: Using the text transformation rules corresponding to the subset of indicators to be corrected, the original response is transformed to determine multiple candidate responses;
[0069] S303: Based on the personality index system, perform core personality attribute boundary verification and consistency verification on multiple candidate responses, and determine the candidate response that passes the core personality attribute boundary verification and has the highest consistency verification score as the reference response.
[0070] As an example, in step S301, the electronic device acquires a preset time window. Deviation reports corresponding to all the aforementioned interaction log data. Afterwards, it is necessary to base the deviation report on... Determine the subset of indicators to be corrected The subset of indicators to be corrected contains multiple indicators used to indicate the direction of personality adjustment in the basic language generation model. These indicators include, but are not limited to, politeness, professionalism, consistency, and rejection boundaries. Next, based on the subset of indicators to be corrected... Filter the subset of metrics to be corrected from the interaction log database. The relevant dialogue fragments were identified as those indicating personality defects. These fragments specifically included user input. The original response of the basic language generation model .
[0071] As an example, in step S302, each indicator A pre-defined set of executable text transformation rules This serves as a machine-executable prompt template or post-processing function; the text transformation rules here... This includes, but is not limited to, identity boundary template completion, rejection strategy templates, wording intensity adjustment templates, structured response templates, and risk warning templates, etc., and uses them as machine-executable prompt templates or post-processing functions. In this example, after the electronic device determines that a dialogue segment contains personality defects, it needs to use indicators to be corrected. Corresponding text transformation rules For the original reply Perform text conversion to determine a candidate response set formed by multiple candidate responses. .
[0072] As an example, in step S303, the electronic device adopts a personality indicator system. For the candidate response set All candidate responses undergo core personality attribute boundary verification and consistency verification. The candidate response that passes the core personality attribute boundary verification and has the highest consistency verification score is determined as the reference response under the ideal personality. In this example, those that do not meet the core personality attributes can be filtered out. The corresponding boundary verification requirements, or candidate responses with lower consistency verification scores, will be considered, with the candidate response that passes the core personality attribute boundary verification and has the highest consistency verification score being used as the reference response. Furthermore, if a reference response that passes the core personality attribute boundary check and has the highest consistency check score cannot be obtained... If necessary, the system will automatically revert to generating a reference response through expert writing or manual review. And record the reasons for failure so that the rule base can be improved in the future.
[0073] Simultaneously, positive signals are extracted from user feedback: if a user comments "Your last suggestion was very good," indicating that a certain response style is popular, the relevant dialogue is marked as a positive example that should be maintained or strengthened. By combining manually set reference responses and user feedback, a training sample set with improvement guidelines is determined. ,in To obtain reference responses consistent with the target personality, and to determine the sample weights corresponding to each training sample. Sample weights The sample weights are determined by feedback strength, bias priority, or time decay. In this example, the sample weights... From the deviation vector The determination of components in the indicator dimension satisfies ,in For time decay coefficient, For scene importance coefficient, For feedback intensity coefficient, This refers to the priority weight of indicators, which makes the indicator dimensions that correct biases more significantly during training and updates.
[0074] In one embodiment, applying the core personality attribute anchoring constraint includes: anchoring the parameter dimensions corresponding to the core personality attribute based on a mask update suppression mechanism, wherein the mask update suppression mechanism is implemented through the following formula: ; ;in, This represents the parameter update amount obtained from this small incremental update; A non-updatable set of parameter masks constructed based on the set of core personality attributes in the current personality configuration profile; The amount of update after constraints; These are the model vector parameters before the update. These are the updated model vector parameters;
[0075] Alternatively, based on the permissive subspace projection mechanism, anchor constraints are applied to the parameter dimensions corresponding to the core personality attributes. The permissive subspace projection is achieved through the following formula: ; ; To allow projection operators that update subspaces, based on Induced determination;
[0076] Applying the distribution difference constraint includes: constructing an anchoring cue set, performing difference calculation based on the output distribution before and after attaching the candidate incremental module corresponding to the same anchoring cue set, determining the distribution difference constraint loss used to constrain the personality configuration profile before and after the update, and constraining the distribution difference constraint loss according to the scenario adaptive threshold;
[0077] Applying the rule constraints includes: using a violation indicator function to calculate the value attributes and forbidden attributes in the current personality configuration profile, determining the rule constraint loss, and applying rule constraints based on the rule constraint loss.
[0078] As an example, based on the training samples During the process of performing small-step incremental updates to the current personality configuration profile, in addition to... In addition to determining the supervised learning loss, it is also necessary to impose core personality attribute anchoring constraints, distribution difference constraints, and rule constraints, among which, For sample weights, Determined by feedback strength, deviation priority, or time decay; For cross-entropy, This indicates the output distribution after mounting the candidate incremental module.
[0079] As an example, imposing anchoring constraints on core personality attributes includes:
[0080] Set of core personality attributes Structured into a collection of fields The field types must include at least identity attribute boundaries, value attribute boundaries, restricted area attribute boundaries, and stable trait attribute boundaries;
[0081] For each field A set of affected modules is obtained through pre-configuration or learning. The set of affected modules is used to indicate trainable locations in the basic language generation model that are strongly correlated with the field, such as: attention projection matrices of specific layers, feedforward network projection matrices, cue template slots, or LoRA insertion points. To facilitate the description of the mapping relationship between core personality attribute fields and trainable locations in the model, a mapping function is defined. .in, Represents the set of core personality attributes The j-th field in the data (e.g., identity attribute boundary, value attribute boundary, restricted area attribute boundary, or stable trait attribute boundary); The output is used to identify the set of trainable locations that are strongly correlated with this field, and can be represented as a tuple. and its extended forms. This represents the layer index (e.g., the first) of the Transformer layer in the basic language generation model. (Self-attention layer or feedforward network layer). This indicates the specific projection location identifier within the layer, used to distinguish attention projection matrices (e.g. , , , ), feedforward network projection matrix (e.g. , ) or the projection / mapping location associated with the prompt; when using a low-rank adapter (LoRA), It can also indicate the insertion point of LoRA (e.g., at...). or (The low-rank branch inserted above) thus makes the strong association between the field and the projection point or insertion point explicit. Based on A set of non-updatable parameter masks can be further constructed. When the parameter dimension belongs to any When the indicated position is specified, the corresponding mask value is 1 (indicating a parameter dimension constrained by the core field), otherwise it is 0 (indicating a parameter dimension that is allowed to be updated).
[0082] For trainable parameter vectors With Evolvable Personality Vectors Perform index alignment to generate a mask set of non-updatable parameters of the same dimension. Wherein, when a parameter belongs to any When the indicated location is reached, set Otherwise ;
[0083] (4) During gradient descent or adaptive optimization updates, the following two parallel and interchangeable implementation methods can be optionally adopted to ensure that the parameter dimensions corresponding to the core personality attributes do not undergo observable drift:
[0084] Method A (Mask Update Suppression): Let This represents the parameter update amount obtained from this small incremental update (including but not limited to the update amount of LoRA extrinsic parameters and the update amount of the evolvable personality vector). Construct a set of non-updatable parameter masks. Its elements take values of 0 or 1; where The position represents the constrained parameter dimension that is strongly correlated with the core personality field. Masking suppression is applied to the parameter update amount to obtain the constrained update amount. : and order Thus The parameter dimensions remain unchanged. To avoid learning stagnation due to an overly wide mapping table, the following can be done: Set a maximum coverage limit (e.g., the constrained parameter dimension should not exceed 20% of the total number of trainable parameters). When the limit is exceeded, priority should be given to retaining the positions corresponding to high-priority core fields such as "forbidden zones / values".
[0085] Method B (Allows Subspace Projection): Based on or replacing Method A, constructs a projection operator that allows updating the subspace. The parameter update amount obtained from this small incremental update Projecting onto the "non-core subspace" : and order .in can be Induced to obtain: for example, by exist Position retention, in The position projection is 0; or further in The position is only allowed to change up to a preset limit. This allows for configurable constraints of strong anchoring (completely unchanged) and weak anchoring (limited variation). Both methods A and B described above represent feasible implementation paths for core personality attribute anchoring constraints.
[0086] As an example, applying the distribution difference constraint includes:
[0087] (1) Constructing the anchoring cue set Specifically, it is necessary to determine a fixed set of questions and answers or a security test set based on the scenario dimension, and to determine the set of anchored prompts. Anchoring cue set The preferred approach is to construct samples using three types: "core attribute coverage," "scene coverage," and "adversarial coverage." ;in, Used to cover the core personality attribute set For each type of boundary field (identity boundary, values / compliance boundary, restricted area boundary, stable trait), each field must provide at least one... A question-and-answer pair or instruction-and-response pair that requires the model to respond within the boundaries of that field; Used for coverage scenarios Typical tasks and style constraints (such as the rigor and refusal boundaries in professional consultation, and the friendliness and non-overstepping boundaries in daily communication). Used to cover common adversarial and boundary-crossing inducement prompts (such as identity overreach, inducement to output prohibited content, and inducement to deviate from the value system).
[0088] (2) Based on the same set of anchoring prompts The corresponding output distribution before mounting the candidate incremental module Output distribution after mounting candidate incremental modules Perform variance calculations to determine the output distribution differences used to constrain the personality configuration profile update. Anchor cue set. The version number is stored in the database corresponding to the personality configuration profile or the associated test database, and the same version of the anchoring cue set is used in each updated assessment. Output distribution before mounting candidate incremental modules Output distribution after mounting candidate incremental modules Perform comparative calculations to determine the distribution difference constraint loss. For the two output distributions before and after mounting the candidate incremental module, the following can be used: This formula is used to calculate and determine the distribution difference constraint loss. Further, in the anchored cue set... When expansion is needed, it is only allowed to be added after manual approval or rule verification, and the reason for the addition, the covered fields and the expected interception risk type should be recorded to ensure the reproducibility and auditability of distribution difference constraints.
[0089] (3) Adaptive threshold based on scenario The loss constrained by the distribution difference is constrained by introducing a threshold-type penalty mechanism. To limit the loss due to single-distribution difference constraints, For scene-adaptive thresholds, use sliding statistics for updates: Maintain scene mean divergence with standard deviation ,according to , and take , , This is the scaling factor.
[0090] As an example, imposing the rule constraint includes: using a violation indication function. The value attributes and forbidden attributes in the current personality configuration file are calculated to determine the rule constraint loss. The violation indicator function here can indicate content such as hitting forbidden themes, violating identity boundaries, and outputting inappropriate content. Then, constraints are imposed based on the rule constraint loss, for example, limiting the rule constraint loss to a preset range.
[0091] In one embodiment, the target personality configuration profile is a personality configuration profile determined when the multiple constraint loss is less than the preset total loss;
[0092] The multi-constraint loss is determined using the following formula: ;
[0093] in, For multiple constraint losses; , and These are the coefficients of the distribution difference constraint loss, the core anchoring constraint loss, and the rule constraint loss, respectively.
[0094] To monitor learning loss, , For sample weights, For cross-entropy, The output distribution after mounting the candidate incremental module, , and These represent the user input, scene label, and reference response for the i-th training sample, respectively.
[0095] For distribution difference constraint loss, For anchoring the cue set, Input for users Corresponding anchoring prompts , The output distribution before mounting the candidate incremental module, The output distribution after mounting the candidate incremental module, for Divergence function;
[0096] As the core anchoring constraint loss, or , This is a set of non-updatable parameter masks constructed based on the core personality attribute set in the current personality configuration profile. This represents the parameter update amount obtained from this small incremental update. For margin;
[0097] To constrain losses by rules, , The sampled or decoded output generated for the current training step. This is a violation indicator function.
[0098] As an example, such as Figure 9 As shown, during the process of the electronic device performing small-step incremental updates on the current personality configuration profile using the training samples, it needs to be based on... Calculate supervised learning loss ,based on Determine the distribution difference constraint loss Determine the core anchoring constraint loss ,based on Determine the rule-constrained loss Next, based on Determine the multi-constraint loss and compare it with the preset total loss. If the multi-constraint loss is not less than the preset total loss, the model is determined to have not converged, and the small-step incremental update of the current personality configuration profile based on the training samples is repeated. If the multi-constraint loss is less than the preset total loss, the model is determined to have converged.
[0099] In this example, the core personality attribute anchoring loss Used to explicitly punish the drift of the parameter dimension corresponding to the core personality field. Let This refers to the parameter update amount obtained from this small incremental update (e.g., LoRA extrinsic parameter update amount and / or evolvable personality vector update amount). A set of non-updatable parameter masks (values are 0 or 1, and...) If the parameter dimension is subject to anchoring constraints from the core field, then it can be defined as follows: When using weak anchoring (allowing for small variations), the aforementioned L2 norm can be replaced with one that has a margin. Hinge penalty: When using allowed subspace projection At that time, the above It can also be equivalently understood as a penalty function in constrained optimization, used to drive the optimization process to automatically apply penalties. Pushback allows updating the subspace, thus enabling... The projection updates are consistent.
[0100] In one embodiment, step S105, the security verification of the target personality configuration profile, includes:
[0101] The target personality configuration file is subjected to security verification. If the security verification conditions are met, the security verification is determined to be successful; if the security verification conditions are not met, the security verification is determined to be unsuccessful.
[0102] The security verification conditions include: the distribution difference constraint loss corresponding to the anchoring prompt set is less than the preset difference loss, the norm decrease value corresponding to the deviation report is greater than the preset decrease value, and the rule verification result of the core personality attribute set is zero violation.
[0103] As an example, after the target personality configuration profile training is completed, the target personality configuration profile needs to be security verified. It is determined that it meets the security verification conditions when the following conditions are met simultaneously: (1) in the anchoring cue set Corresponding distribution difference constraint loss Less than the preset difference loss This indicates that the core personality attribute anchoring has not been damaged; (2) the norm decrease value corresponding to the deviation report is greater than the preset decrease value; wherein, the norm decrease value of the deviation report is used to quantify the effect of this update on the repair of personality defects. Let the deviation report obtained in window W before the update be The updated deviation report obtained within the same or aligned window is as follows: Then the norm descent value is defined as: Or define the relative decline rate as: ;in To prevent extremely small constants with a denominator of 0, the safety check condition "norm descent value greater than preset descent threshold" refers to... or This is used to ensure that the written-back personality configuration profile not only meets the requirements of stability and security, but also meets the requirements of effective repair. (3) Core personality attribute set The rule verification result is zero violations. Conversely, if at least one of the above conditions is not met, it is determined that the security verification condition is not met. Conversely, in the anchoring prompt set... Corresponding distribution difference constraint loss Not less than the preset difference loss The anchoring of core personality attributes has been determined to be disrupted.
[0104] To achieve differentiated adjustments for different personality indicators, targeting Deviation of individual indicators Calculate weights And break down the update into ,in In order to be with the first The gradient update direction related to each indicator For the learning rate. Optionally, to improve robustness, in Superimposed noise sampling , , This is a noise scale related to confidence level or constraint margin. After the update, the target personality configuration profile will be updated. Versioned storage is implemented; if a violation of core personality attributes or abnormal risk is detected, the target personality configuration file is rejected. And roll back to the current personality configuration profile. .
[0105] In one embodiment, such as Figure 4 As shown, before step S101, that is, before obtaining the interaction log data of the character large model interaction process when the adaptive optimization condition is detected, the method further includes:
[0106] S401: Initialize the current personality configuration profile of the main character model and the basic personality data of the basic language generation model;
[0107] S402: Perform scene recognition on the dialogue context during the interaction process of the large character model, and determine the posterior probability distribution of multiple scenes;
[0108] S403: When the maximum value of the posterior probability distribution in all scenarios is greater than the first posterior probability distribution, and the scenario corresponding to the maximum value is inconsistent with the current scenario corresponding to the character big model, scenario personality matching processing is performed based on the scenario posterior probability distribution and the evolvable personality vector in the current personality configuration file to determine the scenario personality matching degree.
[0109] S404: Determine the inference increment parameters based on the scene personality matching degree and the scene posterior probability distribution, and perform fusion update on the scene sub-personality increment module corresponding to the basic language generation model based on the inference increment parameters.
[0110] Wherein, the first posterior probability distribution is a pre-set posterior probability distribution used to evaluate whether a larger standard has been met, which can be adopted as follows: express.
[0111] As an example, in step S401, during the initialization process of the large model of the character that needs to be controlled, the electronic device needs to acquire training data to describe the character's identity background, language style, interaction boundaries, and behavioral preferences. The training data is then input into the basic language generation model for personality-oriented training to obtain the basic personality parameters corresponding to the basic language generation model. Synchronously initialize and load the current personality configuration file corresponding to the character's large model. The current personality configuration file includes at least: a set of core personality attributes. Evolvable personality vector Scene Subpersonality Incremental Module Collection Personality indicator system and constraint parameter set .
[0112] As an example, in step S402, the electronic device needs to obtain the t-th round of dialogue context during the interaction process of the large character model. The context of the conversation This includes the sequence of user input and model output in round t; followed by the dialogue context. Perform scene recognition to obtain each scene Corresponding posterior probability distribution , Specifically, for the first Dialogue context for round-robin interactive input Perform feature encoding to determine text encoding According to text encoding Determine the text encoding The corresponding logits vector , For the scene The corresponding weight matrix, For the scene The corresponding bias coefficients; then, for the logits vector The posterior probability distribution of the scene is obtained by performing Softmax. .
[0113] As an example, in step S403, the electronic device determines multiple scenarios. Corresponding posterior probability distribution Then, it is necessary to determine the maximum value of the posterior probability distribution for all scenarios. The maximum value of the posterior probability distribution across all scenarios Greater than or equal to the posterior probability distribution of the first scenario (Right now ), and the maximum value of the posterior probability distribution for all scenarios When the corresponding scene is inconsistent with the current scene corresponding to the character's large model, the determination is made based on the dialogue context. If the determined scene does not match the current scene of the character model, and the pre-set loading triggering conditions are met, scene-personality matching processing needs to be performed based on the posterior probability distribution of the scene and the personality configuration file corresponding to the character model to determine the scene-personality matching degree.
[0114] In this example, the scenario-personality matching degree is determined based on the following formula: ;in, For scene-personality matching degree, The cosine similarity function is used. For each scene Pre-defined scene representation vectors, The personality representation vector mapped from the evolving personality vectors in the current personality configuration profile. The electronic device starts from the personality configuration profile corresponding to round t. Extracting Evolvable Personality Vectors Evolvable personality vectors Mapped to personality representation vector The personality representation vector With each scene Pre-set scene representation vector Perform scenario-based personality matching to determine the personality matching degree in multiple scenarios. Specifically, the personality representation vector can be... and scene representation vector Perform cosine similarity calculation to determine each scene Corresponding scenario personality matching degree .
[0115] As an example, in step S404, the electronic device needs to determine the inference increment parameters based on the scene personality matching degree and the scene posterior probability distribution, and then perform a fusion update on the scene sub-personality increment module corresponding to the basic language generation model based on the inference increment parameters, so that the adjusted basic language generation model can accurately adapt to the scene, improve personality consistency, and facilitate personality evolution.
[0116] In one embodiment, such as Figure 5 As shown, step S404, namely determining the inference increment parameters based on the scene personality matching degree and the scene posterior probability distribution, and fusion updating the scene sub-personality increment module corresponding to the basic language generation model based on the inference increment parameters, includes:
[0117] S501: Based on the scenario-personality matching degree and the scenario posterior probability distribution corresponding to each scenario, determine the fusion weight corresponding to each scenario. The fusion weight is determined using the following formula: ;in, For the scene The corresponding fusion weights, For the scene The corresponding posterior probability distribution for the scenario For scene-personality matching degree, and These are the weighting coefficients;
[0118] S502: Based on the fusion weight corresponding to each scenario and the sub-personality incremental module corresponding to the scenario in the current personality configuration file, a weighted fusion is performed to determine the inference incremental parameter. The inference incremental parameter is determined using the following formula: ,in, For inference increment parameters, For the scene The corresponding sub-personality incremental module;
[0119] S503: Based on the inference increment parameters, the basic language generation model is fused and updated to obtain the updated basic language generation model.
[0120] As an example, in step S501, the electronic device determines each scenario Corresponding scenario personality matching degree and the posterior probability distribution of the scene After that, it is necessary to adopt The two are fused and calculated to determine each scene. Corresponding fusion weights .
[0121] As an example, in step S502, the electronic device determines the scene. Corresponding fusion weights Then, adopt Fusion weights for all scenarios Hezi Personality Increment Module Parameters Perform weighted processing to determine the corresponding inference increment parameters. Based on the fusion weights corresponding to each scenario. The set of parameters for the sub-personality incremental module corresponding to scene s in the current personality configuration profile The parameters of the sub-personality incremental modules in each scenario are weighted and fused to obtain the inference incremental parameters. , , For the candidate scene set; where, This represents the set of trainable parameter tensors for the sub-personality incremental module corresponding to scene s (e.g., the parameter matrix set of the LoRA low-rank branch and / or the cue parameter vector related to the scene template). This is the set of incremental parameters after fusion.
[0122] As an example, in step S503, the electronic device determines the inference increment parameters. Subsequently, a fusion update strategy of "parameter fusion first, template fusion as a fallback" is adopted to fuse and update the basic language generation model to ensure... It was actually used in the update:
[0123] (1) When When including the LoRA low-rank adapter parameter set, The parsing is done by converting the LoRA parameters into fusion parameters that can be directly mounted into the base language generation model at the corresponding insertion point (e.g., corresponding to...). (or low-rank branch parameters of feedforward projection), and during inference, attach the fused LoRA parameters to the base language generation model to obtain instantaneous output with contextualized subpersonalities.
[0124] (2) When When including prompt template parameters or prompt vectors, first determine the main template. :make ,Pick Then The hint vector part in the middle is denoted as and will The placeholders (slots) written into the main template form the final hint. At the same time, it can be done by By splicing key style fragments from other scene templates with controlled length, additional hints can be obtained. and will and Common input base language generation model.
[0125] (3) When When both LoRA parameters and cue vectors are included, it is preferable to simultaneously load the fused LoRA parameters and populate the cue template to form a dual-path fusion update that achieves parameter-level style transfer and cue-level interpretable control. Through the above process, It is not just intermediate quantities, but participates in the reasoning configuration of the basic language generation model in a specific way by attaching external parameters or filling templates, thereby realizing feasible updates of multi-scenario personality fusion.
[0126] As another example, electronic devices determine inference increment parameters. Subsequently, the sub-personality incremental module parameters are preferably low-rank adapter (LoRA) parameters and / or prompt templates, wherein the low-rank adapter adopts a rank... The low-rank decomposition incrementally adjusts the selected linear projection matrix in the basic language generation model, freezes the backbone parameters of the basic language generation model, and only updates the incremental module parameters, thereby achieving lightweight personality switching and smooth transition across scenarios. The scenario sub-personality incremental module is preferably a low-rank adapter parameter. and / or prompt templates The low-rank adapter uses a rank The low-rank decomposition incrementally adjusts the linear projection matrix. Preset positive integers (e.g.) And control the incremental module parameters to a preset proportion of the number of parameters in the basic language generation model. Within (e.g.) In this example, the maximum length of the prompt template is indicated. For preset values (e.g.) (each word element).
[0127] It should be noted that this solution applies to two types of inference update scenarios: full-scene fusion and high-confidence scene fusion. In full-scene fusion, the inference increment parameter... The fusion summation range covers the candidate scene set. All scenarios are included, without being limited to high-confidence scenarios, to ensure smooth fusion of multiple scenarios in general. When fusing high-confidence scenarios, a set of high-confidence scenarios is introduced. Only perform fusion and summation on high-confidence scenarios, or further introduce smooth fusion weights. This is to suppress instantaneous jitter in the posterior probability of the scene. The above hierarchical constraints can expand the scope of protection and provide feasible preferred implementations without changing the overall technical effect.
[0128] In one embodiment, the inference increment parameter is determined using the following formula: , ,in, For inference increment parameters, For the scene The corresponding sub-personality incremental module parameters, This is a set of high-confidence scenarios. This represents the second posterior probability distribution;
[0129] Alternatively, the inference increment parameter can be determined using the following formula: ; , To smoothly merge weights, For preset coefficients, .
[0130] The second posterior probability distribution is a pre-set posterior probability distribution used to assess whether a high confidence standard has been met.
[0131] As an example, electronic devices will [describe the scene]. Corresponding posterior probability distribution Compared with the pre-set second posterior probability distribution Comparison, in the posterior probability distribution of the scene Greater than the second posterior probability distribution At that time, determine the scene For high-confidence scenarios, place them in the high-confidence scenario set. In, that is Then, it is necessary to adopt For high confidence scene sets Fusion weights for all high-confidence scenarios Hezi Personality Increment Module Parameters Perform weighted processing to determine the corresponding inference increment parameters. .
[0132] As an example, to avoid abrupt style changes, one could adopt... Fusion weights for high-confidence scenarios Perform smoothing processing and determine the smoothing fusion weights. Then use the above For high confidence scene sets Smoothing fusion weights for all high-confidence scenarios Hezi Personality Increment Module Parameters Perform weighted processing to determine the inference increment parameters. To achieve smooth fusion weights Alternate fusion weights Execute inference incremental parameters The actual mount.
[0133] The following examples illustrate the personality adaptive training and dynamic evolution method for large character models, such as... Figure 6 As shown, the specific steps include the following:
[0134] Initial configuration: Load the basic personality data of the character AI's basic language generation model and the initial personality configuration file, and store the anchor values of the core personality attributes in memory as a benchmark reference.
[0135] Online interaction: The AI character interacts with the user online.
[0136] Scene recognition and personality switching: Whenever user input is received, scene recognition is required to determine whether the scene of the dialogue context is consistent with the current scene of the AI.
[0137] If the two are inconsistent, the personality configuration profile is switched, the inference increment parameters are calculated, and the scene sub-personality increment module corresponding to the basic language generation model is fused and updated based on the inference increment parameters; then the basic language generation model (after superimposing personality parameters) generates a response for the user.
[0138] Log recording: The content of this round of dialogue (user input + AI response), scene tags, user feedback and other information are appended and saved to the interaction log database.
[0139] Periodic Review: When the adaptive optimization conditions are met (e.g., fixed intervals or a certain number of dialogues), the review and evaluation process is initiated. Interaction log data of the character's large-scale interaction process is read from the interaction log database. The interaction log data is analyzed, the model output scores relative to various indicators are calculated, shortcomings are identified, and a deviation report is generated. This report lists specific items that need improvement (e.g., "insufficient professionalism," "lack of responsiveness to a particular interest," etc.) and corresponding example dialogue segments.
[0140] Training Sample Extraction: Based on biased applications, relevant dialogue fragments exhibiting personality flaws are extracted from the log database to construct a training sample set. For each area requiring improvement, one or more supervised training samples are generated, including the AI's original responses in the dialogue and reference responses from the ideal personality (provided by rules or humans). Simultaneously, dialogues corresponding to positive user feedback are marked as positive reinforcement samples. Based on this, a set of personality training pairs with desired outputs is obtained.
[0141] Model fine-tuning and update: Based on the training samples, the parameters of the current personality profile are updated. A small-step incremental training strategy is adopted, performing several steps of gradient descent to optimize the model parameters and reduce the gap between the model output and the reference response. During the small-step incremental update process, core personality attribute anchoring constraints, distribution difference constraints, and rule validation constraints are applied. After the update is completed, the target personality profile is obtained.
[0142] Security Verification: After training is completed, compare the target personality configuration profile. With the current personality configuration profile Differences in key personality attributes. If the differences exceed a preset threshold or a tendency to deviate from the preset personality profile is found, the update process will be terminated (the character will be discarded). ,recover The system then records any anomalies for further adjustments to the training strategy. If the validation passes, the new personality model is deployed to replace the old model for subsequent interactions. At this point, the system returns to step 2, entering a new closed-loop cycle.
[0143] Long-term evolution: The above process repeats itself through daily interactions, forming a long-term, gradual evolutionary process. The AI's personality will be gradually optimized: each update brings subtle improvements, which accumulate over time to significantly enhance personality fit. For example, after multiple iterations, the AI gradually learns the communication styles that users prefer, avoids topics that users dislike, and behaves more naturally and consistently in various scenarios. This evolutionary process not only improves the user experience but also allows the AI to demonstrate its "accompanying growth" attribute, enhancing user trust and emotional connection.
[0144] The workflow of the present invention will be described below with reference to an embodiment. This embodiment uses a large-scale example character model. The core personality attributes of the target are set as "rigorous, polite, and adhering to compliance boundaries", and two scenario labels are pre-defined. ,in For professional consultation scenarios, For everyday communication scenarios.
[0145] During the initialization phase, an initial personality configuration profile is generated. It contains a set of core personality attributes. Evolvable personality vector and scene sub-personality incremental module During operation, scene recognition is performed on the dialogue context during the interaction of the large character model. The posterior probability distribution of multiple scenes is determined, and then it is determined whether the scene of the dialogue context is consistent with the current scene of the large character model. If they are inconsistent, the corresponding scene-specific sub-personality incremental module is attached according to the matching degree and fusion weight, so that the same large character model presents the corresponding style in different scenes while maintaining consistency in core attributes. As interactions accumulate, the system records dialogue logs and feedback, and generates a deviation report based on the personality indicator system. Then, training samples are extracted based on the deviation report and small-step incremental updates are performed. The loss includes core personality attribute anchoring constraints, distribution difference constraints, and rule constraints. The updated target personality configuration profile needs to pass security verification before deployment.
[0146] Example of quantification effect: using scene switching delay Personality consistency score and user satisfaction As an indicator, among which Defined as target personality vector Compared with the average actual score cosine similarity, This represents the explicit score mean. In an exemplary test setting, when the proportion of parameters in the scene sub-personality incremental module to the total parameters in the basic language generation model is... And the number of scenes is At that time, the required storage overhead is determined by the comparison scheme. Reduced to ( (Based on the number of parameters in the generative model for the basic language), the storage saving ratio is approximately The loading time for a single scene switch can be approximated by [previous timeframe] when bandwidth is stable. The values decrease proportionally. The above evaluation indicators and calculation methods are used to illustrate the quantifiable technical effects that this invention can bring; specific values can be replaced by actual test data.
[0147] This invention also considers other feasible technical approaches, but all of them have obvious shortcomings compared to others:
[0148] Option 1: Pre-train multiple specialized models – Pre-train a separate large language model for each scenario or personality, and switch between them as needed during interaction. The drawback is the huge resource overhead (requiring maintenance). The existing model has numerous duplicates, resulting in a large amount of redundant parameter storage, and the models do not share new knowledge: new preferences taught to the AI by the user in a certain scenario cannot be transferred to other models. This invention avoids redundant training and the "knowledge silo" effect by sharing a basic language generation model and pairing it with a lightweight personality configuration module, thus offering advantages in efficiency and consistency.
[0149] Option 2: Relying solely on rules to constrain personality – Some systems apply a series of post-processing rules or filters to AI responses to ensure the output does not violate the preset personality. However, this approach does not allow the AI to truly "understand" the personality; it merely passively corrects the wording, lacking flexibility. Moreover, rules are difficult to cover complex situations and have high maintenance costs. This invention directly adjusts model parameters through machine learning, internalizing the personality into the model's behavior, possessing adaptive flexibility while adhering to basic principles. Option 3: Fully autonomous evolution – Allowing AI to freely evolve its personality under unconstrained reinforcement learning. This method may bring unexpected changes, but it is extremely prone to getting out of control, potentially leading to ethical issues or the evolution of a personality deviating from its original intent. In contrast, this invention introduces multiple constraints to ensure the controllable direction of evolution, achieving both continuous learning and preventing "deviation." It has been proven that in sensitive personality shaping tasks, guided evolution is safer and more reliable than uncontrolled evolution.
[0150] Compared with existing technologies, the personality adaptive training and dynamic evolution method for large-scale character models provided in this invention has at least the following beneficial effects:
[0151] (1) Repeatable incremental adaptation: Through a closed loop of “collection-evaluation-refinement-update-verification”, personality performance is quantified into an indicator score vector. and deviation vector and with Or its weighted components can be used as training driving signals to make the personality optimization process measurable and reproducible.
[0152] (2) Stability and security: In incremental updates, the set of core personality attributes Implement freeze or projection constraints (e.g.) Or make This suppresses updates to the dimensions corresponding to the core attributes, and uses a threshold-based approach. punish Limiting the scope of each update, along with rule verification and rollback mechanisms, reduces the risk of personality drift, value deviation, and catastrophic amnesia.
[0153] (3) Lightweight adaptation and resource saving for multiple scenarios: A single basic language generation model is used in conjunction with Each scene-specific sub-personality incremental module enables multi-scene style adaptation. If the parameter count of each incremental module accounts for a certain percentage of the base language generation model... The total storage overhead is Compared to maintaining a complete model for each scenario The savings rate is approximately Scene switching loading volume is adjusted by Down to The switching latency is approximately equal to the bandwidth when the bandwidth is stable. It decreased proportionally.
[0154] (4) Reduced deployment and maintenance costs: The personality configuration profile supports versioned storage, online incremental updates and rollbacks, and continuous personality optimization can be achieved without replacing the entire basic language generation model, making it easy to integrate into existing dialogue systems. In summary, this invention achieves a balance between "gradual optimization, cross-scenario adaptation, stability and security, and engineering feasibility".
[0155] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0156] This invention provides a character large model personality adaptive training and dynamic evolution system, which corresponds one-to-one with the character large model personality adaptive training and dynamic evolution method described in the above embodiments. For example... Figure 7 As shown, the system includes:
[0157] The log acquisition module 701 is used to acquire interaction log data of the character large model interaction process when the adaptive optimization conditions are met.
[0158] The log evaluation module 702 is used to score the interaction log data based on the personality indicator system, determine the indicator score vector corresponding to the interaction log data, determine the deviation vector corresponding to the interaction log data based on the indicator score vector and the target score vector corresponding to the personality indicator system, and determine the deviation report based on the deviation vectors corresponding to all the interaction log data within a preset time window.
[0159] The training sample determination module 703 is used to determine dialogue segments with personality defects based on the deviation report, and to determine training samples based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses. The reference responses are responses to the user input under the ideal personality.
[0160] The incremental update module 704 is used to perform small-step incremental updates on the current personality configuration profile based on the training samples, freeze the backbone parameters of the basic language generation model, update at least one of the evolutionary personality vector and scene sub-personality incremental module sets, and apply core personality attribute anchoring constraints, distribution difference constraints, and rule constraints to determine the target personality configuration profile; the core personality attribute anchoring constraints are used to restrict the core personality attributes in the personality configuration profile from being updated, the distribution difference constraints are used to restrict the output distribution difference before and after the personality configuration profile is updated, and the rule constraints are used to restrict the value attributes and forbidden attributes in the personality configuration profile;
[0161] The security verification module 705 is used to perform security verification on the target personality configuration file. If the security verification passes, the target personality configuration file is used to update and replace the current personality configuration file; if the security verification fails, the current personality configuration file is rolled back.
[0162] In one embodiment, the character large model personality adaptive training and dynamic evolution system further includes:
[0163] Initialization module 706 is used to initialize the current personality configuration profile of the large character model and the basic personality data of the basic language generation model;
[0164] The scene recognition module 707 is used to perform scene recognition on the dialogue context during the interaction of the large character model and determine the posterior probability distribution of multiple scenes.
[0165] The personality management module 708 is used to perform scene personality matching processing based on the scene posterior probability distribution and the evolvable personality vector in the current personality configuration file when the maximum value of the posterior probability distribution in all scenarios is greater than the first posterior probability distribution, and the scenario corresponding to the maximum value is inconsistent with the current scenario corresponding to the character big model;
[0166] The incremental parameter fusion module 709 is used to determine the inference incremental parameters based on the scene personality matching degree and the scene posterior probability distribution, and to fuse and update the scene sub-personality incremental module corresponding to the basic language generation model based on the inference incremental parameters.
[0167] In this example, the system also includes a basic language generation model, which is a pre-trained language generation network with natural language understanding and generation capabilities, and whose basic personality parameters are obtained through personality initialization training. Used in a given input dialogue context Original response generated in time The system may also include a personality configuration profile module for storing, versioning, managing, and retrieving personality configuration profiles. Personality Configuration Profile At least includes the core set of personality attributes Evolvable personality vector Scene Subpersonality Incremental Module Collection Personality indicator system and constraint parameter set Scene Subpersonality Incremental Module Preferred to be low-rank adapter parameters and / or prompt templates The configuration is designed to reduce the number of incremental parameters and support hot-plug loading.
[0168] Scene recognition module 707 is used to receive dialogue context. Output the posterior probability distribution of the scene. This module includes a feature extraction unit and a scene discrimination unit: the feature extraction unit encodes the input text into a vector. Scene discrimination unit output and through calculate The scene set It is a pre-defined, finite set of categories, which can be expanded as needed by the application.
[0169] Personality Management Module 708: Used to determine the posterior probability distribution of a scenario. Personality Configuration Profile This module determines the personality loading, fusion, and smoothing strategies. It includes a similarity calculation unit, a loading control unit, and a transition smoothing unit: the similarity calculation unit calculates... ; Loading control unit in Below the threshold and Above the threshold Switching is triggered on demand; when multiple high-confidence scenarios exist, the fusion weights are calculated. And generate the fused incremental parameters. ; Transition smoothing unit according to Implement a gradual transition to ensure consistent output style across different scenarios.
[0170] The log evaluation module 702 is used to record human-computer dialogue content and related feedback in the background and periodically evaluate differences in personality performance. This module includes a log unit (recording data such as input, output, scenario, and feedback for each dialogue) and an evaluation unit (reviewing and analyzing dialogues accumulated over a period of time). The evaluation unit calculates the scores of various personality indicators output by the model against a preset personality indicator system and generates a quantitative evaluation report.
[0171] The personality evolution engine is responsible for extracting training data based on the assessment report and executing model updates. Specifically, it includes a training sample determination module 703 and an incremental update module 704. The training sample determination module 703 selects and constructs training samples (including ideal responses, user feedback, etc.). The incremental update module 704 incrementally fine-tunes and updates the basic language generation model, applying core personality attribute anchoring constraints, distribution difference constraints, and rule constraints to determine the target personality configuration profile. After training, the new personality data from the basic language generation model is submitted back to the personality configuration profile module for storage, and the personality management module is notified to update the current personality configuration profile. During the model training phase, the outputs of the old and new models are calculated... Divergence, and limit it to not exceed a set threshold. At the same time, the pre-labeled core personality attribute parameters are locked and constrained to remain unchanged during training.
[0172] The security verification module 705 tests the new target personality configuration profile after a model update and before deployment, including simulating several key dialogue scenarios to detect abnormal tendencies. If a problem is found, the update is rejected or rolled back. This module ensures that personality evolution follows preset boundaries and ethical requirements.
[0173] The modules communicate via a bus or application programming interface (API). In terms of hardware implementation, each module can be implemented as a functional unit within the same server process, or it can be deployed and collaborate in a distributed manner via network communication. This modular design facilitates system expansion and maintenance: new scene categories or updated constraint strategies can be smoothly added without affecting the normal operation of other parts.
[0174] This invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it is used to implement the character large model personality adaptive training and dynamic evolution method described in the above embodiments. Specifically, it includes: collecting interaction logs when triggering conditions are met; calculating indicator score vectors and deviation reports based on a personality indicator system; extracting training samples based on the deviation reports; freezing the backbone parameters of the basic language generation model and performing small-step incremental updates on the external parameters, while applying core personality attribute anchoring constraints, distribution difference constraints, and rule constraints; performing security checks on the candidate personality configuration files and writing them back to versioned storage when they pass, and rejecting and rolling back when they fail.
[0175] This invention provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program is used to implement the adaptive training and dynamic evolution of the large-scale personality model described in the above embodiments. The method includes at least: collecting interaction logs when triggering conditions are met; calculating indicator score vectors and deviation reports based on a personality indicator system; extracting training samples based on the deviation reports; freezing the backbone parameters of the basic language generation model and performing small-step incremental updates on the external parameters, while applying core personality attribute anchoring constraints, distribution difference constraints, and rule constraints; performing security checks on candidate personality configuration files and writing back to versioned storage when passing, and rejecting and rolling back when failing.
[0176] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for personality adaptive training and dynamic evolution of a large-scale character model, characterized in that, include: When the adaptive optimization conditions are met, acquire the interaction log data of the character's large model interaction process; The interaction log data is scored based on a personality indicator system to determine the indicator score vector corresponding to the interaction log data. Based on the indicator score vector and the target score vector corresponding to the personality indicator system, the deviation vector corresponding to the interaction log data is determined. Based on the deviation vectors corresponding to all interaction log data within a preset time window, a deviation report is determined. The personality indicator system is a system of personality indicators that fits the role identity and is constructed by the basic language generation model. Based on the deviation report, dialogue segments with personality defects are identified, and training samples are determined based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses. The reference responses are responses to the user input under the ideal personality. Based on the training samples, a small-step incremental update is performed on the current personality configuration profile. The backbone parameters of the basic language generation model are frozen, and at least one of the evolvable personality vector and the scene sub-personality incremental module set is updated. Core personality attribute anchoring constraints, distribution difference constraints, and rule constraints are applied to determine the target personality configuration profile. The core personality attribute anchoring constraints are used to restrict the core personality attributes in the personality configuration profile from being updated. The distribution difference constraints are used to restrict the output distribution difference before and after the personality configuration profile update. The rule constraints are used to restrict the value attributes and forbidden attributes in the personality configuration profile. The current personality configuration profile refers to the personality configuration profile before the change, and the target personality configuration profile refers to the updated personality configuration profile. The personality configuration profile refers to a machine-readable data structure used to describe the output behavior of the large character model in different scenarios. The scene sub-personality incremental module set is a collection of sub-personality incremental modules corresponding to multiple scenarios. The target personality configuration file is subjected to security verification. If the security verification passes, the target personality configuration file is used to update and replace the current personality configuration file. If the security verification fails, the current personality configuration file is rolled back.
2. The method according to claim 1, characterized in that, The interaction log data includes dialogue context, model output, scene tags, and user feedback information; The step of scoring the interaction log data based on a personality indicator system to determine the indicator score vector corresponding to the interaction log data includes: Based on the dialogue context, the model output, and the scene label, a text scene vector is determined. The text scene vector is then processed based on a personality index system to determine the text scene score corresponding to the interaction log data. The user feedback information is normalized to determine the user feedback score corresponding to the interaction log data; The text scene score and user feedback score corresponding to the interaction log data are weighted and fused to determine the fusion score corresponding to the interaction log data. The fusion score corresponding to the interaction log data is partitioned and discretely mapped to determine the indicator score vector corresponding to the interaction log data.
3. The method according to claim 1, characterized in that, The process of identifying dialogue segments with personality defects based on the deviation report, and determining training samples based on the dialogue segments, includes: Based on the deviation report, a subset of indicators to be corrected is determined, and the dialogue segments corresponding to the subset of indicators to be corrected are identified as dialogue segments with personality defects. The dialogue segments include user input and original response, and the original response is the response of the basic language generation model to the user input. The original response is transformed using the text transformation rules corresponding to the subset of indicators to be corrected, and multiple candidate responses are determined. Based on the personality index system, the core personality attribute boundaries and consistency of multiple candidate responses are checked. The candidate response that passes the core personality attribute boundary check and has the highest consistency score is determined as the reference response.
4. The method according to claim 1, characterized in that, Applying the anchoring constraints to the core personality attributes includes: anchoring constraints on the parameter dimensions corresponding to the core personality attributes based on a mask update suppression mechanism, which is implemented through the following formula: ; ;in, This represents the parameter update amount obtained from this small incremental update; A non-updatable set of parameter masks constructed based on the set of core personality attributes in the current personality configuration profile; The amount of update after constraints; These are the model vector parameters before the update. These are the updated model vector parameters; Alternatively, based on the permissive subspace projection mechanism, anchor constraints are applied to the parameter dimensions corresponding to the core personality attributes. The permissive subspace projection is achieved through the following formula: ; ; To allow projection operators that update subspaces, based on Induced determination; Applying the distribution difference constraint includes: constructing an anchoring cue set, performing difference calculation based on the output distribution before and after attaching the candidate incremental module corresponding to the same anchoring cue set, determining the distribution difference constraint loss used to constrain the personality configuration profile before and after the update, and constraining the distribution difference constraint loss according to the scenario adaptive threshold; Applying the rule constraints includes: using a violation indicator function to calculate the value attributes and forbidden attributes in the current personality configuration profile, determining the rule constraint loss, and applying rule constraints based on the rule constraint loss.
5. The method according to claim 1, characterized in that, The target personality configuration profile is the personality configuration profile determined when the loss due to multiple constraints is less than the preset total loss; The multi-constraint loss is determined using the following formula: ; in, This is the loss due to multiple constraints; , and These are the coefficients of the distribution difference constraint loss, the core anchoring constraint loss, and the rule constraint loss, respectively. To monitor learning loss, , For sample weights, For cross-entropy, The output distribution after mounting the candidate incremental module, , and These represent the user input, scene label, and reference response for the i-th training sample, respectively. For distribution difference constraint loss, , For anchoring the cue set, Input for users Corresponding anchoring prompts , The output distribution before mounting the candidate incremental module, The output distribution after mounting the candidate incremental module, for Divergence function; As the core anchoring constraint loss, or , This is a set of non-updatable parameter masks constructed based on the core personality attribute set in the current personality configuration profile. This represents the parameter update amount obtained from this small incremental update. For margin; To constrain losses by rules, , The sampled or decoded output generated for the current training step. This is a violation indicator function.
6. The method according to claim 5, characterized in that, The security verification of the target personality configuration profile includes: The target personality configuration file is subjected to security verification. If the security verification conditions are met, the security verification is determined to be successful; if the security verification conditions are not met, the security verification is determined to be unsuccessful. The security verification conditions include: the distribution difference constraint loss corresponding to the anchoring prompt set is less than the preset difference loss, the norm decrease value corresponding to the deviation report is greater than the preset decrease value, and the rule verification result of the core personality attribute set is zero violation.
7. The method according to any one of claims 1-5, characterized in that, Before acquiring interaction log data of the character's large model interaction process when the adaptive optimization conditions are detected, the method further includes: Initialize the current personality configuration profile of the main character model and the basic personality data of the basic language generation model; Scene recognition is performed on the dialogue context during the interaction process of the large character model to determine the posterior probability distribution of multiple scenes; When the maximum value of the posterior probability distribution in all scenarios is greater than the first posterior probability distribution, and the scenario corresponding to the maximum value is inconsistent with the current scenario corresponding to the character big model, scenario personality matching processing is performed based on the scenario posterior probability distribution and the evolvable personality vector in the current personality configuration file to determine the scenario personality matching degree. Based on the scene personality matching degree and the scene posterior probability distribution, the inference increment parameters are determined, and the scene sub-personality increment module corresponding to the basic language generation model is fused and updated based on the inference increment parameters.
8. The method according to claim 7, characterized in that, The step of determining inference increment parameters based on the scene personality matching degree and the scene posterior probability distribution, and then fusing and updating the scene sub-personality increment module corresponding to the basic language generation model based on the inference increment parameters, includes: Based on the scenario-personality matching degree and the posterior probability distribution of each scenario, the fusion weight for each scenario is determined using the following formula: ;in, For the scene The corresponding fusion weights, For the scene The corresponding posterior probability distribution for the scenario For scene-personality matching degree, and These are the weighting coefficients; Based on the fusion weight corresponding to each scenario and the sub-personality incremental module corresponding to the scenario in the current personality configuration file, a weighted fusion is performed to determine the inference incremental parameter. The inference incremental parameter is determined by the following formula: ,in, For inference increment parameters, For the scene The corresponding sub-personality incremental module; Based on the inference increment parameters, the basic language generation model is fused and updated to obtain the updated basic language generation model.
9. The method according to claim 8, characterized in that, The inference increment parameter is determined using the following formula: , ,in, For inference increment parameters, For the scene The corresponding sub-personality incremental module parameters, This is a set of high-confidence scenarios. This represents the second posterior probability distribution; Alternatively, the inference increment parameter can be determined using the following formula: ; , To smoothly merge weights, For preset coefficients, .
10. A personality adaptive training and dynamic evolution system for a large-scale character model, characterized in that, include: The log acquisition module is used to acquire interaction log data of the character's large model interaction process when the adaptive optimization conditions are met. The log evaluation module is used to score the interaction log data based on the personality indicator system, determine the indicator score vector corresponding to the interaction log data, determine the deviation vector corresponding to the interaction log data based on the indicator score vector and the target score vector corresponding to the personality indicator system, and determine the deviation report based on the deviation vectors corresponding to all interaction log data within a preset time window; the personality indicator system is a system of personality indicators that fit the role identity and is constructed by the basic language generation model. The training sample determination module is used to determine dialogue segments with personality defects based on the deviation report, and to determine training samples based on the dialogue segments. The training samples include user input in the dialogue segments, scene tags in the dialogue segments, and reference responses, wherein the reference responses are responses to the user input under the ideal personality. The incremental update module is used to perform small-step incremental updates on the current personality configuration profile based on the training samples, freeze the backbone parameters of the basic language generation model, update at least one of the evolvable personality vector and the scene sub-personality incremental module set, and apply core personality attribute anchoring constraints, distribution difference constraints, and rule constraints to determine the target personality configuration profile. The core personality attribute anchoring constraints are used to restrict the core personality attributes in the personality configuration profile from being updated. The distribution difference constraints are used to restrict the output distribution difference before and after the personality configuration profile is updated. The rule constraints are used to restrict the value attributes and forbidden attributes in the personality configuration profile. The current personality configuration profile refers to the personality configuration profile before the change, and the target personality configuration profile refers to the updated personality configuration profile. The personality configuration profile refers to the machine-readable data structure used to describe the output behavior of the large character model in different scenarios. The scene sub-personality incremental module set is a collection of sub-personality incremental modules corresponding to multiple scenarios. The security verification module is used to perform security verification on the target personality configuration file. If the security verification passes, the target personality configuration file is used to update and replace the current personality configuration file; if the security verification fails, the current personality configuration file is rolled back.
11. The system according to claim 10, characterized in that, The system also includes: The initialization module is used to initialize the current personality configuration profile of the large character model and the basic personality data of the basic language generation model; The scene recognition module is used to identify the dialogue context during the interaction of the large character model and determine the posterior probability distribution of multiple scenes. The personality management module is used to determine the scene personality matching degree when the maximum value of the posterior probability distribution in all scenarios is greater than the first posterior probability distribution, and the scenario corresponding to the maximum value is inconsistent with the current scenario corresponding to the character big model. It performs scene personality matching processing based on the scene posterior probability distribution and the evolvable personality vector in the current personality configuration file. The incremental parameter fusion module is used to determine the inference incremental parameters based on the scene personality matching degree and the scene posterior probability distribution, and to fuse and update the scene sub-personality incremental module corresponding to the basic language generation model based on the inference incremental parameters.
12. 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 personality adaptive training and dynamic evolution method of the large character model according to any one of claims 1-9.
13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the personality adaptive training and dynamic evolution method of the large character model according to any one of claims 1-9.