A hierarchical adapter adaptive method and system for model style anchoring

By adopting a hierarchical adapter adaptive approach, the problem of unclear boundaries between style anchor adapters and adaptive adapters in large language model adaptation technology is solved. This achieves stability and consistency in response output, ensures the management of short-term preferences and version states, and improves the operational stability and response accuracy of the adaptive adapter.

CN123114785APending Publication Date: 2026-11-17CHANGSHA YUQI WUXIAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611035312.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing large language model adaptation technologies, the boundaries between style anchoring adapters, adaptive adapters, and memory layer modules are unclear, and there is a lack of unified control over feedback attribution and candidate update versions. This leads to the response output deviating from the anchored response output, and short-term preferences and conversational facts being mixed into the adaptation process. It is difficult to meet the requirements for stable operation of the hierarchical adapter, and the management of merging weights, version states, and memory entries is not easy to synchronize.

Method used

By acquiring the base general large model, style anchoring adapter, adaptive adapter, and memory layer module, hierarchical identification, read-only, implicit update, session-level writing, and merge weight configuration are performed to form a hierarchical adapter running structure. Anchoring inference, candidate inference, style consistency scoring, and feedback signal processing are performed to generate adaptive candidate samples and memory update entries. Candidate update version generation, gray-scale upgrade control, and rollback processing are performed to ensure the consistency and stability of the response output.

Benefits of technology

It realizes the comparison and recording of response output with anchor response output before generation, reduces the adaptive adapter being rewritten by a single feedback, retains short-term preferences in the memory layer module, and has a traceable link between style deviation records and version status. It also manages the integration weight and version status synchronously, improving the adaptive stability and consistency of the layered adapter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114785A_ABST
    Figure CN123114785A_ABST
Patent Text Reader

Abstract

This invention relates to the field of large language model adaptation technology, and particularly to a hierarchical adapter adaptive method and system for model style anchoring. The method includes: acquiring a base general large model, a style anchoring adapter, an adaptive adapter, and a memory layer module; configuring hierarchical identifiers, read-only settings, implicit updates, session-level writes, and merge weights; generating a hierarchical adapter runtime structure; reading and filtering memory entries based on user input to construct input samples and valid memory entries; obtaining response output through anchoring inference, candidate inference, and mask generation, and performing style consistency scoring, weight adjustment, and response selection; collecting feedback signals to form adaptive candidate samples, memory update entries, and style deviation records; and completing candidate updates, licensing, gray-scale upgrades, auditing, and rollback. This invention effectively improves model style stability, memory update controllability, and adaptive traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large language model adaptation technology, and in particular to a hierarchical adapter adaptation method and system for model style anchoring. Background Technology

[0002] In the field of large language model adaptation technology, existing solutions for base-based general large models typically employ an interaction chain consisting of an adapter, a memory layer module, user input, and feedback signals. The base-based general large model receives user input, combines it with memory entries or candidate adapters to generate a response output, and then performs sample writing, memory updates, or adapter updates based on feedback signals. However, this approach suffers from limitations such as unclear boundaries between style-anchored adapters, adaptive adapters, and memory layer modules; a lack of unified control over feedback attribution and candidate update versions; and the infiltration of short-term preferences and conversational facts into the adaptation process. Existing methods often rely on domain selection, adapter invocation, memory entry concatenation, or version recording to process user input, which can easily lead to the direct association of memory update entries and communication preference feedback attribution with adapter updates.

[0003] In scenarios where response outputs and feedback signals are generated continuously, candidate response outputs are prone to deviating from the anchor response output and the style-anchoring adapter boundary of the candidate update version, making it difficult to meet the requirements for the adaptive and stable operation of the hierarchical adapter. After users like, complain, change the reuse rate, actively correct, and change the session duration of the response output, the processing paths for adaptive candidate samples, memory update entries, and style deviation records in existing solutions are often mixed in the same update chain. After short-term preferences enter through the memory layer module, there is a lack of joint determination of duration, trigger frequency, and style consistency score, which can easily be regarded as communication preferences in the generation of candidate update versions. When the adaptive adapter experiences version anomalies, existing solutions usually only record the version status, lacking a rollback judgment chain that combines the difference in the number of complaints, the difference in the number of active corrections, the difference in reuse rate, the difference in session duration, and the difference in style consistency score.

[0004] For the joint processing of response output, style consistency scoring, update permission, canary upgrade control and rollback, existing technologies generally lack a continuous link from anchoring response output to comparing candidate response output, to feedback attribution, sample writing, candidate update version generation, auditing and rollback. It is not easy to form a consistent process of collection, judgment, control and recording in long-term interaction scenarios, which makes it difficult to synchronize and manage the merge weight, version status and memory entry mark in the hierarchical adapter running structure. Summary of the Invention

[0005] To address the above problems, this invention provides a hierarchical adapter adaptive method for model style anchoring, comprising:

[0006] S100: Obtain the base general large model, style anchoring adapter, adaptive adapter and memory layer module, perform hierarchical identification, read-only, implicit update, session-level write and merge weight configuration processing to obtain the hierarchical adapter running structure;

[0007] S200. Based on the hierarchical adapter operation structure, user input reception, memory entry reading, expiration judgment, invalidation judgment, conflict judgment and input sample construction processing are performed to obtain input samples and valid memory entries;

[0008] S300. Based on the input sample and the valid memory entry, perform anchoring reasoning, candidate reasoning and mask generation processing to obtain anchoring response output and candidate response output;

[0009] S400. Based on the anchored response output and the candidate response output, perform style consistency scoring, integration weight adjustment and response selection processing to obtain the response output.

[0010] S500: Based on the response output, perform feedback signal acquisition, feedback attribution, sample writing and memory update processing to obtain adaptive candidate samples, memory update entries and style deviation records;

[0011] S600: Based on the adaptive candidate samples, the memory update entries, and the style deviation records, perform candidate update version generation, update licensing, gray-scale upgrade control, auditing, and rollback processing to obtain the hierarchical adapter adaptive result.

[0012] Furthermore, in S100, the hierarchical identifier includes a style anchoring layer identifier, an adaptive layer identifier, and a memory layer identifier; a read-only configuration is given to the style anchoring adapter, an implicit update configuration is given to the adaptive adapter, and a session-level write configuration is given to the memory layer module.

[0013] Furthermore, in S200, the expiration judgment generates an expiration mark based on the validity period field of the memory entry, the invalidation judgment generates an invalidation mark based on the active correction record, and the conflict judgment generates a conflict mark based on the current session data and the stored memory entries. Memory entries with expiration marks, invalidation marks, or conflict marks are excluded from candidate inference.

[0014] Furthermore, in S300, the anchoring inference is performed by the base general large model and the style anchoring adapter, without calling the adaptive adapter and the memory layer module; in S400, the adaptive module generates a mask based on the input sample, the valid memory entry, the style consistency score history, and the version status.

[0015] Furthermore, in S400, the style consistency score includes tone style score, address style score, value score, and catchphrase score; when the style consistency score is lower than the threshold, the merging weight of the memory layer module is reduced and the candidate response output is regenerated; when the regenerated candidate response output is still lower than the threshold, the merging weight of the adaptive adapter is reduced and the candidate response output is regenerated.

[0016] Furthermore, in S500, the feedback signals include likes, complaints, reuse rate, proactive correction, and conversation duration; the feedback attribution includes factual memory feedback attribution, communication preference feedback attribution, style deviation feedback attribution, and version anomaly feedback attribution. Factual memory feedback attribution generates the memory update entries, and communication preference feedback attribution generates the adaptive candidate samples.

[0017] Furthermore, in S600, the candidate update version is generated by the implicit training scheduler based on the adaptive candidate samples; after the candidate update version is generated, it is stored in the version control and audit module, and the style consistency score generates the judgment result of the update permission based on the updated response output of the candidate update version and the anchored response output, and the update permission includes pass, reject and downgrade.

[0018] Furthermore, in S600, the grayscale upgrade control includes statistics on the duration of short-term preferences, the frequency of triggering, the reuse rate, and the active correction; when the short-term preference meets the duration threshold, the frequency of triggering, and the style consistency score threshold, the short-term preference is written into the adaptive candidate sample, and the short-term preference is not written into the style anchoring adapter.

[0019] Furthermore, in S600, the rollback process generates a rollback judgment result based on the difference in the number of complaints between the current version and the previous version, the difference in the number of proactive corrections, the difference in reuse rate, the difference in session duration, and the difference in style consistency score. When the rollback judgment result is a rollback, the adaptive adapter is restored to the previous version, and the associated memory update entry is marked as invalid.

