Image processing method and device

By using chaotic systems and hashing algorithms in the financial banking industry for time-varying chaos and nonlinear replacement of images, the high pressure and security problems in image storage and transmission are solved, and efficient image encryption and decryption processes are realized. Ensures image security and storage efficiency.

CN119232947APending Publication Date: 2024-12-31CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411270129.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Images face high storage pressure and security challenges in the storage and transmission of the financial banking industry. The existing encryption algorithms have problems such as low security, high computational complexity and low algorithm randomness, which leads to vulnerability to attacks and implementation difficulties.

Method used

The preset chaotic system and hashing algorithm are used to perform time-varying, compression and nonlinear replacement of the image. Combining the timestamps to improve the randomness and attack resistance of the encryption algorithm, calculate the initial value through the hashing algorithm, and generate it using the chaotic system. Pseudo-random sequences are encrypted and decrypted, and nonlinear replacement is achieved by combining S-box generation and replacement algorithms.

Benefits of technology

On the premise of ensuring image transmission security, the storage pressure of the image is reduced, and the integrity and aggressiveness of the encryption process are improved, making the encrypted compressed image difficult to crack and can be effectively reconstructed after being damaged.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232947A_ABST
    Figure CN119232947A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and device, and the method comprises the steps: calling a Hash algorithm to process a first plaintext image corresponding to a first user, and carrying out the calculation to obtain a first designated initial value; inputting the first specified initial value into the chaotic system for iteration to obtain a first pseudo-random sequence; performing time-varying scrambling and compression on the first plaintext image by using the first pseudo-random sequence and the current first timestamp to obtain a first encrypted compressed image; quantizing the first encrypted compressed image; embedding the specified associated information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image; and performing nonlinear replacement on the second encrypted compressed image to obtain a final third encrypted compressed image. According to the scheme, the plaintext image is subjected to time-varying scrambling, compression, quantization, non-linear replacement and other processing to obtain the final encrypted and compressed image, and the storage pressure of the image can be reduced on the premise of ensuring the image transmission security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an image processing method and device. Background Art

[0002] With the development of big data and multimedia technology, images are used for information exchange due to their rich data volume and intuitive expression. For the financial and banking industries, images of customer IDs, qualification certificates, etc. need to be stored in the customer information management system and transmitted over the network.

[0003] However, on the one hand, compared with one-dimensional data, images require more storage space; on the other hand, since images involve specific customer information, images of customer information need to be strictly protected during transmission.

[0004] Therefore, there is an urgent need for a method that can reduce the storage pressure of images and ensure the security of image transmission. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides an image processing method and apparatus to reduce the storage pressure of images and ensure the security of image transmission.

[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0007] A first aspect of an embodiment of the present invention discloses an image processing method, the method comprising:

[0008] Calling a preset hash algorithm to process a first plaintext image corresponding to the first user, and calculating a first specified initial value;

[0009] Inputting the first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence;

[0010] Using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain a first encrypted compressed image;

[0011] quantizing the first encrypted compressed image;

[0012] embedding the designated association information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated association information of the first user;

[0013] The preset S-box generation and replacement algorithm is called, and the second encrypted compressed image is nonlinearly replaced in combination with the first pseudo-random sequence and the first timestamp to obtain a final third encrypted compressed image.

[0014] Preferably, calling a preset hash algorithm to process the first plaintext image corresponding to the first user and calculating the first specified initial value includes:

[0015] Splitting a first plaintext image corresponding to the first user into an R component, a G component, and a B component;

[0016] Calling a preset hash algorithm to respectively calculate encryption sequences corresponding to the R component, the G component, and the B component;

[0017] A first designated initial value is calculated based on the encryption sequences corresponding to the R component, the G component, and the B component.

[0018] Preferably, using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain a first encrypted compressed image includes:

[0019] Using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling on the first plaintext image to obtain an encrypted scrambled image;

[0020] generating a first measurement matrix based on the first pseudo-random sequence;

[0021] The encrypted scrambled image is compressed according to the first measurement matrix to obtain a first encrypted compressed image.

[0022] Preferably, embedding the designated association information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated association information of the first user includes:

[0023] converting the specified association information of the first user into a grayscale image;

[0024] Performing time-varying scrambling on the grayscale image, and converting the grayscale image after the time-varying scrambling into a bit stream sequence;

[0025] Performing bit plane decomposition on the quantized first encrypted compressed image;

[0026] The bit stream sequence is used to sequentially replace the binary code of the lowest bit plane of the first encrypted compressed image after quantization and bit plane decomposition, so as to obtain a second encrypted compressed image carrying the designated associated information of the first user.

[0027] Preferably, calling a preset S-box generation and replacement algorithm, combining the first pseudo-random sequence and the first timestamp, performing nonlinear replacement on the second encrypted compressed image to obtain a final third encrypted compressed image, includes:

[0028] integrating the second encrypted compressed image into a decimal image;

[0029] The preset S-box generation and replacement algorithm is called, and the second encrypted compressed image integrated into a decimal image is nonlinearly replaced in combination with the first pseudo-random sequence and the first timestamp to obtain a final third encrypted compressed image.

[0030] Preferably, it also includes:

[0031] When receiving the second designated initial value, the second timestamp and the fourth encrypted compressed image corresponding to the second user, inputting the second designated initial value into the chaotic system for iteration to obtain a second pseudo-random sequence;

[0032] Calling a preset S-box reverse substitution algorithm, combining the second pseudo-random sequence and the second timestamp, and performing nonlinear reverse substitution on the fourth encrypted compressed image to obtain a fifth encrypted compressed image;

[0033] Performing bit plane decomposition on the fifth encrypted compressed image to obtain the encrypted designated association information of the second user and a sixth encrypted compressed image;

[0034] Based on the second pseudo-random sequence and the second timestamp, time-varying inverse scrambling is performed on the encrypted designated associated information of the second user to obtain the decrypted designated associated information of the second user;

[0035] Integrate the sixth encrypted compressed image into a decimal image and perform inverse quantization;

[0036] The preset reconstruction algorithm is called, and the sixth encrypted compressed image that is integrated into a decimal image and dequantized is reconstructed in combination with the second pseudo-random sequence and the second timestamp to obtain a second plaintext image corresponding to the second user.

[0037] Preferably, calling a preset reconstruction algorithm, combining the second pseudo-random sequence and the second timestamp, reconstructing the sixth encrypted compressed image after integration into a decimal image and dequantization, and obtaining a second plaintext image corresponding to the second user, includes:

