Distributed large model adaptive training method, user terminal and server

By using a globally shared backbone model and a lightweight adapter architecture, combined with hash encryption and differential privacy, the privacy and security issues and personalized adaptation problems in large model training are solved, enabling efficient and secure user terminal training and model updates.

CN122021808APending Publication Date: 2026-05-12GUANGZHOU TAIDONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU TAIDONG TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing large model training techniques, while ensuring data privacy and security, cannot effectively solve the problems of gradient leakage, model performance degradation and lack of personalization caused by Non-IID, and privacy protection issues related to user clustering.

Method used

We employ a globally shared backbone model and a lightweight adapter architecture. By hashing and encrypting gradient data and using differential privacy perturbation to interact with feature vectors, we generate cluster-level adapter parameters through unsupervised clustering, enabling local training and updates.

Benefits of technology

It reduces computational resource consumption, prevents gradient reconstruction attacks, protects user privacy, improves the model's personalized adaptability and response quality, and shortens cold start time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021808A_ABST
    Figure CN122021808A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence and distributed models, and relates to a distributed large model adaptive training method, a user terminal and a server, and the method comprises the steps: collecting historical dialogue data between a user and a customer service agent; gradient data and interaction feature vectors used for representing user interaction behavior modes are generated; performing Hash encryption on the gradient data to obtain encrypted gradient data, and performing differential privacy perturbation processing on the interaction feature vector to obtain an encrypted interaction feature vector; uploading the encrypted gradient data and the encrypted interaction feature vector to a server; and receiving a first parameter issued by the server, applying the first parameter to the global shared trunk model, receiving a cluster-level adapter parameter issued by the server, and applying the cluster-level adapter parameter to the lightweight adapter. By adopting the method disclosed by the invention, the universality and individuation of the large model can be considered, and the privacy information of the user can be protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and distributed model training. More specifically, this invention relates to a distributed large-scale model adaptive training method, a user terminal, and a server. Background Technology

[0002] With the rapid development of deep learning technology, Large Language Models (LLMs) have demonstrated outstanding capabilities in natural language processing tasks and are widely used in scenarios such as intelligent customer service and personal assistants. To enhance user experience, intelligent agents need to possess personalized service capabilities, meaning they can adaptively adjust based on a specific user's language habits, emotional patterns, and interaction preferences. Traditional personalized training methods typically involve uploading massive amounts of user-generated dialogue data to a cloud server for centralized fine-tuning.

[0003] However, this centralized training method faces serious data privacy and security challenges. Users' historical conversation data often contains highly sensitive personal information such as names, addresses, financial status, and health information. Directly uploading raw data not only violates increasingly stringent data privacy protection regulations but also increases the risk of data leakage during transmission and storage.

[0004] To address the issues of data silos and privacy protection, Federated Learning (FL) has emerged. Federated Learning allows users to train models on their local devices using private data, uploading only model updates (such as gradients or parameter differences) to a server for aggregation, thus achieving "data not leaving the domain." While Federated Learning reduces privacy risks to some extent, existing technologies still face significant technical challenges when applied to personalized training of large models: First, gradient leakage leads to insufficient privacy and security. Although federated learning does not transmit raw data, research shows that the transmitted plaintext gradients or parameter updates contain a wealth of semantic information about the original data. Attackers (such as malicious aggregation servers or eavesdroppers) can use gradient inversion attacks or reconstruction attacks to reconstruct the user's original training samples pixel-wise or character-wise by analyzing the uploaded gradient data. Existing defenses, such as directly adding Gaussian noise (differential privacy), often require a difficult trade-off between the strength of privacy protection and model usability; excessive noise can lead to a significant performance degradation in large models.

