Frequency domain image transmission method and device based on semi-tensor product, and computer equipment
By using a frequency domain image transmission method based on semi-tensor product and generating random matrices and sequences through chaotic systems for multi-layer encryption, the problem of low computational efficiency and insufficient security of traditional encryption algorithms in image data transmission is solved, thus achieving efficient and secure image data transmission and storage.
Patent Information
- Application Number
- CN202510945976.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-11-04
AI Technical Summary
Existing traditional encryption algorithms suffer from low computational efficiency, insufficient security, and limited key space in image data encryption, making it difficult to meet the requirements of efficient real-time transmission and strong anti-attack capabilities.
A frequency domain image transmission method based on half-tensor product is adopted. By setting multiple keys as initial values of the chaotic system, multiple sets of chaotic sequences are generated and preprocessed. The chaotic system is used to generate random matrices and random sequences, and half-tensor product operation and pixel diffusion encryption are performed on the image to form a multi-layer encryption mechanism.
It improves the security and processing efficiency of image data transmission and storage, enhances resistance to known attack patterns, and ensures data integrity and availability, enabling lossless restoration to the original plaintext image.
Smart Images

Figure CN120897016A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image transmission technology, and in particular to a frequency domain image transmission method, apparatus, computer device, computer-readable storage medium, and computer program product based on half-tensor product. Background Technology
[0002] With the rapid development of internet and IoT technologies, the transmission volume of image data in mobile communication networks is growing exponentially. Image data often carries personal privacy information and may also involve trade secrets or even national security, making it imperative to implement stricter standards and technical safeguards for encryption protection during transmission and storage.
[0003] Currently, traditional symmetric encryption algorithms such as Data Encryption Standard (DES) and Advanced Encryption Standard (AES) are widely used for image data encryption. The DES algorithm uses a Feistel structure, performing 16 rounds of permutation and substitution operations on 64-bit data blocks. However, its short 56-bit key length is insufficient for modern security requirements. In contrast, AES employs a substitution-permutation network structure, performing encryption operations on 128-bit data blocks. It supports 128, 192, and 256-bit keys and corresponding 10, 12, and 14 rounds of encryption. Through S-box substitution and round key addition, it achieves strong diffusion and obfuscation capabilities. AES significantly outperforms DES in security and resistance to attacks, thus becoming the more mainstream solution in current image encryption scenarios.
[0004] However, traditional encryption algorithms were originally designed for text data and have good performance in text data encryption, but they have certain limitations in image data encryption applications, mainly in the following three aspects: low computational efficiency, making it difficult to meet the needs of efficient real-time transmission; insufficient security, and the ability to resist attacks needs to be improved; and limited key space, making them vulnerable to brute-force attacks.
[0005] Therefore, there is an urgent need for a frequency domain image transmission method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on half-tensor product to improve the security and processing efficiency of image data during transmission and storage. Summary of the Invention
[0006] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product based on half-tensor product for frequency domain image transmission, which can improve the security and processing efficiency of image data during transmission and storage.
[0007] In a first aspect, this application provides a frequency domain image transmission method based on half-tensor product, comprising:
[0008] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0009] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0010] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0011] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0012] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0013] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0014] In one embodiment, the preprocessing of multiple sets of chaotic sequences to generate random matrices and random sequences includes:
[0015] At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix.
[0016] The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
[0017] In one embodiment, obtaining multiple sub-band components of the original plaintext image in the wavelet domain includes:
[0018] The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain;
[0019] The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0020] In one embodiment, the step of using a random matrix generated by a chaotic system to perform a half-tensor product operation and encryption on the sub-band components to obtain encrypted frequency domain sub-band components includes:
[0021] Using a random matrix generated by a chaotic system, a half-tensor product operation and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
[0022] In one embodiment, converting the sub-band components of the encrypted frequency domain into a spatial domain image to form a preliminary encrypted image includes:
[0023] The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0024] In one embodiment, the step of performing image restoration and decryption on the final encrypted image at the receiving end to obtain the original plaintext image includes:
[0025] Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
[0026] Secondly, this application also provides a frequency domain image transmission device based on half-tensor product, comprising:
[0027] The encryption module is used to set multiple keys and use the set keys as the initial values of the chaotic system. It iterates through the chaotic system to generate multiple sets of chaotic sequences and preprocesses the multiple sets of chaotic sequences to generate random matrices and random sequences.
[0028] The encryption module is also used to obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0029] The encryption module is also used to perform half-tensor product operations and encryption operations on the sub-band components using a random matrix generated by a chaotic system, so as to obtain the encrypted sub-band components in the frequency domain.
[0030] The encryption module is also used to convert the sub-band components of the encrypted frequency domain into spatial domain images to form a preliminary encrypted image;
[0031] The encryption module is also used to perform horizontal pixel diffusion encryption and vertical pixel diffusion encryption on the preliminary encrypted image using a random sequence generated by a chaotic system to obtain the final encrypted image;
[0032] An encrypted image transmission module is used to transmit the final encrypted image to the receiving end;
[0033] The decryption module is used to perform image restoration and decryption on the final encrypted image at the receiving end to obtain the original plaintext image.
[0034] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0035] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0036] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0037] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0038] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0039] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0040] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0041] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0042] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0043] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0044] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0045] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0046] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0047] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0048] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0049] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0050] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0051] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0052] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0053] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0054] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0055] The aforementioned frequency domain image transmission method, apparatus, computer equipment, computer-readable storage medium, and computer program product based on semi-tensor product (STP) generate multiple chaotic sequences by setting multiple keys as initial values for a chaotic system, and further preprocessing to generate random matrices and random sequences. The sensitivity of the initial values of the chaotic system and the complexity of the random matrices make the encryption process highly random and unpredictable, effectively preventing the risk of key cracking. By using two-dimensional discrete wavelet transform to decompose the image into multiple sub-band components and performing encryption operations on sub-bands of different frequencies, uniform processing of the entire image is avoided, significantly improving encryption efficiency. Simultaneously, the introduction of semi-tensor product operations further optimizes the encryption process and accelerates the computation speed. Based on the initially encrypted image, horizontal and vertical pixel diffusion operations are used to comprehensively disperse the statistical characteristics between image pixels. This multi-layer encryption mechanism makes the encrypted image pixel values more random, difficult to analyze and crack, and significantly enhances resistance to known attack patterns. The encrypted image can be losslessly restored to the original plaintext image through inverse pixel diffusion operations and inverse discrete wavelet transform, ensuring data integrity and availability without losing any original image information. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is an application environment diagram of a frequency domain image transmission method based on half-tensor product in one embodiment;
[0058] Figure 2 This is a flowchart illustrating a frequency domain image transmission method based on half-tensor product in one embodiment.
[0059] Figure 3 This is an architecture diagram of a frequency domain image encryption method based on half-tensor product in one embodiment;
[0060] Figure 4 This is a diagram illustrating the effect of discrete wavelet transform in one embodiment.
[0061] Figure 5 This is a schematic diagram of a pixel lateral diffusion operation in one embodiment;
[0062] Figure 6 This is a schematic diagram of a pixel matrix expanded row by row in one embodiment;
[0063] Figure 7 This is a schematic diagram of a pixel vertical diffusion operation in one embodiment;
[0064] Figure 8 This is a schematic diagram of the pixel matrix expanded column-wise in one embodiment;
[0065] Figure 9 This is an architecture diagram of a frequency domain image decryption method based on half-tensor product in one embodiment;
[0066] Figure 10 This is a structural block diagram of a frequency domain image transmission device based on half-tensor product in one embodiment;
[0067] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0069] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0070] The frequency domain image transmission method based on half-tensor product provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0071] Server 104 controls terminal 102 (encryption end) to use the set key as the initial value of the chaotic system, iteratively generate multiple sets of chaotic sequences, and preprocess the multiple sets of chaotic sequences to generate random matrices and random sequences; obtain multiple sub-band components of the original plaintext image in the wavelet domain; use the random matrix generated by the chaotic system to perform half-tensor product operations and encryption operations on the sub-band components to obtain the encrypted frequency domain sub-band components; convert the encrypted frequency domain sub-band components into a spatial domain image to form a preliminary encrypted image; use the random sequence generated by the chaotic system to perform horizontal pixel diffusion encryption and vertical pixel diffusion encryption on the preliminary encrypted image to obtain the final encrypted image; transmit the final encrypted image to the receiving end; server 104 controls terminal 102 (decryption end) to perform image restoration and decryption on the final encrypted image at the receiving end to obtain the original plaintext image.
[0072] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0073] In one exemplary embodiment, such as Figure 2As shown, a frequency domain image transmission method based on half-tensor product is provided, which is then applied to... Figure 1 Taking 102 as an example, the explanation includes the following steps S202 to S212. Wherein:
[0074] Step S202: Set multiple keys and use the set keys as the initial values of the chaotic system. Iterate the chaotic system to generate multiple sets of chaotic sequences and preprocess the multiple sets of chaotic sequences to generate random matrices and random sequences.
[0075] Specifically, in an encryption system, the key is a crucial parameter used to encrypt and decrypt data. The security of the key directly affects the security of the entire encryption system. To improve encryption security, multiple keys are set. These keys are used to initialize a chaotic system. The behavior of a chaotic system is extremely sensitive to initial conditions. By using the key as the initial value of the chaotic system, it can be ensured that the generated chaotic sequence has a high degree of randomness and unpredictability.
[0076] While chaotic sequences possess a high degree of randomness, their value range may not be suitable for direct use in encryption operations. Preprocessing aims to transform chaotic sequences into a format suitable for encryption. Chaotic systems generate chaotic sequences through iterative computation; each iteration updates the state according to the system's dynamic equations, generating multiple sets of chaotic sequences through repeated iterations. Each set of chaotic sequences can be used for different encryption operations, such as generating random matrices or random sequences.
[0077] Step S204: Obtain multiple sub-band components of the original plaintext image in the wavelet domain.
[0078] Specifically, obtaining multiple sub-band components of the original plaintext image in the wavelet domain refers to transforming the original plaintext image from the spatial domain to the wavelet domain using two-dimensional discrete wavelet transform (2D-DWT) and extracting sub-band components of different frequencies and directions. These sub-band components contain feature information of the image at different scales and directions.
[0079] Two-dimensional discrete wavelet transform is a method to convert an image from the spatial domain (pixel domain) to the wavelet domain. Through a series of filtering and downsampling operations, the image is decomposed into multiple sub-band components, each of which represents the characteristics of the image in a specific frequency range and direction.
[0080] Step S206: Using the random matrix generated by the chaotic system, perform half-tensor product operation and encryption operation on the sub-band components to obtain the encrypted frequency domain sub-band components.
[0081] Specifically, the semi-tensor product (STP) is a generalization of matrix multiplication that allows for the unified representation and computation of matrices of arbitrary dimensions. STP is frequently used in image processing to perform complex matrix operations. By performing a semi-tensor product operation on subband components using a random matrix, the random matrix can be combined with the subband component matrix to achieve encryption operations.
[0082] By combining the random matrix with the subband components through a semi-tensor product operation, the encrypted subband components are obtained. This encryption operation scrambles the original structure of the subband components, improving encryption security. The encrypted subband components are no longer directly identifiable in the frequency domain and require a corresponding decryption process to restore them to their original form.
[0083] Step S208: Convert the sub-band components of the encrypted frequency domain into spatial domain images to form a preliminary encrypted image.
[0084] Specifically, the inverse discrete wavelet transform (DWT) is the inverse process of the discrete wavelet transform (DWT), and its purpose is to restore the sub-band components in the frequency domain to the original spatial domain image. The specific steps are as follows:
[0085] Input: Encrypted subband components, including low-frequency approximate subband (LL) and high-frequency detail subband (LH, HL, HH).
[0086] Operation: By using the inverse discrete wavelet transform algorithm, these sub-band components are recombined to restore the spatial domain representation of the image.
[0087] Output: Preliminary encrypted image. This is an image in the spatial domain whose pixel values have been encrypted, making it impossible to directly identify the original image content.
[0088] The specific process involves taking the encrypted low-frequency approximation subband (LL) and high-frequency detail subbands (LH, HL, HH) as input. Upsampling (inserting zeros between each element) is then performed on both the LL and HH subbands. The upsampled data is then filtered to recover the image's detail information. The filtered data is then recombined to form a complete image. The output is a pre-encrypted image, represented in the spatial domain, whose pixel values are encrypted and cannot be directly identified from the original image content.
[0089] Step S210: Using the random sequence generated by the chaotic system, perform horizontal pixel diffusion encryption and vertical pixel diffusion encryption on the preliminary encrypted image to obtain the final encrypted image.
[0090] Specifically, horizontal pixel diffusion encryption refers to row-wise expansion: the pixel matrix of the initially encrypted image is expanded row-wise and concatenated into a one-dimensional vector P of length M×N. Through this operation, the current pixel is affected not only by the random sequence but also by the previous pixel, thus diffusing the correlation between pixels. The encrypted vector after horizontal pixel diffusion is rearranged into a two-dimensional pixel matrix in row order.
[0091] Vertical pixel diffusion encryption refers to column-wise expansion: the pixel matrix of the initially encrypted image is expanded column-wise and concatenated into a one-dimensional vector of length M×N. Through this operation, the current pixel is affected not only by the random sequence but also by the previous pixel, thus further diffusing the correlation between pixels. The encrypted vector after vertical pixel diffusion is rearranged into a two-dimensional pixel matrix in column order.
[0092] After horizontal and vertical pixel diffusion operations, the resulting two-dimensional pixel matrix is the final encrypted image C. Through bidirectional pixel diffusion operations, the statistical characteristics between image pixels are completely broken down, making the pixel values of the encrypted image more random and difficult to analyze and crack.
[0093] Step S212: The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0094] Specifically, the encrypted image (the final encrypted image) is sent to the receiving end via a network or other transmission medium. Because the image has been encrypted, even if intercepted during transmission, attackers cannot directly obtain the image content. It supports multiple communication protocols such as TCP, UDP, HTTP / HTTPS, etc., and can be combined with digital signatures and authentication mechanisms to enhance transmission security and tamper resistance. The encryption process ensures the security of the image during transmission, preventing data leakage and unauthorized access. The receiving end refers to the device or system that receives the encrypted image, typically located in a secure environment. The receiving end uses the same key and decryption algorithm as the sending end to decrypt the encrypted image.
[0095] In the aforementioned frequency domain image transmission method based on semi-tensor product, multiple keys are set as initial values for the chaotic system to generate multiple sets of chaotic sequences, which are then further preprocessed to generate random matrices and random sequences. The sensitivity of the initial values of the chaotic system and the complexity of the random matrices make the encryption process highly random and unpredictable, effectively preventing the risk of key cracking. Two-dimensional discrete wavelet transform is used to decompose the image into multiple sub-band components, and encryption operations are performed on sub-bands of different frequencies, avoiding uniform processing of the entire image and significantly improving encryption efficiency. Simultaneously, the introduction of semi-tensor product operations further optimizes the encryption process and accelerates the computation speed. Based on the initially encrypted image, horizontal and vertical pixel diffusion operations are used to completely disperse the statistical characteristics between image pixels. This multi-layer encryption mechanism makes the encrypted image pixel values more random, difficult to analyze and crack, and significantly enhances resistance to known attack patterns. The encrypted image can be losslessly restored to the original plaintext image through inverse pixel diffusion operations and inverse discrete wavelet transform, ensuring data integrity and availability without losing any original image information.
[0096] In one embodiment, multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences, including:
[0097] At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix.
[0098] The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
[0099] Specifically, at least one chaotic sequence from multiple sets of chaotic sequences is converted into a random sequence conforming to a first preset value range. For example, the value range of the chaotic sequence can be converted to [0,1] or [0,255]. A preset number of elements are selected from the random sequence within the first preset value range to form a two-dimensional random matrix. For example, a matrix of size 4x4 or 8x8 can be selected. The remaining chaotic sequences from the multiple sets of chaotic sequences are converted into integer random sequences of a preset length conforming to a second preset value range. For example, the value range of the chaotic sequence can be converted to [0,255], and a sequence of length 256 can be selected.
[0100] For example, the encryption process is as follows Figure 3 As shown, three keys are first set as initial values for the chaotic system. The chaotic system iterates to generate three sets of chaotic sequences, which are then preprocessed to obtain a random matrix for the semi-tensor product operation and a random sequence for pixel diffusion. A three-dimensional Lorenz chaotic system is used, and its system state equation is:
[0101]
[0102] In the formula, x, y, and z are the three state variables of the three-dimensional Lorenz chaotic system, and σ, ρ, and β are the control parameters of the chaotic system, with values set as follows: σ = 10, ρ = 28, and β = 8 / 3. Three random keys x0, y0, and z0 are selected within the interval [0,1] as the initial values of the three-dimensional Lorenz chaotic system, either manually set or generated using a random number generator. The chaotic system is iterated to generate chaotic sequences. Assuming the plaintext image size is M×N, where M is the number of rows and N is the number of columns, the three-dimensional Lorenz chaotic system is iterated M×N times to generate three chaotic sequences X, Y, and Z of length M×N.
[0103] Furthermore, the three chaotic sequences are preprocessed. First, the chaotic sequence X is preprocessed as follows to transform it into a random number sequence with a value range of [0,1]:
[0104] X(i) = mod(X(i), 1)
[0105] In the formula, X(i) is the i-th element of the chaotic sequence X, i = 1, 2, ..., M × N, and mod(·) is the modulo operation. Subsequently, the first MN / 16 elements of the sequence X are extracted and transformed into a two-dimensional matrix of (M / 4) × (N / 4).
[0106] The sequence Y is preprocessed as follows to transform it into a random integer sequence in the interval [0, 255]:
[0107] Y(i) = mod(round(Y(i)×10)) 12 ), 256)
[0108] In the formula, Y(i) is the i-th element of the chaotic sequence Y, i = 1, 2, ..., M × N, and round(·) is the rounding operation.
[0109] The sequence Z is preprocessed as follows to transform it into a random integer sequence in the interval [0, 255]:
[0110] Z(i) = mod(round(Z(i)*10) 12 ), 256)
[0111] In the formula, Z(i) is the i-th element of the chaotic sequence Z, i = 1, 2, ..., M × N.
[0112] After preprocessing, X is transformed into a two-dimensional random matrix of size (M / 4)×(N / 4), and Y and Z are transformed into random integer sequences of length M×N with a value range of [0,255].
[0113] In this embodiment, the random matrices and random sequences generated by the chaotic system possess high randomness and unpredictability, making them suitable for image encryption. The generation process of the random matrices and random sequences utilizes the initial value sensitivity and complexity of the chaotic system, ensuring the security of the encryption process. The generated random matrices and random sequences can be used for different encryption operations, such as half-tensor product operations and pixel diffusion operations, improving the applicability and flexibility of the encryption method.
[0114] In one embodiment, obtaining multiple sub-band components of the original plaintext image in the wavelet domain includes:
[0115] The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain;
[0116] The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; among which, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0117] Specifically, the two-dimensional discrete wavelet transform is a method for converting an image from the spatial domain (pixel domain) to the wavelet domain. It decomposes the image into multiple sub-band components through a series of filtering and downsampling operations. Each sub-band component represents the image's features within a specific frequency range and direction. In the wavelet transform, the image is decomposed into multiple sub-band components, each containing information about the image at different frequencies and directions:
[0118] Low-frequency subband component (LL): Contains the main information and overall structure of the image, reflecting the smooth changes and large-scale features of the image.
[0119] Horizontal high-frequency subband component (LH): Contains horizontal detail information of the image, such as horizontal edges and textures.
[0120] Vertical high-frequency subband component (HL): Contains vertical detail information of the image, such as vertical edges and textures.
[0121] Diagonal high-frequency subband component (HH): Contains diagonal detail information of the image, such as diagonal edges and textures.
[0122] Two-dimensional discrete wavelet transform can perform multi-level decomposition, with each level further refining the frequency information of the image. For example:
[0123] First-order decomposition: The image is decomposed into one low-frequency subband (LL) and three high-frequency subbands (LH, HL, HH).
[0124] Second-level decomposition: The low-frequency subband (LL) in the first-level decomposition is further decomposed to obtain finer frequency information.
[0125] Multi-level decomposition: Multi-level decomposition can be performed as needed, and each level of decomposition will further refine the frequency information of the image.
[0126] For example, the discrete wavelet transform is applied to convert the plaintext image from spatial domain pixels to wavelet domain coefficients, decomposing the image into four frequency domain sub-band components.
[0127] Specifically, the discrete wavelet transform employs the Haar orthogonal wavelet basis. A two-dimensional discrete wavelet transform is performed on the input plaintext image P of size M×N, decomposing the plaintext image into four frequency domain sub-band components: {LL,LH,HL,HH}=DWT(P). Where DWT(·) is the discrete wavelet transform function.
[0128] The four frequency domain sub-band components each have a size of (M / 2)×(N / 2), where the low-frequency approximate sub-band component (i.e., the low-frequency inherent component) LL represents the approximate component of the image, containing the main information of the image, such as... Figure 4 As shown; the other three sub-band components only carry secondary information of the image, where the horizontal high-frequency sub-band component LH represents the horizontal edge information of the image, the vertical high-frequency sub-band component HL represents the vertical edge information of the image, and the diagonal high-frequency sub-band component HH represents the diagonal detail information of the image.
[0129] In this embodiment, the image is decomposed into multiple sub-band components through wavelet transform, each representing the image's features in different frequency ranges and directions. This multi-scale analysis can better capture the image's details and structural information. High-frequency sub-band components typically contain less energy and can be compressed through thresholding or quantization, thereby reducing the data volume. Sub-band component data can be used for image feature extraction, such as edge detection and texture analysis. In image encryption, encrypting different sub-band components can improve both the security and efficiency of the encryption.
[0130] In one embodiment, a random matrix generated by a chaotic system is used to perform a half-tensor product operation and encryption operation on the sub-band components to obtain the encrypted frequency domain sub-band components, including:
[0131] By using a random matrix generated by a chaotic system, half-tensor product operations and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
[0132] Specifically, a highly random and unpredictable random matrix is first generated using a chaotic system. Then, these random matrices are used to perform a semi-tensor product operation on the wavelet domain low-frequency sub-band (LL) component of the image. This operation combines the random matrix with the LL component matrix, achieving initial encryption. To further enhance the encryption effect, the result of the semi-tensor product operation is subjected to a nonlinear encryption operation, such as transformation using a nonlinear function (e.g., Sigmoid or ReLU), thereby completely disrupting the original structure of the LL component, making it difficult to analyze and crack. The resulting encrypted frequency domain LL component retains the main information of the image while possessing extremely high security, providing a solid foundation for subsequent image encryption processing.
[0133] For example, a matrix semi-tensor product operation is performed using a random matrix X generated by a three-dimensional Lorenz chaotic system and a low-frequency approximate subband LL to achieve nonlinear encryption of the main information in the frequency domain of an image. The following semi-tensor product operation is performed:
[0134]
[0135] In the formula, LL is the low-frequency approximate subband, and LL' is the encrypted low-frequency approximate subband after matrix half-tensor product operation. This represents the operation of half-tensor product. This is a tensor product operation, where In is the identity matrix. This operation, while maintaining encryption strength, can effectively prevent the matrix rank from decreasing, thus improving the non-linearity of the encryption.
[0136] To balance the effectiveness of encryption with the computational burden, this application encrypts the low-frequency approximate subband LL, which carries the main information of the image, by performing matrix half-tensor product operation, while keeping the other frequency domain subband components LH, HL, and HH unchanged.
[0137] The semi-tensor product encryption operation is reversible; the information before encryption can be recovered by performing the inverse semi-tensor product operation. The operation process for recovering the information before encryption by performing the inverse semi-tensor product operation is as follows:
[0138]
[0139] In the formula, LL represents the low-frequency approximate subband, and LL' represents the encrypted low-frequency approximate subband after matrix semi-tensor product operation, where represents the semi-tensor product operation. For tensor product operations, I n It is an identity matrix.
[0140] In this embodiment, through semi-tensor product operations and nonlinear encryption, the low-frequency subband components are encrypted into highly random and unpredictable data, enhancing encryption security. The nonlinear encryption operation introduces additional complexity, making the encrypted data more difficult to analyze and crack. During decryption, the encrypted low-frequency subband components can be restored to their original form through inverse operations (inverse semi-tensor product operation and inverse nonlinear transformation), ensuring data integrity and availability.
[0141] In one embodiment, the sub-band components of the encrypted frequency domain are converted into a spatial domain image to form a preliminary encrypted image, including:
[0142] The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0143] Specifically, the two-dimensional discrete wavelet transform (IDWT) is the inverse process of the discrete wavelet transform (DWT), and its purpose is to restore the sub-band components in the frequency domain to the original spatial domain image. The specific steps are as follows:
[0144] Input the encrypted low-frequency subband component (LL), horizontal high-frequency subband component (LH), vertical high-frequency subband component (HL), and diagonal high-frequency subband component (HH).
[0145] The IDWT algorithm is used to recombine these sub-band components to restore the spatial domain representation of the image. This involves upsampling each sub-band component by inserting zeros between each element. The upsampled data is then filtered to recover image details. The filtered data is recombined to form the complete image. Finally, IDWT converts the encrypted sub-band component data into a spatial domain image, creating a preliminary encrypted image.
[0146] The output is a preliminary encrypted image, which is an image in the spatial domain whose pixel values have been encrypted and cannot be directly identified from the original image content.
[0147] For example, the encrypted low-frequency approximate subband LL' and the untransformed frequency domain subband components LH, HL, and HH are input into the inverse discrete wavelet transform process, and the spatial domain image is reconstructed through the inverse discrete wavelet transform. The encrypted wavelet domain coefficients are mapped back to the spatial domain through the inverse discrete wavelet transform to obtain the preliminary encrypted image P' in the spatial domain:
[0148] P' = IDWT{LL^',LH,HL,HH}; where IDWT(·) is the discrete wavelet inverse transform function.
[0149] After the discrete wavelet inverse transform, the four frequency domain sub-band components with a size of (M / 2)×(N / 2) are reconstructed into a spatial domain image P' with a size of M×N, which is the preliminary encrypted image.
[0150] In this embodiment, the encrypted sub-band component data is converted into a spatial domain image using inverse discrete wavelet transform, forming a preliminary encrypted image. This image, represented in the spatial domain, has encrypted pixel values, making it impossible to directly identify the original image content. The preliminary encrypted image retains the randomness and unpredictability of the encrypted frequency domain sub-band components, further enhancing encryption security. During decryption, the preliminary encrypted image can be restored to the original image through inverse operations (i.e., performing discrete wavelet transform and inverse transform again), ensuring data integrity and usability.
[0151] In one embodiment, the bidirectional pixel diffusion operation includes two stages: horizontal pixel diffusion and vertical pixel diffusion.
[0152] Based on the initial encrypted image, a random sequence Y generated by the three-dimensional Lorenz chaotic system is used to perform horizontal pixel diffusion on the image, and then a random sequence Z is used to perform vertical pixel diffusion on the image, thus completely disrupting the statistical characteristics between the image pixels.
[0153] like Figure 5 As shown, the first stage of the bidirectional pixel diffusion operation is lateral pixel diffusion encryption. First, the spatial domain image pixel matrix is expanded row-wise, as follows: Figure 6 As shown, they are connected to form a one-dimensional vector P1 of length M×N.
[0154] Furthermore, the vector P1 is XORed with a random sequence Y as follows:
[0155]
[0156] In the formula, i = 2, 3, ..., M × N, This indicates a bitwise XOR operation.
[0157] The encrypted vector, after horizontal pixel diffusion, is transformed into a two-dimensional pixel matrix in row order. This process diffuses the correlation between pixels, ensuring that the current pixel is influenced by both the previous pixel and the random sequence.
[0158] like Figure 7 As shown, the second stage of the bidirectional pixel diffusion operation is vertical pixel diffusion encryption.
[0159] First, expand the spatial domain image pixel matrix column by column, as follows: Figure 8 As shown, they are connected to form a one-dimensional vector P2 of length M×N.
[0160] Furthermore, the vector P2 is XORed with a random sequence Z as follows:
[0161]
[0162] In the formula, j = 2, 3, ..., M × N.
[0163] The encrypted vector, after vertical pixel diffusion, is transformed into a two-dimensional pixel matrix in column order, thus obtaining the final encrypted image C.
[0164] In one embodiment, the final encrypted image is decrypted at the receiving end to obtain the original plaintext image, including:
[0165] Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
[0166] Specifically, the process of restoring and decrypting the final encrypted image at the receiving end to obtain the original plaintext image involves several key steps. These steps are the inverse operations of the encryption process and must be executed in the reverse order of encryption. First, using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal and vertical pixel diffusion decryption. By performing the reverse operation using the same random sequence as during encryption, the pixel correlation of the image is recovered. Next, a two-dimensional discrete wavelet transform (2D-DWT) is performed on the image after pixel diffusion decryption, transforming it from the spatial domain to the wavelet domain and extracting the encrypted sub-band components. Then, the inverse half-tensor product operation is performed on these sub-band components using a random matrix generated by the chaotic system to decrypt the sub-band components in the frequency domain and recover their original information. Finally, a two-dimensional discrete wavelet inverse transform (2D-IDWT) is performed on the decrypted sub-band components, mapping them back from the frequency domain to the spatial domain, thus obtaining the original plaintext image. The entire decryption process requires not only the use of the same key and algorithm as the encryption, but also ensuring that the reverse operation at each step is accurate to achieve lossless data restoration, ensure the security of the image during transmission, and guarantee that the receiving end can accurately restore the original image content.
[0167] For example, after an encrypted image is transmitted from the sending end to the receiving end, such as... Figure 9 As shown, the receiving end uses the same initial key and chaotic system parameters as the sending end, and sequentially performs inverse bidirectional diffusion operation, discrete wavelet transform, inverse half-tensor product operation and discrete wavelet inverse transform on the encrypted image C to gradually restore the image information and finally recover the plaintext image information.
[0168] First, set the same three keys x0, y0, and z0 as in step one as the initial values of the chaotic system. Iterate through the chaotic system to generate three sets of chaotic sequences and perform the same preprocessing as in step one to obtain a random matrix X and random sequences Y and Z that are completely consistent with the encryption process. Use the random sequences Y and Z to perform inverse bidirectional pixel diffusion on the encrypted image C to obtain the preliminary encrypted image C'.
[0169] Specifically, the first stage of inverse bidirectional pixel diffusion is inverse vertical pixel diffusion. The pixel matrix of the encrypted image C is expanded column-wise and concatenated into a one-dimensional vector C1 of length M×N. A random sequence Z is then used to perform the following XOR operation on vector C1:
[0170]
[0171] In the formula, j = M×N, M×N-1, ..., 3, 2. The one-dimensional vector after inverse vertical pixel diffusion is transformed into a two-dimensional pixel matrix in column order.
[0172] The second stage of inverse bidirectional pixel diffusion is inverse lateral pixel diffusion. The pixel matrix C1 is expanded row by row and concatenated into a one-dimensional vector C2 of length M×N.
[0173] Furthermore, the vector C2 is XORed with a random sequence Y as follows:
[0174]
[0175] In the formula, i = M×N, M×N-1, ..., 3, 2. The one-dimensional vector after inverse horizontal pixel diffusion is transformed into a two-dimensional pixel matrix in row order, resulting in the preliminary encrypted image C2.
[0176] Furthermore, a discrete wavelet transform is performed on the initially encrypted image C2 to obtain four frequency domain sub-band components:
[0177] {LL2, LH2, HL2, HH2}=DWT(C2)
[0178] Performing the inverse half-tensor product operation on the low-frequency subband component LL2 yields the decrypted low-frequency subband component LL'2:
[0179]
[0180] Finally, the decrypted low-frequency subband component LL' and the untransformed frequency domain subband components LH2, HL2, and HH2 are input together into the inverse discrete wavelet transform process. The decrypted image P” is then reconstructed through the inverse discrete wavelet transform.
[0181] P"=IDWT{LL'2,LH2,HL2,HH2}
[0182] The decryption process and the encryption process are completely symmetrical in structural design, ensuring that the receiving end can accurately recover the image information based on the same key and the opposite algorithm process as the sending end.
[0183] In this embodiment, through the inverse operation, the decryption process can losslessly restore the encrypted image to the original plaintext image, ensuring data integrity and availability. The decryption process requires the same key (initial value of the chaotic system) and algorithm as the encryption process, ensuring that only authorized receivers can successfully decrypt the image. The decryption process corresponds to the encryption process, achieving fast decryption through an efficient algorithm.
[0184] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0185] Based on the same inventive concept, this application also provides a frequency domain image transmission apparatus based on half-tensor product for implementing the frequency domain image transmission method based on half-tensor product described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the frequency domain image transmission apparatus based on half-tensor product provided below can be found in the limitations of the frequency domain image transmission method based on half-tensor product described above, and will not be repeated here.
[0186] In one exemplary embodiment, such as Figure 10 As shown, a frequency domain image transmission device based on half-tensor product is provided, comprising:
[0187] The encryption module 1002 is used to set multiple keys and use the set keys as the initial values of the chaotic system to iteratively generate multiple sets of chaotic sequences. It also preprocesses the multiple sets of chaotic sequences to generate random matrices and random sequences.
[0188] The encryption module 1002 is also used to obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0189] The encryption module 1002 is also used to perform half-tensor product operations and encryption operations on the sub-band components using a random matrix generated by a chaotic system, so as to obtain the sub-band components in the encrypted frequency domain.
[0190] The encryption module 1002 is also used to convert the sub-band components of the encrypted frequency domain into spatial domain images to form a preliminary encrypted image;
[0191] The encryption module 1002 is also used to perform horizontal pixel diffusion encryption and vertical pixel diffusion encryption on the preliminary encrypted image using a random sequence generated by a chaotic system to obtain the final encrypted image.
[0192] The encrypted image transmission module 1004 is used to transmit the final encrypted image to the receiving end;
[0193] The decryption module 1006 is used to perform image restoration and decryption on the final encrypted image at the receiving end to obtain the original plaintext image.
[0194] In an exemplary embodiment, the encryption module includes a chaotic sequence generation submodule, which is used to convert at least one set of chaotic sequences from multiple sets of chaotic sequences into random sequences that conform to a first preset value range, select a preset number of elements from the random sequences in the first preset value range to form a two-dimensional random matrix, and convert the remaining chaotic sequences from multiple sets of chaotic sequences into integer random sequences of a preset length that conform to a second preset value range.
[0195] In an exemplary embodiment, the encryption module 1002 includes a discrete wavelet transform submodule, which is used to perform a two-dimensional discrete wavelet transform on the original plaintext image using the discrete wavelet transform method, converting the image pixels from the spatial domain to the wavelet domain; and decomposing the original plaintext image in the wavelet domain to obtain a preset number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0196] In an exemplary embodiment, the encryption module 1002 includes a matrix semi-tensor product submodule, which is used to perform semi-tensor product operations and nonlinear encryption on the low-frequency subband components using a random matrix generated by a chaotic system, to obtain the encrypted frequency domain subband components.
[0197] In an exemplary embodiment, the encryption module 1002 includes a discrete wavelet inverse transform submodule, which is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encryption frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components using the discrete wavelet transform method, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0198] In an exemplary embodiment, the decryption module is specifically used to use the initial value of the chaotic system to sequentially perform horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation and two-dimensional discrete wavelet inverse transform on the final encrypted image to restore the original plaintext image.
[0199] Each module in the aforementioned frequency domain image transmission device based on semi-tensor product can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0200] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores raw plaintext image data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a frequency domain image transmission method based on half-tensor product.
[0201] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0202] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0203] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0204] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0205] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0206] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0207] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0208] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0209] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0210] At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix.
[0211] The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
[0212] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0213] The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain;
[0214] The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0215] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0216] Using a random matrix generated by a chaotic system, a half-tensor product operation and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
[0217] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0218] The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0219] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0220] Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
[0221] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0222] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0223] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0224] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0225] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0226] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0227] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0228] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0229] At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix.
[0230] The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
[0231] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0232] The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain;
[0233] The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0234] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0235] Using a random matrix generated by a chaotic system, a half-tensor product operation and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
[0236] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0237] The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0238] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0239] Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
[0240] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0241] Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences.
[0242] Obtain multiple sub-band components of the original plaintext image in the wavelet domain;
[0243] Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components;
[0244] The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image;
[0245] By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image;
[0246] The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
[0247] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0248] At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix.
[0249] The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
[0250] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0251] The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain;
[0252] The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
[0253] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0254] Using a random matrix generated by a chaotic system, a half-tensor product operation and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
[0255] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0256] The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
[0257] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0258] Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
[0259] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0260] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0261] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0262] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A frequency domain image transmission method based on half-tensor product, characterized in that, The method includes: Multiple keys are set, and the set keys are used as the initial values of the chaotic system. The chaotic system is iterated to generate multiple sets of chaotic sequences, and the multiple sets of chaotic sequences are preprocessed to generate random matrices and random sequences. Obtain multiple sub-band components of the original plaintext image in the wavelet domain; Using a random matrix generated by a chaotic system, a half-tensor product operation and encryption operation are performed on the sub-band components to obtain the encrypted frequency domain sub-band components; The sub-band components of the encrypted frequency domain are converted into spatial domain images to form a preliminary encrypted image; By using a random sequence generated by a chaotic system, the initial encrypted image is subjected to horizontal pixel diffusion encryption and vertical pixel diffusion encryption to obtain the final encrypted image; The final encrypted image is transmitted to the receiving end, where the image is restored and decrypted to obtain the original plaintext image.
2. The method according to claim 1, characterized in that, The preprocessing of multiple chaotic sequences to generate random matrices and random sequences includes: At least one chaotic sequence from multiple chaotic sequences is converted into a random sequence that conforms to a first preset value range. A preset number of elements are selected from the random sequence in the first preset value range to form a two-dimensional random matrix. The remaining chaotic sequences in multiple sets of chaotic sequences are converted into integer random sequences of a preset length that conform to the second preset value range.
3. The method according to claim 2, characterized in that, The step of obtaining multiple sub-band components of the original plaintext image in the wavelet domain includes: The discrete wavelet transform method is used to perform a two-dimensional discrete wavelet transform on the original plaintext image, converting the image pixels from the spatial domain to the wavelet domain; The original plaintext image is decomposed in the wavelet domain to obtain a predetermined number of sub-band components; wherein, the sub-band components include low-frequency sub-band components, horizontal high-frequency sub-band components, vertical high-frequency sub-band components, and diagonal high-frequency sub-band components.
4. The method according to claim 3, characterized in that, The process of using a random matrix generated by a chaotic system to perform a half-tensor product operation and encryption on the sub-band components to obtain encrypted frequency domain sub-band components includes: Using a random matrix generated by a chaotic system, a half-tensor product operation and nonlinear encryption are performed on the low-frequency subband components to obtain the encrypted frequency domain subband components.
5. The method according to claim 4, characterized in that, The step of converting the sub-band components of the encrypted frequency domain into a spatial domain image to form a preliminary encrypted image includes: The discrete wavelet transform method is used to perform two-dimensional discrete wavelet inverse transform on the sub-band components of the encrypted frequency domain, the horizontal high-frequency sub-band components, the vertical high-frequency sub-band components, and the diagonal high-frequency sub-band components, mapping them back to the spatial domain to form a preliminary encrypted image in the spatial domain.
6. The method according to claim 1, characterized in that, The step of restoring and decrypting the final encrypted image at the receiving end to obtain the original plaintext image includes: Using the initial values of the chaotic system, the final encrypted image is sequentially subjected to horizontal pixel diffusion decryption and vertical pixel diffusion decryption, two-dimensional discrete wavelet transform, inverse half-tensor product operation, and two-dimensional discrete wavelet inverse transform to restore the original plaintext image.
7. A frequency domain image transmission device based on half-tensor product, characterized in that, The device includes: The encryption module is used to set multiple keys and use the set keys as the initial values of the chaotic system. It iterates through the chaotic system to generate multiple sets of chaotic sequences and preprocesses the multiple sets of chaotic sequences to generate random matrices and random sequences. The encryption module is also used to obtain multiple sub-band components of the original plaintext image in the wavelet domain; The encryption module is also used to perform half-tensor product operations and encryption operations on the sub-band components using a random matrix generated by a chaotic system, so as to obtain the encrypted sub-band components in the frequency domain. The encryption module is also used to convert the sub-band components of the encrypted frequency domain into spatial domain images to form a preliminary encrypted image; The encryption module is also used to perform horizontal pixel diffusion encryption and vertical pixel diffusion encryption on the preliminary encrypted image using a random sequence generated by a chaotic system to obtain the final encrypted image; An encrypted image transmission module is used to transmit the final encrypted image to the receiving end; The decryption module is used to perform image restoration and decryption on the final encrypted image at the receiving end to obtain the original plaintext image.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.