[0038] generating a second measurement matrix based on the second pseudo-random sequence;

[0039] A preset reconstruction algorithm is called, and the sixth encrypted compressed image that is integrated into a decimal image and dequantized is reconstructed in combination with the second measurement matrix and the second timestamp to obtain a second plaintext image corresponding to the second user.

[0040] A second aspect of an embodiment of the present invention discloses an image processing device, the device comprising:

[0041] A first calculation unit, configured to call a preset hash algorithm to process a first plaintext image corresponding to a first user, and calculate a first specified initial value;

[0042] A first iteration unit, used for inputting the first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence;

[0043] A first processing unit, configured to perform time-varying scrambling and compression on the first plaintext image using the first pseudo-random sequence and a current first timestamp to obtain a first encrypted compressed image;

[0044] A first quantization unit, configured to quantize the first encrypted compressed image;

[0045] An embedding unit, configured to embed the designated associated information of the first user into the quantized first encrypted compressed image, to obtain a second encrypted compressed image carrying the designated associated information of the first user;

[0046] The first replacement unit is used to call a preset S-box generation and replacement algorithm, combine the first pseudo-random sequence and the first timestamp, perform nonlinear replacement on the second encrypted compressed image, and obtain a final third encrypted compressed image.

[0047] Preferably, the first computing unit includes:

[0048] A splitting module, used to split the first plaintext image corresponding to the first user into an R component, a G component and a B component;

[0049] A first calculation module, used to call a preset hash algorithm to respectively calculate encryption sequences corresponding to the R component, the G component and the B component;

[0050] The second calculation module is used to calculate a first specified initial value based on the encryption sequences corresponding to the R component, the G component and the B component.

[0051] Preferably, the first processing unit includes:

[0052] A time-varying scrambling module, configured to perform time-varying scrambling on the first plaintext image using the first pseudo-random sequence and a current first timestamp to obtain an encrypted scrambled image;

[0053] A generating module, configured to generate a first measurement matrix based on the first pseudo-random sequence;

[0054] A compression module is used to compress the encrypted scrambled image according to the first measurement matrix to obtain a first encrypted compressed image.

[0055] Based on the above-mentioned embodiment of the present invention, an image processing method and device are provided. The method is as follows: calling a preset hash algorithm to process the first plaintext image corresponding to the first user, and calculating the first specified initial value; inputting the first specified initial value into the preset chaotic system for iteration to obtain the first pseudo-random sequence; using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain the first encrypted compressed image; quantizing the first encrypted compressed image; embedding the first user's specified associated information into the quantized first encrypted compressed image to obtain the second encrypted compressed image carrying the first user's specified associated information; calling the preset S-box generation and replacement algorithm, combining the first pseudo-random sequence and the first timestamp, and performing nonlinear replacement on the second encrypted compressed image to obtain the final third encrypted compressed image. This scheme obtains the final encrypted compressed image by performing time-varying scrambling, compression, quantization and nonlinear replacement on the plaintext image, which can reduce the storage pressure of the image while ensuring the security of image transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0057] Figure 1 A flowchart of an image processing method provided by an embodiment of the present invention;

[0058] Figure 2 An example diagram of the processing logic of the encryption compression process provided by an embodiment of the present invention;

[0059] Figure 3 A flowchart of decryption and reconstruction provided by an embodiment of the present invention;

[0060] Figure 4 An example diagram of the processing logic of the decryption and reconstruction process provided by an embodiment of the present invention;

[0061] Figure 5 A structural block diagram of an image processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 are within the scope of protection of the present invention.

[0063] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0064] With the development of big data and multimedia technology, images are used for information exchange due to their rich data volume and intuitive expression. For the financial and banking industries, images of customer certificates, qualification certificates, etc. need to be stored in the customer information management system and transmitted over the network. Among them, images of customer certificates, qualification certificates, etc. are also called customer information images (two-dimensional images).

[0065] For objects such as commercial banks, the number of customers of commercial banks is usually measured in hundreds of millions, so objects such as commercial banks with a large number of customers face greater storage pressure.

[0066] On the one hand, compared with one-dimensional data, images require more storage space, so compressing images to reduce the memory space required for images is an important means to alleviate storage pressure; on the other hand, since images involve specific customer information, images are vulnerable to attacks during transmission, resulting in information leakage, so it is very important to encrypt images to improve the security of images during transmission.

[0067] The inventors have discovered through research that existing encryption algorithms such as the Data Encryption Standard (DES), Advanced Encryption Standard (AES), and Elliptic Curve Cryptograph (ECC) have problems such as low security, high computational complexity, and low algorithm randomness, which further lead to problems such as vulnerability to exhaustive attacks and difficulty in implementation.

[0068] In order to solve the above problems, on the one hand, this scheme uses a preset chaotic system (called a hyperchaotic system) to achieve good chaotic performance while reducing computational complexity, thereby achieving a balance between performance and computational difficulty, and proposes an encryption algorithm based on the preset chaotic system;

[0069] Secondly, this solution effectively combines encryption with compression, decryption with reconstruction, thereby improving the integrity and anti-attack capability of the encryption and decryption process, thereby achieving higher security;

[0070] Thirdly, this scheme uses the plaintext image with user information as input to generate the initial value of the chaotic system, improves the sensitivity of the plaintext, and adds the current timestamp during the encryption process to achieve "one-time one-key", so that the encrypted compressed image obtained each time is different, improving the randomness of the encryption.

[0071] In summary, this scheme uses a chaotic system with good chaotic performance to achieve encryption compression with greater security, anti-attack capability, randomness and plaintext sensitivity, so that attackers cannot crack the encrypted compressed image, and the encrypted compressed image can still be effectively restored after being damaged; and this scheme effectively combines encryption and compression, decryption and reconstruction, so that the encryption process and decryption process based on this scheme form a highly compact and adaptable whole.

[0072] The present solution is described in detail below through various embodiments.

[0073] See also Figure 1 , shows a flow chart of an image processing method provided by an embodiment of the present invention, the image processing method comprising:

[0074] Step S101: calling a preset hash algorithm to process a first plaintext image corresponding to a first user, and calculating a first specified initial value.

[0075] It should be noted that the first plaintext image corresponding to the first user in this solution is equivalent to the customer information image of the first user.

[0076] In the process of specifically implementing step S101, the first plaintext image (denoted as I) corresponding to the first user is split into an R component, a G component and a B component; the preset hash algorithm is called to calculate the encryption sequences corresponding to the R component, the G component and the B component respectively; based on the encryption sequences corresponding to the R component, the G component and the B component, the first specified initial value is calculated; wherein RGB stands for red, green and blue.