[0005] Second, the non-independent and identically distributed (Non-IID) data leads to performance degradation and insufficient personalization of the global model. In practical applications, there are significant differences in the interaction behaviors, intent distributions, and language styles of different users (i.e., statistical heterogeneity of the data). The traditional FedAvg algorithm attempts to train a "global model" applicable to all users. This often results in the model converging to a mediocre compromise point when aggregating gradients that vary greatly among different users, failing to meet the personalized needs of specific users. Furthermore, if users only perform excessive fine-tuning locally, the model is prone to losing its global general reasoning ability, resulting in a "catastrophic forgetting" phenomenon, where the model forgets basic language logic and general knowledge while adapting to personal preferences.

[0006] Third, there is a lack of privacy-preserving user clustering mechanisms. To address the Non-IID problem, clustering-based federated learning has been proposed, aiming to group similar users to train specific group models. However, existing clustering methods typically rely on analyzing user model parameters or explicit behavioral characteristics, which effectively constitutes a "user profiling" analysis, potentially indirectly revealing user behavior habits or group affiliations (e.g., clustering to discover a group with specific disease consultation characteristics). Currently, there is a lack of mechanisms that can effectively group users based on their interaction behavior characteristics while also strictly protecting the privacy of these characteristics themselves.

[0007] In summary, existing large model training techniques or federated training methods mainly suffer from the following technical problems: they cannot simultaneously resolve the conflict between the generalization ability of the entire model and the personalized adaptation ability caused by the statistical heterogeneity of user data (Non-IID) while ensuring that the original privacy information is irreversibly derived from the uploaded data (including gradients and behavioral features), as well as the resulting problems of catastrophic model forgetting and difficulty in accurate user grouping. Summary of the Invention

[0008] To address the technical problems of existing large model training techniques mentioned in the background section, this invention provides solutions in the following aspects.

[0009] In a first aspect, the present invention provides a distributed large model adaptive training method for user terminals, comprising: Collect historical dialogue data between users and customer service agents; the customer service agents adopt a distributed large model; the distributed large model includes a globally shared backbone model and a lightweight adapter, wherein the globally shared backbone model is used to provide basic answering capabilities, and the lightweight adapter is used to learn and store the personalized preferences, emotional patterns and interaction habits of specific users, and to make personalized corrections to the basic answers; Local training of a distributed large model is performed based on historical dialogue data to generate gradient data; statistical analysis of historical dialogue data is performed to generate interaction feature vectors that characterize user interaction behavior patterns; the gradient data is the gradient of the parameters of the lightweight adapter. The gradient data is hashed and encrypted to obtain encrypted gradient data, and the interaction feature vector is subjected to differential privacy perturbation to obtain encrypted interaction feature vector. Upload the encrypted gradient data and encrypted interaction feature vectors to the server; Receive the first parameter sent by the server and use the first parameter for the global shared backbone model to update the global shared backbone model. Receive the cluster-level adapter parameters sent by the server and apply the cluster-level adapter parameters to the lightweight adapter to update the lightweight adapter.

[0010] Preferably, the method for obtaining the encrypted gradient data includes: Acquire the gradient data generated by the user terminal during local training; The gradient data is divided into multiple gradient blocks; A hash mapping operation is performed on each gradient block to generate a hash gradient value that cannot be reversed, and the hash gradient value is used as the encrypted gradient data.

[0011] Preferably, the gradient data is obtained by the user terminal by differentiating the lightweight adapter parameters based on a local loss function, wherein the local loss function... The expression is: ; In the formula, This represents the total loss value during local training, and E represents the expected value. Represents the prediction loss function. This represents the model's predicted output. The parameters represent the frozen shared backbone model. These represent the parameters of a trainable lightweight adapter. Indicates mission loss. This represents a consistency constraint. Represents the regularization coefficient. Denotes KL divergence, This represents the current local model's output distribution for input x. This represents the output distribution of the global model for the same input x.

[0012] Preferably, the interaction feature vector includes a statistical value of the number of interaction rounds, a variance value of the emotion distribution, and an intent entropy value; the encrypted interaction feature vector is generated by adding Laplace noise or Gaussian noise to the statistical value of the number of interaction rounds, the variance value of the emotion distribution, and the intent entropy value based on a local differential privacy mechanism.

