Hierarchical encryption method, system and device for privacy image and medium

By hierarchically encrypting the images, the encryption algorithm is selected according to the privacy levels of different regions, and the chaotic matrix is ​​used for calculation, the problems of high cost, low efficiency and loss of private information in the existing technology are solved, and efficient and secure Image encryption.

CN119397559APending Publication Date: 2025-02-07HARBIN UNIV OF COMMERCE
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411408136.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, image encryption usually requires unified encryption of the entire image, resulting in high encryption cost and low efficiency. Once the image is decrypted, all the privacy information of the entire image is lost, which is a high risk.

Method used

By dividing the image to be encrypted into private image areas of different degrees of importance according to the region threshold, and selecting different levels of encryption algorithms for encryption according to the privacy level of each region, the main element product operation is finally used to obtain the final encrypted image.

Benefits of technology

It improves the efficiency and security of image encryption, reduces the encryption cost, and only exposes the corresponding level of privacy information when decrypting, reducing risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397559A_ABST
    Figure CN119397559A_ABST
Patent Text Reader

Abstract

The invention discloses a hierarchical encryption method, system, device and medium for a privacy image, and relates to the technical field of image processing and information security, and the method comprises the steps: segmenting a to-be-encrypted image divided according to a region threshold, and obtaining images with privacy of different importance degrees; according to the privacy importance degree of an image region, selecting encryption algorithms of different levels to encrypt a high-privacy-level image, a middle-privacy-level image and a low-privacy-level image, and performing main element product operation by using a chaos matrix and the encrypted high-privacy-level image, middle-privacy-level image and low-privacy-level image to obtain a high-privacy-level image, a middle-privacy-level image and a low-privacy-level image; and a final encrypted image is obtained. According to the image encryption method, selective algorithm encryption is carried out on each part of the to-be-encrypted image, high-strength encryption processing does not need to be carried out on the whole image, and the encryption method is numerous, so that the encryption strength and security can be remarkably improved while the encryption efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing and information security technology, and in particular to a hierarchical encryption method, system, device and medium for private images. Background Art

[0002] With the vigorous development of information technology in the Internet era, a large number of information carriers such as images, audio, and text are widely spread on the Internet. In particular, images have become one of the most widely used media in multimedia data due to their unique ability to present and convey data clearly and intuitively.

[0003] However, the privacy content of images faces the risk of being maliciously attacked, cracked, tampered or leaked. Therefore, ensuring the confidentiality and integrity of images has become an urgent task, and encrypting image data is a direct and effective solution.

[0004] At present, traditional image encryption technology often requires uniform encryption of the entire image to make the encryption result of the entire image consistent, which invisibly increases the encryption cost and reduces the encryption efficiency. At the same time, once the image is decrypted, it means the loss of the privacy information of the entire image, and the risk is relatively large. Summary of the invention

[0005] The purpose of the present invention is to provide a hierarchical encryption method, system and device for private images in view of the above-mentioned deficiencies in the prior art, so as to solve the problem that the traditional image encryption technology at the current stage in the prior art often requires uniform encryption of the entire image to make the encryption result of the entire image consistent, which invisibly increases the encryption cost and reduces the encryption efficiency. At the same time, once the image is decrypted, it means the loss of the privacy information of the entire image, which is relatively risky.

[0006] The present invention specifically provides the following technical solution: a hierarchical encryption method for private images, comprising the following steps:

[0007] The image to be encrypted divided according to the regional threshold is segmented to obtain image regions with different privacy importance levels; the image regions with different privacy importance levels include high privacy level images greater than the maximum value of the interval threshold, low privacy level images less than the minimum value of the interval threshold, and medium privacy level images within the interval threshold;

[0008] According to the privacy importance of the image area, different levels of encryption algorithms are selected to encrypt high privacy level images, medium privacy level images and low privacy level images;

[0009] The chaotic matrix is ​​used to perform principal element product operations with the encrypted high privacy level image, medium privacy level image and low privacy level image to obtain the final encrypted image.

[0010] Preferably, segmenting the image to be encrypted divided according to the region threshold to obtain image regions with different privacy importance levels comprises the following steps:

[0011] Input the image to be encrypted into the deep learning segmentation model to obtain a cutting mask; wherein the cutting mask is a two-dimensional array;

[0012] The cutting mask is saved as an image file, and the color value of each pixel in the image file is used as a category label;

