Color grading thumbnail storage encryption method based on block space adjustment strategy

By adopting a color grading thumbnail storage encryption method based on block space adjustment strategy in the industrial Internet of Things, the problem of difficulty in achieving comprehensive image encryption and color grading in the prior art is solved, and the color vivid transition of encrypted images and the retention of visual information is achieved.

CN119854424AActive Publication Date: 2025-04-18NANJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411995366.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-18
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art is difficult to achieve comprehensive encryption of images in the industrial Internet of Things, especially to ensure color grading effects while maintaining image availability.

Method used

The color grading thumbnail saving encryption method based on the block space adjustment strategy is adopted to construct a complete encrypted image block by preprocessing the image, decomposing the channel, generating a pseudo-random key stream, performing two-pixel and maintaining replacement operations, adjusting the block space, and applying the permutation table generated by the chaotic system.

Benefits of technology

The transition from dull to bright color vividness of encrypted images is achieved, ensuring that the encrypted image retains visual information similar to the original image, meeting the needs of usability and color grading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854424A_ABST
    Figure CN119854424A_ABST
Patent Text Reader

Abstract

The invention discloses a color grading thumbnail storage and encryption method based on a block space adjustment strategy, which comprises the following steps of: decomposing each channel of an image into two parts, namely a part I containing the highest bit plane and a part II containing the rest bit planes, the highest bit plane is responsible for bearing the main color information of the image, and the rest bit planes are responsible for bearing the main color information of the image; the remaining bit planes contain detail information. The sum of the element values in the block space is finely adjusted, so that the sum is gradually aligned with the element values in the original block pixels, and the color vividness grading of the encrypted image and the thumbnail thereof is realized. And along with the increase of the adjustment proportion, the vividness of the color is also increased. The method ensures that the encrypted image retains rough visual information similar to the original image, so that the availability is met, and the adaptability to different Internet of Things scenes is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of information security, and in particular to a color-grading thumbnail storage encryption method based on a block space adjustment strategy. Background Art

[0002] Today, deploying visual perception capabilities in the Industrial Internet of Things has become an important application, allowing managers to perceive information within the industrial environment and provide a basis for decision-making. But on the other hand, this also leads to serious privacy risks, because visual content often contains sensitive information, which may expose personal information, industrial secrets, location data, etc. Secondly, cloud storage uses centralized data management, which also brings risks when removing privacy-sensitive information. At the same time, visual content is also crucial because it contains rich visual content. Therefore, necessary processing is required after the visual content is collected. Therefore, it is crucial to retain an appropriate amount of visual information to maintain basic usability in industrial environments.

[0003] In order to achieve the best balance between privacy and usability, some privacy protection schemes, object replacement and selective encryption are proposed. There are also schemes that focus on encrypting specific data by identifying privacy in privacy regions within the image. However, these schemes have great limitations because they usually do not encrypt the entire image object or only selectively encrypt part of the data. Although the resulting encrypted image is still usable, inaccuracies in describing privacy regions and improper selection of privacy objects may lead to accidental leakage of the original information contained in the encrypted image. Therefore, there is an urgent need for a comprehensive privacy protection scheme that can guarantee the complete encryption of the image while maintaining usability.

[0004] In recent years, an image privacy protection scheme called Thumbnail Preservation Encryption (TPE) has been proposed to meet the above requirements. These schemes ensure global encryption of the image without missing any area. In terms of security, they use substitution and permutation encryption to ensure the confidentiality of the image. In addition, they maintain the usability of the thumbnail block by adjusting the size of the thumbnail block and maintaining the encryption method.

[0005] However, none of the current schemes can implement color grading in encrypted images. Color grading is important for thumbnails because color can directly affect people's understanding of the meaning of the image. For example, in many images where color elements can quickly establish an intuitive impression, these elements can be better hidden if the vividness of the colors is reduced. It should be noted that although there are some TPE schemes that can encrypt color images into images that are visually perceived as grayscale images, they still do not allow color grading, which is difficult to apply to scenes that rely on high color richness. Summary of the invention

[0006] The present invention aims to solve one of the technical problems existing in the related art at least to a certain extent.

[0007] One object of the present invention is to provide a color grading thumbnail preservation encryption method based on a block space adjustment strategy, which can make the color vividness of the encrypted image gradually transition from dim or distorted to bright or real regardless of how the size of the thumbnail block changes, thereby achieving color grading.