[0013] In a second aspect, the present invention also provides a user terminal, including a processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the distributed large model adaptive training method for a user terminal of the present invention.

[0014] In a third aspect, the present invention also provides a distributed large model adaptive training method for a server, comprising: Receive encrypted gradient data and encrypted interaction feature vectors uploaded by multiple user terminals; A global aggregation operation is performed based on the encrypted gradient data to generate a global gradient for the global shared backbone model; and the updated parameters of the global shared backbone model are calculated based on the global gradient and the parameters of the global shared backbone model before the update, and these are used as the first parameter. The multiple user terminals are clustered based on the encrypted interaction feature vectors to generate multiple user clusters. For each user cluster, obtain the parameters of the lightweight adapter of the user terminal belonging to that user cluster, and calculate the aggregate value of the parameters of the lightweight adapter, and use it as the cluster-level adapter parameter corresponding to that user cluster. The first parameter and the cluster-level adapter parameter that matches the target user terminal are sent to the target user terminal so that the target user terminal can load and perform local inference.

[0015] Preferably, the step of clustering the multiple user terminals based on encrypted interaction feature vectors to generate multiple user clusters specifically includes: Unsupervised clustering is performed on the encrypted interaction feature vectors uploaded by the multiple user terminals to determine multiple clusters; User terminals corresponding to encrypted interaction feature vectors belonging to the same cluster are grouped into the same set to form the user cluster.

[0016] Preferably, the step of sending the first parameter and the cluster-level adapter parameters matching the target user terminal to the target user terminal includes: Obtain the current encrypted interaction feature vector of the target user terminal; Calculate the Euclidean distance between the current encrypted interaction feature vector of the target user terminal and the cluster centers of each user cluster; select the user cluster with the smallest Euclidean distance as the matching cluster; The first parameter and the cluster-level adapter parameter corresponding to the matching cluster are sent to the target user terminal as initial parameters for the target user terminal to perform local inference.

[0017] Preferably, it further includes a user forgetting processing step, comprising: Receive user logout requests sent from specific user terminals; In response to the user logout request, identify the target user cluster to which the specific user terminal belongs; set the weight value of the cluster-level adapter parameter corresponding to the target user cluster to zero.

[0018] In a fourth aspect, the present invention also provides a server, including a processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the distributed large model adaptive training method of the present invention for a server.

[0019] The beneficial effects of this invention are as follows: The method employs a decoupled architecture between a "globally shared backbone model" and a "lightweight adapter," allowing for local training and updates only on adapters with a very small number of parameters (such as LoRA or Adapter layers). This not only significantly reduces the computational and storage overhead on user terminals when training large models, but also preserves the powerful basic language understanding and logical reasoning capabilities of the backbone model by freezing it, avoiding the "catastrophic forgetting" problem caused by local data sparsity or distribution bias. Thus, it balances the versatility and personalization of large models while reducing terminal resource consumption.

[0020] Furthermore, by "hashing" the gradient data of the lightweight adapter, continuous floating-point gradients are converted into discrete, irreversible hash values. This nonlinear transformation completely destroys the differentiability relationship between the gradient data and the original input data, fundamentally blocking gradient-based reconstruction attacks (such as DLG attacks) and ensuring the absolute security of the user's original dialogue content (such as private text) during transmission. Compared with traditional gradient noise-adding schemes, this approach reduces the impact on model convergence accuracy while protecting privacy.

[0021] Furthermore, by generating "interaction feature vectors" that represent user behavior patterns and applying "differential privacy perturbations," the server can perform user clustering based on fuzzy statistical features without knowing the specific numerical values ​​of user behavior (such as the exact chat duration or the precise value of emotional fluctuations). This allows users to be matched with the "cluster-level adapter" that best suits their behavior patterns, thereby obtaining more accurate initialization parameters, accelerating the convergence of the local model, and strictly protecting the user's behavioral privacy profile from being stolen by the server.