[0020] Furthermore, a hierarchical adapter adaptive system for model style anchoring, applied to the method described in any of the above, includes: a hierarchical configuration module, an input and memory processing module, a dual-path inference module, a style scoring and response selection module, a feedback attribution and sample writing module, and a version and grayscale control module.

[0021] The key innovations of this invention include:

[0022] (1) Based on the anchored response output and the candidate response output, a style consistency score is performed, and the merging weight is adjusted and the response selection is performed according to the style consistency score result, so that the candidate response output is compared with the anchored response output before entering the response output.

[0023] (2) Generate candidate update versions based on the adaptive candidate samples, and control the update relationship between the candidate update versions and the adaptive adapter through update licensing, auditing and rollback processing, so that the candidate update versions do not directly replace the adaptive adapter.

[0024] (3) Based on the memory update entries and the style deviation records, gray-scale upgrade control is performed. Short-term preferences are processed by duration, trigger frequency, reuse rate, active correction and style consistency score and then written into the adaptive candidate samples, so that a controlled write link is formed between the memory layer module and the adaptive adapter.

[0025] The following are its main beneficial effects:

[0026] (1) To address the issue of candidate response outputs deviating from anchor response outputs, style consistency scoring, merging weight adjustment, and response selection processing are used to ensure that the anchor response output and candidate response outputs are compared before the response outputs are generated, and that subsequent feedback attribution and sample writing obtain a clear source of response.

[0027] (2) To address the issue of the adapter being updated directly by feedback signals, the adaptive candidate sample is first entered into the candidate update version through candidate update version generation, update permission, auditing and rollback processing. Then, the judgment result of passing, rejecting or downgrading is formed based on the style consistency score result, thereby reducing the situation where the adaptive adapter is rewritten by a single feedback.

[0028] (3) To address the problem of short-term preferences and conversational facts being mixed into the adaptive process, gray-scale upgrade control is used to process the memory update items by controlling the duration, trigger frequency, reuse rate and active correction, so that short-term preferences are first retained in the memory layer module and then enter the adaptive candidate sample through style consistency scoring.

[0029] (4) To address the issue of the lack of linkage between style deviation records and version status, style deviation records, candidate update versions, update licenses, and merge weight adjustment records are linked and saved through auditing and rollback processes, so that the status changes between the current version and the previous version have a traceable link.

[0030] (5) To address the problem that the merged weights, version status and memory entry tags are not easy to synchronize and manage in the hierarchical adapter running structure, the merged weight field and version status field are written back by the hierarchical adapter adaptive result, so that the subsequent input sample construction, candidate inference and response selection processing can follow the same running link. Attached Figure Description

[0031] Figure 1 A flowchart illustrating a hierarchical adapter adaptive method for model style anchoring provided in an embodiment of this application;

[0032] Figure 2 This is a structural block diagram of a hierarchical adapter adaptive system with model style anchoring, provided in an embodiment of this application. Detailed Implementation

[0033] Example 1: Refer to Figure 1 This is a flowchart illustrating a hierarchical adapter adaptive method for model style anchoring provided in an embodiment of the present invention. The process may include at least steps S100-S600:

[0034] S100: Obtain the base general large model, style anchoring adapter, adaptive adapter and memory layer module, perform hierarchical identification, read-only, implicit update, session-level write and merge weight configuration processing to obtain the hierarchical adapter running structure;

[0035] S200. Based on the hierarchical adapter operation structure, user input reception, memory entry reading, expiration judgment, invalidation judgment, conflict judgment and input sample construction processing are performed to obtain input samples and valid memory entries;

[0036] S300. Based on the input sample and the valid memory entry, perform anchoring reasoning, candidate reasoning and mask generation processes to obtain anchoring response output and candidate response output;

[0037] S400. Based on the anchored response output and the candidate response output, perform style consistency scoring, integration weight adjustment and response selection processing to obtain the response output.

[0038] S500: Based on the response output, perform feedback signal acquisition, feedback attribution, sample writing and memory update processing to obtain adaptive candidate samples, memory update entries and style deviation records;

[0039] S600: Based on the adaptive candidate samples, the memory update entries, and the style deviation records, perform candidate update version generation, update licensing, gray-scale upgrade control, auditing, and rollback processing to obtain the hierarchical adapter adaptive result.

[0040] S100: Obtain the base general large model, style anchoring adapter, adaptive adapter and memory layer module, perform hierarchical identification, read-only, implicit update, session-level write and merge weight configuration processing to obtain the hierarchical adapter running structure;

[0041] Specifically, this step is initiated during system initialization, the establishment of a new user session, the rollback of a candidate update version, or the loading of a style anchoring adapter version. Input sources include the base general-purpose large model in the model storage path, the style anchoring adapter and adaptive adapter in the adapter library, and the memory layer module in the memory pool. The base general-purpose large model is a pre-trained large language model containing a Transformer layer, an attention layer, a word embedding layer, and an output layer, used to receive input samples generated in subsequent S200 and perform inference. The style anchoring adapter and the adaptive adapter are both low-rank adaptation (LoRA) adapters, both mounted in the attention layer or transformer layer of the base general-purpose large model. The memory layer module is a memory pool structure used to store session-level facts and short-term preferences, and is used in subsequent S200 for memory entry retrieval, expiration judgment, invalidation judgment, and conflict judgment.

[0042] Specifically, the hierarchical identification configuration is performed by the version control and auditing module. The version control and auditing module reads the model identifier, version status, and layer position information of the base general large model; reads the adapter identifier, style version, and mount position of the style anchoring adapter; reads the adapter identifier, user identifier, and candidate update version status of the adaptive adapter; and reads the memory pool identifier, session identifier, and memory entry index of the memory layer module. Subsequently, the version control and auditing module registers the style anchoring adapter as the style anchoring layer identifier, the adaptive adapter as the adaptive layer identifier, and the memory layer module as the memory layer identifier. This process is necessary because the write permissions and invocation phases of the three types of objects are different. If the hierarchical identification is not completed first, subsequent candidate inference, style consistency scoring, and rollback processing will result in object misuse. After the hierarchical identification is completed, a hierarchical identifier field is formed in the hierarchical adapter runtime structure. This field serves as the higher-level configuration for reading valid memory entries and constructing input samples in S200.

[0043] Furthermore, a read-only configuration is applied to the style anchor adapter. The version control and auditing module sets the parameter write state of the style anchor adapter to a locked state, the training state to a frozen state, the candidate update version receiving state to a prohibited state, and isolates the write path of the memory layer module from the style anchor adapter. The style anchor adapter carries tone style, values, addressing style, and catchphrases, where tone style represents the intensity of expression and sentence structure in the response output, values ​​represent the stable judgment boundary in the response output, addressing style represents the rules for addressing users, and catchphrases represent fixed expression fragments. After the read-only configuration is completed, the feedback signals collected by S500 and the candidate update versions generated by S600 are not written to the style anchor adapter. If the style anchor adapter is detected to be missing a style version, mounting location, or locked state, the version control and auditing module registers the style anchor adapter as pending loading and suspends the output of the layered adapter running structure.

[0044] Furthermore, an implicit update configuration is applied to the adaptive adapter. The implicit training scheduler reads the user identifier, current version, previous version, candidate update version storage location, and update record of the adaptive adapter, and configures the adaptive adapter to receive adaptive candidate samples. The adaptive candidate samples originate from the communication preference feedback attribution of S500. The implicit update configuration does not depend on explicit user training instructions, but is triggered by the feedback signal collector after likes, comments, reuse rates, proactive corrections, and session duration are generated. The adaptive adapter carries user individual characteristics and communication preferences, where user individual characteristics represent the user's stable expression habits in multiple sessions, and communication preferences represent preference records for response length, addressing style, and expression structure. After the implicit update configuration is completed, an adaptive version field and a candidate update entry field are formed in the hierarchical adapter runtime structure for use by S600 in candidate update version generation and update license processing.

