Face region selective encryption method based on CNN and chaotic system

By employing a face region selective encryption method based on CNN and chaotic systems, face regions and non-face regions are accurately segmented. Multi-level encryption and lightweight XOR encryption are used to solve the problems of wasted computing resources and limited key space in existing technologies, thus achieving efficient and secure image encryption.

CN121786856APending Publication Date: 2026-04-03TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing image encryption schemes encrypt the entire image with the same complexity, resulting in wasted computing resources and low efficiency, making it difficult to meet the needs of real-time or large-scale processing. At the same time, the key space is limited, and the resistance to attacks is weak.

Method used

A multi-task cascaded convolutional network is used to segment face regions and non-face regions. Selective encryption is performed based on CNN and chaotic system. Multi-level encryption is performed on face regions, while lightweight XOR encryption is used on non-face regions. Combining feature extraction and key generation, a three-dimensional multi-module nonlinear feedback coupled chaotic system and two-dimensional logical mapping model are used to generate key stream.

Benefits of technology

It achieves efficient and secure image encryption, reduces computational redundancy, expands the key space, enhances resistance to attacks, and ensures the security and encryption efficiency of facial privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786856A_ABST
    Figure CN121786856A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of image encryption and privacy protection, particularly relates to a face region selective encryption method based on a CNN and a chaotic system, and aims to realize efficient and safe encryption of a portrait image. The method comprises the following steps: detecting a portrait image by adopting a multi-task cascade convolutional network, obtaining bounding box coordinates of a face region, segmenting the image into the face region and a non-face region according to the bounding box coordinates, and recording position information corresponding to the bounding box coordinates. And extracting a feature vector from the face region obtained by segmentation based on a convolutional neural network to generate a key, and performing multi-level encryption on the face region in combination with a three-dimensional multi-module nonlinear feedback coupling chaotic system. And generating a key stream by adopting a two-dimensional logic mapping model, and encrypting a non-face region through an XOR operation. And according to the position information, backfilling the encrypted face region data and the encrypted non-face region data to corresponding positions, and splicing to form a complete encrypted image and storing the complete encrypted image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image encryption and privacy protection, and in particular to a method for selective encryption of face regions based on CNN and chaotic systems. Background Technology

[0002] With the widespread application of facial recognition, social media, and digital surveillance, image data containing facial information is growing explosively. As a direct and sensitive personal biometric characteristic, the leakage of facial images poses a serious threat to personal privacy and security. Therefore, efficient and strong encryption protection for images containing facial information has become a key technological requirement for ensuring the security of the digital society.

[0003] Currently, most mainstream image encryption schemes employ chaotic systems. A typical implementation involves using a chaotic system to perform a uniform scrambling and diffusion operation on the entire image. This method first generates a pseudo-random sequence using a logistic mapping, then uses this sequence to globally scramble the pixel positions of the input image. Subsequently, another chaotic system generates a diffusion sequence, which is XORed pixel-by-pixel with the scrambled image to complete global diffusion, ultimately outputting a ciphertext image. This type of scheme leverages the initial value sensitivity and pseudo-random characteristics of chaotic systems to disrupt the statistical properties of the image, achieving a certain level of encryption.

[0004] However, encrypting the entire image with the same complexity means investing unnecessary computational resources in non-sensitive areas, resulting in a time-consuming and inefficient encryption process that fails to meet the demands of real-time or large-scale processing applications. To improve security, more complex hyperchaotic systems or nested multi-layered encryption operations are often required, further exacerbating the computational burden. Conversely, if a simple one-dimensional chaotic mapping is used in pursuit of efficiency, the key space is limited, making it less resistant to statistical analysis and differential attacks, and unable to cope with increasingly sophisticated cryptographic attacks. Summary of the Invention