[0077] Specifically, the first plaintext image is decomposed into R component, G component and B component, and then the decomposed R component, G component and B component are substituted into the preset hash algorithm (such as SHA-512), and the encryption sequence SE corresponding to the R component is calculated by formula (1): R , the encryption sequence SE corresponding to the G component G , the encryption sequence SE corresponding to the B component B .

[0078]

[0079] Encryption sequence SE corresponding to R component R , the encryption sequence SE corresponding to the G component G , the encryption sequence SE corresponding to the B component B , the first specified initial value of the chaotic system is calculated by formula (2), thereby improving the plaintext sensitivity of the encryption algorithm.

[0080]

[0081] In formula (2), mod is a remainder operation, and the first specified initial value includes x, y, ρ, and β calculated by the above formula (2). From the perspective of the entire encryption process, x, y, ρ, and β are equivalent to the key.

[0082] Step S102: inputting a first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence.

[0083] It should be noted that the chaotic system adopted in this scheme is a 2D-TMCM hyperchaotic system. The full name of 2D-TMCM is 2D Tent-Modulated-Cubic Map. The relevant explanation of the 2D-TMCM hyperchaotic system will be explained after the encryption compression process of this scheme is explained.

[0084] In the specific implementation of step S102, the first specified initial value (x, y, ρ and β) is substituted into the chaotic system for iteration to obtain a first pseudo-random sequence (denoted as S).

[0085] Step S103: using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain a first encrypted compressed image.

[0086] In the specific implementation process of step S103, a preset 2D-CSS scrambling compression algorithm is used to perform time-varying scrambling and compression on the first plaintext image in combination with a first pseudo-random sequence and a current first timestamp to obtain a first encrypted compressed image, wherein 2D-CSS (Two-dimensional Compressive Sensing Scrambling) is called two-dimensional compressed sensing scrambling.

[0087] For the 2D-CSS scrambling compression algorithm, the 2D-CSS scrambling compression algorithm is divided into two parts: time-varying scrambling and 2D CS compression (also known as 2D CS chaotic compression). The time-varying scrambling part adds the use of the current first timestamp, so that the encryption results at different times are completely different, realizing "one-time one-key"; the first measurement matrix used in the 2D CS compression part is generated by the first pseudo-random sequence generated by the 2D-TMCM hyperchaotic system, which improves the randomness of the 2D-CSS scrambling compression algorithm. In addition, the 2D-CSS scrambling compression algorithm encrypts the image before compression, enhances the anti-attack capability, and further improves the security of the algorithm.

[0088] The input of the 2D-CSS scrambling compression algorithm is the first plaintext image (I) and the first pseudo-random sequence (S), and the output of the 2D-CSS scrambling compression algorithm is the first encrypted compressed image (equivalent to the encrypted compressed image, denoted as I en ); The overall process of the 2D-CSS scrambling compression algorithm includes the following processes A1-A7.

[0089] 2D-CSS scrambling compression algorithm:

[0090] A1. According to the first pseudo-random sequence S and the first timestamp, the index sequence is obtained by formula (3): and

[0091]

[0092] In formula (3), i = 1, 2, 3, 4, M×N is the size of the first plaintext image (that is, the customer information image), time is the current first timestamp (equivalent to the current time), ToSeconds(.) is a function that converts time into seconds, and sort(.) is a sorting function.

[0093] A2. Convert the first plaintext image I into a one-dimensional sequence, using formula (4) and Get the scrambling factor f.

[0094]

[0095] in, is a floor rounding function, I(i) refers to the i-th pixel value in the first plaintext image I converted into a one-dimensional sequence, i = 1, 2…, M×N.

[0096] A3. Obtain the scrambled sequence l by formula (5).

[0097]

[0098] A4. Using formula (6), the scrambled sequence l is used to scramble the first plaintext image I into a one-dimensional sequence.

[0099]

[0100] Among them, i=1,2…,M×N.

[0101] A5. Restore the first plaintext image I of the scrambled one-dimensional sequence to its original size, denoted as A (that is, the encrypted scrambled image).

[0102] A6. Generate two first measurement matrices Ψ1 and Ψ2 using the first pseudo-random sequence S according to formula (7).

[0103]

[0104] In formula (7), k = 1, 2, i = 1, 2…, M×N, d is the sampling interval, the reshape(.) function is used to transform the size of Rk into M×N, and orth(.) is the regularization function;

[0105] By retaining the first L rows of ψ1 and ψ2, we can obtain the first measurement matrices Ψ1 and Ψ2; where L is represented by CR is the custom compression ratio. To round down.

[0106] A7. By using formula (8), the first measurement matrix Ψ1 and Ψ2 are used to compress A (the encrypted scrambled image) in process A5 to obtain the first encrypted compressed image (denoted as I en ).

[0107]

[0108] The above processes A1-A7 are related descriptions of the 2D-CSS scrambling compression algorithm proposed in this solution.

[0109] Based on the above-mentioned 2D-CSS scrambling compression algorithm, in some embodiments, a specific implementation method of obtaining the first encrypted compressed image is: using a first pseudo-random sequence and a current first timestamp to perform time-varying scrambling on the first plaintext image to obtain an encrypted scrambled image; generating a first measurement matrix based on the first pseudo-random sequence; and compressing the encrypted scrambled image according to the first measurement matrix to obtain a first encrypted compressed image.

[0110] In a specific application, through the process A1 to the process A5 of the above-mentioned 2D-CSS scrambling compression algorithm, a time-varying scrambling is generated according to the first pseudo-random sequence S and the current first timestamp, and the first plaintext image is scrambled and encrypted to obtain an encrypted scrambled image (that is, A obtained in the above-mentioned process A5);

[0111] The current first timestamp is introduced in the scrambling process of obtaining the encrypted scrambled image, so that different encryption results can be obtained when the same image is encrypted at different times, which can further improve the security of encryption.

[0112] Through the process A6 of the 2D-CSS scrambling compression algorithm, two first measurement matrices Ψ1 and Ψ2 are generated using the first pseudo-random sequence S; and through the process A7 of the 2D-CSS scrambling compression algorithm, the encrypted scrambled image A is compressed to obtain a first encrypted compressed image I en , wherein the first measurement matrix generated using the first pseudo-random sequence is more random and secure.

[0113] Step S104: quantizing the first encrypted compressed image.

[0114] In the specific implementation of step S104, the first encrypted compressed image I en Quantize the first encrypted compressed image I en The value of is converted to between 0 and 255, and the first encrypted compressed image after quantization is recorded as I q .