[0008] In order to achieve the above-mentioned object, the present invention provides a color graded thumbnail storage encryption method based on a block space adjustment strategy, comprising the following steps:

[0009] S100, preprocessing the input image;

[0010] S200, decomposing each channel of the image into two parts, namely, part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information;

[0011] S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream;

[0012] S400, performing a two-pixel sum-keeping replacement operation on the part II, by calculating the sum of pixel values ​​of the pixel group and replacing it with a pixel group with an equal or similar sum;

[0013] S500, adjusting the block space of the part I, including compressing the space when the elements in the block are consistent, and filling the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane;

[0014] S600, applying the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the reorganized image block to construct a complete encrypted image block;

[0015] S700: reorganize the processed blocks according to the original bit order to form a final encrypted image.

[0016] A further preferred technical solution of the present invention is that in step S100, the input image is preprocessed, and the specific method includes:

[0017] S110, selecting an image format using lossless compression;

[0018] S120, the image is a single-channel grayscale image or a multi-channel color map; when the image is a multi-channel color image, each channel is regarded as a two-dimensional digital matrix, and the value of the element in the channel is less than or equal to 2d-1, where d=128;

[0019] S130, defining a unique identifier for each image, denoted as ρ;

[0020] S140, dividing the image into blocks, recorded as data block B m,n , the components of the first part of the block are integrable with respect to the first part.

[0021] Preferably, the step S300 of generating a 256-bit pseudo-random key stream by using the 2D-LSM chaotic system includes:

[0022] S310, record the key stream as Where μ represents the number of bits in the key, which is 256, and w represents the random selector;

[0023] S320, using the 2D-LSM chaotic system to generate a large number of 256-bit key streams, expressed as:

[0024] K s =round(abs(2D-LSM(X1, Y1, τ, σ, 256)));

[0025] Among them, round means rounding, abs means taking the absolute value, 2D-LSM means the pseudo-random number algorithm generated based on the two-dimensional chaotic mapping system, X1, Y1 means the input initial value of the two-dimensional chaotic mapping system, X1, Y1∈(0,1), τ, σ means the control parameters of the two-dimensional chaotic system, τ∈(0,4), σ∈(0,1);

[0026] S330, connect the image with the corresponding identifier ρ, the connection is denoted as ρ||c, and its length Len is less than or equal to 256 bits:

[0027] S340, will be in K s Replace the last Len bit in with ρ||c to get the encryption key.

[0028] Preferably, in step S400, a two-pixel sum-and-keep replacement operation is performed on the portion II, and the specific method is:

[0029] S410, organizing pixels in a block into a pixel group consisting of two pixels, represented as f = {f1, f2};

[0030] S420, calculate the sum of the pixel values ​​of the pixel group f={f1, f2}, denoted as f s ;

[0031] S430, calculate all sums to be f s The pixel groups form a set θ s , expressed as:

[0032]

[0033] S440, using R s (·) equation determines the label of the pixel group f = {f1, f2}, denoted by ε f , expressed as:

[0034]

[0035] S450, the encrypted pixel group is represented as ε e , expressed as:

[0036] ε e =(ε f +β)mod|θ s |;

[0037] Among them, β ≥ 2|θ s |;

[0038] S460, Utilization The function labels ε e Convert to encrypted pixel group f e , completing the process of replacing and encrypting the pixel group.

[0039] Preferably, the block space of the part I is adjusted in step S500, including:

[0040] S510, Evacuation Space:

[0041] Find the data block with consistent elements, that is, identify the data block with all elements being 1 or 0;

[0042] Compress the space within the found data block to create additional space for subsequent adjustments;

[0043] S520, Adjustment:

[0044] Fill the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane;

[0045] The first and second elements of the compressed block have values, and the other elements are left empty. The first element represents the compressible element in the original block, and the second element is set to 0, indicating that it has been compressed.

[0046] Preferably, the permutation table generated by the 2D-LSM chaotic system is applied in step S600 to perform pixel value permutation sorting on the image blocks of part I and part II, respectively, and the specific method includes:

[0047] S610: converting the one-dimensional sequence generated by the 2D-LSM chaotic system into a two-dimensional matrix to form a permutation table;

[0048] S620: Sort the pixel values ​​of the image blocks according to the substitution table to implement block-by-block substitution encryption;

[0049] S630: The index of the substitution table is obtained by arranging the elements in the chaotic block in descending order.