[0013] Image regions with different privacy importance levels are obtained according to their category labels.

[0014] Preferably, the encryption algorithms of different levels are selected to encrypt the high privacy level image, the medium privacy level image and the low privacy level image, specifically:

[0015] Processing the high privacy level image through DNA encoding and DNA decoding to obtain a three-dimensional array with disrupted content correlation on three channels of R, G and B, and using the three-dimensional array as the first encrypted image;

[0016] The medium privacy level image is converted from a rectangular coordinate system to a polar coordinate system, and the polar coordinates are used in dynamic rotation permutation and double diffusion to scramble the pixel spatial positions and diffusely scramble the pixel points to obtain an encrypted image, and the encrypted image is converted to a rectangular coordinate system to obtain a second encrypted image;

[0017] A three-dimensional array on three channels R, G and B of the low-privacy level image is obtained, pixel values ​​in the three-dimensional array are swapped, and the swapped pixel values ​​are combined to construct a third encrypted image.

[0018] Preferably, the high privacy level image is processed by DNA encoding and DNA decoding to obtain a three-dimensional array with disrupted content correlation on the three channels of R, G and B, and the three-dimensional array is used as the first encrypted image, including the following steps:

[0019] The high privacy level image is divided into the values ​​of three channels: R, G and B;

[0020] According to the information features of the image, the cryptographic hash function SHA512 algorithm is used to generate chaotic initial values ​​X1 and X2, and a number of new time series X1, X2 and X3 are obtained according to the initial values. The base of the new time series is selected to perform modulus to obtain chaotic key sequences {X1}, {X2} and {X3};

[0021] The three channels R, G and B are DNA-encoded according to the corresponding chaotic key sequence {X1} to obtain a new DNA encoding matrix;

[0022] Through the values ​​of the chaotic sequence {X2}, determine the XOR and XOR operation modes between the codes of the values, and perform the operations in sequence, cyclically alternating, until all pixels have completed N rounds of operations, until the correlation between the contents of the high privacy level images is completely disrupted;

[0023] According to the value of {X3} of the chaotic sequence, a DNA decoding method is selected, and the DNA sequence obtained by XOR operation in the cyclic alternation is subjected to DNA decoding to obtain a numerical matrix;

[0024] The decoded numerical matrix is ​​decomposed into three channels of R, G and B, and the decomposed three channels of R, G and B are recombined to obtain a new three-dimensional array, and the new three-dimensional array is used as the final first encrypted image.

[0025] Preferably, the step of converting the medium privacy level image from a rectangular coordinate system to a polar coordinate system, using polar coordinates in dynamic rotation permutation and double diffusion, disrupting pixel spatial positions, and performing diffusion scrambling on pixel points to obtain an encrypted image, and converting the encrypted image to a rectangular coordinate system to obtain a second encrypted image comprises the following steps:

[0026] Convert the segmented medium privacy level image from the rectangular coordinate system to the polar coordinate system to obtain the polar coordinates (r, θ) of each pixel, where r represents the distance to the origin and θ represents the angle with the x-axis;

[0027] Polar coordinates are used in dynamic rotation displacement, and a hyperchaotic system is used to generate a time series, the time series is used as a dynamic rotation angle Δθ, and for each pixel point, its polar angle θ plus Δθ is rotated, and double diffusion is performed in polar coordinates;

[0028] In the first diffusion, the time series is used as a diffusion parameter to perform a filtering diffusion on the image after rotation and displacement;

[0029] In the second diffusion, other time series generated by hyperchaos are used as diffusion parameter selection. The degree of current diffusion is controlled according to the difference between the current pixel value and the previous pixel value, and r and θ are dynamically diffused again. The cycle is repeated until all pixels are diffused and scrambled to obtain an encrypted image.

[0030] The encrypted image is converted from the polar coordinate system back to the rectangular coordinate system to obtain a second encrypted image.

[0031] Preferably, the step of obtaining a three-dimensional array on three channels R, G and B of the low privacy level image, swapping pixel values ​​in the three-dimensional array, and combining the swapped pixel values ​​to construct a third encrypted image further includes the following steps:

[0032] The low-privacy level image is divided into three channels: R, G, and B, and the pixel values ​​of each channel are stored in a one-dimensional array in sequence;