[0045] Furthermore, a session-level write configuration is applied to the memory layer module. The memory layer module receives memory entries, an expiration field, a source field, a session identifier, an active correction record, and a conflict state field. Memory entries represent session-level facts and short-term preferences; the expiration field is used for expiration determination in subsequent S200 operations; the active correction record is used for invalidation determination in subsequent S200 operations; and the conflict state field is used for conflict determination in subsequent S200 operations. The session-level write configuration limits the memory layer module to only receive current session data, factual memory feedback after feedback signal attribution, and short-term preferences retained by grayscale upgrade control. The memory layer module does not write content to the style anchoring adapter. If duplicate memory entries exist under the same session identifier, the memory layer module retains the newer memory entry according to the source field and active correction record, and marks the replaced memory entry as invalid. After this configuration is completed, a memory read field and a memory write field are formed in the hierarchical adapter runtime structure for memory entry reading in S200 and memory update processing in S500.

[0046] Furthermore, the merge weight configuration is executed by the adaptive module. The adaptive module reads the style anchoring layer identifier, adaptive layer identifier, memory layer identifier, style consistency scoring history, and version status, and generates the merge weight configuration. The merge weight configuration includes the style anchoring adapter merge weight, the adaptive adapter merge weight, and the memory layer module merge weight. The style anchoring adapter merge weight is fixed during initialization, the adaptive adapter merge weight is registered according to the version status, and the memory layer module merge weight is registered according to the validity period field and conflict status field of the memory entry. The merge weight configuration participates in the call boundaries of anchoring inference and candidate inference in S300, and participates in the merge weight adjustment after style consistency scoring in S400. If the version status shows that the adaptive adapter is in a rollback observation state, the adaptive module reduces the initial merge weight of the adaptive adapter; if a memory entry has a conflict status field, the adaptive module registers the corresponding memory layer module merge weight as paused.

[0047] In an engineering implementation, the enterprise customer service system deploys a base general-purpose large model and configures a style anchoring adapter and an adaptive adapter in the adapter library. The style anchoring adapter records the customer service's fixed tone style, addressing style, and catchphrases; the adaptive adapter records a user's communication preferences regarding response length and expression structure; and the memory layer module records the facts of the questions submitted by the user in the current session and short-term preferences. After system startup, the version control and auditing module first reads the version status and mount location of the three objects, and then writes the style anchoring layer identifier, adaptive layer identifier, and memory layer identifier. Subsequently, the version control and auditing module sets the style anchoring adapter to read-only, registers the adaptive adapter as an acceptable candidate update version, and registers the memory layer module as a session-level write object. The adaptive module then registers the merge weights of the three objects. After completion, the hierarchical adapter execution structure is passed to S200. After receiving the structure, S200 reads the memory entries according to the memory read field and generates input samples and valid memory entries based on the validity period field, active correction record, and conflict status field.

[0048] Understandably, the hierarchical adapter runtime structure is not a single model file, but rather runtime configuration data composed of a model loading field, an adapter mounting field, a hierarchy identifier field, a permission status field, a merge weight field, a memory read field, a memory write field, and a version status field. The model loading field points to the base general large model; the adapter mounting field records the mounting positions of the style anchoring adapter and the adaptive adapter within the base general large model; the permission status field records read-only, implicit update, and session-level write; the merge weight field is used for subsequent candidate inference and response selection; and the version status field is used for subsequent candidate update version generation, auditing, and rollback processing. After being output in this step, the hierarchical adapter runtime structure serves as the direct input to S200, ensuring that S200 already possesses memory read boundaries, adapter call boundaries, and permission boundaries before receiving user input.

[0049] In summary, this step divides the base general model, style anchoring adapter, adaptive adapter, and memory layer module into different layers, and establishes a stable operational boundary through read-only access, implicit updates, session-level writes, and merged weight configuration. This step isolates the style anchoring adapter from the adaptive adapter and memory layer module, reducing direct writes to the style anchoring adapter by subsequent feedback signals and memory update entries. The hierarchical adapter runtime structure output by this step provides a unified calling foundation for subsequent input sample construction, anchoring inference, candidate inference, style consistency scoring, and rollback processing.

[0050] S200. Based on the hierarchical adapter operation structure, user input reception, memory entry reading, expiration judgment, invalidation judgment, conflict judgment and input sample construction processing are performed to obtain input samples and valid memory entries;

[0051] Specifically, this step receives the hierarchical adapter runtime structure output by S100 as the higher-level configuration and starts when the user initiates a new session, continues the current session, or triggers a regeneration request. The hierarchical adapter runtime structure includes a model loading field, an adapter mounting field, a hierarchy identifier field, a permission status field, a merge weight field, a memory read field, a memory write field, and a version status field. User input is received by the front-end dialogue interface or application service interface. User input includes text content, session identifier, user identifier, input time, current session data, and request type. After receiving user input, the system first calls the memory read field based on the session identifier, and then confirms the object participating in the read is the memory layer module based on the hierarchy identifier field. The style anchoring adapter and the adaptive adapter are not called for write processing. This is because this step only completes the construction of input samples and valid memory entries, without changing the adapter parameters.

[0052] Specifically, the memory entry retrieval is performed by the memory layer module. The memory layer module retrieves memory entries from the memory pool according to the user identifier, session identifier, and request type. The memory entries include session-level facts, short-term preferences, validity period fields, source fields, active correction records, and conflict status fields. Session-level facts represent the factual content provided by the user in the current session or related sessions. Short-term preferences represent the user's preferred response length, address style, or expression structure in the current session. The validity period field records the readable time boundary of the memory entry. The source field records the source from which the memory entry was generated. Active correction records the user's corrections to the memory entry. The conflict status field records the correspondence between this memory entry and current session data or previously stored memory entries. After the memory entry retrieval is completed, the memory layer module generates a candidate memory entry set and passes this set to the expiration judgment process.

[0053] Further, the expiration determination is performed based on the expiration date field in the candidate memory entry set. The system reads the write time, expiration date field, and current session time for each memory entry. When the current session time exceeds the read boundary recorded in the expiration date field, the system generates an expiration mark for the corresponding memory entry. When the current session time is still within the read boundary recorded in the expiration date field, the system passes the corresponding memory entry to the expiration determination process. The necessary fields in the expiration determination are the write time, expiration date field, and current session time. The source field, request type, and session topic can be used as preferred fields for reading sorting. Memory entries with the expiration mark are not included in subsequent valid memory entries and are not involved in the candidate reasoning in S300.

[0054] Furthermore, failure determination is performed based on the active correction record. The system reads the content field and active correction record from the candidate memory entry and matches the active correction record with the source field of the corresponding memory entry. When the active correction record points to the same user identifier, the same session identifier, or the same factual content, the system generates a failure flag for the corresponding memory entry. When the active correction record only points to the expression in the current response output and not to the factual content of the memory entry, the system retains the memory entry and passes the relevant expression preference to subsequent S500 for feedback attribution. The necessary fields in failure determination are the active correction record, the source field, and the content field. Memory entries with the aforementioned failure flag are not included in subsequent valid memory entries.

[0055] Furthermore, conflict determination is performed based on current session data and stored memory entries. The system compares the content fields of candidate memory entries with the current session data and reads stored memory entries under the same user identifier in the memory layer module. When two memory entries point to the same fact object but have different content, or when the current session data and the stored memory entries contain contradictory descriptions, the system generates a conflict flag for the memory entry from the earlier source or the lower confidence source. If the content of two memory entries is not contradictory but belongs to different session topics, the system retains both and sorts them according to request type and session identifier. After conflict determination is completed, memory entries with conflict flags are excluded from candidate inference, and memory entries without expiration, invalidation, or conflict flags are registered as valid memory entries.

[0056] Specifically, input sample construction is performed by the input processing unit of the base general large model module. The input processing unit receives the user input, the hierarchical adapter runtime structure, and the valid memory entries, and performs field alignment, sequential concatenation, and call boundary registration. Field alignment involves writing the user identifier, session identifier, request type, text content, valid memory entry identifier, and version status into the same input record. Sequential concatenation places the text content in the main input position, the valid memory entry in the memory input position, and the version status in the control input position. Call boundary registration registers, based on the hierarchical identifier field and the merge weight field in the hierarchical adapter runtime structure, whether anchored inference in S300 calls the memory layer module, or whether candidate inference calls the valid memory entries. After input sample construction is complete, the system obtains the input sample and binds it to the valid memory entries.