[0050] Preferably, the processed blocks are reassembled in the original bit order in step S700 to construct a complete encrypted image block, specifically:

[0051] According to the bit order when part I and part II are divided, the adjusted highest bit plane and the remaining bit planes are reassembled; it is ensured that the reassembled image blocks are continuous in space to obtain the final encrypted image.

[0052] Another aspect of the present invention provides a non-transitory computer-readable storage medium having computer instructions stored thereon, the computer instructions enabling a computer to execute the above-mentioned color graded thumbnail storage encryption method based on block space adjustment strategy.

[0053] Yet another aspect of the present invention provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and the processor calls logic instructions in the memory to execute the above-mentioned color grading thumbnail storage encryption method based on the block space adjustment strategy.

[0054] On the other hand, the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the above-mentioned color grading thumbnail storage encryption method based on the block space adjustment strategy.

[0055] Beneficial effects: The color grading thumbnail preservation encryption method based on block space adjustment strategy of the present invention can make the color vividness of the encrypted image gradually transition from dim or distorted to bright or real regardless of the size of the thumbnail block.

[0056] The color-grading thumbnail preservation encryption method based on the block space adjustment strategy designed by the present invention ensures that the encrypted image retains the rough visual information similar to the original image, thereby meeting the usability.

[0057] The color grading thumbnail storage encryption method based on block space adjustment strategy designed by the present invention encrypts the image by adjusting the block space, and successfully realizes the color grading of color images. Moreover, the image size expansion multiple and time overhead of encryption and decryption are comparable to those of current similar schemes, without adding additional costs.

[0058] The color grading thumbnail storage encryption method based on block space adjustment strategy designed by the present invention greatly improves the adaptability of the scheme to different Internet of Things scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 The figure is a flow chart of the method for preserving and encrypting color graded thumbnails based on the block space adjustment strategy of the present invention.

[0060] Figure 2 It is the overall framework diagram of the encryption method of the present invention.

[0061] Figure 3 It is a framework diagram of the two-pixel replacement method in step S400 of the present invention.

[0062] Figure 4 It is a framework diagram of the block space adjustment method in step S500 of the present invention.

[0063] Figure 5 It is a framework diagram of the permutation encryption operation in step S600 of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below 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, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0065] Combine the following Figure 1-Figure 5 The present invention describes a color graded thumbnail storage encryption method based on a block space adjustment strategy.

[0066] Embodiment 1: The color graded thumbnail storage encryption method based on the block space adjustment strategy provided in this embodiment has the following overall processing framework: Figure 2 As shown, by fine-tuning the sum of the element values ​​in the block space to gradually align it with the element values ​​in the original block pixels, the encrypted image and its thumbnail achieve grading of color vividness. As the adjustment ratio increases, the color vividness also increases. The present invention ensures that the encrypted image retains the rough visual information similar to the original image, thereby meeting the usability and greatly improving the adaptability to different IoT scenarios.

[0067] The encryption method includes the following specific steps: Figure 1 As shown, including:

[0068] S100: pre-processing the input image.

[0069] In this embodiment, an RGB image is taken as an example, and a lossless compressed image format such as PNG or BMP is selected.

[0070] In a multi-channel color image, each channel is regarded as a two-dimensional digital matrix, and the value of the elements in the channel is less than or equal to 2d-1, where d = 128; each image is defined with a unique identifier, denoted by ρ; the image is processed in blocks, denoted by B m,n , dimension d l ×d l ; Component DB of part I in block i,j For part I it is integrable.

[0071] S200, decomposing each channel of the image into two parts, namely part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information.

[0072] S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream.

[0073] Before encryption, a secure key stream needs to be constructed. Use the high-performance chaotic system 2D-LSM to generate a sequence and construct a pseudo-random key stream. The process is as follows:

[0074] The key stream is recorded as μ represents the number of bits in the key, which is 256, and w represents the random selector;

[0075] A 2D-LSM chaotic system is used instead of PRG to generate a large number of 256-bit key streams, expressed as:

[0076] K s =round(abs(2D-LSM(X1, Y1, τ, σ, 256)));

[0077] Among them, round means rounding, abs means taking the absolute value, 2D-LSM means the pseudo-random number algorithm generated based on the two-dimensional chaotic mapping system, X1, Y1 represent the input initial values ​​of the two-dimensional chaotic mapping system, X1, Y1∈(0,1), τ, σ represent the control parameters of the two-dimensional chaotic system, τ∈(0,4), σ∈(0,1).