[0033] Starting from the end of the one-dimensional array, use the value of the generated chaotic time series to swap the element at the current position with the element with the subscript i; where i represents a random integer between 0 and the current array length - 1;

[0034] Repeat the steps of exchanging positions, traverse the entire array, and obtain the R, G, and B channel pixel value arrays in a disrupted order;

[0035] The scrambled pixel values ​​of the three channels of R, G and B are combined in sequence to construct an encrypted new image, which is output as a third encrypted image.

[0036] Preferably, the method of using the chaotic matrix to perform principal element product operation with the encrypted high privacy level image, medium privacy level image and low privacy level image to obtain the final encrypted image comprises the following steps:

[0037] Normalize the generated chaotic time series to obtain a random sequence between [0,1];

[0038] Divide the chaotic time series to generate several groups of elements, each group of elements contains H×W elements, and arrange each group of elements into an H×W matrix to construct a chaotic matrix; where H and W are random numbers;

[0039] The chaotic matrix is ​​subjected to principal element multiplication operation with the first encrypted image, the second encrypted image and the third encrypted image, and a modulo 256 operation is performed on the principal element multiplication result to obtain a final encrypted image.

[0040] The present invention also provides a hierarchical encryption system for private images, comprising:

[0041] A preprocessing module is used to segment the image to be encrypted divided according to the region threshold to obtain image regions with different privacy importance levels; wherein the image regions with different privacy importance levels include high privacy level images greater than the maximum value of the interval threshold, low privacy level images less than the minimum value of the interval threshold, and medium privacy level images within the interval threshold;

[0042] A hierarchical encryption module is used to select different levels of encryption algorithms to encrypt high-privacy level images, medium-privacy level images, and low-privacy level images according to the privacy importance of the image area;

[0043] The overall encryption module is used to use the chaotic matrix to perform principal element product operations with the encrypted high privacy level image, medium privacy level image and low privacy level image to obtain the final encrypted image.

[0044] The present invention also provides a computer device, including a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of the above-mentioned hierarchical encryption method for private images.

[0045] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned hierarchical encryption method for private images are implemented.

[0046] Compared with the prior art, the present invention has the following significant advantages:

[0047] After obtaining the original image, the present invention first divides the original image into multiple sub-images and divides them into privacy images of different importance according to the contents of the sub-images. According to the privacy level of the image, different encryption algorithms are selected to encrypt it. A multi-module encryption architecture is adopted, and each module corresponds to a specific encryption algorithm. Selective algorithm encryption is performed on each major module. There is no need to perform high-intensity encryption processing on the entire image. There are many encryption methods, which can significantly improve the encryption strength and security while improving the encryption efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of a hierarchical encryption method for private images provided by the present invention;

[0049] Figure 2 It is the high privacy level encryption module and its algorithm steps of the present invention;

[0050] Figure 3 It is the privacy level encryption module and its algorithm steps in the present invention;

[0051] Figure 4 This is the low privacy level encryption module and its algorithm steps of the present invention. DETAILED DESCRIPTION

[0052] The following is a clear and complete description of the technical solutions of the embodiments of the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0053] Embodiment 1:

[0054] like Figure 1As shown, an embodiment of the present invention provides a hierarchical encryption method for a private image, comprising the following steps:

[0055] Step S1: Obtain an image I to be encrypted, and segment the image I to be encrypted according to the area threshold to obtain image areas with different privacy importance levels; wherein the image areas with different privacy importance levels include a high privacy level image greater than the maximum value of the interval threshold, a low privacy level image less than the minimum value of the interval threshold, and a medium privacy level image within the interval threshold.

[0056] S1 is specifically:

[0057] The image to be encrypted is segmented according to the region threshold to obtain image regions with different privacy importance, including the following steps:

[0058] Step S11: Input the image to be encrypted into the deep learning segmentation model, and obtain the result with the cutting mask after calling the inference_model function. Save the cutting mask through the plt.imsave function. The cutting mask itself is a two-dimensional array, and the value of each pixel represents the label of the different categories to which the point belongs.

[0059] Step S12: Save the cutting mask as an image file, read and record the positions of all points with different labels through the list function to generate a text file, and use the color value of each pixel in the image file as the category label to which it belongs.

[0060] Step S13: Obtain images with different privacy importance levels according to their category labels.