[0005] The purpose of this invention is to provide a face region selective encryption method based on CNN and chaotic system, which aims to achieve efficient and secure encryption of portrait images.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a face region selective encryption method based on CNN and chaotic system, comprising: S1: using a multi-task cascaded convolutional network to detect portrait images, obtaining the bounding box coordinates of face regions, segmenting the image into privacy-sensitive face regions and non-privacy-sensitive non-face regions based on the bounding box coordinates, and recording the position information corresponding to the bounding box coordinates; S2: using a convolutional neural network to extract feature vectors from the segmented face regions to generate a key, and combining a three-dimensional multi-module nonlinear feedback coupled chaotic system to perform multi-level encryption operations on the face regions to obtain encrypted face region data; S3: using a two-dimensional logical mapping model to generate a key stream, and performing encryption on non-face regions through XOR operation to obtain encrypted non-face region data; S4: according to the position information recorded in step S1, filling the encrypted face region data obtained in step S2 and the encrypted non-face region data obtained in step S3 back into the corresponding positions, splicing them to form a complete encrypted image and storing it.

[0007] In step S1, the multi-task cascaded convolutional network is a face detection network composed of image preprocessing, candidate face generation, candidate box optimization and precise localization functional modules; the three-dimensional multi-module nonlinear feedback coupled chaotic system is a coupled chaotic system with time-varying parameter adjustment capability; and the two-dimensional logical mapping model is a nonlinear mapping model that realizes chaotic behavior by adjusting control parameters.

[0008] In step S1, the portrait image is preprocessed. Candidate face regions are generated by image pyramid construction and sliding window scanning. After candidate box size optimization and precise positioning are completed in sequence, the face bounding box coordinates are obtained by non-maximum suppression and confidence thresholding. The face region and non-face region are segmented based on the face bounding box coordinates and the position information is recorded.

[0009] The key generation process in step S2 includes: extracting facial region feature vectors based on the VGG16 network architecture, generating a public key by combining a hash function, and performing an XOR operation between the public key and a randomly generated binary private key to obtain an initial master key. The initial master key is used to provide the initial values ​​and control parameters required by the three-dimensional multi-module nonlinear feedback coupled chaotic system.

[0010] The three-dimensional multi-module nonlinear feedback coupled chaotic system in step S2 is constructed based on the Lorentz chaotic system and the Chern chaotic system, and time-varying parameters, nonlinear terms and state feedback terms are added. The three-dimensional multi-module nonlinear feedback coupled chaotic system is started by initial values ​​and control parameters.

[0011] The multi-level encryption operation in step S2 includes sequential scrambling, deoxyribonucleotide encoding, diffusion, and bit reversal operations, which complete the high-security encryption of the face region through multi-level operations.

[0012] The specific encryption process in step S3 includes: inputting the private key and splitting it to obtain the initial value, control parameters and random seed; initializing the two-dimensional logical mapping model with the initial value, control parameters and random seed and iteratively generating a chaotic sequence; forming a key stream from the chaotic sequence; and completing encryption by XORing the key stream with the non-face region image data.

[0013] The specific fusion process in step S4 includes: creating a blank canvas with the same size and format as the original portrait image; filling the encrypted face region data and encrypted non-face region data back into the corresponding positions on the canvas according to the bounding box coordinates and position information recorded in step S1; stitching them together to form a complete encrypted image and storing it.