[0022] Finally, the user terminal simultaneously receives both the "first parameter" (global update) and the "cluster-level adapter parameter" (group update). This mechanism enables the local model to absorb general knowledge iterations from the entire network data while also quickly synchronizing with the specific preferences of its user group (for example, users belonging to the "technical consulting" group can obtain relevant terminology optimizations more quickly), significantly improving the model's adaptability and response quality in complex application scenarios. Attached Figure Description

[0023] Figure 1 This is a schematic flowchart illustrating a distributed large model adaptive training method for a user terminal according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the structure of a user terminal according to an embodiment of the present invention; Figure 3 This is a schematic flowchart illustrating a distributed large model adaptive training method for a server according to an embodiment of the present invention. Detailed Implementation

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

[0025] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0026] Example of a distributed large-scale adaptive training method for user terminals: like Figure 1 As shown, the distributed large model adaptive training method for user terminals of the present invention includes: S101. Collect historical dialogue data between the user and the customer service agent, specifically: collect historical dialogue data between the user and the customer service agent; the customer service agent adopts a distributed large model; the distributed large model includes a globally shared backbone model and a lightweight adapter, wherein the globally shared backbone model is used to provide basic answering capabilities, and the lightweight adapter is used to learn and store the personalized preferences, emotional patterns and interaction habits of specific users, and to make personalized corrections to the basic answers. S102. Obtain gradient data and interaction feature vectors, specifically: train the distributed large model locally based on historical dialogue data to generate gradient data; perform statistics on historical dialogue data to generate interaction feature vectors that characterize user interaction behavior patterns; the gradient data is the gradient of the parameters of the lightweight adapter. In this embodiment, the interaction feature vector includes the interaction round count statistics, the emotion distribution variance value, and the intent entropy value; the encrypted interaction feature vector is generated by adding Laplace noise or Gaussian noise to the interaction round count statistics, the emotion distribution variance value, and the intent entropy value based on a local differential privacy mechanism.

[0027] The number of interaction rounds reflects the length of a conversation or the length of the user's problem-solving path. It is obtained by counting the total number of back-and-forth conversations between the user and the customer service agent at the end of a session. One round is counted as one sentence sent by the user and one sentence replied by the agent.

[0028] The variance of emotion distribution reflects the intensity of a user's emotional fluctuations during a conversation (e.g., whether they remained calm throughout or experienced a dramatic shift from anger to satisfaction). It is obtained as follows: (1) Emotional scoring: The sentiment analysis model on the client side is used to score the text sent by the user in each round (e.g. -1 represents anger, 0 represents neutrality, and +1 represents satisfaction) to obtain an emotional sequence. .

[0029] (2) Calculate the variance: for this emotion sequence The mathematical variance is calculated using the following expression: .

[0030] The smaller the variance, the more stable the emotions; the larger the variance, the greater the emotional fluctuations.

[0031] Intent entropy reflects the complexity and divergence of a user's conversational intent (i.e., whether the user focuses on asking one question or asks irrelevant questions). Methods for obtaining it include: (1) Intent recognition: Use the local NLU (Natural Language Understanding) module to identify the intent label of each sentence of the user (e.g., "Check bill", "Transfer to human", "Complain").

[0032] (2) Calculate the probability distribution: Statistically count the frequency of each intention to obtain the probability distribution P(x).

[0033] (3) Calculate the entropy value: Calculate using the Shannon entropy formula.

[0034] In this embodiment, by selecting interaction rounds, sentiment variance, and intent entropy as features when constructing the meta-feature vector, user profiles can be accurately depicted from a macro-behavioral pattern perspective without involving specific semantic content. Furthermore, a local differential privacy mechanism (adding Laplacian or Gaussian noise) is employed to mask individual features while ensuring the effectiveness of clustering statistical properties. This prevents the server or third parties from inferring a specific user's identity or precise behavioral habits through features, thus achieving user profile anonymization.

