An emotion classification system based on encryption algorithm and generative adversarial network
By using a hybrid encryption framework of SM9 identifier cipher and ECDHE key exchange, and co-training of generative adversarial networks, the problem of privacy leakage and computational efficiency imbalance in visual data processing is solved, achieving efficient emotion classification and feature extraction, and meeting the ISO/IEC 27701 standard.
Patent Information
- Application Number
- CN202510728742.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Existing technologies pose risks of privacy leaks, computational efficiency imbalances, and model security vulnerabilities in visual data processing scenarios. Traditional encryption algorithms result in excessive blurring of image texture features, making it impossible for classification models to effectively extract key points of human skeletons. Furthermore, encryption computational overhead is high, affecting the accuracy of emotion classification.
A hybrid encryption framework combining SM9 identifier cipher and ECDHE key exchange is adopted. Virtual encrypted data is generated by combining generative adversarial networks. By adaptively balancing encryption strength and recognition performance, a dual privacy enhancement pipeline is constructed. The co-training of encryption algorithm and generative adversarial network is optimized to achieve irreversible texture replacement and preservation of emotional features.
With privacy protection in compliance with ISO/IEC 27701 standards, the accuracy of emotion classification is improved, computational efficiency is increased, and feature extraction is significantly improved. This solves the feature distortion problem caused by traditional encryption algorithms and reduces model adaptation costs.
Smart Images