[0014] A selective encryption method for face regions based on CNN and chaotic systems also includes an image decryption step: splitting the encrypted image into encrypted face regions and encrypted non-face regions; reconstructing a two-dimensional logical mapping model and key stream for the non-face regions using a private key, and recovering the original non-face region data through an inverse XOR operation; sequentially performing inversion, inverse diffusion, deoxyribonucleic acid inverse encoding, and inverse scrambling operations on the face regions, and recovering the original spatial positions of pixels using the inverse table of the position mapping table of a three-dimensional multi-module nonlinear feedback coupled chaotic system; and stitching together the recovered face region data and non-face region data to obtain a complete original human image.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This application provides a face region selective encryption method based on CNN and chaotic systems. It accurately segments face and non-face regions using a multi-task cascaded convolutional network, performs high-security multi-level encryption on privacy-sensitive face regions, and employs lightweight XOR encryption on non-privacy-sensitive non-face regions, forming a differentiated on-demand encryption strategy. This design avoids the computational redundancy caused by full-image high-strength encryption while ensuring the security protection strength of core privacy regions, significantly improving encryption processing efficiency. To address the high privacy requirements of facial regions, this invention designs a multi-layered encryption chain involving feature extraction, key generation, chaotic scrambling, DNA encoding, diffusion, and bit reversal. Based on a VGG16 network, a facial region-specific feature vector is extracted. This vector is then combined with a hash function to generate a public key, which is XORed with a random private key to obtain an initial master key. This ensures a strong binding between the key and facial features, preventing key reuse risks. Subsequently, scrambling disrupts pixel spatial correlation, DNA encoding enhances information hiding capabilities, and diffusion and bit reversal further disrupt data statistical patterns. This multi-layered protection creates a difficult-to-crack and tamper-proof encryption effect, completely blocking the path for unauthorized extraction or reconstruction of facial information, providing core security guarantees for personal facial privacy.

[0016] 2. The method provided in this application constructs a three-dimensional multi-module nonlinear feedback coupled chaotic system, based on a fusion design of Lorentz chaotic system and Chern chaotic system. It adds time-varying parameters, nonlinear terms, and state feedback terms, giving the system more complex chaotic trajectories and higher randomness. Simultaneously, by combining feature extraction based on a VGG16 network with an initial master key generated by XORing public and private keys, dynamically adjustable initial values ​​and control parameters are provided for the chaotic system, significantly expanding the key space and effectively resisting common attack methods such as brute-force attacks and differential attacks. Practical verification shows that the encrypted image information entropy approaches the theoretical maximum value, the key space meets high-order security standards, and the security performance is significantly better than traditional chaotic encryption schemes. Attached Figure Description

[0017] Figure 1 This is a flowchart of a face region selective encryption method based on CNN and chaotic system provided in an embodiment of this application; Figure 2 This is a schematic diagram of an experimental result provided in an embodiment of this application. Detailed Implementation

[0018] 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0019] For example, refer to Figure 1 This application provides a method for selective encryption of face regions based on CNN and chaotic systems, including: S1: A multi-task cascaded convolutional network is used to detect human images, obtain the bounding box coordinates of the face region, and segment the image into privacy-sensitive face regions and non-privacy-sensitive non-face regions based on the bounding box coordinates, and record the position information corresponding to the bounding box coordinates.

[0020] In step S1, the multi-task cascaded convolutional network is a face detection network composed of image preprocessing, candidate face generation, candidate box optimization and precise localization functional modules; the three-dimensional multi-module nonlinear feedback coupled chaotic system is a coupled chaotic system with time-varying parameter adjustment capability; and the two-dimensional logical mapping model is a nonlinear mapping model that realizes chaotic behavior by adjusting control parameters.

[0021] In step S1, the portrait image is preprocessed. Candidate face regions are generated by image pyramid construction and sliding window scanning. After candidate box size optimization and precise positioning are completed in sequence, the face bounding box coordinates are obtained by non-maximum suppression and confidence thresholding. The face region and non-face region are segmented based on the face bounding box coordinates and the position information is recorded.

[0022] As one possible implementation, the multi-task cascaded convolutional network is a three-level detection architecture, which includes generating candidate face regions through image pyramid construction and 12×12 sliding window scanning, optimizing the 24×24 size and accurately locating the 48×48 size, combining non-maximum suppression and confidence threshold filtering, outputting accurate face bounding box coordinates, and segmenting the face region and non-face region accordingly and recording the position information.