[0115] Specifically, the first encrypted compressed image I is calculated by formula (9): en Quantify and get I q (The first encrypted compressed image after quantization).

[0116]

[0117] In formula (9), I max and I min I en The maximum and minimum values ​​in , [.] is the rounding operation.

[0118] Step S105: embed the designated association information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated association information of the first user.

[0119] It should be noted that in order to more quickly match the current quantized first encrypted compressed image (also equivalent to the encrypted image) with the customer information in the system or database, some associated information closely related to the image (such as customer number, etc.) can be embedded into the quantized first encrypted compressed image to facilitate subsequent storage and use.

[0120] From the overall point of view, the specified associated information (such as customer number) to be embedded is first converted into an image and scrambled in time, and then embedded into the I q (The first encrypted compressed image after quantization) is saved, and the detailed process is explained as follows.

[0121] In the process of specifically implementing step S105, the designated associated information of the first user is converted into a grayscale image; time-varying scrambling is performed on the grayscale image, and the grayscale image after time-varying scrambling is converted into a bit stream sequence; the quantized first encrypted compressed image is decomposed into a bit plane; the bit stream sequence is used to sequentially replace the binary code of the lowest bit plane of the first encrypted compressed image after quantization and bit plane decomposition, so as to obtain a second encrypted compressed image carrying the designated associated information of the first user.

[0122] Specifically, the specified association information of the first user is converted into a grayscale image of size m×n (denoted as C), where m≤M and n≤N, and M and N are the sizes of the first plaintext image; the grayscale image C is time-varyingly scrambled and converted into a bit stream sequence (denoted as C b ).

[0123] Will I q (The first encrypted compressed image after quantization) is decomposed into 8 bit planes, using the bit stream sequence C b Replace I in sequence q The binary code of the lowest plane is thus embedded in the designated association information of the first user, and a second encrypted compressed image carrying the designated association information of the first user is obtained. The second encrypted compressed image is recorded as I e .

[0124] Step S106: calling a preset S-box generation and replacement algorithm, combining the first pseudo-random sequence and the first timestamp, performing nonlinear replacement on the second encrypted compressed image, and obtaining a final third encrypted compressed image.

[0125] In the specific implementation of step S106, the preset S-box generation and replacement algorithm is called, and the second encrypted compressed image I is generated in combination with the first pseudo-random sequence and the first timestamp.e The final third encrypted compressed image (that is, the final encrypted image) is obtained by performing nonlinear replacement. The final third encrypted compressed image is recorded as I f .

[0126] It should be noted that the S-box replacement algorithm is a nonlinear transformation method used in cryptography. The "preset S-box generation and replacement algorithm" adopted in this scheme is an improved S-box replacement algorithm. The "preset S-box generation and replacement algorithm" adopted in this scheme is also called a time-varying S-box generation and replacement algorithm (abbreviated as time-varying S-box replacement algorithm).

[0127] That is, this solution uses the time-varying S-box generation and replacement algorithm to perform nonlinear replacement on the second encrypted compressed image to obtain the final third encrypted compressed image.

[0128] For the time-varying S-box generation and replacement algorithm, the time-varying S-box generation and replacement algorithm adds the current first timestamp, so that the S-box content and the replacement algorithm are different each time, so that the encryption result is different each time, which improves the security of the algorithm.

[0129] From the perspective of input and output, the input of the time-varying S-box generation and replacement algorithm is the plaintext image (temporarily denoted as I in the time-varying S-box generation and replacement algorithm) and the pseudo-random sequence (temporarily denoted as S), and the output of the time-varying S-box generation and replacement algorithm is the encrypted image after replacement (denoted as I s ); The overall process of the time-varying S-box generation and replacement algorithm includes the following processes B1-B5.

[0130] Time-varying S-box generation and replacement algorithm:

[0131] B1. Assume that the size of the S-box is m×m, and generate the initial S-box Sbox using the pseudo-random sequence S and the current timestamp (that is, the first timestamp mentioned last time) according to formula (10).

[0132]

[0133] B2. Further scramble the initial S-box Sbox using formula (11) to make the S-box more random.

[0134]

[0135] B3. Convert the current timestamp t into binary, and extract the last 8 bits of the converted t as t b According to the above formula (11), t b Perform scrambling, where m×m is 8, and use t b Replace Sbox.

[0136] B4.b The first 4 digits are recorded as r, the last 4 digits are recorded as c, and t b Convert to decimal to use as the replacement row and column indices.

[0137] B5. Use Sbox(r,c) to replace each element in the plaintext image I in a loop, and obtain the final encrypted image (I s ).

[0138] The above processes B1-B5 are related descriptions of the time-varying S-box generation and replacement algorithm proposed in this solution.

[0139] The time-varying S-box generation and replacement algorithm given in the above processes B1-B5 is applied to process the second encrypted compressed image. In some embodiments, the specific implementation method of obtaining the final third encrypted compressed image is: integrating the second encrypted compressed image into a decimal image; calling a preset S-box generation and replacement algorithm (time-varying S-box generation and replacement algorithm), combining the first pseudo-random sequence and the first timestamp, and performing nonlinear replacement on the second encrypted compressed image integrated into the decimal image to obtain the final third encrypted compressed image (denoted as I f ).

[0140] Specifically, the second encrypted compressed image I of the 8-bit plane e The second encrypted compressed image I is integrated into a decimal image, and the time-varying S-box generation and replacement algorithm given in the above process B1-B5 is used to generate and replace the second encrypted compressed image I integrated into a decimal image. e Replace the pixels to further reduce the correlation between them, and obtain the final third encrypted compressed image (I f ).

[0141] In some embodiments, after the final third encrypted compressed image is obtained, the third encrypted compressed image is sent to other objects, thereby completing the encrypted transmission of the first plaintext image corresponding to the first user.

[0142] In the embodiment of the present invention, by performing time-varying scrambling, compression, quantization and nonlinear replacement on the plaintext image, a final encrypted compressed image is obtained, which can reduce the storage pressure of the image while ensuring the security of image transmission.

[0143] The above embodiments of the present invention Figure 1 , is a description of the encryption and compression process provided by this solution. To further help understand the encryption and compression process provided by this solution, Figure 2 The example diagram of the processing logic of the encryption compression process is shown to illustrate the encryption compression process from an overall level.

[0144] like Figure 2As can be seen from the example diagram of the processing logic of the encryption compression process, the customer information image (i.e., the first plaintext image) is used as the input of SHA-512 to generate the initial value of the 2D-TMCM (chaotic system) (i.e., the first specified initial values ​​x, y, ρ, and β);