[0035] S103. Obtain encrypted gradient data and encrypted interaction feature vector, specifically: perform hash encryption on the gradient data to obtain encrypted gradient data, and perform differential privacy perturbation processing on the interaction feature vector to obtain encrypted interaction feature vector. S104. Upload the encrypted gradient data and encrypted interaction feature vector to the server; S105. Update the global shared backbone model and the lightweight adapter, specifically: receive the first parameter sent by the server and use the first parameter for the global shared backbone model to update the global shared backbone model; receive the cluster-level adapter parameters sent by the server and apply the cluster-level adapter parameters to the lightweight adapter to update the lightweight adapter.

[0036] The first parameter is the updated parameter of the global shared backbone model, calculated by the server based on the global gradient and the parameters before the global shared backbone model update. The global gradient is the gradient obtained by performing a global aggregation operation on the encrypted gradient data uploaded by each user terminal. The cluster-level adapter parameter is the aggregated value of the parameters of the lightweight adapter of the user terminal belonging to the same user cluster, calculated by the server. The user cluster is the cluster obtained by the server performing clustering processing on the multiple user terminals based on the encrypted interaction feature vector.

[0037] The first parameter is the new weight parameter for the globally shared backbone model, and the cluster-level adapter parameter is the new weight parameter for the lightweight adapter.

[0038] In this embodiment, updating the global shared backbone model means setting the weight parameters of the global shared backbone model to the first parameters issued by the server, and updating the lightweight adapter means setting the weight parameters of the lightweight adapter to the cluster-level adapter parameters.

[0039] After the user terminal updates the globally shared backbone model and the lightweight adapter, local inference can be performed. Further local fine-tuning of the lightweight adapter is also possible after updating the globally shared backbone model and the lightweight adapter.

[0040] In one embodiment, the method for obtaining the encrypted gradient data includes: S201. Obtain the gradient data generated by the user terminal during local training; In this embodiment, the gradient data is obtained by the user terminal by differentiating the lightweight adapter parameters based on a local loss function. The expression is: ; In the formula, This represents the total loss value during local training, and E represents the expected value. Represents the prediction loss function. This represents the model's predicted output. The parameters represent the frozen shared backbone model. These represent the parameters of a trainable lightweight adapter. Indicates mission loss. This represents a consistency constraint. Represents the regularization coefficient. Denotes KL divergence, This represents the current local model's output distribution for input x. This represents the output distribution of the global model for the same input x.

[0041] Original gradient data The calculation expression is: .

[0042] The design of the local loss function takes into account both "task adaptability" and "knowledge consistency".

[0043] The task loss term ensures that the model can learn user-specific preferences and business rules.

[0044] The KL divergence constraint (consistency constraint) limits the degree to which local model parameters deviate from the global model, effectively preventing catastrophic forgetting, i.e. preventing the model from losing its general language understanding ability when learning new personalized features.

[0045] S202, Divide the gradient data into multiple gradient blocks; S203. Perform a hash mapping operation on each gradient block to generate a hash gradient value that cannot be reversed, and use the hash gradient value as the encrypted gradient data.

[0046] By dividing the original gradients into blocks and hashing them, the spatial structure and numerical correspondence of the gradients are disrupted. This one-way encryption effectively defends against gradient inversion attacks, ensuring that even if an attacker intercepts the uploaded gradient data, they cannot deduce the user's original training data (such as sensitive dialogue text), thus greatly improving the security of data transmission.

[0047] User terminal example: The present invention also provides a user terminal. For example... Figure 2 As shown, the user terminal includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the distributed large model adaptive training method for the user terminal described in the above embodiments of the present invention is implemented.

[0048] The user terminal also includes other components well known to those skilled in the art, such as communication buses and communication interfaces. Their settings and functions are known in the art and will not be described in detail here.