[0023] For example, in the preprocessing operation, a Gaussian filtering algorithm is used to smooth the original image, with the filter kernel size set to 3×3 and the standard deviation to 0.8, filtering out Gaussian noise and salt-and-pepper noise in the image while preserving facial contours and detailed features. The filtered image is then subjected to grayscale normalization, mapping pixel values ​​to the [0,255] range to eliminate differences in pixel value distribution caused by different shooting devices and lighting conditions. Finally, the image size is uniformly adjusted to ensure consistency in the network input format.

[0024] A multi-task cascaded convolutional network constructs an image pyramid based on the preprocessed image. It generates initial candidate face regions through multi-scale scanning: using the preprocessed image as the base layer, it scales down sequentially by a scaling factor of 0.8 to generate eight pyramid layers. The minimum size of the scaled image is no less than 60×60 pixels, ensuring coverage of faces of different sizes in the original image. For each pyramid layer, a 12×12 pixel sliding window is used to scan the entire image with a stride of 2 pixels. Each time the window slides, it extracts the texture and grayscale features of the corresponding region and inputs them into the first-stage convolutional network. The first-stage network uses a binary classification model to determine whether a window region is a face, outputting a face confidence score. Window regions with confidence scores higher than 0.5 are retained as candidate face regions, generating 1000-3000 initial candidate boxes. The coordinate mapping relationship of each candidate box in the original image is recorded.

[0025] Next, the candidate bounding boxes for all candidate face regions are uniformly scaled to 24×24 pixels to ensure consistent feature map sizes input to the second-level network. The second-level convolutional network adds two convolutional layers and one fully connected layer to the first-level network, focusing on extracting local features of key facial features (eyes, nose, mouth) to further distinguish between human faces and face-like regions. Based on the output of the second-level network, the coordinates of the candidate bounding boxes are fine-tuned (correcting the offset by ±3 pixels). Simultaneously, a confidence threshold of 0.7 is set, and candidate bounding boxes with confidence scores below this threshold are removed. After filtering, 300-500 high-quality candidate bounding boxes are retained, significantly reducing redundant information.

[0026] The candidate bounding boxes after the second-level filtering are scaled back to 48×48 pixels and input into a third-level convolutional network. This network contains 5 convolutional layers, 3 fully connected layers, and 1 regression branch. It not only outputs a face confidence score but also predicts the offset between the candidate bounding boxes and the actual face boundary. Based on the output of the regression branch of the third-level network, the x-coordinate of the top-left corner, the y-coordinate of the top-left corner, the width, and the height of the candidate bounding boxes are fine-tuned with an accuracy of ±1 pixel to ensure that the candidate bounding boxes closely fit the face contour. A higher confidence threshold of 0.85 is set, and only candidate bounding boxes with a confidence score higher than this threshold are retained. At this point, the number of remaining candidate bounding boxes is 10-30, all of which are high-confidence face region candidate bounding boxes.

[0027] The intersection-union ratio (IU) among the remaining candidate boxes is calculated, with an IU threshold of 0.3. For candidate boxes with an IU greater than this threshold, the candidate box with the highest confidence is retained, while other overlapping candidate boxes are removed to avoid the same face being detected multiple times. After non-maximum suppression, 1-5 precise face bounding box coordinates are output, with coordinate accuracy down to the pixel level. Based on the final face bounding box coordinates, the original image is segmented into privacy-sensitive face regions (regions within the bounding boxes) and non-privacy-sensitive non-face regions (regions outside the bounding boxes). Simultaneously, the coordinate information, corresponding pyramid level, confidence score, and region size of each bounding box are recorded in an XML file, providing a precise location index for subsequent image fusion steps.

[0028] S2: Based on the convolutional neural network, feature vectors are extracted from the segmented face region to generate a key. Combined with a three-dimensional multi-module nonlinear feedback coupled chaotic system, multi-level encryption operations are performed on the face region to obtain encrypted face region data.