[0145] The initial value is substituted into the 2D-TMCM to iteratively generate a pseudo-random sequence S (ie, the first pseudo-random sequence) for subsequent encryption compression.

[0146] The 2D CSS algorithm (full name is the 2D-CSS scrambling compression algorithm mentioned above) is used to perform time-varying scrambling and 2D CS chaotic compression on the customer information image, wherein the time-varying scrambling is based on the current timestamp (that is, the first timestamp) and the pseudo-random sequence, and the measurement matrix (that is, the first measurement matrix) used by the 2D CS chaotic compression is generated based on the pseudo-random sequence.

[0147] The result of the scrambled compression (that is, the first encrypted compressed image) is quantized to control the value of the result within a specified range; then the quantized image (that is, the quantized first encrypted compressed image) is decomposed into 8 bit planes, and other related information with higher correlation that has been time-varying scrambled (that is, specified related information) is embedded into the lowest bit plane, and after embedding, it is reintegrated into a decimal image.

[0148] Finally, the decimal image obtained by the above integration is replaced using the time-varying S-box generation and replacement algorithm to obtain the final encrypted image (that is, the final third encrypted compressed image).

[0149] above Figure 2 The relevant content is an example of the encryption compression process.

[0150] Regarding the 2D-TMCM hyperchaotic system mentioned in the above embodiment of the present invention (that is, the chaotic system adopted in this solution), the 2D-TMCM hyperchaotic system is modulated by Tent mapping and Cubic mapping. The specific generation method of the 2D-TMCM hyperchaotic system is divided into the following three steps:

[0151] Step 1: Add the outputs of the Tent map and the Cubic map and extract the common factors 2 and p. β p is used as a modulation coefficient to modify the output result;

[0152] Step 2: Modulo 1 on the output result to make the distribution result more dense;

[0153] Step 3: Expand the mapping obtained by modulo 1 in the second step to two dimensions so that it has a wider traversal result.

[0154] The specific content of the 2D-TMCM hyperchaotic system is shown in formula (12).

[0155]

[0156] In formula (12), i is the number of iterations, i = 0, 1, 2, ..., T-1, T is the final number of iterations; when i = 0, x i and i is the initial value of the chaotic system (that is, Figure 1 x and y in the first specified initial value mentioned in step S101); when i>0, x i and i is the result of the chaotic system iterating i times; x i+1 and i+1 For x i and i The result after iteration, that is, the result of iteration i+1 times; p and β are control parameters, and the value range is p>0 and β>0.

[0157] Through iteration, the 2D-TMCM hyperchaotic system can obtain a pseudo-random sequence S (that is, the above Figure 1 The first pseudo-random sequence mentioned in step S102), S = [x1, y1, x2, y2, ..., x T ,y T ].

[0158] Compared with one-dimensional chaotic systems, high-dimensional chaotic systems have more complex chaotic trajectories, larger key spaces, and more unpredictable chaotic behaviors. 2D-TMCM hyperchaotic systems are more secure for encrypting data. The 2D-TMCM hyperchaotic system provided in this solution can achieve good chaotic performance even with lower dimensions.

[0159] In practical applications, in addition to the above embodiments of the present invention Figure 1 In addition to encrypting and compressing the plaintext image in the manner given above, other encryption parties will also receive the above-mentioned embodiments of the present invention. Figure 1 The encrypted compressed image is processed in the given manner; after receiving the encrypted compressed image sent by other encryption parties, it is necessary to decrypt and reconstruct the encrypted compressed image sent by other encryption parties;

[0160] The decryption and reconstruction process provided by this solution is similar to the above-mentioned embodiment of the present invention. Figure 1 The encryption compression process is basically symmetrical, that is, the decryption and reconstruction process is equivalent to the above-mentioned embodiment of the present invention. Figure 1The inverse process of the encryption compression process is given; the difference is that the 2D PG-CSD (Two-dimensional Projection Gradient with Chaotic Scrambling Decryption) reconstruction algorithm is used in the decryption and reconstruction process, and the 2D PG-CSD reconstruction algorithm has a more precise reconstruction accuracy.

[0161] Specifically, the 2D PG-CSD reconstruction algorithm provided by this scheme is solved in the encryption domain, that is, time-varying scrambling and descrambling are embedded in the reconstruction algorithm, rather than reconstructing first and then descrambling. This can greatly improve the reconstruction accuracy and make the reconstruction result (also called the reconstruction result) almost indistinguishable from the plaintext. The following is a detailed description of the decryption and reconstruction process proposed in this scheme.

[0162] See also Figure 3 , showing a flowchart of decryption and reconstruction provided by an embodiment of the present invention, Figure 3 The following steps are involved:

[0163] Step S301: When a second designated initial value, a second timestamp, and a fourth encrypted compressed image corresponding to a second user are received, the second designated initial value is input into the chaotic system for iteration to obtain a second pseudo-random sequence.

[0164] In the process of specifically implementing step S301, when a second specified initial value, a second timestamp, and a fourth encrypted compressed image corresponding to a second user sent by other encryption parties are received, the second specified initial value is input into the chaotic system (2D-TMCM hyperchaotic system) for iteration to obtain a second pseudo-random sequence.

[0165] It should be noted that other encryption parties adopt the above-mentioned embodiment of the present invention based on the second specified initial value and the second timestamp. Figure 1 In the manner provided, the second plaintext image corresponding to the second user is encrypted and compressed to obtain a fourth encrypted compressed image (equivalent to the final encrypted image).

[0166] Step S302: calling a preset S-box reverse substitution algorithm, combining the second pseudo-random sequence and the second timestamp, and performing nonlinear reverse substitution on the fourth encrypted compressed image to obtain a fifth encrypted compressed image.

[0167] It should be noted that the preset S-box de-substitution algorithm provided by this solution is called a time-varying S-box de-substitution algorithm.

[0168] In the process of specifically implementing step S302, a time-varying S-box reverse substitution algorithm is called, and the fourth encrypted compressed image is nonlinearly reversed in combination with the second pseudo-random sequence and the second timestamp to obtain a fifth encrypted compressed image, wherein the reverse substitution process of the time-varying S-box reverse substitution algorithm involves the second pseudo-random sequence and the second timestamp.

[0169] Step S303: performing bit plane decomposition on the fifth encrypted compressed image to obtain the encrypted designated association information of the second user and the sixth encrypted compressed image.