[0078] To prevent the same key from being used to encrypt different registration times, the key stream needs to be replaced in Section II before encryption. To achieve this, each image is concatenated with an identifier ρ, which is uniquely defined for each image and the number of channels in the image. This concatenation is denoted ρ||c, and its length Len is less than or equal to 256 bits. Finally, the K s Replace the last Len bit in with ρ||c to get the encryption key.

[0079] S400, performing a two-pixel sum-and-keep replacement operation on part II.

[0080] This step ensures that the sum of the elements of the encrypted pixel group is equal to or close to that of the original group, maintaining the usability of the image.

[0081] The image is segmented into part I and part II, and the corresponding blocks are labeled B m,n , dimension d l ×d l . Two-pixel and keep-replace encryption methods, such as Figure 3 As shown, the process is outlined as follows:

[0082] S410, organizing pixels in a block into a pixel group consisting of two pixels, represented as f = {f1, f2};

[0083] S420, calculate the sum of the pixel values ​​of the pixel group f={f1, f2}, denoted as f s ;

[0084] S430, calculate all sums to be f s The pixel groups form a set θ s , expressed as:

[0085]

[0086] S440, using R s (·) equation determines the label of the pixel group f = {f1, f2}, denoted by ε f , expressed as:

[0087]

[0088] S450, the encrypted pixel group is represented as ε e , expressed as:

[0089] ε e =(ε f +β)mod|θ s |;

[0090] Among them, β is a sufficiently large number, and here it is stipulated that β≥2|θ s |;

[0091] S460, Utilization The function labels ε e Convert to encrypted pixel group f e , completing the process of replacing and encrypting the pixel group.

[0092] S500: Adjust the block space of part I.

[0093] This step is divided into two parts: evacuation space and adjustment. The specific process is as follows:

[0094] S510, Evacuation Space:

[0095] There are two cases when the highest bit plane of the image channel is divided into blocks. The first case occurs when the elements in the block are not the same, that is, they are composed of both 1 and 0. In this case, the block cannot be compressed to create additional space, so it cannot be adjusted; the second case occurs when all elements in the data block are the same, that is, either all 1 or all 0. In this case, the block can be compressed to create space that can be used for subsequent adjustments. This step is mainly for the second case.

[0096] S520, Adjustment:

[0097] Adjustment is the process of approximating the sum of the elements in the original bit planes by filling the vacated spaces with 1s or 0s. This makes the encrypted image closer to the thumbnail of the original version. Before any adjustments are made, it is necessary to determine whether the elements in the block are compressible. If they are compressible, only the first and second elements of the compressed block have values, and the other elements are left empty. The first element in the compressed block represents the compressible element in the original block, and the second element is set to 0 to indicate compression.

[0098] The grading of color vividness is achieved by adjusting the sum of element values ​​in the block space to gradually align them with the element values ​​in the original block pixels. As the adjustment ratio increases, the vividness of the color also increases. This means that by controlling the degree of block space adjustment, the vividness of the color of the encrypted image can be controlled, thereby achieving color grading. Figure 4 Let me explain in detail.

[0099] Figure 4 A block size of 4×4 is shown.

[0100] Figure 4 (a) describes a block with all elements set to 1, which is compressible. In this case, the first element in the compressed block is 1 and the second element is 0, indicating that compression is possible.

[0101] Figure 4 (b) illustrates the block after the space is vacated, where the first and second elements are retained and the remaining elements are vacated for subsequent adjustment.

[0102] Figure 4 (c) represents a block without any adjustment, and the remaining space in the compressed block is filled with elements that are different from the original block, i.e., 0. Therefore, the sum of the element values ​​in the block deviates more from the value of the original block, resulting in darker colors for the encrypted image and thumbnail.

[0103] Figure 4 (d) shows a compressed block adjusted by 50%, at which stage the sum of the element values ​​in the block is half of the original block. As the adjustment proceeds, the colors of the encrypted image and thumbnail gradually approach the original version.

[0104] S600 , using the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the part I and part II image blocks respectively.

[0105] The permutation encryption operation is performed on the image blocks of part I and part II respectively. The permutation encryption is slightly different from the replacement encryption. The former performs encryption operation block by block, while the latter performs encryption operation on a group of pixels within a block. Figure 5 As shown, permutation encryption requires a permutation table that can transform the one-dimensional sequence generated by the 2D-LSM chaotic system into a two-dimensional matrix, as shown below.