[0029] For example, the key generation process in step S2 includes: extracting face region feature vectors based on the VGG16 network architecture, generating a 512-bit public key by combining it with a hash function, and performing an XOR operation between the public key and a randomly generated 512-bit binary private key to obtain an initial master key. The initial master key is used to provide the initial values ​​and control parameters required by the three-dimensional multi-module nonlinear feedback coupled chaotic system.

[0030] As one possible implementation, the three-dimensional multi-module nonlinear feedback coupled chaotic system in step S2 is constructed based on the Lorentz chaotic system and the Chern chaotic system, and time-varying parameters, nonlinear terms and state feedback terms are added. The three-dimensional multi-module nonlinear feedback coupled chaotic system is started by initial values ​​and control parameters.

[0031] For example, the multi-level encryption operation in step S2 includes scrambling, deoxyribonucleotide encoding, diffusion and bit reversal operations performed sequentially, thereby achieving high-security encryption of the face region through multi-level operations.

[0032] For example, the calculation formula for a three-dimensional multi-module nonlinear feedback coupled chaotic system is as follows: Where x, y, and z are state parameters. These are weighting coefficients. Here are the control parameters; L is the improved Lorentz system, and C is the improved Chern chaotic system, with the specific expression as follows: In the formula, , For time-varying parameters, , For nonlinear cross terms, For the state feedback term, its expression is: For example, the following is a specific implementation of step S2: The face region image obtained from step S1 is standardized according to the input requirements of the VGG16 network. First, the image size is adaptively adjusted to 224×224 pixels (if the original face region size is smaller than this specification, bilinear interpolation is used to complete it; if it is larger, it is cropped proportionally). Then, Z-score normalization is performed on the pixel values ​​(mean μ=0.485, standard deviation σ=0.229) to eliminate feature differences caused by lighting and shooting angle, and a standardized face image is output.

[0033] Standardized face images are input into a pre-trained VGG16 network. The parameters of the convolutional and pooling layers are frozen, and only fully connected layers are used for feature mapping. The output of the network's fc6 layer is extracted as the initial feature vector (4096 dimensions), which contains core features such as facial contours and key organ layouts. The initial feature vector is then subjected to dimensionality reduction and non-linear transformation through the fc7 layer, outputting a simplified 2048-dimensional feature vector to ensure both feature discriminability and compactness.

[0034] The SHA-512 hash function is used to encrypt the 2048-dimensional simplified feature vector. First, the feature vector is split into groups of 8 dimensions to obtain 256 groups of sub-vectors. The mean of each group of sub-vectors is calculated and then concatenated to form a 256-dimensional intermediate vector. Then, the intermediate vector is mapped to a 512-bit binary string using the SHA-512 hash function. This binary string is the public key. The public key is strongly bound to the facial region features to ensure that different faces generate a unique public key.

[0035] A cryptographically secure random number generator (CSPRNG) is used to generate a 512-bit binary private key. The private key meets the requirements of unpredictability and non-repeatability. Hardware noise, such as CPU clock jitter, is introduced into the generation process to enhance randomness. The public key and private key are XORed bitwise (0 for the same bit and 1 for different bits) to obtain a 512-bit initial master key. The initial master key is then quantized: each 64-bit binary segment is converted into a decimal floating-point number, resulting in 8 floating-point numbers. These numbers are normalized and mapped to the interval [0.001, 0.999], which are then used as parameter inputs for the subsequent chaotic system.

[0036] The eight normalized initial master key floating-point numbers are allocated as initial values ​​and control parameters for the chaotic system. Three floating-point numbers serve as the initial state values ​​of the system (x0, y0, z0), with example values ​​of x0=0.152, y0=0.437, and z0=0.891. The other five floating-point numbers are mapped to control parameters (α, β, a, b, c, d, k), where the weighting coefficient α∈[0.1, 0.9], the variable control parameter β∈[0.5, 2.0], and the basic parameters a=10, b=8 / 3, c=28, d=3, and k=0.5.