[0057] In an engineering embodiment, the enterprise customer service system receives the user input "The last order hasn't been processed yet, please keep the reply short." The system reads the order facts and response length preferences related to the user from the memory layer module based on the session identifier. The system first reads the validity period field and finds that an order fact has exceeded the time boundary recorded in the validity period field, thus generating an expired flag. The system then reads the active correction record and finds that the user has corrected another order status, thus generating an invalidation flag for that memory entry. Subsequently, the system performs conflict judgment between the current session data and the stored memory entries, retaining order facts and short-term preferences that are not expired, invalidated, or conflicting. The input processing unit combines the user input, valid memory entries, session identifier, and version status into an input sample and writes the valid memory entries into the memory input location. This input sample enters anchored inference and candidate inference in S300; the valid memory entries only enter candidate inference.

[0058] Understandably, the input sample is not simply user-input text, but rather inference input data composed of text content, session identifier, user identifier, request type, version status, valid memory entry identifier, and call boundary. The valid memory entry is not all stored memory entries, but rather memory entries retained after expiration, invalidation, and conflict checks. The input sample and the valid memory entries, after being output in this step, serve as the direct input to S300. Based on the input sample and the valid memory entries, S300 performs anchored inference, candidate inference, and mask generation processes, respectively, and generates anchored response output and candidate response output.

[0059] In summary, this step handles the boundaries of user input and memory entries before inference, excluding expired, invalid, and conflicting memory entries from candidate inferences. It synthesizes user input, valid memory entries, and the hierarchical adapter runtime structure into an input sample, giving anchored inference and candidate inferences distinct invocation boundaries. This step provides a clear input source for subsequent style consistency scoring and merging weight adjustments.

[0060] S300. Based on the input sample and the valid memory entry, perform anchoring reasoning, candidate reasoning and mask generation processing to obtain anchoring response output and candidate response output;

[0061] Specifically, this step receives the input sample and the valid memory entry output by S200 as direct input, and reads the model loading field, adapter mounting field, hierarchy identifier field, permission status field, merge weight field, and version status field from the hierarchical adapter runtime structure generated by S100. This step starts after the input sample completes field alignment, sequential concatenation, and call boundary registration. The input sample includes text content, session identifier, user identifier, request type, version status, valid memory entry identifier, and call boundary. The valid memory entry includes session-level facts and short-term preferences retained after expiration, invalidation, and conflict checks. The base general large model module reads the input sample, the style anchoring adapter module reads the text content and call boundary in the input sample, and the adaptive module reads the valid memory entry, version status, and merge weight field, thereby entering the anchoring inference, candidate inference, and mask generation processes.

[0062] Specifically, anchoring inference is performed by the base general-purpose large model and the style anchoring adapter. The base general-purpose large model is a pre-trained large language model, containing a transformer layer, an attention layer, a word embedding layer, and an output layer. The style anchoring adapter is a low-rank adapter, mounted in the attention layer or transformer layer of the base general-purpose large model, and configured as read-only. During anchoring inference, the base general-purpose large model module writes the text content of the input sample into the word embedding layer, writes the session identifier and request type into the control input position, and calls the tone style, values, addressing manner, and verbal parameters of the style anchoring adapter. Anchoring inference does not call the adaptive adapter, does not call the memory layer module, and does not read the content field of the valid memory entries. This processing ensures that the anchoring response output only reflects the response boundaries of the base general-purpose large model and the style anchoring adapter under the current input sample. After anchoring inference is completed, the system generates the anchoring response output and registers the anchoring output identifier, input sample identifier, style anchoring layer identifier, and generation time in the anchoring response output.

[0063] Furthermore, candidate inference involves the base general model, the style anchoring adapter, the adaptive adapter, and the memory layer module. The candidate inference receives the same input sample and reads the content, source, and expiration fields of the valid memory entries. The adaptive adapter receives the version status and merge weight fields and calls the user's individual characteristics and communication preference parameters. The memory layer module only provides session-level facts and short-term preferences that have been registered as valid memory entries. At the start of candidate inference, the base general model module writes the text content from the input sample to the main input position, writes the valid memory entries to the memory input position, and writes the version status of the adaptive adapter to the control input position. Subsequently, the style anchoring adapter module provides read-only style parameters, the adaptive adapter module provides communication preference parameters, and the memory layer module provides short-term preferences and session-level facts. After candidate inference is completed, the system generates a candidate response output and registers the candidate output identifier, input sample identifier, valid memory entry identifier, adaptive layer identifier, memory layer identifier, and version status in the candidate response output.

[0064] Further, the mask generation process is performed by the adaptive module. This module controls the merging weights of the adaptive adapter and the memory layer module in candidate inference. The adaptive module reads the request type, user identifier, and version status from the input sample, reads the validity period field, source field, and conflict status field from the valid memory entries, and reads the merging weight field registered in S100. The adaptive module first determines the version status of the adaptive adapter. When the version status is normal, the adaptive adapter merging weight participates in candidate inference according to the value registered in S100. When the version status is a rollback observation state, the adaptive adapter merging weight is reduced and registered as an observation state. The adaptive module then determines the validity period field and source field of the valid memory entries. When the validity period field is close to the read boundary or the source field comes from a record before active correction, the corresponding memory layer module merging weight is reduced. After the mask generation is completed, the system writes the mask to the candidate inference control position and binds the mask identifier to the candidate response output.

[0065] Understandably, anchored inference and candidate inference use the same input sample, but their invocation boundaries differ. Anchored inference only invokes the base general model and the style anchoring adapter, while candidate inference, in addition to invoking the base general model and the style anchoring adapter, adds the adaptive adapter and the memory layer module. The mask is neither the domain classification result nor the path selection result from the adapter library, but rather the merging control data generated by the adaptive module based on the input sample, the valid memory entries, the style consistency score history, and the version status. After the mask is bound to the candidate response output, it is used by S400 to perform style consistency scoring and merging weight adjustment. If, during mask generation, it is found that a valid memory entry lacks a validity period field or a source field, the system marks the corresponding valid memory entry as paused and re-executes candidate inference.

[0066] In an engineering implementation, the enterprise customer service system receives an input sample generated by S200. The text content is "The last order hasn't been processed yet, please keep the reply short." Valid memory entries include order facts and short-term preferences. During the anchoring inference phase, the base general model module and the style anchoring adapter module only read the text content and request type, generating an anchored response output that conforms to a fixed customer service tone and address style. During the candidate inference phase, the system reads the order facts and short-term preferences from the valid memory entries and calls the response length preference in the adaptive adapter. The adaptive module generates a mask based on the validity period field, source field, version status, and merge weight field. If the order facts are within the validity period field, the memory layer module maintains the registered value for the merge weight; if the short-term preference comes from multiple proactive corrections within the same session, the adaptive adapter maintains the registered value for the merge weight. After candidate inference is completed, the system generates a candidate response output containing the order facts and a shorter expression structure. Both the anchored response output and the candidate response output are identified by the registered input sample and passed to S400.

[0067] Furthermore, exception handling is recorded by the version control and auditing module. When anchoring inference fails, the system reads the model loading field of the base general large model and the adapter mounting field of the style anchoring adapter, and records the failure reason as an anchoring inference exception. When candidate inference fails, the system reads the adaptive adapter version status and valid memory entry identifier, and records the failure reason as a candidate inference exception. When mask generation fails, the system restores the adaptive adapter merging weight and the memory layer module merging weight to the initial merging weight registered in S100, and regenerates the candidate response output. The above exception records enter the version control and auditing module and are used as version status references in the auditing and rollback processing of S600.

[0068] The anchored response output in this step includes an anchored output identifier, an input sample identifier, a style anchoring layer identifier, and response text content. The candidate response output includes a candidate output identifier, an input sample identifier, a valid memory entry identifier, an adaptive layer identifier, a memory layer identifier, a mask identifier, a version status, and response text content. Both the anchored response output and the candidate response output are synchronously transmitted to S400. Based on the anchored response output and the candidate response output, S400 performs style consistency scoring, merge weight adjustment, and response selection processing, and generates the response output.

[0069] In summary, this step splits the same input sample into two paths: anchored inference and candidate inference. This makes the read-only output of the style anchoring adapter comparable to the output of the adaptive adapter and memory layer module. This step controls the merging weights of the adaptive adapter and memory layer module through mask generation, ensuring that the candidate response output carries a traceable merging control record. The anchored response and candidate response outputs from this step provide direct input for subsequent style consistency scoring, response selection, and rollback processing.

[0070] S400. Based on the anchored response output and the candidate response output, perform style consistency scoring, integration weight adjustment and response selection processing to obtain the response output.