[0061] Read the original image and cutting mask: According to the generated text file, read the data of the original image (three-dimensional array, whose shape is [height, width, number of channels]) and the corresponding cutting mask data (two-dimensional array).

[0062] The saved Label 0 file is represented as the road label. Its text file contains the positions of all pixels that are considered to be road categories after segmentation, in the form of (X, Y). The filling color inside the cutting mask is [128, 64, 128]. The road segmentation obtained by this segmentation is sub-image I0.

[0063] The saved Label 1 file is represented as the sidewalk label. Its text file contains the positions of all pixels that are considered to be sidewalk categories after segmentation, in the form of (X, Y). The fill color inside the cutting mask is [244, 35, 232]. The sidewalk segmentation obtained by this segmentation is sub-image I1.

[0064] The saved Label 2 file is represented as the building label. Its text file contains the positions of all pixels considered to be the building category after segmentation, in the form of (X, Y). The filling color inside the cutting mask is [70,70,70]. The building segmentation obtained by this segmentation is sub-image I2.

[0065] The saved Label 3 file is represented as a sky label. Its text file contains the positions of all pixels that are considered to be sky categories after segmentation, in the form of (X, Y). The fill color inside the cutting mask is [70, 130, 180]. The sky segmentation obtained by this segmentation is sub-image I3.

[0066] The saved Label 4 file is represented as the person label. Its text file contains the positions of all pixels that are considered to be in the person category after segmentation, in the form of (X, Y). The filling color inside the cutting mask is [220, 20, 60]. The person segmentation obtained through this segmentation is sub-image I4.

[0067] The saved Label 5 file is represented as a car label. Its text file contains the positions of all pixels that are considered to be car categories after segmentation, in the form of (X, Y). The filling color inside the cutting mask is [0, 0, 140]. The car segmentation obtained by this segmentation is sub-image I5.

[0068] According to the privacy level, the pixel label of high privacy level is represented as label4, which is the person category, the pixel label of medium privacy level is represented as label 1, label 2 and label 5, which are the sidewalk, building and car categories, and the pixel label of low privacy level is represented as label 0 and label 5, which are the road and sky categories. Through the file reading textscan() function, the coordinate value in the txt file is read and converted into a special (X, Y) format to obtain the pixel point data of each segmented area for subsequent processing and analysis. After processing, the person category is listed as the high privacy level plate, the car, building and sidewalk categories are listed as the medium privacy level plate, and the sky and road categories are listed as the low privacy level plate.

[0069] Step S2: According to the privacy importance of the image area, different levels of encryption algorithms are selected to encrypt the high privacy level image, the medium privacy level image and the low privacy level image.

[0070] S2 is specifically:

[0071] Different levels of encryption algorithms are selected to encrypt high privacy level images, medium privacy level images, and low privacy level images, specifically:

[0072] Step S21: Process the high privacy level image through DNA encoding and DNA decoding to obtain a three-dimensional array with disrupted content correlation on the three channels of R, G and B, and use the three-dimensional array as the first encrypted image. The encryption strength is high and the security is better.

[0073] S21 specifically includes the following steps:

[0074] Step S211: read all pixel points labeled person after the image to be encrypted textscan, that is, read the original image I4, and divide the high-privacy level image into values ​​of three channels of R, G and B through the image processing method img(:,:,1 / 2 / 3).

[0075] The new two-dimensional hyperchaotic system LTCC is generated by coupling the chaotic map Logistic and the tent map Tent. The specific expression is:

[0076] x(i+1)=μ×y(i)×(1-y(i)).

[0077]

[0078] Among them, x is the system state, y is the system output, μ and α are adjustable parameters, and i is a variable.

[0079] Step S212: According to the information features of the image, the cryptographic hash function SHA512 algorithm is used to generate chaotic initial values ​​X1 and X2, and the initial values ​​are brought into LTCC to obtain several new time series X1, X2 and X3, and certain processing is performed to obtain usable sequences {X1}, {X2} and {X3}; wherein the processing is to obtain the chaotic key sequence {X1}, {X2} and {X3} by selecting the base of the new time series and taking the modulus; thereby determining the DNA encoding method, or the AND operation method and the DNA decoding method of each pixel.

[0080] Step S213: DNA encode the three channels R, G and B according to the corresponding chaotic key sequence {X1} to obtain a new DNA encoding matrix. The specific encoding method is shown in Table 1.

[0081] Table 1 Encoding method

[0082]