[0049] Example of a distributed large-scale model adaptive training method for servers: like Figure 3 As shown, the present invention also provides a distributed large model adaptive training method for servers, comprising: S301, Receive encrypted gradient data and encrypted interaction feature vectors uploaded by multiple user terminals; S302. Obtain the first parameter, specifically: perform a global aggregation operation based on the encrypted gradient data to generate a global gradient for the global shared backbone model; and calculate the updated parameters of the global shared backbone model based on the global gradient and the parameters before the global shared backbone model update, and use them as the first parameter. In this embodiment, performing a global aggregation operation based on the encrypted gradient data to generate a global gradient for globally sharing the backbone model includes: I. Receiving and parsing input data.

[0050] The server first receives encrypted gradient data uploaded from various user terminals (user ends).

[0051] These gradients are not the direct original gradients, but rather hash gradient values ​​generated by the user terminal using a hash function after the user terminal blocks the gradients of the lightweight adapter locally.

[0052] This approach aims to prevent servers or attackers from back-deriving users' raw privacy data through gradient descent.

[0053] 2. Execute the FedAvg algorithm.

[0054] In the general channel, the server uses the FedAvg (Federated Average) algorithm to aggregate and calculate multiple received structured meta-gradients to obtain the global gradient.

[0055] This step typically involves weighted averaging of gradients from different user terminals to extract a general update direction that reflects the global data distribution characteristics.

[0056] Through this process, the system can accumulate the common knowledge gained by each user terminal during local training into a shared backbone model, thereby enabling continuous model evolution and improved global capabilities.

[0057] S303. Cluster the multiple user terminals based on the encrypted interaction feature vector to generate multiple user clusters; S304. Obtain the cluster-level adapter parameters for each user cluster, specifically: for each user cluster, obtain the parameters of the lightweight adapter of the user terminal belonging to that user cluster, and calculate the aggregate value of the parameters of the lightweight adapter, and use it as the cluster-level adapter parameters corresponding to that user cluster. S305. Send the first parameter and the cluster-level adapter parameter that matches the target user terminal to the target user terminal so that the target user terminal can load and perform local inference.

[0058] In this embodiment, the server completes the general capability iteration of the "globally shared backbone" and the personalized capability iteration of the "cluster-level adapter" without ever touching the plaintext gradients and features. This "blind clustering" and "blind aggregation" mechanism constructs a zero-trust training environment, minimizing the risk of data leakage on the server side. Furthermore, by clustering based on encrypted interaction features, users with similar behavioral patterns (such as similar emotional fluctuations or intent complexity) are grouped together, and a unique "cluster-level adapter parameter" is calculated for each group. This divide-and-conquer strategy effectively alleviates the gradient conflict problem caused by the distribution of Non-IID data, allowing the model parameters of each user group to converge towards the optimal solution for that group, rather than being averaged. Moreover, the method in this embodiment can distribute the cluster-level adapter parameters that best match the target user's current behavioral pattern. For new users or users whose behavior changes, the system can quickly switch them to the most suitable "expert model" state, greatly shortening the training time and data volume required for local fine-tuning, and significantly improving the user's first-screen experience and cold start effect.

[0059] In one embodiment, the step of clustering the multiple user terminals based on encrypted interaction feature vectors to generate multiple user clusters specifically includes: S401. Perform unsupervised clustering on the encrypted interaction feature vectors uploaded by the multiple user terminals to determine multiple clusters; In this embodiment, the K-Means++ algorithm is used when performing unsupervised clustering on the meta-feature vectors uploaded by multiple user terminals.

[0060] The K-Means++ algorithm is used to optimize the selection of initial cluster centers. Compared with the traditional K-Means algorithm, it can accelerate the clustering convergence speed and improve the stability and accuracy of the clustering results, ensuring the rationality of user grouping and thus improving the effect of subsequent adapter matching.

[0061] S402. The user terminals corresponding to the encrypted interaction feature vectors belonging to the same cluster are divided into the same set to form the user cluster.