[0071] Specifically, this step receives the anchored response output and the candidate response output from S300 as direct input, and reads the merge weight field, hierarchical identifier field, permission status field, and version status field from the hierarchical adapter runtime structure generated by S100. The anchored response output includes an anchored output identifier, an input sample identifier, a style anchoring layer identifier, and response text content. The candidate response output includes a candidate output identifier, an input sample identifier, a valid memory entry identifier, an adaptive layer identifier, a memory layer identifier, a mask identifier, version status, and response text content. The style consistency scorer starts scoring processing when both the anchored output identifier and the candidate output identifier exist and correspond to the same input sample identifier. If the input sample identifiers are inconsistent, the version control and auditing module records this as a response matching anomaly and returns the candidate response output to S300 for regeneration.

[0072] Specifically, style consistency scoring is performed by the style consistency scorer. The style consistency scorer receives the response text content from the anchored response output and the response text content from the candidate response output, and compares them according to four scoring fields: tone style, address style, values, and verbal tics. The tone style score compares the intensity of expression, sentence structure, and politeness in the two types of response text content. The address style score compares whether the user's address, role address, and conversational address are consistent with the address style registered by the style anchor adapter. The values ​​score compares whether the candidate response output deviates from the stable judgment boundary registered by the style anchor adapter. The verbal tics score compares whether the candidate response output retains or disrupts the fixed expression fragments registered by the style anchor adapter. The style consistency scorer writes the four scoring fields into a scoring record and generates a style consistency scoring result. The scoring record is bound to the candidate response output and is used for style deviation feedback attribution in S500 and candidate updated version scoring in S600.

[0073] Further, the merging weight adjustment is performed by the adaptive module. The adaptive module reads the mask identifier, valid memory entry identifier, adaptive layer identifier, memory layer identifier, and version status from the candidate response output, and reads the style consistency score result. When the style consistency score result meets the threshold, the adaptive module retains the adaptive adapter merging weight and memory layer module merging weight registered in S300, and registers the candidate response output as selectable. When the style consistency score result is lower than the threshold, the adaptive module first reduces the merging weight of the memory layer module and writes the reduced merging weight into a new mask. Subsequently, the base general large model module re-invokes candidate inference based on the new mask, generating a new candidate response output. The new candidate response output re-enters the style consistency scorer to generate a re-scoring result. If the re-scoring result is still lower than the threshold, the adaptive module reduces the merging weight of the adaptive adapter and generates a new mask again for the candidate inference of S300 to re-invoke.

[0074] Further, the response selection process is performed by a response selection unit. The response selection unit reads the anchored response output, the candidate response output, the style consistency score result, and the merging weight adjustment record. When the style consistency score result meets a threshold, the response selection unit selects the candidate response output as the response output and records the candidate output identifier as the response source identifier. When the style consistency score result is lower than the threshold and meets the threshold after reducing the merging weight of the memory layer module, the response selection unit selects a new candidate response output as the response output and writes the memory layer module merging weight adjustment record into the response output. When the merging weights of the memory layer module and the adaptive adapter are still lower than the threshold after reducing them, the response selection unit selects the anchored response output as the response output and records the anchored output identifier as the response source identifier. The response output includes response text content, input sample identifier, response source identifier, style consistency score result, merging weight adjustment record, and version status.

[0075] Understandably, the style consistency score is not a judgment on the correctness of the response content, but rather a score on the correspondence between the anchored response output and the candidate response output in terms of output style. The merging weight adjustment does not directly modify the parameters of the style anchoring adapter, the adaptive adapter, or the memory layer module, but rather modifies the invocation intensity in the candidate inference. The response selection process is performed under the same input sample identifier, with the anchored response output serving as the style benchmark and the candidate response output serving as the candidate text after merging the adaptive adapter and the memory layer module. When a candidate response output is selected, its valid memory entry identifier and mask identifier are retained along with the response output; when the anchored response output is selected, the candidate response output is still written to the version control and audit module as a source for subsequent style deviation records.

[0076] In an engineering implementation, the enterprise customer service system receives the anchored response output and candidate response output generated by S300. The anchored response output maintains a fixed customer service tone and address, while the candidate response output incorporates order facts and a short-term preference for "shorter replies." The style consistency scorer first compares the tone and address of the two, then compares their values ​​and verbal tics. If the candidate response output is shorter but still retains the fixed address and customer service verbal tics, and the style consistency score meets the threshold, the response selection unit selects the candidate response output as the response output. If the candidate response output omits the fixed address due to excessive short-term preference, and the style consistency score is below the threshold, the adaptive module first reduces the weight of the memory layer module and regenerates the candidate response output. If the regenerated candidate response output restores the fixed address, the response selection unit selects the regenerated candidate response output. If the regenerated candidate response output still deviates from the anchored response output, the response selection unit selects the anchored response output.

[0077] Furthermore, exception handling is recorded by the version control and auditing module. If the style consistency scorer cannot read the response text content of the anchored response output or the candidate response output, the version control and auditing module records a missing score input and returns the candidate response output to S300. If a new candidate response output cannot be generated after merging and weight adjustment, the version control and auditing module records a candidate inference exception and registers the anchored response output as a response output. If multiple consecutive candidate response outputs are below the threshold, the version control and auditing module registers the corresponding version status as an observation status and writes the observation status into the version status field of the response output for S500 feedback signal collection and S600 auditing calls.

[0078] The response output in this step includes the response text content, input sample identifier, response source identifier, style consistency score result, merge weight adjustment record, mask identifier, and version status. This response output is sent to the front-end dialog interface or application service interface and serves as direct input to the S500. Based on the response output, the S500 performs feedback signal acquisition, feedback attribution, sample writing, and memory update processing to obtain adaptive candidate samples, memory update entries, and style deviation records.

[0079] In summary, this step achieves the following technical results: By comparing the anchored response output and the candidate response output, a style selection path is established before the candidate response output enters the final response. This step limits the influence of the memory layer module and the adaptive adapter on the candidate response output by incorporating weight adjustments. The response output generated in this step retains the style consistency score, incorporating weight adjustment records, and version status, providing a record basis for subsequent feedback attribution, candidate update version generation, and rollback processing.

[0080] S500: Based on the response output, perform feedback signal acquisition, feedback attribution, sample writing and memory update processing to obtain adaptive candidate samples, memory update entries and style deviation records;

[0081] Specifically, this step receives the response output from S400 as direct input and reads the response text content, input sample identifier, response source identifier, style consistency score result, merging weight adjustment record, mask identifier, and version status from the response output. The feedback signal collector starts collecting data after the response output is sent to the front-end dialogue interface or application service interface. The feedback signals include likes, comments, reuse rate, proactive correction, and session duration. Likes represent positive feedback from the user to the response output. Comments represent negative feedback from the user to the response output. Reuse rate represents the number of times the response text content is copied, quoted, or reused. Proactive correction represents the user's corrections to factual content, address, expression structure, or tone style in subsequent inputs. Session duration represents the duration the user continues the session after the response output is generated. The feedback signal collector binds the above feedback signals with the input sample identifier, response source identifier, and version status to form a feedback signal record.

[0082] Specifically, feedback attribution is jointly performed by the feedback signal collector and the version control and auditing module. The feedback signal collector first reads the response text content and feedback signal records, then categorizes the feedback signals according to the feedback object into factual memory feedback attribution, communication preference feedback attribution, style deviation feedback attribution, and version anomaly feedback attribution. Factual memory feedback attribution is used to mark the addition, correction, or deletion of conversation-level facts. Communication preference feedback attribution is used to mark changes in preference for response length, address style, and expression structure. Style deviation feedback attribution is used to mark deviations in tone, values, and verbal tics relative to the content registered by the style anchor adapter. Version anomaly feedback attribution is used to mark consecutive complaints, proactive corrections, decreased reuse rates, or decreased conversation duration within the same version state. After the feedback attribution processing is completed, the system generates an attribution result record and writes the attribution result record to the version control and auditing module.

[0083] Furthermore, the factual memory feedback attribution generates memory update entries. Specifically, the feedback signal collector extracts the corrected fact, the corrected fact, the source field, and the session identifier from the proactive correction, and reads the valid memory entry identifier from the response output. If the proactive correction points to an existing memory entry, the memory layer module marks the original memory entry as invalid and generates a new memory update entry. If the proactive correction points to new factual content, the memory layer module generates a new memory update entry and writes it into the validity period field, source field, proactive correction record, and conflict status field. If the complaint only points to the expression of the response text content and not to the factual content, no memory update entry is generated, and the corresponding feedback signal is handed over to the communication preference feedback attribution processing. The memory update entries, after being output in this step, serve as input for the associated memory update entry markers in the S600 grayscale upgrade control and rollback processing.