[0037] Time-varying parameter a t c t Based on dynamic timestamp updates with an update period of 10ms, the calculation formula is the same as the one mentioned above. A combination of sine and cosine functions is used to smooth parameter fluctuations, ensuring that the system's chaotic trajectory is non-repetitive and unpredictable. Nonlinear terms... , With status feedback items Referring to the formula above, the correlation between the system and the encrypted object is enhanced by introducing the weight of the dynamically adjusted term based on pixel value statistical features. Initial values, control parameters, and time-varying parameters are input into the chaotic system to initiate iterative computation. To avoid the initial transient effect affecting the sequence randomness, the results of the first 100 iterations are discarded. Starting from the 101st iteration, the state parameters (x, y, z) are recorded, iterating a total of N times (N = total number of pixels in the face region × 2, ensuring sufficient length for the chaotic sequence). Finally, three sets of chaotic sequences of length N (x, y, z) are generated. seq ,y seq ,z seq( ) and a pixel location mapping table.

[0038] Based on the sequence and mapping table output by the chaotic system, scrambling, deoxyribonucleotide encoding, diffusion, and bit reversal operations are performed sequentially to enhance encryption strength layer by layer: First, scrambling is performed to disrupt the correlation of pixel space; then, deoxyribonucleotide encoding is performed to improve information hiding ability. Diffusion is then performed to weaken the correlation of pixel values, and finally, bit reversal is performed to enhance the irreversibility of encryption. This application's embodiment ensures high security for face region encryption through a combination of feature-bound keys, a dynamic chaotic system, and multi-level encryption: the key is uniquely bound to facial features, avoiding the risk of key reuse; the time-varying parameters and coupling mechanism of the chaotic system enhance resistance to analytical attacks; the four-layer encryption operation disrupts the original image's regularity from four dimensions: spatial distribution, information encoding, numerical correlation, and bit-level features. Even if the encrypted data is subjected to brute-force attacks or differential attacks, it is difficult to recover the original facial information. Simultaneously, the inputs and outputs of each step are closely linked, ensuring the coherence and operability of the encryption process.

[0039] S3: A two-dimensional logical mapping model is used to generate a key stream. The non-face region is encrypted by XOR operation to obtain the encrypted non-face region data.

[0040] As one possible implementation, the specific encryption process of step S3 includes: inputting the private key and splitting it to obtain the initial value, control parameters and random seed; initializing the two-dimensional logical mapping model with the initial value, control parameters and random seed and iteratively generating a chaotic sequence; forming a key stream from the chaotic sequence; and completing encryption by XORing the key stream with the non-face region image data.

[0041] For example, the formula for calculating logical mapping is: in, As a control parameter, when 3.5699 < μ ≤ 4, it indicates that the mapping has complex and chaotic behavior.

[0042] For example, to ensure the compatibility between the key stream and image data during encryption, the non-face region image obtained from step S1 is first standardized. The original size ratio of the non-face region is preserved, and only the image format is converted. If the non-face region is a discrete set of multiple sub-regions, such as the background blocks around the face in a portrait image, the sub-regions are stitched together into a continuous image data block according to their original position order, and the original position index of each sub-region is recorded to facilitate accurate backfilling during subsequent fusion. Based on the 512-bit binary private key consistent with step S2, the core parameters required for the two-dimensional logical mapping model are extracted to ensure key consistency of the encryption system: the 512-bit private key is split into fixed bits, where the first 128 bits are used to generate the initial value x0 (after converting binary to decimal floating-point number and normalizing to the (0,1) interval, example value is 0.372); the middle 256 bits are used to generate the control parameter μ (after converting binary to decimal number and mapping to the (3.5699, 4] interval, ensuring the mapping has complex chaotic behavior, example value is 3.825); the last 128 bits are used as a random seed (used to initialize the starting point of the mapping iteration, avoiding the generation of repeated sequences under the same private key in different scenarios). The validity of the split parameters is checked: if the control parameter μ exceeds the (3.5699, 4] range, it is corrected to this range by linear scaling; if the initial value x0 is close to 0 or 1, the lower 8 bits of the random seed are superimposed for fine-tuning to ensure that the initial value is in the (0.1, 0.9) interval, ensuring the randomness of the chaotic sequence.