[0106] Use the same operation as for the image to divide the chaotic matrix M into blocks, denoted as M m,n .

[0107] Chaos Block M m,n The elements in the array are arranged in descending order to obtain the sorted chaotic block M′ m,n .

[0108] Extract chaotic block M′ m,n The corresponding index is used to obtain the permutation table G.

[0109] According to the permutation table G, the pixel values ​​of the image blocks are sorted.

[0110] S700, reorganize the processed blocks according to the original bit order to construct a complete encrypted image block.

[0111] Embodiment 2: This embodiment provides a non-transitory computer-readable storage medium, on which computer instructions are stored, the computer instructions causing the computer to execute a color-grading thumbnail storage encryption method based on a block space adjustment strategy, the method comprising the following steps:

[0112] S100, preprocessing the input image;

[0113] S200, decomposing each channel of the image into two parts, namely, part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information;

[0114] S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream;

[0115] S400, performing a two-pixel sum-keeping replacement operation on the part II, by calculating the sum of pixel values ​​of the pixel group and replacing it with a pixel group with an equal or similar sum;

[0116] S500, adjusting the block space of the part I, including compressing the space when the elements in the block are consistent, and filling the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane;

[0117] S600, applying the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the reorganized image block to construct a complete encrypted image block;

[0118] S700: reorganize the processed blocks according to the original bit order to form a final encrypted image.

[0119] Embodiment 3: This embodiment provides an electronic device, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute a color grading thumbnail storage encryption method based on a block space adjustment strategy, and the method includes the following steps:

[0120] S100, preprocessing the input image;

[0121] S200, decomposing each channel of the image into two parts, namely, part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information;

[0122] S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream;

[0123] S400, performing a two-pixel sum-keeping replacement operation on the part II, by calculating the sum of pixel values ​​of the pixel group and replacing it with a pixel group with an equal or similar sum;

[0124] S500, adjusting the block space of the part I, including compressing the space when the elements in the block are consistent, and filling the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane;

[0125] S600, applying the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the reorganized image block to construct a complete encrypted image block;

[0126] S700: reorganize the processed blocks according to the original bit order to form a final encrypted image.

[0127] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0128] Embodiment 4: This embodiment provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a color grading thumbnail storage encryption method based on a block space adjustment strategy. The method includes the following steps:

[0129] S100, preprocessing the input image;

[0130] S200, decomposing each channel of the image into two parts, namely, part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information;

[0131] S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream;

[0132] S400, performing a two-pixel sum-keeping replacement operation on the part II, by calculating the sum of pixel values ​​of the pixel group and replacing it with a pixel group with an equal or similar sum;

[0133] S500, adjusting the block space of the part I, including compressing the space when the elements in the block are consistent, and filling the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane;

[0134] S600, applying the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the reorganized image block to construct a complete encrypted image block;

[0135] S700: reorganize the processed blocks according to the original bit order to form a final encrypted image.

[0136] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A color graded thumbnail storage encryption method based on block space adjustment strategy, characterized in that: The following steps are involved: S100, preprocessing the input image; S200, decomposing each channel of the image into two parts, namely, part I containing the highest bit plane and part II containing the remaining bit planes, wherein the highest bit plane is responsible for carrying the main color information of the image, and the remaining bit planes contain detail information; S300, using the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream; S400, performing a two-pixel sum-keeping replacement operation on the part II, by calculating the sum of pixel values ​​of the pixel group and replacing it with a pixel group with an equal or similar sum; S500, adjusting the block space of the part I, including compressing the space when the elements in the block are consistent, and filling the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane; S600, applying the permutation table generated by the 2D-LSM chaotic system to permute and sort the pixel values ​​of the reorganized image block to construct a complete encrypted image block; S700: reorganize the processed blocks according to the original bit order to form a final encrypted image.

2. The color-grading thumbnail storage encryption method based on block space adjustment strategy according to claim 1 is characterized in that: In step S100, the input image is preprocessed, and the specific method includes: S110, selecting an image format using lossless compression; S120, the image is a single-channel grayscale image or a multi-channel color map; when the image is a multi-channel color image, each channel is regarded as a two-dimensional digital matrix, and the value of the element in the channel is less than or equal to 2d-1, where d=128; S130, defining a unique identifier for each image, denoted as ρ; S140, dividing the image into blocks, recorded as data block B m,n , the components of the first part of the block are integrable with respect to the first part.