[0170] In the specific implementation of step S303, the fifth encrypted compressed image (equivalent to the image after reverse substitution) is decomposed into bit planes, the encrypted designated associated information of the second user (such as the customer number, etc.) is extracted, and the sixth encrypted compressed image is obtained; wherein the sixth encrypted compressed image obtained above is equivalent to the above-mentioned embodiment of the present invention. Figure 1 I in step S104 q (The first encrypted compressed image after quantization).

[0171] It should be noted that the encrypted designated associated information of the second user refers to: the associated information embedded in the lowest bit plane of the sixth encrypted compressed image after time-varying scrambling;

[0172] In other words, during the encryption and compression process, the time-varying scrambled designated associated information corresponding to the second user is embedded into the sixth encrypted compressed image, thereby obtaining the fifth encrypted compressed image.

[0173] Step S304: Based on the second pseudo-random sequence and the second timestamp, time-varying inverse scrambling is performed on the encrypted designated associated information of the second user to obtain the decrypted designated associated information of the second user.

[0174] It should be noted that the encrypted designated associated information of the second user extracted is information that has been scrambled and encrypted. Therefore, in the process of specifically implementing step S304, the encrypted designated associated information of the second user is time-varyingly descrambled based on the second pseudo-random sequence and the second timestamp to obtain the decrypted designated associated information of the second user.

[0175] That is, the encrypted designated associated information of the second user is time-varyingly descrambled, and the designated associated information of the second user that has been scrambled and encrypted is restored to readable designated associated information (decrypted designated associated information);

[0176] The decrypted designated association information of the second user can be used to more quickly correspond to the customer information in the system or database.

[0177] Step S305: Integrate the sixth encrypted compressed image into a decimal image and perform inverse quantization.

[0178] In the specific implementation of step S305, the sixth encrypted compressed image of the 8-bit planes is integrated into a decimal image and dequantized.

[0179] Step S306: calling a preset reconstruction algorithm, combining the second pseudo-random sequence and the second timestamp, to reconstruct the sixth encrypted compressed image that is integrated into a decimal image and dequantized, to obtain a second plaintext image corresponding to the second user.

[0180] In the process of specifically implementing step S306, a second measurement matrix is ​​generated based on a second pseudo-random sequence; a preset reconstruction algorithm is called, and the sixth encrypted compressed image that is integrated into a decimal image and dequantized is reconstructed in combination with the second measurement matrix and the second timestamp to obtain a second plaintext image corresponding to the second user, thereby completing the decryption reconstruction of the fourth encrypted compressed image.

[0181] It should be noted that the preset reconstruction algorithm provided by this solution is the 2D PG-CSD reconstruction algorithm, that is, the 2DPG-CSD reconstruction algorithm is used to reconstruct the sixth encrypted compressed image that is integrated into a decimal image and dequantized, and the second plaintext image corresponding to the second user is obtained. The second plaintext image is the decrypted customer information image.

[0182] For the 2D PG-CSD reconstruction algorithm provided in this solution, the 2D PG-CSD reconstruction algorithm is improved based on the 2D projected gradient algorithm (Two-dimensional Projected Gradient, 2D PG). The 2DPG-CSD reconstruction algorithm reconstructs in the encryption domain and effectively combines decryption and reconstruction with high reconstruction accuracy.

[0183] From the perspective of input and output, the input of the 2D PG-CSD reconstruction algorithm is an image (referred to as I in the 2D PG-CSD reconstruction algorithm), and the output of the 2D PG-CSD reconstruction algorithm is a reconstructed image (referred to as ); The overall process of the 2D PG-CSD reconstruction algorithm includes the following processes C1-C8.

[0184] 2D PG-CSD reconstruction algorithm:

[0185] C1. Use the minimum L2 paradigm to initialize image I. Since image I is encrypted before compression, the image obtained at this time is an encrypted image after 2D-CSS scrambling. Therefore, the inverse scrambling algorithm is used to decrypt the encrypted image at this stage to obtain the preliminary decrypted image X.

[0186] C2. Use the gradient descent method to reduce the total variance of the preliminary decrypted image X.

[0187] C3. Use dual-tree discrete wavelet transform to perform orthogonal transform on the preliminary decrypted image X (with reduced total variance), and the result is Dn.

[0188] C4. To enhance sparsity, bivariate shrinkage is performed on Dn.

[0189] C5. Perform inverse dual-tree discrete wavelet transform on the contracted result Dn to obtain

[0190] C6, estimate the encrypted image, specifically, use the time-varying scrambling algorithm to Encrypt to get and will Project to solution space.

[0191] C7, through the Laplacian method Solve and perform inverse scrambling decryption (also called reverse scrambling decryption) on the solution result to obtain

[0192] C8, iterate the above process C1-C6 until and The error value is less than the initial error value, or until the number of iterations is greater than the initial number of iterations, the final reconstructed image is obtained.

[0193] The above processes C1-C8 are the relevant descriptions of the 2D PG-CSD reconstruction algorithm proposed in this scheme.

[0194] The 2D PG-CSD reconstruction algorithm given in the above process C1-C8 is applied to reconstruct the "sixth encrypted compressed image after integration into a decimal image and dequantization" to obtain the second plaintext image corresponding to the second user.

[0195] The above embodiments of the present invention Figure 3 , is a description of the decryption and reconstruction process provided by this solution. To further help understand the decryption and reconstruction process provided by this solution, Figure 4 The processing logic example diagram of the decryption and reconstruction process is shown to illustrate the decryption and reconstruction process from an overall level.

[0196] like Figure 4As can be seen from the processing logic example diagram of the decryption and reconstruction process, the encrypted image (i.e., the fourth encrypted compressed image) is first decomposed using the time-varying S-box decomposition algorithm, and then the decomposition result (i.e., the fifth encrypted compressed image) is decomposed into bit planes to extract the associated information in the lowest bit plane (i.e., the encrypted designated associated information of the second user), and obtain an image of 8 bit planes (i.e., the sixth encrypted compressed image); the associated information in the lowest bit plane is restored by time-varying descrambling to obtain readable associated information (i.e., the decrypted designated associated information).

[0197] It should be noted that a pseudo-random sequence (that is, the second pseudo-random sequence) and a timestamp (that is, the second timestamp) are used in the time-varying descrambling process. The pseudo-random sequence is derived from: substituting the initial value (that is, the second specified initial value x, y, ρ and β) into the 2D-TMCM to iteratively generate a pseudo-random sequence S.

[0198] The image of the 8-bit plane (that is, the sixth encrypted compressed image) is integrated into a decimal image and dequantized. Finally, the dequantized result is decrypted and reconstructed using the 2D PG-CSD reconstruction algorithm to obtain the final plaintext image of the customer information (that is, the second plaintext image).