[0083] That is, the first DNA encoding is: 00 is A, 01 is C, 10 is G, and 11 is T; the second DNA encoding is: 00 is A, 01 is C, 10 is G, and 11 is T; the third DNA encoding is: 00 is T, 01 is C, 10 is G, and 11 is A; the third DNA encoding is: 00 is T, 01 is C, 10 is G, and 11 is A; the fourth DNA encoding is: 00 is T, 01 is G, 10 is C, and 11 is A; the fifth DNA encoding is: 00 is C, 01 is A, 10 is T, and 11 is G; the sixth DNA encoding is: 00 is C, 01 is T, 10 is A, and 11 is G; the seventh DNA encoding is: 00 is G, 01 is A, 10 is T, and 11 is C; the eighth DNA encoding is: 00 is G, 01 is T, 10 is A, and 11 is C.

[0084] Step S214: Determine the XOR and XOR operations between the two encodings of the chaotic sequence {X2}, and perform the operations in sequence, alternating in a cycle, until all pixels have completed N rounds of operations, until the correlation between the high-privacy level image content is completely disrupted.

[0085] Step S215: According to the value of the chaotic sequence {X3}, a DNA decoding method is selected to perform DNA decoding on the DNA sequence obtained through the XOR synchronization operation in the DNA inner loop (in the loop alternation) to obtain its value.

[0086] Step S216: decompose the decoded numerical matrix into three channels of R, G and B, recombine the decomposed three channels of R, G and B to obtain a new three-dimensional array, and use the new three-dimensional array as the final first encrypted image.

[0087] Step S22: Convert the medium privacy level image from the rectangular coordinate system to the polar coordinate system, use the polar coordinates in dynamic rotation permutation and double diffusion, scramble the pixel spatial position, and diffuse the pixel points to obtain an encrypted image, and convert the encrypted image to the rectangular coordinate system to obtain a second encrypted image. High flexibility, more complete scrambling and diffusion effect.

[0088] S22 specifically includes the following steps:

[0089] After textscanning, all pixels labeled as sidewalk, building, and car are converted from the rectangular coordinate system to the polar coordinate system for the segmented medium privacy level images I1, I2, and I5. The polar coordinates (r, θ) of each pixel are calculated, where r represents the distance to the origin and θ represents the angle with the x-axis, to obtain a unique representation of each pixel.

[0090] Step S221: polar coordinates are used in dynamic rotation displacement, and a time series is generated using an improved hyperchaotic system. The time series is used as a dynamic rotation angle Δθ, and each pixel is rotated by adding the polar angle θ to Δθ.

[0091] That is, the improved hyperchaotic system is used to generate the time series according to the initial input parameters of the image and then process it. The specific expression is:

[0092] X i =mod(floor(abs(x*10 12 )),2π).

[0093] Among them, X i is the processing result, mod is the remainder, floor is rounding down, abs is the absolute value of the data, and x is the variable.

[0094] The obtained sequence {X4} is used as the dynamic rotation angle Δθ. For each pixel, its polar angle θ plus Δθ is rotated to obtain the new position of the pixel. The rotation angle changes according to the chaotic dynamics, and the rotation angles of different blocks are also different. This scrambling can disrupt the spatial position of pixels in the image and increase the complexity of the image.

[0095] Perform double diffusion in polar coordinates:

[0096] Step S222: In the first diffusion, the new time series {X6} generated by hyperchaos is used as the diffusion parameter to perform a filtering diffusion on the image after rotation and permutation. In addition, r and θ can also be diffused once.

[0097] Step S223: In the second diffusion, the other time series {X7} generated by hyperchaos is used as the diffusion parameter selection, and the dynamic diffusion method is adopted to control the current diffusion degree according to the difference between the current pixel value and the previous pixel value, and r and θ are dynamically diffused again, and the cycle is repeated until all pixels are diffused and scrambled to obtain an encrypted image. The randomness and complexity of the image are further increased.

[0098] Step S224: converting the encrypted image from the polar coordinate system back to the rectangular coordinate system to obtain a second encrypted image.

[0099] Step S23: Obtain the three-dimensional arrays of the three channels R, G and B of the low privacy level image, swap the pixel values ​​in the three-dimensional array, and combine the swapped pixel values ​​to construct a third encrypted image. It is possible to perform large-scale scrambling encryption on color images.