3. The color graded thumbnail storage encryption method based on block space adjustment strategy according to claim 2 is characterized in that: The step S300 uses the 2D-LSM chaotic system to generate a 256-bit pseudo-random key stream, including: S310, record the key stream as Where μ represents the number of bits in the key, which is 256, and w represents the random selector; S320, using the 2D-LSM chaotic system to generate a large number of 256-bit key streams, expressed as: K s =round(abs(2D-LSM(X1,Y1,τ,σ,256))); Among them, round means rounding, abs means taking the absolute value, 2D-LSM means the pseudo-random number algorithm generated based on the two-dimensional chaotic mapping system, X1, Y1 means the input initial value of the two-dimensional chaotic mapping system, X1, Y1∈(0,1), τ, σ means the control parameters of the two-dimensional chaotic system, τ∈(0,4), σ∈(0,1); S330, connecting the image with the corresponding identifier ρ, the connection is denoted as ρ||c, and its length Len is less than or equal to 256 bits; S340, will be in K s Replace the last Len bit in with ρ||c to get the encryption key.

4. The color-graded thumbnail storage encryption method based on block space adjustment strategy according to claim 2 is characterized in that: In step S400, a two-pixel sum-and-keep replacement operation is performed on the portion II, and the specific method is as follows: S410, organizing pixels in a block into a pixel group consisting of two pixels, represented as f = {f1, f2}; S420, calculate the sum of the pixel values ​​of the pixel group f={f1, f2}, denoted as f s ; S430, calculate all sums to be f s The pixel groups form a set θ s , expressed as: S440, using R s (·) equation determines the label of the pixel group f = {f1, f2}, denoted by ε f , expressed as: S450, the encrypted pixel group is represented as ε e , expressed as: e e =(e f +β)mod|θ s |; Among them, β ≥ 2|θ s |; S460, Utilization The function labels ε e Convert to encrypted pixel group f e , completing the process of replacing and encrypting the pixel group.

5. The color graded thumbnail storage encryption method based on block space adjustment strategy according to claim 1, characterized in that: It is characterized in that In step S500, the block space of the part I is adjusted, including: S510, Evacuation Space: Find the data block with consistent elements, that is, identify the data block with all elements being 1 or 0; Compress the space within the found data block to create additional space for subsequent adjustments; S520, Adjustment: Fill the vacated space with 1 or 0 to approximate the sum of the elements in the original bit plane; The first and second elements of the compressed block have values, and the other elements are left empty. The first element represents the compressible element in the original block, and the second element is set to 0, indicating that it has been compressed.

6. The color-grading thumbnail storage encryption method based on block space adjustment strategy according to claim 1, characterized in that: The method of using the permutation table generated by the 2D-LSM chaotic system in step S600 to permutate and sort the pixel values ​​of the image blocks of part I and part II includes: S610: converting the one-dimensional sequence generated by the 2D-LSM chaotic system into a two-dimensional matrix to form a permutation table; S620: Sort the pixel values ​​of the image blocks according to the substitution table to implement block-by-block substitution encryption; S630: The index of the substitution table is obtained by arranging the elements in the chaotic block in descending order.

7. The color graded thumbnail storage encryption method based on block space adjustment strategy according to claim 1, characterized in that: Step S700 reorganizes the permuted encrypted blocks in the original bit order to construct a complete encrypted image block, specifically: According to the bit order when part I and part II are divided, the adjusted highest bit plane and the remaining bit planes are reassembled; ensuring that the reassembled image blocks are continuous in space, and obtaining the final encrypted image.

8. A non-transitory computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and the computer instructions enable the computer to execute the color-grading thumbnail storage encryption method based on the block space adjustment strategy as described in any one of claims 1-7.

9. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, and the processor calls the logic instructions in the memory to execute the color grading thumbnail storage encryption method based on the block space adjustment strategy described in any one of claims 1-7.

10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer executes the color grading thumbnail storage encryption method based on a block space adjustment strategy as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for steganography of the digital watermarks through the channel end values

    CN110570341A

  • Image encryption method based on chaotic mapping and bit-level replacement

    CN112084517A

  • Medical image encryption method based on two-dimensional Logistic-Gaussian hyperchaotic mapping

    CN115529122A

  • System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps

    US20040202326A1