[0199] It should be noted that the 2D PG-CSD reconstruction algorithm uses a timestamp (ie, a second timestamp) and a measurement matrix (ie, a second measurement matrix), and the measurement matrix is ​​generated based on a pseudo-random sequence (ie, a second pseudo-random sequence).

[0200] The above embodiments of the present invention Figures 1 to 4 , is a complete description of the encryption compression process and decryption reconstruction process proposed in this scheme; from the above Figures 1 to 4 According to the description, this scheme is based on the pseudo-random sequence generated by the 2D-TMCM hyperchaotic system, and realizes encryption compression and decryption reconstruction through the 2D-CSS scrambling compression algorithm, time-varying S-box generation and replacement algorithm, and 2D PG-CSD reconstruction algorithm.

[0201] Among them, the 2D-TMCM hyperchaotic system makes the encryption process more random, which improves the security of this scheme. In addition, the initial value of the 2D-TMCM hyperchaotic system is generated by the customer information image, which makes this scheme have high plaintext sensitivity.

[0202] The 2D-CSS scrambling compression algorithm effectively combines encryption and compression, improving the integrity of encryption compression; the time-varying scrambling, time-varying S-box generation and replacement algorithm can achieve "one-time one-key", and the algorithms obtained at different times are also different, which makes the final encryption results have greater differences and improves the randomness of the encryption process.

[0203] Embedding the associated information closely related to the customer information image into the customer information image facilitates faster matching of the encrypted image with the customer information in the system and database; the 2D PG-CSD reconstruction algorithm can make the reconstruction result more accurate, which is conducive to the transmission and storage of customer information images.

[0204] Corresponding to an image processing method provided by an embodiment of the present invention, see Figure 5 , an embodiment of the present invention further provides a structural block diagram of an image processing device, the image processing device comprising: a first calculation unit 100, a first iteration unit 200, a first processing unit 300, a first quantization unit 400, an embedding unit 500 and a first replacement unit 600;

[0205] The first calculation unit 100 is used to call a preset hash algorithm to process a first plaintext image corresponding to a first user, and calculate a first specified initial value.

[0206] The first iteration unit 200 is used to input a first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence.

[0207] The first processing unit 300 is used to perform time-varying scrambling and compression on the first plaintext image by using the first pseudo-random sequence and the current first timestamp to obtain a first encrypted compressed image.

[0208] The first quantization unit 400 is used to quantize the first encrypted compressed image.

[0209] The embedding unit 500 is used to embed the designated associated information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated associated information of the first user.

[0210] The first replacement unit 600 is used to call a preset S-box generation and replacement algorithm, combine the first pseudo-random sequence and the first timestamp, perform nonlinear replacement on the second encrypted compressed image, and obtain a final third encrypted compressed image.

[0211] In the specific implementation, the first replacement unit 600 is specifically used to: integrate the second encrypted compressed image into a decimal image; call the preset S-box generation and replacement algorithm, combine the first pseudo-random sequence and the first timestamp, and perform nonlinear replacement on the second encrypted compressed image integrated into the decimal image to obtain the final third encrypted compressed image.

[0212] In the embodiment of the present invention, by performing time-varying scrambling, compression, quantization and nonlinear replacement on the plaintext image, a final encrypted compressed image is obtained, which can reduce the storage pressure of the image while ensuring the security of image transmission.

[0213] Preferably, combined Figure 5 As shown in the figure, the first computing unit 100 includes a splitting module, a first computing module and a second computing module. The execution principle of each module is as follows:

[0214] The splitting module is used to split the first plaintext image corresponding to the first user into an R component, a G component and a B component.

[0215] The first calculation module is used to call a preset hash algorithm to calculate encryption sequences corresponding to the R component, the G component and the B component respectively.

[0216] The second calculation module is used to calculate the first specified initial value based on the encryption sequence corresponding to the R component, the G component and the B component.

[0217] Preferably, combined Figure 5 As shown in the figure, the first processing unit 300 includes a time-varying scrambling module, a generation module and a compression module. The execution principle of each module is as follows:

[0218] The time-varying scrambling module is used to perform time-varying scrambling on the first plaintext image using the first pseudo-random sequence and the current first timestamp to obtain an encrypted scrambled image.

[0219] A generating module is used to generate a first measurement matrix based on a first pseudo-random sequence.

[0220] The compression module is used to compress the encrypted scrambled image according to the first measurement matrix to obtain a first encrypted compressed image.

[0221] Preferably, combined Figure 5 The content shown, the embedding unit 500 includes a conversion module, a time-varying scrambling module, a decomposition module and a replacement module, and the execution principle of each module is as follows:

[0222] The conversion module is used to convert the designated association information of the first user into a grayscale image.

[0223] The time-varying scrambling module is used to perform time-varying scrambling on the grayscale image and convert the grayscale image that has completed the time-varying scrambling into a bit stream sequence.

[0224] The decomposition module is used to perform bit plane decomposition on the quantized first encrypted compressed image.

[0225] The replacement module is used to use the bit stream sequence to sequentially replace the binary code of the lowest bit plane of the first encrypted compressed image after quantization and bit plane decomposition, so as to obtain the second encrypted compressed image carrying the designated associated information of the first user.

[0226] Preferably, combined Figure 5 The image processing device further comprises:

[0227] The iteration unit is used to input the second specified initial value into the chaotic system for iteration to obtain a second pseudo-random sequence when receiving the second specified initial value, the second timestamp and the fourth encrypted compressed image corresponding to the second user.

[0228] The second replacement unit is used to call a preset S-box reverse replacement algorithm, combine the second pseudo-random sequence and the second timestamp, and perform nonlinear reverse replacement on the fourth encrypted compressed image to obtain a fifth encrypted compressed image.

[0229] The decomposition unit is used to perform bit plane decomposition on the fifth encrypted compressed image to obtain the encrypted designated associated information of the second user and the sixth encrypted compressed image.

[0230] The second processing unit is configured to perform time-varying descrambling on the encrypted designated associated information of the second user based on the second pseudo-random sequence and the second timestamp to obtain the decrypted designated associated information of the second user.

[0231] A third processing unit, used for integrating the sixth encrypted compressed image into a decimal image and performing inverse quantization;

[0232] The reconstruction unit is used to call a preset reconstruction algorithm, combine the second pseudo-random sequence and the second timestamp, reconstruct the sixth encrypted compressed image that is integrated into a decimal image and dequantized, and obtain a second plaintext image corresponding to the second user.