[0084] Furthermore, the communication preference feedback attribution generates adaptive candidate samples. Specifically, the feedback signal collector reads likes, reuse rate, proactive corrections, and session duration, and combines this with the response source identifier, mask identifier, and merge weight adjustment record from the response output to determine whether the feedback signal points to the answer length, address style, or expression structure. If a user likes a short answer multiple times, or proactively corrects a longer answer multiple times, the system writes this feedback signal into the adaptive candidate sample. If a user proactively corrects their address style, the system writes the original address style, the corrected address style, the input sample identifier, and the response source identifier into the adaptive candidate sample. If the feedback signal comes from a single session and lacks a reuse rate record, the system registers this feedback signal as an observation sample and does not include it in the candidate update version generation. The adaptive candidate sample includes the user identifier, input sample identifier, communication preference type, response source identifier, number of feedbacks, reuse rate record, proactive correction record, and version status.

[0085] Furthermore, style deviation feedback attribution generates style deviation records. Specifically, the feedback signal collector reads the style consistency score, the merging weight adjustment record, complaints, and proactive corrections. If the complaints relate to tone of voice, values, address style, or catchphrases, the system writes the corresponding fields into the style deviation record. If the style consistency score is below a threshold, and S400 has performed a reduction in the memory layer module's merging weight or the adaptive adapter's merging weight, the system writes the merging weight adjustment record into the style deviation record. If the user proactively corrects the address style or fixed expression fragments in the candidate response output, the system writes the text before correction, the text after correction, the response source identifier, and the mask identifier into the style deviation record. The style deviation record is not written to the style anchoring adapter; it is used for candidate update version generation, update licensing, and auditing in S600.

[0086] Furthermore, sample writing is managed by an implicit training scheduler. The implicit training scheduler reads the adaptive candidate samples and writes them into the sample pool according to user identifier, communication preference type, and version status. Before writing, the implicit training scheduler checks whether the adaptive candidate samples have an input sample identifier, feedback count, active correction record, and response source identifier. Samples lacking an input sample identifier are registered as invalid samples. Samples lacking feedback counts but having active correction records are registered as single-correction samples. Samples with multiple likes, high reuse rates, or continuous session records are registered as stable candidate samples. After sample writing is completed, the implicit training scheduler writes the stable candidate sample status in the sample pool into the version control and audit module for the S600 to read when generating candidate update versions.

[0087] Furthermore, the memory update process is executed by the memory layer module. The memory layer module reads the fact content, validity period field, source field, active correction record, and conflict status field from the memory update entry and matches them with the stored memory entries. If the memory update entry corresponds to the same fact object as the stored memory entry and has the same content, the memory layer module updates the source field and session identifier. If the memory update entry corresponds to the same fact object as the stored memory entry but has different content, the memory layer module generates an invalidation flag for the old memory entry and writes it into the new memory update entry. If the memory update entry belongs to a short-term preference, the memory layer module writes the duration statistics entry, trigger frequency statistics entry, reuse rate statistics entry, and active correction statistics entry. These entries are read in the S600's gray-scale upgrade control. After the memory update process is completed, the memory layer module writes the write status, invalidation flag, and conflict status fields to the version control and audit module.

[0088] In an engineering implementation, after the enterprise customer service system outputs a response, the user clicks "like" and copies the reply, then enters "keep it shorter like this from now on." The feedback signal collector binds the like, reuse rate, and proactive correction to the same input sample identifier. The feedback attribution processing determines that the feedback does not point to order facts, but rather to the length and expression structure of the response, thus generating a communication preference feedback attribution and writing it into an adaptive candidate sample. If the user subsequently enters "I misspoke about the order number; it should be a different order number," the feedback signal collector classifies the proactive correction into a fact memory feedback attribution, and the memory layer module marks the original order fact memory entry as invalid and writes a new memory update entry. If the user enters "This address is incorrect; don't address me like that," the system classifies the proactive correction into a style deviation feedback attribution and generates a style deviation record. The above three outputs are respectively entered into the candidate update version generation, gray-scale upgrade control, and audit processing of the S600.

[0089] Understandably, the feedback signal in this step does not directly train the parameters of the adaptive adapter, but first undergoes feedback attribution and sample writing processing. The adaptive candidate sample only records sample content related to communication preferences. The memory update entry only records conversational facts and short-term preferences. The style deviation record only records deviation content related to tone of voice, values, addressing style, and verbal tics. After being output in this step, the adaptive candidate sample, the memory update entry, and the style deviation record are synchronously transmitted to S600. Based on the adaptive candidate sample, the memory update entry, and the style deviation record, S600 performs candidate update version generation, update licensing, gray-scale upgrade control, auditing, and rollback processing.

[0090] In summary, this step decomposes the user's feedback signal to the response output into adaptive candidate samples, memory update entries, and style deviation records, forming different writing paths. This step prevents the feedback signal from being directly written to the style anchoring adapter, allowing communication preferences, factual memories, and style deviations to enter their respective processing chains. The three outputs of this step provide traceable input for candidate update version generation, grayscale upgrade control, and rollback processing.

[0091] S600: Based on the adaptive candidate samples, the memory update entries, and the style deviation records, perform candidate update version generation, update licensing, gray-scale upgrade control, auditing, and rollback processing to obtain the hierarchical adapter adaptive result.

[0092] Specifically, this step receives the adaptive candidate samples, memory update entries, and style deviation records output by S500 as direct input, and reads the hierarchical identifier field, permission status field, merge weight field, and version status field from the hierarchical adapter running structure generated by S100. The adaptive candidate samples include user identifier, input sample identifier, communication preference type, response source identifier, feedback count, reuse rate record, proactive correction record, and version status. The memory update entries include factual content, validity period field, source field, proactive correction record, and conflict status field. The style deviation records include tone style, values, address style, catchphrases, response source identifier, merge weight adjustment record, and style consistency score result. The implicit training scheduler initiates candidate update version generation processing when the adaptive candidate samples reach a preset sample quantity, a preset update time, or a preset trigger frequency for the same communication preference feedback. Adaptive candidate samples that do not meet the trigger conditions are stored in the sample pool and registered as pending observation.

[0093] Specifically, the generation of candidate update versions is executed by the implicit training scheduler. The implicit training scheduler first reads the user identifier, communication preference type, and version status from the adaptive candidate samples, and then reads the adaptive layer identifier and implicit update permission from the hierarchical adapter runtime structure. If an adaptive candidate sample lacks an input sample identifier, response source identifier, or active correction record, the implicit training scheduler registers the sample as an invalid sample. If an adaptive candidate sample has a style deviation record, the implicit training scheduler registers the sample as a sample to be scored. If an adaptive candidate sample is formed by multiple likes, reuse rate records, and session duration, the implicit training scheduler registers the sample as a stable candidate sample. The implicit training scheduler generates candidate update versions of the adaptive adapter based on the stable candidate samples. The candidate update versions do not directly replace the current version, but are written into the version control and audit module, and the candidate version identifier, sample source, generation time, corresponding user identifier, and current version status are registered.

[0094] Furthermore, the update permission is jointly executed by the style consistency scorer and the version control and auditing module. The style consistency scorer reads the candidate update version and calls the anchor response output corresponding to the input sample identifier. The system generates an updated response output based on the candidate update version, and then performs a style consistency score on the updated response output and the anchor response output. The style consistency score includes tone style score, address style score, value score, and catchphrase score. When the style consistency score result meets the threshold, the version control and auditing module generates a pass result and registers the candidate update version as mergeable. When the style consistency score result is below the threshold, the version control and auditing module generates a rejection result and registers the candidate update version as rejected. When the style consistency score result is within the observation range, the version control and auditing module generates a demotion result and registers the candidate update version as demotiond. The update permission judgment result includes pass, rejection, and demotion, and is bound to the candidate version identifier.

[0095] Further, the grayscale upgrade control is executed by the grayscale upgrade controller. The grayscale upgrade controller reads the short-term preference, validity period field, source field, active correction record, and conflict status field from the memory update entry, and reads the duration statistics entry, trigger frequency statistics entry, reuse rate statistics entry, and active correction statistics entry written by S500. When a short-term preference meets the duration threshold, trigger frequency threshold, and style consistency score threshold, the grayscale upgrade controller writes the short-term preference into the adaptive candidate sample and registers the grayscale source field. When a short-term preference does not reach the duration threshold or trigger frequency threshold, the grayscale upgrade controller retains the short-term preference in the memory layer module. When a short-term preference has a conflict status field or active correction record, the grayscale upgrade controller marks the short-term preference as invalid. The short-term preference is not written to the style anchor adapter, and the style anchor adapter remains in a read-only state.

