Error correction method, electronic equipment and computer readable storage medium
By employing dynamic detection and privacy-preserving error correction methods in federated learning, the problems of privacy leaks and model instability caused by the impact of user data revocation on the model are solved, achieving efficient model optimization and accuracy, and promoting the application of federated learning technology.
Patent Information
- Application Number
- CN202511294659.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-12-16
AI Technical Summary
In federated learning, the challenge lies in how to protect user data privacy while effectively reversing the impact of user data on the model to prevent privacy leaks, and maintaining the stability and accuracy of the model.
Through system initialization, federated learning training, dynamic error detection, error correction, and model consistency maintenance stages, model bias is detected by combining dynamic loss volatility, gradient KL divergence, and adversarial example confidence shift. Privacy-preserving abnormal client verification is performed using a two-party computation protocol. The system then reverts to a historical stable model version, performs knowledge distillation-driven incremental training, applies regularization constraints and differential privacy noise to the abnormal model layer, calibrates the global model using homomorphic encrypted majority voting, and ensures operational auditability through blockchain notarization.
It improves the robustness and accuracy of the model, ensures fair and efficient collaboration among multiple participants in federated learning, solves problems such as model bias correction, data privacy protection and distributed collaborative optimization, and promotes the wider application of federated learning technology.
Smart Images