Figure CN120874069B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of emotion recognition technology, and in particular to an emotion classification system based on encryption algorithms and generative adversarial networks. Background Technology
[0002] Against the backdrop of the rapid penetration of artificial intelligence technology into sensitive fields such as medical image analysis and intelligent security, federated learning, as a distributed privacy protection paradigm, has the core advantage of replacing raw data sharing with parameter interaction. However, the existing technical system still suffers from three structural defects: privacy leakage risk, imbalance of computational efficiency, and vulnerability of model security. Traditional solutions rely solely on differential privacy or static encryption technology in the feature extraction stage, making it difficult to balance privacy protection and model performance. For example, mainstream models such as ResNet have a success rate of up to 80% against member inference attacks, while the Top-1 accuracy of ImageNet tasks generally drops by 5-10% after introducing differential privacy. More seriously, non-independent and identically distributed data in horizontal federation scenarios amplify the privacy leakage effect. Experiments show that only 10% node feature leakage is needed to reconstruct complete identity information, making the privacy budget accumulation problem in dynamic training environments a key factor in long-term protection failure.
[0003] In visual data processing scenarios, existing encryption mechanisms are significantly disconnected from model training processes. While traditional encryption algorithms can ensure data transmission security, their strong irreversibility leads to excessive blurring of image texture features, making it impossible for classification models to effectively extract key points of the human skeleton in OpenPose format. For example, when using 256-bit AES encryption, the correlation ratio (rr) between adjacent pixels can reach over 0.7, far exceeding the 0.05 threshold required by the ISO / IEC 27701 standard. This directly disrupts the local gradient distribution characteristics of facial action units, resulting in a loss of over 30% in emotion classification accuracy. Although Paillier homomorphic encryption supports ciphertext domain operations, its computational overhead increases communication latency for models such as ResNet50 by 230 times and causes GPU utilization to plummet to 40%, exposing a sharp contradiction between privacy protection and computational efficiency. Summary of the Invention
[0004] This invention discloses an emotion classification system based on encryption algorithms and generative adversarial networks, the specific method of which is as follows:
[0005] A hybrid encryption framework using SM9 identifier cipher and ECDHE key exchange is employed to encrypt user facial data;
[0006] Optimize the adaptive balance between encryption strength and recognition performance;
[0007] Based on encrypted facial data, virtual encrypted data is generated using a generative adversarial network, and an emotion classification model is trained.
[0008] Emotion classification is performed using a pre-trained emotion classification model.
[0009] Furthermore, a hybrid encryption framework combining SM9 identifier cipher and ECDHE key exchange is used to encrypt user facial data. The specific method is as follows:
[0010] Let G1 and G2 be additive cyclic groups, G T For a multiplicative cyclic group, the bilinear pair mapping e: G1 × G2 → G T The condition e(aP,bQ) = e(P,Q) is satisfied. ab (in SM9 maps user identity IDs directly to public keys Q. ID =H1(ID);
[0011] Define encryption strength adjustment function in The image gradient vector has a numerator that specifically refers to the local gradient associated with facial action units.
[0012] By adjusting the SM9 elliptic curve parameters a and b, the local binary mode histogram differences in the encrypted image are improved. Satisfying ΔH<θ LBP
[0013] Constraining the correlation between adjacent pixels Where cov(x,y) is the covariance, and D(x) and D(y) are the variances;
[0014] The multi-objective optimization problem can be expressed in Lagrange multiplier form as follows:
[0015]
[0016] in, For encryption delay, m and n are operands, f clk =250MHz is the hardware operating frequency, and the hyperparameters λ1=0.5 and λ2=0.3 are determined through Pareto front analysis.
[0017] Furthermore, when encrypting user facial data, SM9 encryption with AES-256 key is used for highly sensitive areas, with encryption strength α. high =1; Low-sensitivity areas use RC4 stream encryption, α low =0.5;
[0018] Introducing a dynamic key generation mechanism:
[0019]
[0020] Among them SKbase For SM9 master key, AU i For the action unit strength, the weight w i Based on the contribution of micro-expressions in the FACS system.
[0021] Furthermore, highly sensitive areas include the periorbital region and the periorbital region.
[0022] Furthermore, the adaptive balance between encryption strength and recognition performance is optimized, and the specific method is as follows:
[0023] Image quality assessment metric Q for encrypted data enc And the gradient penalty term of the discriminator in a generative adversarial network Given the two constraints, we construct the following joint optimization objective:
[0024]
[0025] Where θ represents the encryption algorithm parameters, D KL Let Acc be the KL divergence of the image distribution before and after encryption. cls λ1, λ2, and λ3 represent the accuracy of the emotion classification model on the validation set, and λ1, λ2, and λ3 are dynamic weight coefficients.
[0026] When the model converges, if Acc cls If a threshold is set, the weight of λ3 will be automatically increased, causing the encryption algorithm to reduce the pixel correlation r to the range of 0.05±0.02. At the same time, the local sensitivity map output by the discriminator will guide the selection of the blurred area.
[0027] If the discriminant's accuracy in distinguishing between encrypted data and virtual data is A disc >0.75, enhance the texture perturbation strength of the encryption algorithm, specifically by increasing the block size Δb of the CBC mode in the block cipher or increasing the pseudo-random sequence complexity σ of the stream cipher; conversely, if A disc If the value is less than 0.55, the encryption process should be simplified to reduce computational overhead.
[0028] A dual validation metric is introduced, as follows:
[0029] Privacy risk Where p(y) i |x i ) represents the probability of successfully recovering identity information from the reconstruction model;
[0030] Feature fidelity Where φ(·) is the 512-dimensional feature vector extracted by ResNet-18;
[0031] When R leak >F featWhen the value is greater than 0, the encrypted parameter backtracking mechanism is triggered, and the Pareto optimal solution is searched in the parameter space Θ using the Bayesian optimization framework.
[0032] Furthermore, virtual encrypted data is generated through generative adversarial networks, specifically as follows:
[0033] By co-training an improved U-Net generator and a dynamic attention discriminator, the dual goals of irreversible texture replacement and emotional feature preservation are achieved.
[0034] The generator uses encrypted face feature vectors z∈R d Given the emotion label y∈{1,2,…,K} as input, the output satisfies the target domain distribution. The virtual data, while the discriminator uses spatial attention weights g h (i),g w (j) Dynamically divide the region into high and low sensitivity areas, and apply Gaussian blurring to the low-weight region to suppress identity information leakage; formalize it into a minimax optimization problem:
[0035]
[0036] Where p data Let p(y) be the prior distribution of the encrypted data, and p(y) be the distribution of the emotion category.
[0037] The network design introduces a multi-scale feature fusion mechanism: the generator adopts the U-Net architecture, extracts multi-scale features through the encoder, and fuses them with the decoder through skip connections to retain detailed information;
[0038] The generator's loss function combines Wasserstein distance and gradient penalty terms:
[0039]
[0040] Where λ gp The gradient penalty coefficient is... To generate interpolated data along the sample path;
[0041] The discriminator combines a coordinate attention mechanism to accurately locate key points in the horizontal and vertical directions, and constructs feature vectors of major axis X, minor axis Y, and angle θ based on the external ellipse parameters of the human body. It then uses an MLP classifier to detect complex action features.
[0042] Furthermore, a generative adversarial network is trained, employing a dynamic blurring strategy to handle complex scenes involving head turning and occlusion. The specific method is as follows:
[0043] Using the spatial attention weights g output by the CA module h (i) and g w(j) Dynamically divide high and low weight regions, apply Gaussian blur to low weight regions to suppress noise, and adaptively adjust the threshold according to the occlusion state to enhance the attention weight of unoccluded regions.
[0044] This strategy is reflected in the regularization term of the loss function:
[0045]
[0046] in Let θ be the gradient of the image in frame t. t Let λ be the elliptic parameter. θ This is the balance coefficient;
[0047] To verify the validity of the generated data, an evaluation framework based on Paillier homomorphic encryption is constructed: the generated sample x ' Element-wise encryption is performed into a ciphertext vector x” = [E(x'1),…,E(x'n)]. The cloud can then directly perform aggregation operations on the ciphertext without decryption.
[0048] By introducing the differential privacy mechanism of DP-SeqGAN, noise perturbation is added during generator training: This ensures that the generated data satisfies (∈,δ)-differential privacy;
[0049] Let the global model parameters in round t be W. t Based on encryption gradient Perform noisy model updates:
[0050]
[0051] in The adaptive learning rate is Δf, the gradient sensitivity is σ. 2 Determined by the privacy budget (∈,δ); through the distributed residual correction term R t To compensate for the accuracy loss introduced by noise, the final model parameters satisfy:
[0052] |W t+1 -W t | ∞ ≤τ and Verify sig (H(W t+1 ),Σ t =True
[0053] Where τ is the model mutation threshold, Σ t For multi-party digital signatures.
[0054] Furthermore, emotion classification is performed using the trained emotion classification model, specifically as follows:
[0055] First, the encrypted data is semantically segmented and texture replaced using an improved U-Net generative adversarial network, while preserving the human skeleton key points in OpenPose format. Then, the facial action units are accurately located in the horizontal and vertical directions using a coordinate attention mechanism. Finally, emotion classification is achieved using an MLP classifier.
[0056] The emotion classification model is built on the Hourglass network and MLP classifier. It captures multi-scale facial contours and local details by stacking convolutional layers and dynamically divides high-sensitivity regions using a coordinate attention mechanism.
[0057] Let the input feature vector be x = [x1, x2, ..., xn]. n The classifier is mapped to an emotion probability distribution via a multilayer perceptron:
[0058] p(y|x)=Softmax(W (L) σ(W (L-1) …σ(W (1) x+b (1) )...)+b (L) )
[0059] Where σ(·) is the activation function, W (l) ,b (l) For the parameters of the l-th layer;
[0060] During the model training phase, a dynamic fuzzification strategy is employed: utilizing the spatial attention weights g output by the CA module. h (i),g w (j) Divide into high and low weight regions, apply Gaussian blur to the low weight region to suppress noise, and adaptively adjust the threshold according to the occlusion state to enhance the attention weight of the unoccluded region.
[0061] The model introduces spatiotemporal consistency constraints and gradient projection operators: smoothing blurred regions between video frames and calibrating spatial alignment using external ellipse parameters to avoid misjudgment of motion jitter; and using gradient projection... Limiting gradient sensitivity Combined with differential privacy noise With residual correction term Dynamically balance privacy budget (∈,δ) with model performance;
[0062] The final classification result is generated using the following mixed precision update mechanism:
[0063]
[0064] in, Dynamically adjust the weights of noise and correction terms;
[0065] Through secure aggregation protocol and multi-party digital signature
[0066] Due to the adoption of the above technical solutions, the present invention has the following beneficial effects:
[0067] 1. This invention innovatively constructs a dual privacy enhancement pipeline: First, pixel-level semantic segmentation is achieved through an improved U-Net generative adversarial network. While preserving the external ellipse parameters and key point topology of the human body, an irreversible texture replacement is performed on the facial region using a blurring strategy guided by a dynamic attention mechanism. This design not only eliminates identity-sensitive information but also maintains the integrity of action features through a multi-scale feature fusion mechanism—experiments show that the LBP histogram difference ΔH on the FER2013 dataset can be controlled within 0.18, meeting the performance benchmark of an F1 score of 0.85 for emotion recognition. Subsequently, a hybrid encryption framework is introduced, whose 256-bit key strength provides security equivalent to 3072-bit RSA, while improving signature verification speed by 40%, solving the feature distortion problem caused by traditional encryption.
[0068] 2. This invention proposes a virtual data-driven model training paradigm, constructing a virtual sample library aligned with the distribution of encrypted data through a generative adversarial network (GAN). The core value of this mechanism lies in solving the domain offset problem between encrypted and plaintext data: when a classification model is directly applied to encrypted video, traditional encryption algorithms destroy the image gradient distribution characteristics, leading to significant performance degradation in the feature extractor. However, the virtual data generated by this invention using an improved GAN inherits the mathematical security characteristics of encrypted data while preserving the local texture features of action units, enabling the classification model to establish robust feature mapping relationships during the encrypted domain training phase. This pre-training strategy reduces the model adaptation cost for encrypted data by 60% and provides a reliable gradient verification foundation for subsequent secure multi-party computation protocols. Finally, through the collaborative mechanism of Paillier homomorphic encryption and secure multi-party computation, encrypted aggregation operations are directly executed in the cloud, and gradient integrity is verified, constructing an end-to-end protection system covering the entire process of data acquisition, model training, and parameter aggregation.
[0069] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0070] The accompanying drawings of this invention are described below.
[0071] Figure 1 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0072] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0073] A sentiment classification system based on cryptographic algorithms and generative adversarial networks, such as Figure 1 As shown, the specific steps are as follows:
[0074] S1. The user's facial data is encrypted using a hybrid encryption framework that combines SM9 identifier cipher with ECDHE key exchange.
[0075] This step requires constructing a dual-constraint model based on mathematical security and feature preservation. First, a hybrid encryption framework combining SM9 identifier cryptography and ECDHE key exchange is adopted. Its core principle lies in ensuring security using the computational complexity of elliptic curve bilinear pairing and the discrete logarithm problem. Let G1 and G2 be additive cyclic groups, G... T For a multiplicative cyclic group, the bilinear pair mapping e: G1 × G2 → G T The condition e(aP,bQ) = e(P,Q) is satisfied. ab (in SM9 maps user identity IDs directly to public keys Q. ID =H1(ID), avoiding the overhead of certificate management in traditional PKI systems. Compared to the RSA algorithm, SM9 provides the equivalent security strength of 3072-bit RSA with a 256-bit key length, and improves signature verification speed by 40%. Based on this, the ECDHE protocol is introduced to ensure forward security: if the order of the base point G is a prime number n, the private keys of both communicating parties... Public keys A = aG, B = bG are generated, and shared keys K = aB = bA. Even if the keys are leaked long-term, the historical session keys cannot be derived.
[0076] To address the need for facial emotion feature protection, a parameter optimization model needs to be constructed to achieve a dynamic balance between encryption strength and feature preservation. This involves defining an encryption strength adjustment function. in This represents the image gradient vector, with the numerator specifically referring to the local gradient associated with the facial motion unit (AU), such as the mouth corner stretching region. By adjusting the SM9 elliptic curve parameters a and b, the local binary mode (LBP) histogram difference of the encrypted image is optimized. Satisfying ΔH<θ LBP Experiments show that when θ LBP At a value of 0.18, the emotion classification accuracy loss for the FER2013 dataset does not exceed 5%. Meanwhile, to meet the ISO / IEC 27701 standard, the correlation between adjacent pixels needs to be constrained. Where cov(x,y) is the covariance, and D(x) and D(y) are the variances. This multi-objective optimization problem can be expressed in Lagrange multiplier form:
[0077]
[0078] in For encryption delay, m and n are operands, f clk =250MHz is the hardware operating frequency, and the hyperparameters λ1=0.5 and λ2=0.3 are determined through Pareto front analysis.
[0079] Furthermore, a regional sensitivity optimization strategy is proposed: for highly sensitive areas, such as the periorbital region and periorbital region, SM9 encryption of AES-256 keys is used, with an encryption strength α. high =1; Low-sensitivity areas use RC4 stream encryption, α low =0.5. This hierarchical mechanism reduces computation by 60% while introducing a dynamic key generation mechanism:
[0080]
[0081] Among them SK base For SM9 master key, AU i The intensity of the action unit, ranging from 0 to 5, with a weight w. i Based on the micro-expression contribution settings of the FACS system, such as the AU12's mouth corner stretching weight of 0.8, experimental verification shows that this solution achieves sub-millisecond latency on FPGA, with an average of 0.78ms. After encryption, the correlation between adjacent pixels is reduced to 0.008, and the emotion recognition F1 score remains at 0.85, meeting the ISO / IEC 27001 certification standard.
[0082] S2. Optimize the adaptive balance between encryption strength and recognition performance.
[0083] This step achieves an adaptive balance between encryption strength and recognition performance through multi-objective constraint equations, resolving the binary opposition between privacy protection and feature preservation in encryption algorithms. Specifically, this module uses the image quality evaluation metric Q of the encrypted data. enc And the gradient penalty term of the discriminator in a generative adversarial network Given the two constraints, we construct the following joint optimization objective:
[0084]
[0085] Where θ represents encryption algorithm parameters, such as AES key length, block cipher mode, and stream cipher initial value, D KL Let Acc be the KL divergence of the image distribution before and after encryption. cls Let λcc represent the accuracy of the emotion classification model on the validation set, and λ1, λ2, and λ3 be dynamic weight coefficients. The core logic of this equation is: when the model converges, if Acc... clsIf a threshold is set, the weight of λ3 will be automatically increased, causing the encryption algorithm to reduce the pixel correlation r to the range of 0.05±0.02. At the same time, the local sensitivity map output by the discriminator will guide the selection of the blurred area.
[0086] The encryption parameter adjustment follows the following feedback mechanism: if the discriminator's accuracy in distinguishing between encrypted data and virtual data is A... disc A value >0.75 indicates a domain offset between the encryption feature and the generated data. In this case, the texture perturbation strength of the encryption algorithm needs to be enhanced, specifically by increasing the block size Δb of the CBC mode in the block cipher or increasing the pseudo-random sequence complexity σ of the stream cipher; conversely, if A... disc If the value is less than 0.55, the encryption process is simplified to reduce computational overhead. This dynamic balancing strategy ensures that the encryption parameters are always within the feasible range of "privacy protection threshold - model performance lower bound".
[0087] To quantitatively evaluate the effectiveness of encryption optimization, a dual verification metric is introduced:
[0088] 1. Privacy leakage risk Where p(y) i |x i ) represents the probability of successfully recovering identity information from the reconstruction model;
[0089] 2. Feature fidelity Where φ(·) is the 512-dimensional feature vector extracted by ResNet-18. When R leak >F feat When the value is greater than 0, a backtracking mechanism for encryption parameters is triggered, employing a Bayesian optimization framework to search for a Pareto optimal solution in the parameter space Θ. Experiments show that this method can control the LBP histogram difference ΔH of encrypted data within 0.18 on the FER2013 dataset, while maintaining the loss in emotion classification accuracy to no more than 5%. This optimization step forms a closed-loop feedback with subsequent steps: the confusion matrix index of the classification model, such as the F1-score, guides the sensitive region division of the encryption parameters, while the attention weight distribution of the generative adversarial network determines the spatial sampling strategy of the encryption algorithm. For example, when the recall rate of the classification model for anger drops by more than 10%, the system dynamically adjusts the local blurring parameters of the encryption algorithm, reducing the Gaussian kernel radius σ of the eye region. h Up to 1.5 pixels, while enhancing the texture perturbation intensity of the mouth contour. This cross-module collaborative mechanism breaks through the traditional "one-size-fits-all" processing paradigm of encryption algorithms, and achieves a dynamic balance between data availability and security within the ISO / IEC 27701 privacy standard framework.
[0090] S3. Based on the encrypted facial data, generate virtual encrypted data through a generative adversarial network and train an emotion classification model.
[0091] Based on encrypted facial data, virtual encrypted data is generated using a Generative Adversarial Network (GAN) to train an emotion classification model. This step requires constructing a network architecture based on conditional generation and privacy enhancement. Its core lies in achieving the dual goals of irreversible texture replacement and emotion feature preservation through the collaborative training of an improved U-Net generator and a dynamic attention discriminator. Specifically, the generator uses encrypted facial feature vector z∈R... d Given the emotion label y∈{1,2,…,K} as input, the output satisfies the target domain distribution. The virtual data, while the discriminator uses spatial attention weights g h (i),g w (j) Dynamically divide the region into high- and low-sensitivity areas, and apply Gaussian blurring to the low-weight areas to suppress identity information leakage. This process can be formalized as a minimax optimization problem:
[0092]
[0093] Where p data Let p(y) be the prior distribution of the encrypted data and the emotion category distribution. To enhance the privacy and usability of the generated data, the network design introduces a multi-scale feature fusion mechanism: the generator adopts a U-Net architecture, extracting multi-scale features through the encoder and fusing them with the decoder through skip connections to preserve detailed information. Simultaneously, the generator's loss function incorporates Wasserstein distance and a gradient penalty term to stabilize the training process and improve generation quality.
[0094]
[0095] Where λ gp The gradient penalty coefficient is... To generate interpolated data along the sample path, the discriminator combines a coordinate attention mechanism to accurately locate key points in the horizontal and vertical directions, and constructs feature vectors such as the major axis X, minor axis Y, and angle θ based on the external ellipse parameters of the human body. This is then used by an MLP classifier to detect complex action features.
[0096] During training, a dynamic blurring strategy is used to handle complex scenarios such as head turning and occlusion: First, the spatial attention weights g output by the CA module are utilized. h (i) and g w (j) Dynamically divide the video into high-weight and low-weight regions. Apply Gaussian blur to the low-weight regions to suppress noise. Simultaneously, based on the occlusion status, such as a decrease in the confidence of head key points, adaptively adjust the threshold to enhance the attention weight of unoccluded regions, such as the lower limbs. Furthermore, through spatiotemporal consistency constraints, smooth the blurred regions between video frames and use external ellipse parameters to calibrate spatial alignment, avoiding misjudgments due to motion jitter. This strategy is reflected in the regularization term of the loss function:
[0097]
[0098] in Let θ be the gradient of the image in frame t. t Let λ be the elliptic parameter. θ The balancing coefficient is used. To verify the validity of the generated data, an evaluation framework based on Paillier homomorphic encryption is constructed: the generated sample x is... ' Element-by-element encryption into a ciphertext vector x”=E[(x'1),…,E(x') n In the cloud, aggregation operations can be performed directly on ciphertext without decryption. The evaluation process is ensured to comply with the security requirements of federated learning. Experiments show that the method achieves a sentiment classification accuracy loss of no more than 5% on the FER2013 dataset, while the neighbor-pixel correlation r decreases to 0.008, meeting the ISO / IEC 27701 standard. Furthermore, a differential privacy mechanism from DP-SeqGAN is introduced to add noise perturbation during generator training. This ensures that the generated data satisfies (∈,δ)-differential privacy, further reducing the success rate of member inference attacks to below 0.5.
[0099] Ultimately, the emotion classification model achieves efficient convergence through a mixed-precision dual-channel update mechanism: Let the global model parameters in the t-th round be W. t Based on encryption gradient Perform noisy model updates:
[0100]
[0101] in The adaptive learning rate is Δf, the gradient sensitivity is σ. 2 Determined by the privacy budget (∈,δ). Through the distributed residual correction term R t To compensate for the accuracy loss introduced by noise, the final model parameters satisfy:
[0102] |W t+1 -W t | ∞ ≤τ and Verify sig (H(W t+1 ),Σ t =True,
[0103] Where τ is the model mutation threshold, Σ t Multi-party digital signatures ensure the stability and decentralized trust of the training process.
[0104] S4. Classify emotions using the trained emotion classification model.
[0105] Initial encrypted facial data is input into a trained classification model for emotion judgment. At this stage, an inference framework based on multi-scale feature fusion and differential privacy protection needs to be constructed. This process first uses an improved U-Net generative adversarial network to perform semantic segmentation and texture replacement on the encrypted data, preserving the human skeletal keypoints in OpenPose format. Then, a coordinate attention mechanism is used to accurately locate facial action units (AUs) in the horizontal and vertical directions. Finally, an MLP classifier is used to achieve emotion classification. Specifically, the encoder of the generative adversarial network extracts multi-scale features and fuses them with the decoder through skip connections, preserving detailed information. The generator, through adversarial training, generates virtual data that meets privacy requirements. This process can be formalized as a minimax optimization problem:
[0106]
[0107] Where p data Let p(y) be the prior distribution of the emotion category, representing the encrypted data distribution. The generator outputs virtual data. To ensure the integrity of emotion features, the correlation between adjacent pixels (r) must be less than 0.05 and the difference in the LBP histogram (ΔH) must be less than 0.18. The classification model is built upon an Hourglass network and an MLP classifier. It captures multi-scale facial contours and local details through stacked convolutional layers and dynamically segments highly sensitive regions using a coordinate attention mechanism. Let the input feature vector be x = [x1, x2, ..., x...]. n The classifier is mapped to an emotion probability distribution via a multilayer perceptron:
[0108] p(y|x)=Softmax(W (L) σ(W (L-1) …σ(W (1) x+b (1) )...)+b (L) ),
[0109] Where σ(·) is the activation function, W (l) ,b (l) These are the parameters for the l-th layer. During model training, a dynamic fuzzification strategy is employed: utilizing the spatial attention weights g output by the CA module. h (i),g w (j) The model divides the data into high-weight and low-weight regions. Gaussian blur is applied to the low-weight regions to suppress noise. Simultaneously, based on occlusion status (e.g., decreased confidence of eye keypoints), the threshold is adaptively adjusted to enhance the attention weight of unoccluded regions, such as the chin contour. To improve classification accuracy, the model introduces spatiotemporal consistency constraints and gradient projection operators: smoothing blurred regions between video frames and calibrating spatial alignment using external ellipse parameters to avoid misjudgments due to motion jitter; and using gradient projection... Limiting gradient sensitivity Combined with differential privacy noise With residual correction term A dynamic balance is struck between the privacy budget (∈,δ) and model performance. The final classification result is generated through the following hybrid accuracy update mechanism:
[0110]
[0111] in The weights of noise and correction terms are dynamically adjusted. Experimental results show that on the FER2013 dataset, the method's emotion classification accuracy loss does not exceed 5%, and the correlation between adjacent pixels (r = 0.008) meets the ISO / IEC 27701 standard. Furthermore, a secure aggregation protocol and multi-party digital signatures are used. This ensures that the model update process complies with the decentralized trust requirements of federated learning. This process achieves deep anonymization of encrypted data, significantly improving privacy protection and system robustness in scenarios such as medical image analysis and intelligent monitoring.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A sentiment classification system based on encryption algorithms and generative adversarial networks, characterized in that, The specific method is as follows: A hybrid encryption framework using SM9 identifier cipher and ECDHE key exchange is employed to encrypt user facial data; Optimize the adaptive balance between encryption strength and recognition performance; Based on encrypted facial data, virtual encrypted data is generated using a generative adversarial network, and an emotion classification model is trained. Emotion classification is performed using a pre-trained emotion classification model; The adaptive balance between encryption strength and recognition performance is optimized as follows: Image quality evaluation metrics for encrypted data And the gradient penalty term of the discriminator in a generative adversarial network Given the two constraints, we construct the following joint optimization objective: in Indicates encryption algorithm parameters, The KL divergence of the image distribution before and after encryption. The accuracy of the emotion classification model on the validation set. These are dynamic weighting coefficients; When the model converges, if Set a threshold, and it will automatically increase. Weights, prompting the encryption algorithm to reduce pixel correlation. to The range is determined, and the selection of the blurred region is guided by the local sensitivity map output by the discriminator. If the discriminator's accuracy in distinguishing between encrypted data and virtual data is... To enhance the texture perturbation strength of encryption algorithms, specifically by increasing the block size of the CBC mode in block ciphers. Or improve the pseudo-random sequence complexity of stream ciphers. Conversely, if If so, the encryption process should be simplified appropriately to reduce computational overhead; A dual validation metric is introduced, as follows: Privacy risk ,in The probability of successfully recovering identity information from the reconstructed model; Feature fidelity ,in The 512-dimensional feature vector extracted for ResNet-18; when When this is triggered, an encrypted parameter backtracking mechanism is established, employing a Bayesian optimization framework in the parameter space. Search for the Pareto optimal solution in the middle; The virtual encrypted data is generated using a generative adversarial network, as follows: By co-training an improved U-Net generator and a dynamic attention discriminator, the dual goals of irreversible texture replacement and emotional feature preservation are achieved. The generator uses encrypted facial feature vectors and emotion tags The input and output satisfy the target domain distribution. The virtual data, while the discriminator uses spatial attention weights. Dynamically divide the region into high- and low-sensitivity areas, and apply Gaussian blurring to the low-weight region to suppress identity information leakage; formalize it as a minimax optimization problem: in For encrypted data distribution, For the prior distribution of emotion categories; The network design introduces a multi-scale feature fusion mechanism: the generator adopts the U-Net architecture, extracts multi-scale features through the encoder, and fuses them with the decoder through skip connections to retain detailed information; The generator's loss function combines Wasserstein distance and gradient penalty terms: in The gradient penalty coefficient is... To generate interpolated data along the sample path; The discriminator combines a coordinate attention mechanism to accurately locate key points in the horizontal and vertical directions, and constructs the major axis based on the parameters of the human external ellipse. short axis ,angle Feature vectors are used to detect complex action features through an MLP classifier.
2. The emotion classification system based on encryption algorithms and generative adversarial networks as described in claim 1, characterized in that, A hybrid encryption framework using SM9 identifier cipher and ECDHE key exchange is employed to encrypt user facial data. The specific method is as follows: set up It is an additive cyclic group. For a multiplicative cyclic group, a bilinear pairing mapping satisfy (in ), SM9 uses user identity tokens Directly mapped to public key ; Define encryption strength adjustment function ,in The image gradient vector has a numerator that specifically refers to the local gradient associated with facial action units. By adjusting the SM9 elliptic curve parameters This makes the local binary pattern histogram difference of the encrypted image satisfy Constraining the correlation between adjacent pixels ,in For covariance, For variance; The multi-objective optimization problem can be expressed in Lagrange multiplier form as follows: in, For encryption delay, For operands, Hardware operating frequency, hyperparameters Determined through Pareto front analysis.
3. The emotion classification system based on encryption algorithms and generative adversarial networks as described in claim 2, characterized in that, When encrypting user facial data, SM9 encryption with AES-256 key is used for highly sensitive areas, and the encryption strength is [not specified]. The low-sensitivity area uses RC4 stream encryption. ; Introducing a dynamic key generation mechanism: in For SM9 master key, For action unit strength, weight Based on the contribution of micro-expressions in the FACS system.
4. The emotion classification system based on encryption algorithms and generative adversarial networks as described in claim 2, characterized in that, Highly sensitive areas include the area around the eyes and the area around the mouth.
5. The emotion classification system based on encryption algorithms and generative adversarial networks as described in claim 1, characterized in that, A generative adversarial network is trained, and a dynamic blurring strategy is used to handle complex scenes such as head turning and occlusion. The specific method is as follows: Spatial attention weights output by the CA module and Dynamically divide high and low weight regions, apply Gaussian blur to low weight regions to suppress noise, and adaptively adjust the threshold according to the occlusion status to enhance the attention weight of unoccluded regions. This strategy is reflected in the regularization term of the loss function: in For the first Frame image gradient, For ellipse parameters, This is the balance coefficient; To verify the validity of the generated data, an evaluation framework based on Paillier homomorphic encryption is constructed: the generated samples are... Encrypting element by element into a ciphertext vector The cloud can perform aggregation operations on the ciphertext directly without decryption. ; By introducing the differential privacy mechanism of DP-SeqGAN, noise perturbation is added during generator training: This ensures that the generated data meets the requirements. -Differential privacy; Let the first The global model parameters are Based on encryption gradient Perform noisy model updates: in For adaptive learning rate, For gradient sensitivity, Privacy Budget Decision; through distributed residual correction terms To compensate for the accuracy loss introduced by noise, the final model parameters satisfy: in This is the mutation threshold for the model. For multi-party digital signatures.
6. The emotion classification system based on encryption algorithms and generative adversarial networks as described in claim 5, characterized in that, Emotion classification is performed using a pre-trained emotion classification model. The specific method is as follows: First, the encrypted data is semantically segmented and texture replaced using an improved U-Net generative adversarial network, while preserving the human skeleton key points in OpenPose format. Then, the facial action units are accurately located in the horizontal and vertical directions using a coordinate attention mechanism. Finally, emotion classification is achieved using an MLP classifier. The emotion classification model is built on the Hourglass network and MLP classifier. It captures multi-scale facial contours and local details by stacking convolutional layers and dynamically divides high-sensitivity regions using a coordinate attention mechanism. Let the input feature vector be The classifier is mapped to an emotion probability distribution through a multilayer perceptron: in For activation function, For the first Layer parameters; During the model training phase, a dynamic fuzzification strategy is employed: utilizing the spatial attention weights output by the CA module. The system divides regions into high and low weight regions, applies Gaussian blur to the low weight regions to suppress noise, and adaptively adjusts the threshold according to the occlusion status to enhance the attention weight of the unoccluded regions. The model introduces spatiotemporal consistency constraints and gradient projection operators: smoothing blurred regions between video frames and calibrating spatial alignment using external ellipse parameters to avoid misjudgment of motion jitter; and using gradient projection... Limiting gradient sensitivity Combined with differential privacy noise With residual correction term Dynamically balancing privacy budgets With model performance; The final classification result is generated using the following mixed precision update mechanism: in, Dynamically adjust the weights of noise and correction terms; Through secure aggregation protocol and multi-party digital signature .
Citation Information
Patent Citations
Emotion difference privacy protection method based on generative adversarial network
CN111666588A
Face anonymous image generation and recognition method based on identity relation maintenance
CN115131465A