[0043] The initial value x0, control parameter μ, and random seed are input into the two-dimensional logic mapping model, where the random seed is used to set the initial number of iterations. Iterative computation is initiated according to the core rules of the two-dimensional logic mapping. The core logic of the iterative formula is to generate the chaotic value of the next time step based on the value of the previous time step and the control parameter. In the specific operation, the value of the control parameter μ (3.5699 < μ ≤ 4) ensures that the sequence possesses complex and disordered characteristics. To further enhance randomness, the results of the first 500 iterations are discarded (to avoid transient values). Valid chaotic values ​​are recorded starting from the 501st iteration, for a total of M iterations, generating a one-dimensional chaotic sequence Chaos. seq Chaos sequence seq Each element in the key is linearly normalized, mapped to the interval [0, 255], and then rounded to obtain the integer key stream Key. seq Key seq The element type is completely consistent with the image pixel value, which satisfies the calculation requirements of the XOR operation. Finally, lightweight and efficient encryption is achieved by performing a bitwise XOR operation between the key stream and the non-face region image data.

[0044] S4: Based on the location information recorded in step S1, the encrypted face region data obtained in step S2 and the encrypted non-face region data obtained in step S3 are backfilled into the corresponding positions, spliced ​​together to form a complete encrypted image and stored.

[0045] As one possible implementation, the specific fusion process in step S4 includes: creating a blank canvas with the same size and format as the original portrait image; filling the encrypted face region data and encrypted non-face region data back into the corresponding positions on the canvas according to the bounding box coordinates and position information recorded in step S1; stitching them together to form a complete encrypted image and storing it.

[0046] For example, a face region selective encryption method based on CNN and chaotic systems further includes an image decryption step: splitting the encrypted image into encrypted face regions and encrypted non-face regions; reconstructing a two-dimensional logical mapping model and key stream for the non-face regions using a private key, and recovering the original non-face region data through an inverse XOR operation; sequentially performing inversion, de-diffusion, de-encoding, and de-scrambling operations on the face regions, and recovering the original spatial positions of pixels using the inverse table of the position mapping table of a three-dimensional multi-module nonlinear feedback coupled chaotic system; and stitching together the recovered face region data and non-face region data to obtain a complete original portrait image. It is important to note that the parameters and key must be kept consistent during the decryption process, and the reverse encryption process corresponding to steps S2 to S4 must be strictly followed to ensure the correct recovery of the ciphertext image.

[0047] For example, such as Figure 2 As shown, Figure 2 This paper demonstrates the original portrait image, the encrypted image processed by the face region selective encryption method based on CNN and chaotic system provided in this application, the decrypted image, and the encrypted image and corresponding decryption results under noise attack and cropping attack. The encrypted image exhibits irregular noise, demonstrating that the differentiated strategies of multi-level encryption of the face region (scrambling, deoxyribonucleotide encoding, etc.) and XOR encryption of the non-face region effectively disrupt the original image information. The high degree of consistency between the decrypted image and the original image verifies the accuracy and reversibility of the image fusion and decryption process in step S4. Furthermore, the decrypted image after noise and cropping attacks can still reconstruct the original face content relatively well, further confirming the anti-interference characteristics of the three-dimensional multi-module nonlinear feedback coupled chaotic system and the advantages of the dual-region independent encryption design in this application. This method not only ensures high-security encryption of face privacy but also possesses strong robustness against common attacks, highlighting its practical value in real-world privacy protection scenarios.