Figure CN121146121A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of federated forgetting learning, and in particular to an error correction method, an electronic device and a computer readable storage medium. BACKGROUND
[0002] With the rapid development of technology, big data and artificial intelligence technology have become an important force to promote social progress. In this context, federated learning, as a new machine learning method, has attracted widespread attention due to its unique distributed learning mechanism and privacy protection function. In practical applications, federated learning also faces many challenges, of which the forgetting request problem of user data is the most serious. This problem leads to the concept of federated forgetting learning, i.e. how to effectively revoke the training update of user data on the federated learning model while protecting user data privacy.
[0003] The emergence of federated forgetting learning aims to solve the risk of privacy leakage that may occur during the use of federated learning services by users. When a user wants to revoke the influence of their data on the model, the federated forgetting learning mechanism can ensure that user data no longer affects the model, thereby protecting user privacy. This process is not easy. Revoking the training update of user data can cause the model to deviate or make errors, thereby affecting the accuracy and consistency of the model. Therefore, how to maintain the stability and accuracy of the model while performing federated forgetting learning has become a problem that needs to be solved. SUMMARY
[0004] The present application aims to provide an error correction method, an electronic device and a computer readable storage medium to solve the problems raised in the background.
[0005] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0006] An error correction method, comprising the following steps:
[0007] Step 1, system initialization phase: configure the global model parameters of the federated learning architecture, the client asymmetric key pair and the security parameters;
[0008] Step 2, federated learning training phase: the client calculates the encrypted gradient based on the local data and attaches a timestamp signature, the server updates the global model through homomorphic aggregation, and stores the historical gradient, model parameter and client contribution index at the same time;
[0009] Step 3, error dynamic detection phase: detect model deviation through dynamic loss volatility, gradient KL divergence and adversarial sample confidence offset, and use two-party computation protocol for privacy-protected abnormal client verification;
[0010] Step 4, error correction phase: rollback to the historical stable model version, perform knowledge distillation driven incremental training, and impose regularization constraints and differential privacy noise on abnormal model layers;
[0011] Step 5, model consistency maintenance phase: dynamically adjust aggregation weights based on parameter similarity and prediction variance, calibrate the global model using homomorphic encryption majority voting, and ensure operation audibility through blockchain notarization;
[0012] Step 6, secure interaction protocol phase: implement gradient obfuscation, zero-knowledge proof verification, and threshold signature authorization to prevent gradient leakage, model tampering, and collusion attacks.
[0013] As a further scheme of the present application: in the system initialization phase, the client generates an RSA asymmetric key pair and submits the public key to the server; the server deploys a homomorphic encryption algorithm to generate a global public key; a threshold signature scheme is defined to split the global private key into pieces, requiring at least client joint signature to authorize critical operations, where n and t are natural numbers greater than 2.
[0014] As a further scheme of the present application: in step 2, the encrypted gradient aggregation of the federated learning training phase satisfies:
[0015] The client gradient calculation introduces local differential privacy noise, where the noise scale and sensitivity are constrained by the local data size;
[0016] The server calculates the global gradient through homomorphic aggregation and dynamically adjusts the aggregation weight.
[0017] As a further scheme of the present application: in step 3, the error dynamic detection phase includes the following steps:
[0018] Calculate the sliding window loss volatility rate, and trigger detection when the sliding window loss volatility rate is greater than the preset volatility rate;
[0019] Locate the abnormal client through KL divergence;
[0020] Verify the gradient similarity using a two-party computation protocol, and determine it as abnormal when the gradient similarity is less than the preset threshold.
[0021] As a further scheme of the present application: in step 4, the model correction operation in the error correction phase requires at least t client signatures for authorization, where t is a natural number greater than 2; the correction record is written to the blockchain to support public auditing.
[0022] As a further scheme of the present application: in step 5, the model consistency maintenance phase includes the following steps:
[0023] Cosine similarity and parameter difference entropy of the computing client model and the global model are calculated;
[0024] Dynamic aggregation weight;
[0025] The client consistency fine-tuning is driven based on the homomorphic encryption majority voting result.
[0026] As a further scheme of the application: in step 6, the client adds a random mask in the secure interaction protocol stage and submits the commitment, and the server decrypts the real gradient through the MPC protocol cooperation; the client generates zero-knowledge proof to verify the correctness of gradient calculation and encryption.
[0027] As a further scheme of the application: in step 6, the secure interaction protocol stage adopts an anti-quantum communication tunnel protocol;
[0028] The client and the server generate a session key based on the LWE problem:
[0029] The transmission data is encrypted using the AES-GCM-SIV mode, and an authentication tag is generated.
[0030] An electronic device includes a memory, a processor, and a computer program stored in the memory, and the processor implements the above method when executing the computer program.
[0031] A computer readable storage medium stores a computer program, and the program is executed by a processor to implement the above method.
[0032] Compared with the prior art, the beneficial effects of the application are: improving the robustness and accuracy of the model. At the same time, by maintaining the consistency of the model, it can ensure that the federated learning realizes fair and efficient cooperation among multiple participants, so as to promote the wider application of federated learning technology.
[0033] The application provides a federated forgetting learning model correction method based on dynamic detection and privacy protection, which effectively solves the key problems of model bias repair, data privacy protection and distributed collaborative optimization by fusing a multi-level consistency maintenance mechanism and a secure computing protocol, and provides an innovative solution for reliable evolution of large-scale machine learning systems.
[0034] The application creatively designs a hierarchical and progressive error correction framework for the model degradation and privacy risk problems in the federated learning environment. The core of the framework is to build a dual mechanism of dynamic error perception and verifiable parameter calibration, which can not only capture the abnormal fluctuations of the global model in real time, but also ensure the data confidentiality of the correction process through encrypted calculation, thereby realizing efficient model optimization under the premise of protecting user privacy.
[0035] The federated forgetting learning correction method proposed in this invention demonstrates significant technical advantages and application potential in complex data environments. Future research can further explore the adaptability of this method in multimodal learning and edge computing scenarios, providing theoretical support and practical guidance for building secure and reliable distributed intelligent systems.
[0036] Other features and advantages of the present invention will be disclosed in detail in the following detailed description and accompanying drawings. Attached Figure Description
[0037] Figure 1 This is a flowchart of an error correction method according to the present invention;
[0038] Figure 2 yes Figure 1 A flowchart of the system initialization phase of an error correction method;
[0039] Figure 3 yes Figure 1 A flowchart of encrypted gradient aggregation during the training phase of federated learning, a method for error correction.
[0040] Figure 4 yes Figure 1 A flowchart of the error dynamic detection stage and error correction stage of an error correction method;
[0041] Figure 5 yes Figure 1 A flowchart of the model consistency maintenance phase of one error correction method;
[0042] Figure 6 yes Figure 1 A flowchart of the secure interaction protocol phase of an error correction method. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] like Figures 1 to 6 As shown, this embodiment addresses error correction and consistency maintenance in a federated forgetting learning model. Specifically, an error correction method includes the following steps:
[0045] Step 1, System Initialization Phase: Configure the global model parameters, client asymmetric key pairs, and security parameters of the federated learning architecture;
[0046] Step 2, Federated Learning Training Phase: The client calculates encrypted gradients based on local data and adds timestamp signatures. The server updates the global model through homomorphic aggregation, and stores historical gradients, model parameters and client contribution metrics.
[0047] Step 3, Error Dynamic Detection Stage: Model bias is detected by dynamic loss volatility, gradient KL divergence, and adversarial example confidence shift, and privacy-preserving abnormal client verification is performed using a two-party computation protocol.
[0048] Step 4, Error Correction Phase: Roll back to a historical stable model version, perform knowledge distillation-driven incremental training, and apply regularization constraints and differential privacy noise to the anomalous model layers;
[0049] Step 5, Model Consistency Maintenance Phase: Dynamically adjust aggregate weights based on parameter similarity and prediction variance, calibrate the global model using homomorphic encrypted majority voting, and ensure the auditability of the operation through blockchain notarization;
[0050] Step 6, Secure Interaction Protocol Phase: Implement gradient obfuscation, zero-knowledge proof verification, and threshold signature authorization to defend against gradient leakage, model tampering, and collusion attacks.
[0051] As a specific implementation method, during the system initialization phase, the client... Generate RSA asymmetric key pairs and the public key Submitted to the server; the server deploys the Paillier homomorphic encryption algorithm to generate a global public key. Satisfy encryption operations ,in Use random numbers; define a threshold signature scheme, and use the global private key. Split into At least one fragment is required. Multiple clients jointly sign to authorize critical operations, among which and It is a natural number greater than 2.
[0052] As a specific implementation method, the system initialization phase also involves global model initialization and hyperparameter definition, client registration and key distribution, and security parameter configuration.
[0053] Global Model and Hyperparameter Definition
[0054] 1) Model parameter generation:
[0055] The server generates the initial global model. Its parameters follow a Gaussian distribution. ,in To initialize the variance (empirical value set to 0.01), This refers to the input / output dimensions of the model. Where: This represents a Gaussian distribution (normal distribution). The vector representing the mean of the distribution. Indicates the initial variance. Represents the identity matrix.
[0056] 2) Federated learning hyperparameter configuration:
[0057] Learning rate Adopt an adaptive strategy to satisfy ( Based on the learning rate, The attenuation coefficient is... (This refers to the maximum number of training rounds). Among them: Indicates the first Learning rate during training rounds Indicates the basic learning rate. This represents the decay coefficient, which controls the rate at which the learning rate decreases. This indicates the current training round.
[0058] The aggregation cycle is dynamically adjusted to ensure... By upsampling the aggregation frequency, it is ensured It decreases with increasing client-side gradient heterogeneity, where For the client Private gradients, and The global gradient is the aggregation of all private gradients. Where: This indicates the dynamically adjusted aggregation period. Indicates the basic aggregation period. This represents the floor function. Indicates client gradient norm, Denotes the global gradient norm, where , This indicates the number of clients participating in the training.
[0059] Client registration and key distribution
[0060] 1) Asymmetric key generation:
[0061] Each client Generate RSA key pairs: Given a large prime number that meets security requirements Through large prime numbers Generate private key And calculate the condition that satisfies of value, obtain public key The client will Submit to the server and destroy the primitive roots of large prime numbers. To enhance security. The key generation process includes: 1. Selecting two large prime numbers. and ,calculate 2. Calculate Euler's totient function. 3. Select Public Index ,satisfy 4. Calculate the private key index. Finally, we obtain the private key: Public key: .
[0062] 2) Deployment of the homomorphic encryption module:
[0063] The server integrates the Paillier encryption system and supports ciphertext gradient aggregation: client-side encryption gradient. Server aggregates ciphertext Encryption process: ,in: Client The local gradient; Generators of cyclic groups; : Random number, satisfying (Right now and (coprime) RSA modulus; aggregation process: in: Global gradient 9; : Number of clients participating in the aggregation.
[0064] 3) Threshold signature protocol:
[0065] definition - Threshold signature scheme, requiring at least A joint signature by multiple clients can trigger critical operations (such as model rollback). This includes key sharding: private key... Divided into Each segment ,satisfy Signature verification: The server verifies the signature. ,in is the Lagrange multiplier. Total number of clients; Threshold value, satisfying ; : arbitrarily satisfy A subset of clients; The value of the Lagrange basis function at 0; Client The generated partial signature.
[0066] Security parameter configuration
[0067] 1) Differential privacy noise injection:
[0068] Define noise scale This ensures that noise safety is met. - Differential privacy requirements; and given sensitivity ,in , This represents adjacent datasets that differ by one element. Where: Standard deviation of Gaussian noise (noise scale); Privacy budget parameter, controls the strength of privacy protection (usually a value of 0.1-10). Privacy failure probability (usually set to a value) ); : Natural logarithm function; Sensitivity is defined as the maximum difference in function outputs across adjacent datasets.
[0069] 2) Two-Party Computation (2PC) Protocol:
[0070] Implementing privacy-preserving error verification using the GMW protocol:
[0071] Input client-held data The server holds the function The protocol requires both the client and server to generate a secret share. Then, calculations are performed via the OT protocol. The reconstruction result is obtained. .
[0072] 3) Anti-collusion parameter settings:
[0073] Define client trust weights Dynamically reduce the aggregate weight of clients that frequently malfunction.
[0074] As a specific implementation method, in step 2, the encrypted gradient aggregation during the federated learning training phase satisfies:
[0075] Client-side gradient calculation introduces local differential privacy noise. Among them, noise scale Sensitivity Constrained by the size of local data; : Private gradient with added noise; Original ladder; Gaussian noise with a mean of 0 and a covariance of (\sigma^2 I\).
[0076] The server calculates the global gradient using homomorphic aggregation. And dynamically adjust the aggregation weight. ,in For client data distribution, This represents the KL divergence value. Client Aggregate weights; Temperature parameter, which controls the smoothness of the weight distribution (usually set to 1.0). Client data distribution With global distribution KL divergence; Exponential function.
[0077] As a specific implementation method, the federated learning training phase involves cryptographic gradient calculation and signing, secure gradient aggregation and model updating, historical information storage and verification,
[0078] Encryption gradient calculation and signature
[0079] 1) Local gradient calculation:
[0080] Client Based on local data Calculate gradient Differential privacy perturbation is used This ensures that noise safety is met. - Differential privacy requirements, sensitivity Then it is constrained by the local data size.
[0081] 2) Homomorphic encryption and timestamp signature:
[0082] Use the server public key Encryption gradient: via , Random numbers It is a group of integers of order N, from which the encrypted information of the private gradient value is calculated. .
[0083] Generate timestamp signature To prevent replay attacks.
[0084] Safe gradient aggregation and model update
[0085] 1) Legality verification:
[0086] Server verification signature Invalid or duplicate submissions will be discarded.
[0087] 2) Homomorphic aggregation calculation:
[0088] The server aggregates and decrypts the encrypted gradient: .
[0089] 3) Contribution-aware aggregation:
[0090] Dynamically adjust client weight Suppress low-quality or malicious gradients: ( For the client Data distribution (For global distribution estimation).
[0091] 4) Model update:
[0092] .
[0093] Historical information storage and verification
[0094] 1) Key data archiving:
[0095] Encryption gradient: ;
[0096] Contribution metrics: (Gradient orientation similarity);
[0097] Model snapshot: .
[0098] 2) Tamper-resistant storage:
[0099] Constructing a Merkle tree: Generating hash values for each round of data. ;
[0100] Linked storage: Write it into the blockchain to satisfy This ensures that historical records cannot be altered.
[0101] 3) Verifiable queries:
[0102] The client can verify whether its gradients have been correctly aggregated using zero-knowledge proofs. .
[0103] As a specific implementation method, in step 3, the anomaly determination method in the error dynamic detection stage includes the following steps:
[0104] Calculate the sliding window loss volatility ,when That is, the detection is triggered when the volatility of the sliding window loss exceeds the preset volatility;
[0105] Through KL divergence Locate the abnormal client and meet the requirements. ;
[0106] Gradient similarity is verified using a two-party computation protocol. When the gradient similarity is less than a preset threshold, it is judged as an anomaly, for example, when... This is abnormal.
[0107] The error dynamic monitoring phase involves: dynamic error monitoring and triggering mechanisms, as well as error tracing and verification with privacy protection.
[0108] Dynamic error monitoring and triggering mechanism
[0109] 1) Loss function fluctuation monitoring:
[0110] Define dynamic loss volatility As an indicator triggered by error detection: ( To adjust the sliding window size, (For the validation set). Triggering condition: when Error detection is started at time ( , (Base volatility).
[0111] 2) Gradient distribution anomaly detection:
[0112] Calculate global gradient With each client gradient KL divergence: Anomaly detection: If ( , (Historical KL mean and standard deviation), marked client This is an abnormal candidate.
[0113] Error tracing and verification for privacy protection
[0114] 1) Detection of adversarial example enhancement:
[0115] Generate adversarial examples (FGSM attack), testing model robustness:
[0116] Confidence bias index ( To predict confidence levels, (When it is determined that there is a vulnerability to attack).
[0117] 2) Joint verification by two-party computation (2PC):
[0118] Input: The server holds the global gradient. Client Hold local gradient .
[0119] Agreement process:
[0120] 1. Both parties secretly share the gradient: .
[0121] 2. Calculate similarity using the OT protocol. .
[0122] 3. If ,determination The contribution is abnormal; otherwise, the plaintext result is released.
[0123] As a specific implementation method, in step 4, the model correction operation in the error correction phase requires at least t clients to sign authorization orders, where t is a natural number greater than 2; the correction record is written to the blockchain to support public auditing.
[0124] The bug fixing phase includes:
[0125] Back off until stability constraints are met Historical models ;
[0126] Knowledge distillation loss Drive incremental training;
[0127] Apply L2 regularization to the anomaly layer parameters And inject Gaussian noise .
[0128] The bug fix phase involves: layered, progressive bug fixes and security authorization and audit trails.
[0129] Layered progressive error correction
[0130] 1) Model rollback and stability verification:
[0131] Revert to the latest stable version ,satisfy: ( (tolerance threshold);
[0132] Stability constraint: The loss of the model on the validation set after backtracking must satisfy... .
[0133] 2) Incremental knowledge distillation training:
[0134] Teacher-student framework: For the teacher model, the current model For the student model. Distillation loss function. ( For distillation weight, (For cross-entropy loss).
[0135] 3) Parameter selective correction:
[0136] For the abnormal layer Apply L2 constraints: ;
[0137] Introducing differential privacy noise: .
[0138] Security Authorization and Audit Trail
[0139] 1) Threshold signature authorization modification:
[0140] Model correction operations require at least t clients to sign authorization orders. To prevent malicious tampering.
[0141] 2) Blockchain-based evidence storage:
[0142] Correction Record Write it into the blockchain to support public auditing.
[0143] As a specific implementation method: Step 5, the model consistency maintenance phase includes the following steps:
[0144] Calculate the cosine similarity between the client model and the global model. and parameter difference entropy ;
[0145] Dynamic aggregate weights ;
[0146] Based on homomorphic encryption majority voting results Driver client consistency fine-tuning.
[0147] The model consistency maintenance phase involves a multi-dimensional consistency measurement system, dynamic weight aggregation optimization, secure majority voting calibration, and anti-interference synchronous verification mechanism.
[0148] Multi-dimensional consistency measurement system
[0149] 1) Parameter space similarity measurement:
[0150] Cosine similarity: Calculating the global model With client model Similarity:
[0151] ;
[0152] Parameter difference entropy: quantifies the difference in parameter distribution. ( (This represents the normalized histogram distribution of the parameters in the l-th layer).
[0153] 2) Assessment of consistency of predicted behavior:
[0154] Confidence variance: Statistical analysis of the variance of confidence scores across different clients for the same sample. Prediction variance: ;
[0155] Decision boundary alignment: through adversarial examples Detection model decision differences: .
[0156] Dynamic weight aggregation optimization
[0157] 1) Adaptive weight calculation:
[0158] Dynamically adjust aggregation weights based on consistency metrics ( Controlling similarity sensitivity, (Adjustment of differential entropy penalty term).
[0159] 2) Robust aggregation functions:
[0160] Using a truncated mean to suppress the influence of outliers:
[0161] For client parameters according to Sort, remove the first and last elements. indivual( );
[0162] Aggregate remaining parameters .
[0163] Safe majority voting calibration
[0164] 1) Submission of encrypted prediction results:
[0165] The client submits the prediction results using homomorphic encryption. and tags .
[0166] Additional zero-knowledge proofs ,prove It matches the inference results of the local model.
[0167] 2) Privacy protection majority vote:
[0168] Server aggregation encryption prediction results
[0169] Decryption determines the majority of categories Feedback is sent to each client.
[0170] 3) Consistency-driven fine-tuning:
[0171] The client adjusts the local model based on the majority voting results: ( (The coefficient for the consistency regularization term).
[0172] Anti-interference synchronization verification mechanism
[0173] 1) Threshold model synchronization:
[0174] Define synchronization trigger conditions: when Forced synchronization is started at this time. ).
[0175] The client authorizes synchronization operations via threshold signature, requiring at least... A signature.
[0176] 2) Blockchain anchor verification:
[0177] A verification point is generated after each round of synchronization. .
[0178] Write to the blockchain and trigger a smart contract to verify historical consistency; if tampering is detected, automatically roll back.
[0179] As a specific implementation method: In step 6, during the secure interaction protocol phase, the client adds a random mask. And submit a commitment The server collaboratively decrypts the real gradient via the MPC protocol. The client generates Groth16 zero-knowledge proofs. Verify the correctness of gradient calculation and encryption. Critical operations must at least... Threshold signature authorization for each client, signature fragmentation satisfies t is a natural number greater than 2.
[0180] As a specific implementation method, the secure interaction protocol phase involves: gradient obfuscation and collaborative decryption protocol, zero-knowledge proof verification protocol, threshold signature and anti-collusion protocol, and anti-quantum communication tunneling protocol.
[0181] Gradient obfuscation and collaborative decryption protocol
[0182] 1) Client obfuscation:
[0183] Client Generate random mask Calculate the confusion gradient: Submit a commitment To the blockchain.
[0184] 2) Secure aggregation:
[0185] The server calculates the obfuscated aggregate gradient: .
[0186] 3) Collaborative demasking:
[0187] Clients perform joint computation via the MPC protocol (Based on Shamir's secret sharing);
[0188] Server decryption of the actual gradient: ;
[0189] Mathematical guarantee: Statistical indistinguishability: if Then the confusion gradient satisfies - Differential privacy.
[0190] Zero-knowledge proof verification protocol
[0191] 1) Proof of the correctness of gradient calculation:
[0192] Client generates zk-SNARK proof Verify the following relationship:
[0193] ;
[0194] Groth16 parameters: ;
[0195] Verification equation: ;
[0196] 2) Verifiability of aggregation results:
[0197] The server generates a certificate of aggregate correctness. ,verify: .
[0198] Threshold signatures and anti-collusion protocols
[0199] 1) Key fragmentation and distribution:
[0200] Global private key Split into Shamir's secret sharing share ,satisfy: ( For Lagrange polynomials, (A large prime number).
[0201] 2) Signature generation and verification:
[0202] Client Generate partial signature ;
[0203] Aggregated signature ;
[0204] Verification equation: ;
[0205] The safety threshold setting uses a dynamic adjustment mechanism: based on historical behavior scores. Dynamically set threshold .
[0206] Quantum-resistant communication tunneling protocol
[0207] 1) Key exchange:
[0208] The client and server generate session keys based on the LWE (Learning With Errors) question:
[0209] Server public key ( For private key, (for the error vector)
[0210] Client sends ;
[0211] Both parties recover the shared key m through error correction decoding.
[0212] 2) Encrypted transmission:
[0213] Communication data is encrypted using AES-GCM-SIV mode; tag generation: ( For hash keys, (For related data).
[0214] As a specific implementation method, in step 6, the secure interaction protocol stage, a quantum-resistant communication tunneling protocol is adopted;
[0215] The client and server generate a session key based on the LWE problem, where the server's public key is... The client sends and ;
[0216] Data is transmitted using AES-GCM-SIV mode, and an authentication tag is generated. .
[0217] An electronic device includes: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described above.
[0218] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0219] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0220] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. An error correction method, characterized in that, Includes the following steps: Step 1, System Initialization Phase: Configure the global model parameters, client asymmetric key pairs, and security parameters of the federated learning architecture; Step 2, Federated Learning Training Phase: The client calculates encrypted gradients based on local data and adds timestamp signatures. The server updates the global model through homomorphic aggregation, and stores historical gradients, model parameters and client contribution metrics. Step 3, Error Dynamic Detection Stage: Model bias is detected by dynamic loss volatility, gradient KL divergence, and adversarial example confidence shift, and privacy-preserving abnormal client verification is performed using a two-party computation protocol. Step 4, Error Correction Phase: Roll back to a historical stable model version, perform knowledge distillation-driven incremental training, and apply regularization constraints and differential privacy noise to the anomalous model layers; Step 5, Model Consistency Maintenance Phase: Dynamically adjust aggregate weights based on parameter similarity and prediction variance, calibrate the global model using homomorphic encrypted majority voting, and ensure the auditability of the operation through blockchain notarization; Step 6, Secure Interaction Protocol Phase: Implement gradient obfuscation, zero-knowledge proof verification, and threshold signature authorization to defend against gradient leakage, model tampering, and collusion attacks.
2. The error correction method according to claim 1, characterized in that, During the system initialization phase, the client generates an RSA asymmetric key pair and submits the public key to the server; the server deploys a homomorphic encryption algorithm to generate a global public key. Define a threshold signature scheme that splits the global private key into... At least one fragment is required. Multiple clients jointly sign to authorize critical operations, where n and t are natural numbers greater than 2.
3. The error correction method according to claim 1, characterized in that, In step 2, the encrypted gradient aggregation during the federated learning training phase satisfies: Client-side gradient calculation introduces local differential privacy noise, where the noise scale and sensitivity are constrained by the local data size. The server calculates the global gradient through homomorphic aggregation and dynamically adjusts the aggregation weights.
4. The error correction method according to claim 1, characterized in that, In step 3, the anomaly determination method in the error dynamic detection stage includes the following steps: Calculate the sliding window loss volatility, and trigger a detection when the sliding window loss volatility exceeds a preset volatility. Locating abnormal clients using KL divergence; A two-party computation protocol is used to verify gradient similarity, and anomalies are judged when the gradient similarity is less than a preset threshold.
5. The error correction method according to claim 1, characterized in that, In step 4, the model correction operation in the error correction phase requires at least t clients to sign authorization orders, where t is a natural number greater than 2; the correction record is written to the blockchain to support public auditing.
6. The error correction method according to claim 1, characterized in that, Step 5, the model consistency maintenance phase includes the following steps: Calculate the cosine similarity and parameter difference entropy between the client model and the global model; Dynamic aggregation weights; Client consistency fine-tuning is driven by homomorphic encryption majority voting results.
7. The error correction method according to claim 1, characterized in that, In step 6, during the secure interaction protocol phase, the client adds a random mask and submits a commitment, and the server decrypts the real gradient in collaboration with the MPC protocol; the client generates a zero-knowledge proof to verify the correctness of the gradient calculation and encryption.
8. The error correction method according to claim 1, characterized in that, In step 6, the secure interaction protocol phase employs a quantum-resistant communication tunneling protocol; The client and server generate session keys based on the LWE problem: Data is transmitted using AES-GCM-SIV encryption mode to generate authentication tags.
9. An electronic device, comprising: A memory, a processor, and a computer program stored on the memory, characterized in that the processor, when executing the computer program, implements the method as described in any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-8.
Citation Information
Cited By
Multi-method-domain salary calculation standard generation and verification method and system based on large model
CN122173874A