[0096] Furthermore, the auditing process is performed by the version control and auditing module. This module records the generation record, update license record, gray-scale upgrade control record, and sample source record for the candidate update version. The generation record includes the candidate version identifier, current version status, and generation time. The update license record includes the style consistency score result, pass result, rejection result, or demotion result. The gray-scale upgrade control record includes the duration, trigger frequency, reuse rate, and active correction statistics of short-term preferences. The sample source record includes the input sources for adaptive candidate samples, remembered update entries, and style deviation records. If a candidate update version is rejected, the version control and auditing module retains it as a historical record and does not participate in subsequent reasoning. If a candidate update version is demotiond, the version control and auditing module writes the demotion-reduced merge weight into the version status field of the hierarchical adapter runtime structure for subsequent mask generation processing of S300.

[0097] Furthermore, the rollback process is executed by the version control and auditing module. The version control and auditing module reads the differences in the number of complaints, the number of proactive corrections, the reuse rate, the session duration, and the style consistency score between the current version and the previous version, and generates a rollback judgment result. If the rollback judgment result is rollback, the version control and auditing module restores the adaptive adapter to the previous version and registers the candidate update version as the rollback version. The associated memory update entry is written with an invalidation flag, and the memory layer module stops sending the associated memory update entry into candidate inference. The style anchoring adapter does not participate in the rollback process. If the rollback judgment result is retain, the version control and auditing module maintains the current version state and registers the current version as a stable version. If the rollback judgment result is observation, the version control and auditing module reduces the merging weight of the adaptive adapter and writes the observation status into the version status field.

[0098] In an engineering implementation, the enterprise customer service system obtains a set of adaptive candidate samples in S500. These adaptive candidate samples record users' repeated requests for shorter responses. The implicit training scheduler reads these adaptive candidate samples and generates candidate updated versions of the adaptive adapter. The system generates updated response outputs under the same input samples and performs style consistency scoring with the anchored response output. If the updated response output retains the fixed address and customer service phrases, the version control and auditing module generates a pass result and merges the candidate updated version into the adaptive adapter. If the updated response output omits the fixed address, the version control and auditing module generates a downweight result and reduces the merging weight of the candidate updated version. If the user subsequently complains about this version continuously and the number of times they actively correct it increases, the version control and auditing module reads the feedback difference between the current version and the previous version, restores the adaptive adapter to the previous version, and marks the associated memory update entry as invalid.

[0099] Understandably, the generation of the candidate update version does not change the read-only state of the style anchoring adapter. The update permission is not directly based on a single user feedback decision, but rather on the style consistency score result. The canary upgrade control does not directly write short-term preferences into the style anchoring adapter, but instead writes short-term preferences that meet the duration threshold, trigger frequency threshold, and style consistency score threshold into the adaptive candidate sample. The audit and rollback processing records the candidate update version, update permission, canary upgrade control, and feedback difference as the same version chain. This version chain is written into the hierarchical adapter adaptive result, for S100 to load the version status field in subsequent sessions, for S300 to generate a mask, and for S400 to perform style consistency scoring.

[0100] The hierarchical adapter adaptive result output in this step includes the adaptive adapter version status, candidate update version status, update permission judgment result, canary upgrade control record, rollback judgment result, associated memory update entry flag, and audit record. The hierarchical adapter adaptive result is written back to the version control and audit module, and the version status field and merge weight field in the hierarchical adapter runtime structure are updated synchronously. When a new session or a continued session starts, S100 reads the updated version status field, S200 reads the associated memory update entry flag, and S300 reads the updated merge weight field.

[0101] In summary, this step integrates adaptive candidate samples, memory update entries, and style deviation records into the candidate update version generation, canary upgrade control, and audit rollback chains, respectively. This step restricts candidate update versions from entering the adaptive adapter through update permissions and maintains the style anchor adapter as read-only. The hierarchical adapter adaptation results output by this step form a closed-loop record of version status, merging weights, and memory entry tags.

[0102] Example 2: Figure 2 A block diagram of a model-style anchored hierarchical adapter adaptive system according to an embodiment of the present invention is shown. Figure 2 As shown, the structure may include:

[0103] The hierarchical configuration module 01 is used to obtain the base general large model, style anchoring adapter, adaptive adapter, and memory layer module, and perform hierarchical identification, read-only, implicit update, session-level write, and merge weight configuration processing to obtain the hierarchical adapter running structure. Specifically, the hierarchical configuration module receives the base general large model from the model storage path, the style anchoring adapter and adaptive adapter from the adapter library, and the memory layer module from the memory pool. The hierarchical configuration module reads the model identifier, version status, and mount location of the base general large model, the adapter identifier, style version, and read-only status of the style anchoring adapter, the adapter identifier, user identifier, and candidate update version status of the adaptive adapter, and the session identifier, memory entry index, and session-level write status of the memory layer module. The hierarchical configuration module registers the style anchoring adapter as the style anchoring layer identifier, the adaptive adapter as the adaptive layer identifier, and the memory layer module as the memory layer identifier, and writes the read-only configuration to the style anchoring adapter, the implicit update configuration to the adaptive adapter, and the session-level write configuration to the memory layer module. The hierarchical configuration module also registers the style anchor adapter merging weight, adaptive adapter merging weight, and memory layer module merging weight based on the version status and merging weight field. After configuration, the hierarchical configuration module outputs the hierarchical adapter runtime structure and passes it to the input and memory processing modules for invocation.

[0104] The input and memory processing module 02 is used to receive user input according to the hierarchical adapter runtime structure, read memory entries, and perform expiration, invalidation, conflict, and input sample construction processing to obtain input samples and valid memory entries. Specifically, the input and memory processing module receives the hierarchical adapter runtime structure from the hierarchical configuration module and user input from the front-end dialogue interface or application service interface. The user input includes text content, session identifier, user identifier, input time, current session data, and request type. The input and memory processing module calls the memory layer module to read memory entries according to the memory reading field in the hierarchical adapter runtime structure. The memory entries include session-level facts, short-term preferences, validity period field, source field, active correction record, and conflict status field. The input and memory processing module generates an expiration flag based on the validity period field, an invalidation flag based on the active correction record, and a conflict flag based on the current session data and stored memory entries. Memory entries with expiration, invalidation, or conflict flags are excluded from candidate inference. The input and memory processing module registers memory entries without expiration, invalidation, or conflict markers as valid memory entries, and constructs input samples by including text content, session identifier, user identifier, request type, version status, valid memory entry identifier, and call boundaries. The input and memory processing module then passes the input samples and valid memory entries to the dual-path inference module for invocation.

[0105] The dual-path inference module 03 is used to call the base general large model, style anchoring adapter, adaptive adapter, and memory layer modules based on the input samples and valid memory entries to perform anchoring inference, candidate inference, and mask generation processing, obtaining anchored response output and candidate response output. Specifically, the dual-path inference module receives input samples and valid memory entries from the input and memory processing modules, and reads the model loading field, adapter mounting field, merge weight field, and version status field from the hierarchical adapter runtime structure. In anchoring inference, the dual-path inference module calls the base general large model and style anchoring adapter, and prohibits the calling of the adaptive adapter and memory layer modules. After anchoring inference is completed, the dual-path inference module generates anchored response output and registers the anchored output identifier, input sample identifier, style anchoring layer identifier, and response text content in the anchored response output. In candidate inference, the dual-path inference module calls the base general large model, style anchoring adapter, adaptive adapter, and memory layer modules, and reads the content field, source field, and validity period field of the valid memory entries. The dual-path inference module calls the adaptive module to generate a mask. This mask is generated based on the input sample, valid memory entries, style consistency score history, and version status, and records the merging weights of the adaptive adapter and memory layer modules. After candidate inference is complete, the dual-path inference module generates candidate response outputs and registers the candidate output identifier, input sample identifier, valid memory entry identifier, adaptive layer identifier, memory layer identifier, mask identifier, and version status in the candidate response outputs. The dual-path inference module then passes the anchored response output and candidate response outputs to the style scoring and response selection modules for invocation.