[0233] In a specific implementation, the reconstruction unit is specifically used to: generate a second measurement matrix based on a second pseudo-random sequence; call a preset reconstruction algorithm, combine the second measurement matrix and the second timestamp, reconstruct the sixth encrypted compressed image that is integrated into a decimal image and dequantized, and obtain a second plaintext image corresponding to the second user.

[0234] In summary, the embodiments of the present invention provide an image processing method and device, which obtains a final encrypted compressed image by performing time-varying scrambling, compression, quantization and nonlinear replacement on a plaintext image, thereby reducing the storage pressure of the image while ensuring the security of image transmission.

[0235] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, 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 creative work.

[0236] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0237] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image processing method, characterized in that: The method comprises: Calling a preset hash algorithm to process a first plaintext image corresponding to the first user, and calculating a first specified initial value; Inputting the first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence; Using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain a first encrypted compressed image; quantizing the first encrypted compressed image; embedding the designated association information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated association information of the first user; The preset S-box generation and replacement algorithm is called, and the second encrypted compressed image is nonlinearly replaced in combination with the first pseudo-random sequence and the first timestamp to obtain a final third encrypted compressed image.

2. The method according to claim 1, characterized in that Calling a preset hash algorithm to process a first plaintext image corresponding to the first user and calculating a first specified initial value includes: Splitting a first plaintext image corresponding to the first user into an R component, a G component, and a B component; Calling a preset hash algorithm to respectively calculate encryption sequences corresponding to the R component, the G component, and the B component; A first designated initial value is calculated based on the encryption sequences corresponding to the R component, the G component, and the B component.

3. The method according to claim 1, characterized in that Using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling and compression on the first plaintext image to obtain a first encrypted compressed image includes: Using the first pseudo-random sequence and the current first timestamp to perform time-varying scrambling on the first plaintext image to obtain an encrypted scrambled image; generating a first measurement matrix based on the first pseudo-random sequence; The encrypted scrambled image is compressed according to the first measurement matrix to obtain a first encrypted compressed image.

4. The method according to claim 1, characterized in that: Embedding the designated association information of the first user into the quantized first encrypted compressed image to obtain a second encrypted compressed image carrying the designated association information of the first user includes: converting the specified association information of the first user into a grayscale image; Performing time-varying scrambling on the grayscale image, and converting the grayscale image after the time-varying scrambling into a bit stream sequence; Performing bit plane decomposition on the quantized first encrypted compressed image; The bit stream sequence is used to sequentially replace the binary code of the lowest bit plane of the first encrypted compressed image after quantization and bit plane decomposition, so as to obtain a second encrypted compressed image carrying the designated associated information of the first user.

5. The method according to claim 1, characterized in that: Calling a preset S-box generation and replacement algorithm, combining the first pseudo-random sequence and the first timestamp, performing nonlinear replacement on the second encrypted compressed image, and obtaining a final third encrypted compressed image, including: integrating the second encrypted compressed image into a decimal image; The preset S-box generation and replacement algorithm is called, and the second encrypted compressed image integrated into a decimal image is nonlinearly replaced in combination with the first pseudo-random sequence and the first timestamp to obtain a final third encrypted compressed image.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: When receiving the second designated initial value, the second timestamp and the fourth encrypted compressed image corresponding to the second user, inputting the second designated initial value into the chaotic system for iteration to obtain a second pseudo-random sequence; Calling a preset S-box reverse substitution algorithm, combining the second pseudo-random sequence and the second timestamp, and performing nonlinear reverse substitution on the fourth encrypted compressed image to obtain a fifth encrypted compressed image; Performing bit plane decomposition on the fifth encrypted compressed image to obtain the encrypted designated association information of the second user and a sixth encrypted compressed image; Based on the second pseudo-random sequence and the second timestamp, time-varying inverse scrambling is performed on the encrypted designated associated information of the second user to obtain the decrypted designated associated information of the second user; Integrate the sixth encrypted compressed image into a decimal image and perform inverse quantization; The preset reconstruction algorithm is called, and the sixth encrypted compressed image that is integrated into a decimal image and dequantized is reconstructed in combination with the second pseudo-random sequence and the second timestamp to obtain a second plaintext image corresponding to the second user.

7. The method according to claim 6, characterized in that Calling a preset reconstruction algorithm, combining the second pseudo-random sequence and the second timestamp, reconstructing the sixth encrypted compressed image that is integrated into a decimal image and dequantized, to obtain a second plaintext image corresponding to the second user, including: generating a second measurement matrix based on the second pseudo-random sequence; A preset reconstruction algorithm is called, and the sixth encrypted compressed image that is integrated into a decimal image and dequantized is reconstructed in combination with the second measurement matrix and the second timestamp to obtain a second plaintext image corresponding to the second user.

8. An image processing device, characterized in that: The device comprises: A first calculation unit, configured to call a preset hash algorithm to process a first plaintext image corresponding to a first user, and calculate a first specified initial value; A first iteration unit, used for inputting the first specified initial value into a preset chaotic system for iteration to obtain a first pseudo-random sequence; A first processing unit, configured to perform time-varying scrambling and compression on the first plaintext image using the first pseudo-random sequence and a current first timestamp to obtain a first encrypted compressed image; A first quantization unit, configured to quantize the first encrypted compressed image; An embedding unit, configured to embed the designated associated information of the first user into the quantized first encrypted compressed image, to obtain a second encrypted compressed image carrying the designated associated information of the first user; The first replacement unit is used to call a preset S-box generation and replacement algorithm, combine the first pseudo-random sequence and the first timestamp, perform nonlinear replacement on the second encrypted compressed image, and obtain a final third encrypted compressed image.

9. The device according to claim 8, characterized in that The first computing unit comprises: A splitting module, used to split the first plaintext image corresponding to the first user into an R component, a G component and a B component; A first calculation module, used to call a preset hash algorithm to respectively calculate encryption sequences corresponding to the R component, the G component and the B component; The second calculation module is used to calculate a first specified initial value based on the encryption sequences corresponding to the R component, the G component and the B component.

10. The device according to claim 8, characterized in that The first processing unit comprises: A time-varying scrambling module, configured to perform time-varying scrambling on the first plaintext image using the first pseudo-random sequence and a current first timestamp to obtain an encrypted scrambled image; A generating module, configured to generate a first measurement matrix based on the first pseudo-random sequence; A compression module is used to compress the encrypted scrambled image according to the first measurement matrix to obtain a first encrypted compressed image.