[0062] Unsupervised clustering groups users with similar behavioral patterns or preferences into the same cluster, enabling the system to discover potential user groups (such as "impatient users" or "price-sensitive users"). This mechanism allows the system to accumulate common knowledge about groups, making it more generalizable than fine-tuning individual users, and more targeted than global models.

[0063] In one embodiment, sending the first parameter and the cluster-level adapter parameter matching the target user terminal to the target user terminal includes: S501. Obtain the current encrypted interaction feature vector of the target user terminal; S502. Calculate the Euclidean distance between the current encrypted interaction feature vector of the target user terminal and the cluster centers of each user cluster; select the user cluster with the smallest Euclidean distance as the matching cluster; S503. Send the first parameter and the cluster-level adapter parameter corresponding to the matching cluster to the target user terminal as the initial parameters for the target user terminal to perform local inference.

[0064] The method in this embodiment achieves rapid matching between new users and existing clusters by calculating Euclidean distance, so that new users can obtain a "cluster-level adapter" similar to their own preferences without having to start training from scratch, thus realizing optimized cold start.

[0065] Furthermore, by only sending out matching cluster-level adapters instead of all parameters or other irrelevant adapters, communication overhead is significantly reduced, and download waiting time and storage pressure on end devices are decreased.

[0066] In one embodiment, a user forgetting processing step is also included, comprising: S601, Receive a user logout request sent by a specific user terminal; S602. In response to the user logout request, identify the target user cluster to which the specific user terminal belongs; set the weight value of the cluster-level adapter parameter corresponding to the target user cluster to zero.

[0067] The method in this embodiment provides a clear data "forgetting" mechanism. When a user logs out, the impact of that user data on the system is physically eliminated by resetting the corresponding adapter rights to zero. This not only complies with the requirements of relevant laws and regulations regarding the "right to be forgotten," but also prevents the preferences of outdated or logged-out users from continuously interfering with the model's subsequent decisions.

[0068] In one embodiment, the method further includes limiting the upload frequency during the process of receiving local update data uploaded by multiple user terminals, including: detecting the number of uploads by the same user terminal within a single session period; if the number of uploads exceeds a set threshold, then rejecting subsequent local update data uploaded by that user terminal, wherein the set threshold is 1.

[0069] Limiting the number of uploads per session (with a threshold of 1) reduces network congestion and server load caused by high-frequency communication, and also prevents malicious users from "poisoning" or deviating from the training direction of the global model by submitting abnormal gradients at high frequencies, thereby improving the robustness of the system.

[0070] Server Example: The present invention also provides a server, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the distributed large model adaptive training method for the server described in the above embodiments is implemented.

[0071] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.

Claims

1. A distributed large-scale adaptive training method for user terminals, characterized in that, The method includes: Collect historical dialogue data between users and customer service agents; the customer service agents adopt a distributed large model; the distributed large model includes a globally shared backbone model and a lightweight adapter, wherein the globally shared backbone model is used to provide basic answering capabilities, and the lightweight adapter is used to learn and store the personalized preferences, emotional patterns and interaction habits of specific users, and to make personalized corrections to the basic answers; Local training of a distributed large model is performed based on historical dialogue data to generate gradient data; statistical analysis of historical dialogue data is performed to generate interaction feature vectors that characterize user interaction behavior patterns; the gradient data is the gradient of the parameters of the lightweight adapter. The gradient data is hashed and encrypted to obtain encrypted gradient data, and the interaction feature vector is subjected to differential privacy perturbation to obtain encrypted interaction feature vector. Upload the encrypted gradient data and encrypted interaction feature vectors to the server; Receive the first parameter sent by the server and use the first parameter for the global shared backbone model to update the global shared backbone model. Receive the cluster-level adapter parameters sent by the server and apply the cluster-level adapter parameters to the lightweight adapter to update the lightweight adapter.