[0106] The style scoring and response selection module 04 is used to perform style consistency scoring, merging weight adjustment, and response selection processing based on the anchored response output and the candidate response output to obtain the response output. Specifically, the style scoring and response selection module receives the anchored response output and candidate response output from the dual-path inference module and verifies the correspondence between the anchored output identifier, the candidate output identifier, and the input sample identifier. The style scoring and response selection module calls the style consistency scorer to score the tone style, address style, value, and catchphrase of the anchored response output and candidate response output, and generates a style consistency score result. The style scoring and response selection module reads the mask identifier, adaptive layer identifier, memory layer identifier, and version status from the candidate response output and performs merging weight adjustment based on the style consistency score result. When the style consistency score result meets the threshold, the style scoring and response selection module selects the candidate response output as the response output. When the style consistency score result is lower than the threshold, the style scoring and response selection module first reduces the merging weight of the memory layer module and triggers the dual-path inference module to regenerate the candidate response output. If the regenerated candidate response output is still below the threshold, the style scoring and response selection module reduces the adaptive adapter merging weights and triggers candidate inference again. If the score is still below the threshold, the style scoring and response selection module selects the anchored response output as the response output. The response output includes the response text content, input sample identifier, response source identifier, style consistency score result, merging weight adjustment record, mask identifier, and version status, and is passed to the feedback attribution and sample writing module for invocation.

[0107] The feedback attribution and sample writing module 05 is used to collect likes, comments, reuse rates, proactive corrections, and session duration based on the response output, and perform feedback attribution, sample writing, and memory update processing to obtain adaptive candidate samples, memory update entries, and style deviation records. Specifically, the feedback attribution and sample writing module receives the response output from the style scoring and response selection module, and collects feedback signals after the response output is sent to the front-end dialogue interface or application service interface. The feedback signals include likes, comments, reuse rates, proactive corrections, and session duration. The feedback attribution and sample writing module binds the feedback signals with the input sample identifier, response source identifier, style consistency score result, merge weight adjustment record, mask identifier, and version status in the response output to form a feedback signal record. The feedback attribution and sample writing module performs feedback attribution based on the feedback object and generates factual memory feedback attribution, communication preference feedback attribution, style deviation feedback attribution, and version anomaly feedback attribution. Factual memory feedback attribution generates memory update entries, communication preference feedback attribution generates adaptive candidate samples, and style deviation feedback attribution generates style deviation records. The memory update entries include factual content, validity period field, source field, proactive correction record, and conflict status field. The adaptive candidate samples include user identifier, input sample identifier, communication preference type, response source identifier, feedback frequency, reuse rate record, proactive correction record, and version status. The style deviation record includes tone style, values, address style, catchphrases, response source identifier, integration weight adjustment record, and style consistency score result. The feedback attribution and sample writing module passes the adaptive candidate samples, memory update entries, and style deviation records to the version and grayscale control modules for invocation.

[0108] The version and grayscale control module 06 is used to generate candidate update versions, grant update permissions, control grayscale upgrades, audit, and rollback processes based on the adaptive candidate samples, the memory update entries, and the style deviation records, to obtain the hierarchical adapter adaptive result. Specifically, the version and grayscale control module receives adaptive candidate samples, memory update entries, and style deviation records from the feedback attribution and sample writing module, and reads the hierarchical identifier field, permission status field, merge weight field, and version status field from the hierarchical adapter runtime structure. The version and grayscale control module calls the implicit training scheduler to generate candidate update versions of the adaptive adapter based on the adaptive candidate samples, and stores the candidate update versions in the version control and audit module. The version and grayscale control module calls the style consistency scorer to score the updated response output of the candidate update version against the anchored response output, and generates update permission results that are passed, rejected, or downgraded. The version and grayscale control module calls the grayscale upgrade controller to read the short-term preferences, duration, trigger frequency, reuse rate, and active correction statistics from the memory update entries. When short-term preferences meet the duration threshold, trigger frequency threshold, and style consistency score threshold, the version and grayscale control module writes the short-term preferences into the adaptive candidate samples and prohibits them from being written into the style anchoring adapter. The version and grayscale control module also reads the difference in the number of complaints, the difference in the number of proactive corrections, the difference in reuse rate, the difference in session duration, and the difference in style consistency score between the current version and the previous version, and generates a rollback judgment result. When the rollback judgment result is rollback, the version and grayscale control module restores the adaptive adapter to the previous version and marks the associated memory update entries as invalid. The version and grayscale control module outputs the hierarchical adapter adaptive result and writes the version status field and merge weight field back to the hierarchical configuration module.

Claims

1. A hierarchical adapter adaptive method for model style anchoring, characterized in that, include: S100: Obtain the base general large model, style anchoring adapter, adaptive adapter and memory layer module, perform hierarchical identification, read-only, implicit update, session-level write and merge weight configuration processing to obtain the hierarchical adapter running structure; S200. Based on the hierarchical adapter operation structure, user input reception, memory entry reading, expiration judgment, invalidation judgment, conflict judgment and input sample construction processing are performed to obtain input samples and valid memory entries; S300. Based on the input sample and the valid memory entry, perform anchoring reasoning, candidate reasoning and mask generation processing to obtain anchoring response output and candidate response output; S400. Based on the anchored response output and the candidate response output, perform style consistency scoring, integration weight adjustment and response selection processing to obtain the response output. S500: Based on the response output, perform feedback signal acquisition, feedback attribution, sample writing and memory update processing to obtain adaptive candidate samples, memory update entries and style deviation records; S600: Based on the adaptive candidate samples, the memory update entries, and the style deviation records, perform candidate update version generation, update licensing, gray-scale upgrade control, auditing, and rollback processing to obtain the hierarchical adapter adaptive result.

2. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S100, the hierarchical identifier includes a style anchoring layer identifier, an adaptive layer identifier, and a memory layer identifier; read-only configuration is assigned to the style anchoring adapter, implicit update configuration is assigned to the adaptive adapter, and session-level write configuration is assigned to the memory layer module.

3. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S200, the expiration judgment generates an expiration mark based on the validity period field of the memory entry, the invalidation judgment generates an invalidation mark based on the active correction record, and the conflict judgment generates a conflict mark based on the current session data and the stored memory entries. Memory entries with expiration marks, invalidation marks, or conflict marks are excluded from candidate inference.

4. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S300, the anchoring inference is performed by the base general large model and the style anchoring adapter, without calling the adaptive adapter and the memory layer module; in S400, the adaptive module generates a mask based on the input sample, the valid memory entries, the style consistency score history and the version status.

5. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S400, the style consistency score includes tone style score, address style score, value score, and catchphrase score; when the style consistency score is lower than the threshold, the merging weight of the memory layer module is reduced and the candidate response output is regenerated; when the regenerated candidate response output is still lower than the threshold, the merging weight of the adaptive adapter is reduced and the candidate response output is regenerated.

6. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S500, the feedback signals include likes, complaints, reuse rate, proactive correction, and conversation duration; the feedback attribution includes factual memory feedback attribution, communication preference feedback attribution, style deviation feedback attribution, and version anomaly feedback attribution. Factual memory feedback attribution generates the memory update entries, and communication preference feedback attribution generates the adaptive candidate samples.

7. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S600, the candidate update version is generated by the implicit training scheduler based on the adaptive candidate samples; after the candidate update version is generated, it is stored in the version control and audit module; the style consistency score generates the update permission judgment result based on the updated response output of the candidate update version and the anchored response output; the update permission includes pass, reject, and downgrade.

8. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S600, the grayscale upgrade control includes statistics on the duration of short-term preferences, the frequency of triggering, the reuse rate, and the active correction. When the short-term preference meets the duration threshold, the frequency of triggering threshold, and the style consistency score threshold, the short-term preference is written into the adaptive candidate sample, and the short-term preference is not written into the style anchoring adapter.

9. The hierarchical adapter adaptive method for model style anchoring according to claim 1, characterized in that, In S600, the rollback process generates a rollback judgment result based on the difference in the number of complaints, the difference in the number of proactive corrections, the difference in reuse rate, the difference in session duration, and the difference in style consistency score between the current version and the previous version. When the rollback judgment result is a rollback, the adaptive adapter is restored to the previous version, and the associated memory update entry is marked as invalid.

10. A hierarchical adapter adaptive system with model style anchoring, applied to the method of any one of claims 1 to 9, characterized in that, include: The module includes a hierarchical configuration module, an input and memory processing module, a dual-path inference module, a style scoring and response selection module, a feedback attribution and sample writing module, and a version and grayscale control module.