[0100] S23 includes the following steps:

[0101] All pixels labeled as sky and road after textscan are read out, that is, a multi-channel fusion shuffle algorithm is performed on I0 and I3.

[0102] Step S231: Read low privacy level images I0 and I3, divide the low privacy level images into three channels of R, G and B through img(:,:,1 / 2 / 3), and store the pixel values ​​of each channel into a one-dimensional array in sequence through the reshape function. For example, the pixel value array of the R channel is [R1, R2, R3, ..., Rn]

[0103] Step S232: Starting from the end of the one-dimensional array of the R channel, use the value (mod H)-1 of the generated chaotic time series {X8}, {X9}, {X10}, that is, a random integer i between 0 and the current array length - 1, and exchange the element at the current position with the element with the subscript i in the sequence {X8}.

[0104] Step S233: Repeat steps S331 and S332 of exchanging positions, traverse the entire array, and repeat the above steps for the G channel and the B channel to obtain an array of pixel values ​​of the R, G and B channels in a disrupted order.

[0105] Step S234: sequentially combine the scrambled pixel values ​​of the three channels of R, G and B to construct an encrypted new image, and output the new image as the third encrypted image.

[0106] Step S3: Use the chaotic matrix to perform principal element product operations on the encrypted high privacy level image, medium privacy level image, and low privacy level image to obtain the final encrypted image, thereby achieving the effect of rapidly scrambling pixels.

[0107] S3 includes the following steps:

[0108] After multi-block fusion parallel encryption according to the three major encryption algorithms implemented by S1 and S2, chaotic matrix encryption is performed on the global after block encryption to further improve the encryption security.

[0109] Step S31: normalize the generated chaotic time series to obtain a random sequence {X11} to {X15} between [0,1].

[0110] Step S32: Divide the chaotic time series to generate several groups of elements, each group of elements contains H×W elements, and reshape each group of elements into an H×W matrix to construct a chaotic matrix, where H and W are random numbers.

[0111] Step S33: Perform principal element multiplication operation on the chaotic matrix and the image after multi-plate fusion encryption (the first encrypted image, the second encrypted image and the third encrypted image) until all chaotic matrices are involved in the operation, and perform modulo 256 operation on the principal element multiplication result to obtain the final encrypted image and image matrix Image_cip.

[0112] Based on the above method, the present invention provides a system for hierarchical encryption of private images, such as Figure 1 As shown, it is characterized by comprising a pre-processing module, an image encryption module and an image decryption module; wherein the image encryption module comprises a hierarchical encryption module and an overall encryption module. The pre-processing module comprises an image input module and an image segmentation module.

[0113] Among them, in the preprocessing module, the image input module is used to obtain the image to be encrypted, and the image segmentation module is used to segment the image to be encrypted divided according to the regional threshold to obtain image areas with different privacy importance; wherein the image areas with different privacy importance include high privacy level images greater than the maximum value of the interval threshold, low privacy level images less than the minimum value of the interval threshold, and medium privacy level images within the interval threshold; the hierarchical encryption module is used to select different levels of encryption algorithms to encrypt high privacy level images, medium privacy level images and low privacy level images according to the privacy importance of the image area; the overall encryption module is used to use the chaotic matrix to perform principal element product operations with the encrypted high privacy level images, medium privacy level images and low privacy level images to obtain the final encrypted image.

[0114] The image encryption module also includes the following units: DNA encryption logic unit, spherical dynamic rotation encryption logic unit, multi-channel fusion shuffling encryption logic unit, multi-module chaotic matrix encryption logic unit, start loop unit, and end loop unit.

[0115] DNA encryption logic unit: According to the secret key sequence generated by chaos, the corresponding encoding method is selected, and then the DNA is reorganized and scrambled for encryption, ultimately achieving high-strength image encryption.

[0116] Spherical dynamic rotation encryption logic unit: Based on the two-dimensional hyperchaos generated by coupling, different key sequences are generated according to its chaotic characteristics and the initial input value of the image for subsequent encryption operations.

[0117] Multi-channel fusion shuffle encryption logic unit: According to the selected diffusion scrambling algorithm, the corresponding diffusion method and scrambling method operations are performed to realize an encryption process.

[0118] Multi-module chaotic matrix encryption logic unit: multiply the entire image with the chaotic matrix generated by chaos to perform a full image encryption.