[0048] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0049] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for selective encryption of face regions based on CNN and chaotic systems, characterized in that, include: S1: A multi-task cascaded convolutional network is used to detect human images, obtain the bounding box coordinates of the face region, and segment the image into privacy-sensitive face regions and non-privacy-sensitive non-face regions based on the bounding box coordinates, and record the position information corresponding to the bounding box coordinates; S2: Based on the convolutional neural network, feature vectors are extracted from the segmented face regions to generate a key, and combined with a three-dimensional multi-module nonlinear feedback coupled chaotic system, multi-level encryption operations are performed on the face regions to obtain encrypted face region data; S3: A two-dimensional logical mapping model is used to generate a key stream, and XOR operations are used to encrypt the non-face regions to obtain encrypted non-face region data; S4: Based on the location information recorded in step S1, the encrypted face region data obtained in step S2 and the encrypted non-face region data obtained in step S3 are backfilled into the corresponding positions, spliced ​​together to form a complete encrypted image and stored.

2. The face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, In step S1, the multi-task cascaded convolutional network is a face detection network composed of image preprocessing, candidate face generation, candidate box optimization and precise localization functional modules; the three-dimensional multi-module nonlinear feedback coupled chaotic system is a coupled chaotic system with time-varying parameter adjustment capability; and the two-dimensional logical mapping model is a nonlinear mapping model that realizes chaotic behavior by adjusting control parameters.

3. The face region selective encryption method based on CNN and chaotic system according to claim 2, characterized in that, In step S1, the portrait image is preprocessed. Candidate face regions are generated by image pyramid construction and sliding window scanning. After candidate box size optimization and precise positioning are completed in sequence, the face bounding box coordinates are obtained by non-maximum suppression and confidence thresholding. The face region and non-face region are segmented based on the face bounding box coordinates and the position information is recorded.

4. The face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, The key generation process in step S2 includes: extracting facial region feature vectors based on the VGG16 network architecture, generating a public key by combining a hash function, and performing an XOR operation between the public key and a randomly generated binary private key to obtain an initial master key. The initial master key is used to provide the initial values ​​and control parameters required by the three-dimensional multi-module nonlinear feedback coupled chaotic system.

5. A face region selective encryption method based on CNN and chaotic system according to claim 4, characterized in that, The three-dimensional multi-module nonlinear feedback coupled chaotic system in step S2 is constructed based on the Lorentz chaotic system and the Chern chaotic system, and time-varying parameters, nonlinear terms and state feedback terms are added. The three-dimensional multi-module nonlinear feedback coupled chaotic system is started by the initial value and control parameters.

6. The face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, The multi-level encryption operation in step S2 includes sequentially performing scrambling, deoxyribonucleotide encoding, diffusion, and bit reversal operations, which complete the high-security encryption of the face region through the multi-level operation.

7. A face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, The specific encryption process of step S3 includes: inputting the private key and splitting it to obtain the initial value, control parameters and random seed; initializing the two-dimensional logical mapping model with the initial value, control parameters and random seed and iteratively generating a chaotic sequence; forming a key stream with the chaotic sequence; and completing encryption by XORing the key stream with the non-face region image data.

8. A face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, The specific fusion process in step S4 includes: creating a blank canvas with the same size and format as the original portrait image; filling the encrypted face region data and encrypted non-face region data back into the corresponding positions on the canvas according to the bounding box coordinates and position information recorded in step S1; stitching them together to form a complete encrypted image and storing it.

9. A face region selective encryption method based on CNN and chaotic system according to claim 1, characterized in that, The process also includes image decryption steps: splitting the encrypted image into encrypted face regions and encrypted non-face regions; reconstructing a two-dimensional logical mapping model and key stream for the non-face regions using a private key, and recovering the original non-face region data through an inverse XOR operation; sequentially performing inversion, de-diffusion, deoxyribonucleic acid inverse encoding, and inverse scrambling operations on the face regions, and recovering the original spatial positions of pixels using the inverse table of the position mapping table of a three-dimensional multi-module nonlinear feedback coupled chaotic system; and stitching together the recovered face region data and non-face region data to obtain a complete original portrait image.