2. The privacy-preserving distributed large model adaptive training method as described in claim 1, characterized in that, The method for obtaining the encrypted gradient data includes: Acquire the gradient data generated by the user terminal during local training; The gradient data is divided into multiple gradient blocks; A hash mapping operation is performed on each gradient block to generate a hash gradient value that cannot be reversed, and the hash gradient value is used as the encrypted gradient data.

3. The privacy-preserving distributed large model adaptive training method as described in claim 2, characterized in that, The gradient data is obtained by the user terminal by differentiating the lightweight adapter parameters based on the local loss function. The expression is: ; In the formula, This represents the total loss value during local training, and E represents the expected value. Represents the prediction loss function. This represents the model's predicted output. The parameters represent the frozen shared backbone model. These represent the parameters of a trainable lightweight adapter. Indicates mission loss. This represents a consistency constraint. Represents the regularization coefficient. Denotes KL divergence, This represents the current local model's output distribution for input x. This represents the output distribution of the global model for the same input x.

4. The privacy-preserving distributed large model adaptive training method as described in any one of claims 1 to 3, characterized in that, The interaction feature vector includes the interaction round count statistics, the emotion distribution variance, and the intent entropy value; the encrypted interaction feature vector is generated by adding Laplace noise or Gaussian noise to the interaction round count statistics, the emotion distribution variance, and the intent entropy value based on a local differential privacy mechanism.

5. A user terminal, comprising a processor and a memory, wherein the memory stores computer program instructions, characterized in that, When the computer program instructions are executed by the processor, the distributed large model adaptive training method for user terminals as described in any one of claims 1 to 4 is implemented.

6. A distributed large-scale model adaptive training method for servers, characterized in that, include: Receive encrypted gradient data and encrypted interaction feature vectors uploaded by multiple user terminals; A global aggregation operation is performed based on the encrypted gradient data to generate a global gradient for the global shared backbone model; and the updated parameters of the global shared backbone model are calculated based on the global gradient and the parameters of the global shared backbone model before the update, and these are used as the first parameter. The multiple user terminals are clustered based on the encrypted interaction feature vectors to generate multiple user clusters. For each user cluster, obtain the parameters of the lightweight adapter of the user terminal belonging to that user cluster, and calculate the aggregate value of the parameters of the lightweight adapter, and use it as the cluster-level adapter parameter corresponding to that user cluster. The first parameter and the cluster-level adapter parameter that matches the target user terminal are sent to the target user terminal so that the target user terminal can load and perform local inference.

7. The privacy-preserving distributed large model adaptive training method as described in claim 6, characterized in that, The step of clustering the multiple user terminals based on encrypted interaction feature vectors to generate multiple user clusters specifically includes: Unsupervised clustering is performed on the encrypted interaction feature vectors uploaded by the multiple user terminals to determine multiple clusters; User terminals corresponding to encrypted interaction feature vectors belonging to the same cluster are grouped into the same set to form the user cluster.

8. The privacy-preserving distributed large model adaptive training method as described in claim 6, characterized in that, The step of sending the first parameter and the cluster-level adapter parameters matching the target user terminal to the target user terminal includes: Obtain the current encrypted interaction feature vector of the target user terminal; Calculate the Euclidean distance between the current encrypted interaction feature vector of the target user terminal and the cluster centers of each user cluster; select the user cluster with the smallest Euclidean distance as the matching cluster; The first parameter and the cluster-level adapter parameter corresponding to the matching cluster are sent to the target user terminal as initial parameters for the target user terminal to perform local inference.

9. The privacy-preserving distributed large model adaptive training method as described in any one of claims 6 to 8, characterized in that, It also includes user forgetting handling steps, including: Receive user logout requests sent from specific user terminals; In response to the user logout request, identify the target user cluster to which the specific user terminal belongs; set the weight value of the cluster-level adapter parameter corresponding to the target user cluster to zero.

10. A server comprising a processor and a memory, the memory storing computer program instructions, characterized in that, When the computer program instructions are executed by the processor, the distributed large model adaptive training method for a server as described in any one of claims 6 to 9 is implemented.