[0119] The starting cycle unit is used to control the encryption of several divided modules.

[0120] Figure 1 The image decryption module also includes the following units: reverse decryption unit and termination loop unit. The reverse decryption unit is used to perform reverse operations on the encrypted image according to the encryption methods of different privacy levels and the corresponding encryption logic order, and finally generate the decrypted image of the corresponding privacy level part. The termination loop unit is used to control the cyclic relationship between different privacy levels and different encryption orders until all parts are completely decrypted.

[0121] The present invention also provides a computer device, including a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of a hierarchical encryption method for a privacy image.

[0122] In accordance with the disclosed embodiments, a computing device may communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth communications, etc.), or with any device (e.g., routers, modems, etc.) that enables a computing device to communicate with one or more other computing devices.

[0123] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, a hierarchical encryption method for a privacy image is implemented.

[0124] According to the disclosed embodiments, the storage medium may be a non-volatile computer-readable storage medium, such as but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0125] The above content is a further detailed description of the present invention in combination with a specific preferred embodiment. For technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A hierarchical encryption method for private images, characterized in that: The steps include: The image to be encrypted divided according to the regional threshold is segmented to obtain image regions with different privacy importance levels; the image regions with different privacy importance levels include high privacy level images greater than the maximum value of the interval threshold, low privacy level images less than the minimum value of the interval threshold, and medium privacy level images within the interval threshold; According to the privacy importance of the image area, different levels of encryption algorithms are selected to encrypt high privacy level images, medium privacy level images and low privacy level images; The chaotic matrix is ​​used to perform principal element product operations with the encrypted high privacy level image, medium privacy level image and low privacy level image to obtain the final encrypted image.

2. A hierarchical encryption method for private images as claimed in claim 1, characterized in that: The method of segmenting the image to be encrypted divided according to the region threshold to obtain image regions with different privacy importance levels includes the following steps: Input the image to be encrypted into the deep learning segmentation model to obtain a cutting mask; wherein the cutting mask is a two-dimensional array; The cutting mask is saved as an image file, and the color value of each pixel in the image file is used as a category label; Image regions with different privacy importance levels are obtained according to their category labels.

3. A hierarchical encryption method for private images as claimed in claim 1, characterized in that: The encryption algorithms of different levels are selected to encrypt the high privacy level image, the medium privacy level image and the low privacy level image, specifically: Processing the high privacy level image through DNA encoding and DNA decoding to obtain a three-dimensional array with disrupted content correlation on three channels of R, G and B, and using the three-dimensional array as the first encrypted image; The medium privacy level image is converted from a rectangular coordinate system to a polar coordinate system, and the polar coordinates are used in dynamic rotation permutation and double diffusion to scramble the pixel spatial positions and diffusely scramble the pixel points to obtain an encrypted image, and the encrypted image is converted to a rectangular coordinate system to obtain a second encrypted image; A three-dimensional array on three channels R, G and B of the low-privacy level image is obtained, pixel values ​​in the three-dimensional array are swapped, and the swapped pixel values ​​are combined to construct a third encrypted image.

4. A hierarchical encryption method for private images as claimed in claim 3, characterized in that: The method of processing the high privacy level image by DNA encoding and DNA decoding to obtain a three-dimensional array with disrupted content correlation on the three channels of R, G and B, and using the three-dimensional array as the first encrypted image, includes the following steps: The high privacy level image is divided into the values ​​of three channels: R, G and B; According to the information features of the image, the cryptographic hash function SHA512 algorithm is used to generate chaotic initial values ​​X1 and X2, and a number of new time series X1, X2 and X3 are obtained according to the initial values. The base of the new time series is selected to perform modulus to obtain chaotic key sequences {X1}, {X2} and {X3}; The three channels R, G and B are DNA-encoded according to the corresponding chaotic key sequence {X1} to obtain a new DNA encoding matrix; Through the values ​​of the chaotic sequence {X2}, the XOR and XOR operations between the codes of the values ​​are determined, and the operations are performed in sequence, cyclically alternating, until all pixels have completed N rounds of operations, and the correlation between the contents of the high-privacy images is completely disrupted; According to the value of the chaotic sequence {X3}, a DNA decoding method is selected, and the DNA sequence obtained by the XOR operation in the cyclic alternation is subjected to DNA decoding to obtain a numerical matrix; The decoded numerical matrix is ​​decomposed into three channels of R, G and B, and the decomposed three channels of R, G and B are recombined to obtain a new three-dimensional array, and the new three-dimensional array is used as the final first encrypted image.

5. The hierarchical encryption method for private images as claimed in claim 3, characterized in that: The method of converting the medium privacy level image from a rectangular coordinate system to a polar coordinate system, using polar coordinates in dynamic rotation permutation and double diffusion, disrupting the pixel space position, and performing diffusion scrambling on the pixel points to obtain an encrypted image, and converting the encrypted image to a rectangular coordinate system to obtain a second encrypted image includes the following steps: Convert the segmented medium privacy level image from the rectangular coordinate system to the polar coordinate system to obtain the polar coordinates (r, θ) of each pixel, where r represents the distance to the origin and θ represents the angle with the x-axis; Polar coordinates are used in dynamic rotation displacement, and a hyperchaotic system is used to generate a time series, the time series is used as a dynamic rotation angle Δθ, and for each pixel point, its polar angle θ plus Δθ is rotated, and double diffusion is performed in polar coordinates; In the first diffusion, the time series is used as a diffusion parameter to perform a filtering diffusion on the image after rotation and displacement; In the second diffusion, other time series generated by hyperchaos are used as diffusion parameter selection. The degree of current diffusion is controlled according to the difference between the current pixel value and the previous pixel value, and r and θ are dynamically diffused again. The cycle is repeated until all pixels are diffused and scrambled to obtain an encrypted image. The encrypted image is converted from the polar coordinate system back to the rectangular coordinate system to obtain a second encrypted image.

6. A hierarchical encryption method for private images as claimed in claim 3, characterized in that: The step of obtaining a three-dimensional array on three channels R, G and B of the low privacy level image, swapping pixel values ​​in the three-dimensional array, and combining the swapped pixel values ​​to construct a third encrypted image includes the following steps: The low-privacy level image is divided into three channels: R, G, and B, and the pixel values ​​of each channel are stored in a one-dimensional array in sequence; Starting from the end of the one-dimensional array, use the value of the generated chaotic time series to exchange the element at the current position with the element with subscript i; Where i represents a random integer between 0 and the current array length - 1; Repeat the steps of exchanging positions, traverse the entire array, and obtain the R, G, and B channel pixel value arrays in a disrupted order; The scrambled pixel values ​​of the three channels of R, G and B are combined in sequence to construct an encrypted new image, which is output as a third encrypted image.

7. A hierarchical encryption method for private images as claimed in claim 6, characterized in that: The method of using the chaotic matrix to perform principal element product operations on the encrypted high privacy level image, medium privacy level image, and low privacy level image to obtain the final encrypted image includes the following steps: Normalize the generated chaotic time series to obtain a random sequence between [0,1]; Divide the chaotic time series to generate several groups of elements, each group of elements contains H×W elements, and arrange each group of elements into an H×W matrix to construct a chaotic matrix; where H and W are random numbers; The chaotic matrix is ​​subjected to principal element multiplication operation with the first encrypted image, the second encrypted image and the third encrypted image, and a modulo 256 operation is performed on the principal element multiplication result to obtain a final encrypted image.

8. A hierarchical encryption system for private images, characterized in that: include: A preprocessing module, used for segmenting the image to be encrypted divided according to the regional threshold value, and obtaining image regions with different privacy importance levels; The image areas with different privacy importance include high privacy level images greater than the maximum value of the interval threshold, low privacy level images less than the minimum value of the interval threshold, and medium privacy level images within the interval threshold; A hierarchical encryption module is used to select different levels of encryption algorithms to encrypt high-privacy level images, medium-privacy level images, and low-privacy level images according to the privacy importance of the image area; The overall encryption module is used to use the chaotic matrix to perform principal element product operations with the encrypted high privacy level image, medium privacy level image and low privacy level image to obtain the final encrypted image.

9. A computer device, characterized in that: The method comprises a memory and a processor, wherein a program is stored in the memory, and when the program is executed by the processor, the processor executes the steps of a hierarchical encryption method for a private image as claimed in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a hierarchical encryption method for a private image according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Data encryption transmission method and device

    CN119728875A

  • User privacy protection method and device for face recognition system

    CN120234794A

  • Camera image signal processing method and system

    CN120264001A

  • Edge computing task unloading method and related equipment

    CN120561971A