Image encryption method, device and terminal equipment
By performing color space conversion, position coding and semantic analysis processing on image information, combined with iterative calculation of multi-dimensional encryption mapping functions, the complexity and security of image encryption are improved, the problems that are easy to be cracked in the prior art are solved, and the security of network communication is enhanced.
Patent Information
- Application Number
- CN202510771968.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing image encryption technology is easy to crack and cannot withstand a variety of attacks, resulting in poor encryption effects and reducing network communication security.
By performing color space conversion, position encoding and semantic analysis processing on the image information to be encrypted, multiple initial encrypted image information are generated, and iterative mapping calculation is performed using the multi-dimensional encryption mapping function to generate the target encrypted image information.
It improves the complexity and robustness of image encryption, enhances the ability of image information to resist attacks during the Internet transmission process, and ensures the security of encrypted image information.
Smart Images

Figure CN120281854B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and in particular relates to an image encryption method, apparatus, and terminal device. Background Art
[0002] With the development of the internet and imaging technology, images have become an important carrier of information, playing a key role in fields such as medicine, the military, and finance. However, when images are transmitted in plaintext over public networks, information security is threatened. Therefore, the design of highly secure encryption algorithms is urgently needed.
[0003] In the existing technology, the discrete cosine transform method is usually used to convert the image from the spatial domain to the frequency domain to process the frequency domain coefficients to achieve image encryption; or the discrete wavelet transform method is used to decompose the image into multiple sub-bands of different frequencies and resolutions, and then different operations are performed on the multiple sub-bands to achieve image encryption processing.
[0004] However, the encryption method using discrete cosine transform is simple, making it extremely easy for attackers to crack the encryption method and easily steal image information; the discrete wavelet transform cannot resist various attack methods and has strong limitations in security and encryption effect. Summary of the Invention
[0005] In view of this, the embodiments of the present application provide an image encryption method, apparatus and terminal device, aiming to solve the problem that existing image encryption technology is extremely easy to crack and cannot resist various attacks, resulting in poor encryption effect and reducing the security of users' use of network communications.
[0006] A first aspect of an embodiment of the present application provides an image encryption method, comprising:
[0007] Obtaining image information to be encrypted;
[0008] Performing color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information;
[0009] performing iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions to generate a plurality of intermediate encrypted image information;
[0010] A weighted calculation is performed on the plurality of intermediate encrypted image information to generate target encrypted image information.
[0011] A second aspect of the embodiments of the present application provides an image decryption method, comprising:
[0012] Obtain encrypted image information;
[0013] Decomposing and calculating the encrypted image information to obtain a plurality of initial decrypted image information;
[0014] Performing back-tracing mapping iterative calculations on the multiple initial decrypted image information according to a preset number of multi-dimensional encryption mapping iterations and multiple preset multi-dimensional encryption mapping functions to generate multiple intermediate decrypted image information;
[0015] The intermediate decrypted image information is subjected to semantic reconstruction processing, position decoding processing, and color space inverse conversion to generate target decrypted image information.
[0016] A third aspect of the embodiments of the present application provides an image encryption device, including:
[0017] The module for obtaining the image information to be encrypted is used to obtain the image information to be encrypted;
[0018] An initial encrypted image information generating module is used to perform color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information;
[0019] an intermediate encrypted image information generating module, configured to perform iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions, to generate a plurality of intermediate encrypted image information;
[0020] The target encrypted image information generating module is used to perform weighted calculation on the plurality of intermediate encrypted image information to generate target encrypted image information.
[0021] A fourth aspect of the embodiments of the present application provides an image decryption device, comprising:
[0022] An encrypted image information acquisition module is used to acquire encrypted image information;
[0023] an initial decrypted image information determination module, configured to perform decomposition calculations on the encrypted image information to obtain a plurality of initial decrypted image information;
[0024] an intermediate decrypted image information generating module, configured to perform back-tracing mapping iterative calculations on the plurality of initial decrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions, to generate a plurality of intermediate decrypted image information;
[0025] The target decrypted image information generating module is used to perform semantic reconstruction processing, position decoding processing and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information.
[0026] The fifth aspect of an embodiment of the present application provides a terminal device, which includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, it implements the steps of the image encryption method described in the first aspect above.
[0027] Compared with the prior art, the embodiments of the present application have the following beneficial effects: color space conversion, position encoding and semantic parsing are performed on the encrypted image information to decompose and hide the original information of the image from multiple dimensions, thereby increasing the complexity of image encryption, and then iterative mapping calculations are performed through multiple multi-dimensional encryption mapping functions to further confuse image features, making the image information difficult to crack after multiple transformations, thereby improving the robustness of image encryption, enhancing the ability of image information to resist attacks during Internet transmission, and effectively ensuring the security of encrypted image information. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] Figure 1 This is a schematic diagram of the implementation process of the image encryption method provided in Example 1 of the present application;
[0030] Figure 2 This is a schematic diagram of the implementation process of the image encryption method provided in Example 2 of the present application;
[0031] Figure 3 This is a schematic diagram of the implementation process of the image encryption method provided in Example 3 of the present application;
[0032] Figure 4 This is a schematic diagram of the implementation process of the image encryption method provided in Example 4 of the present application;
[0033] Figure 5 This is a schematic diagram of the implementation flow of the image decryption method provided in Example 5 of the present application;
[0034] Figure 6 This is a schematic diagram of the implementation flow of the image decryption method provided in Example 6 of the present application;
[0035] Figure 7 This is a schematic diagram of the implementation flow of the image decryption method provided in Example 7 of the present application;
[0036] Figure 8 is a structural diagram of an image encryption device provided in an embodiment of the present application;
[0037] Figure 9 Schematic diagram of the structure of the image decryption device provided in an embodiment of the present application;
[0038] Figure 10 It is a schematic diagram of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0040] In order to illustrate the technical solution described in this application, specific embodiments are provided below.
[0041] Figure 1 The following is a flowchart of the image encryption method according to the first embodiment of the present application, which is described in detail as follows:
[0042] Step S101: Obtain image information to be encrypted.
[0043] In this embodiment, the image information to be encrypted may be various medical images of patients in the medical field, such as X-rays, CT scans, magnetic resonance imaging images, etc., which may be generated by medical equipment and transmitted to a computer through the medical equipment for acquisition; the image information to be encrypted may be satellite reconnaissance images or drone shots in the military and defense fields, wherein satellite reconnaissance images may be acquired by high-resolution imaging equipment carried by satellites orbiting the earth, and drones may collect images in a military environment with the help of the cameras they carry; the image to be encrypted may be user bank card photos, ID card scans, transaction bill images, etc. in the financial industry, which may be relevant document photos or bill images uploaded as required by users when conducting online payment, account opening and other financial transactions. These image information are acquired by financial institutions and may contain user identity information, account information, transaction details, etc., and encryption processing is required to ensure the security of financial transactions and user privacy.
[0044] Step S102 : performing color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information.
[0045] In this embodiment, the image information to be encrypted may be converted into a color space using a YCrCb model, an RBG model, or an HSV model. The image information to be encrypted may be decomposed into multiple luminance component information and color component information, and then the decomposed multiple luminance component information and color component information may be position-encoded. Specifically, the position encoding may be performed using a one-hot encoding method, an absolute position encoding method, or a relative encoding method, to reflect and characterize the features of the image information to be encrypted, facilitating subsequent calculations of the encryption process. Semantic parsing may be performed using a size-invariant feature transformation or a directional gradient histogram, to help computers deeply understand the image content and identify areas in the image containing sensitive information, thereby subsequently implementing multiple encryptions of the sensitive information portion to enhance encryption security while avoiding over-encryption of insignificant areas and reducing waste of computing resources. Therefore, in this embodiment, the image to be encrypted is decomposed into multiple color component information through color space conversion, and then position encoding processing is performed on these color component information to quantize each feature in the color component information, and then the quantized image features are semantically parsed. The initial encrypted image information can be generated by semantically identifying the part containing sensitive information, or the semantic information of all image features can be used as the initial encrypted image information.
[0046] Step S103 : performing iterative mapping calculation on the multiple initial encrypted image information according to a preset multi-dimensional encryption mapping iteration number and multiple preset multi-dimensional encryption mapping functions to generate multiple intermediate encrypted image information.
[0047] In this embodiment, the multiple preset multidimensional encrypted mapping functions can be a logistic mapping function, a Tent mapping function, a Henon mapping function, a Lorenz mapping function, a hyperbolic tangent function, a Sigmoid function, or a ReLU function. The multiple preset multidimensional encrypted mapping functions can be the same or different. The preset number of multidimensional encrypted mapping iterations can be manually set, and can be 5 or 10.
[0048] In this embodiment, optionally, multiple initial encrypted image information can be first used as independent variables of a preset multi-dimensional encryption mapping function, and the calculation results can be used as multiple intermediate encrypted image information through multiple iterative calculations of the multi-dimensional encryption mapping function, wherein the number of iterative calculations is determined by the number of multi-dimensional encryption mapping iterations.
[0049] In this embodiment, optionally, the parameters of a randomly generated multidimensional encryption mapping function may be set, and then the solution of the equation formed by the multidimensional encryption mapping function may be solved. The obtained solution may then be XORed with the initial encrypted image information. Alternatively, the obtained solution may be used to generate a matrix, and then the matrix generated by the initial encrypted image information may be convolved with the matrix to obtain the intermediate encrypted image information. It will be appreciated that one piece of initial encrypted image information corresponds to one piece of intermediate encrypted image information.
[0050] Step S104: performing weighted calculation on the plurality of intermediate encrypted image information to generate target encrypted image information.
[0051] In this embodiment, the Euclidean distance between each intermediate encrypted image information and the initial encrypted image information can be calculated, and the Euclidean distance can be used as the weight of each intermediate encrypted image information. A weighted summation of each intermediate encrypted image information can be performed, and the result can be used as the target encrypted image information. Alternatively, a weighted summation of each intermediate encrypted image information can be performed using preset weight information, and the result can be used as the target encrypted image information. The preset weight information can be manually set. Alternatively, weights can be manually set for each color component information. Each intermediate encrypted image can be first classified according to color component information, and then the intermediate encrypted image information corresponding to each color component information is summed separately. Finally, the sums of the intermediate encrypted image information corresponding to each color component information are weighted summed according to the preset weights for each color component information, and the result can be used as the target encrypted image information.
[0052] The image encryption method provided in the embodiment of the present application performs color space conversion, position encoding and semantic analysis on the encrypted image information to decompose and hide the original information of the image from multiple dimensions, thereby increasing the complexity of image encryption. It then performs iterative mapping calculations through multiple multi-dimensional encryption mapping functions to further obfuscate image features, making the image information difficult to crack after multiple transformations, thereby improving the robustness of image encryption, enhancing the ability of image information to resist attacks during Internet transmission, and effectively ensuring the security of encrypted image information.
[0053] Figure 2 The following is a flowchart of an implementation of the image encryption method provided in the second embodiment of the present application. The difference between the second embodiment and the first embodiment is that step S102 specifically includes:
[0054] Step S201 : performing color space conversion on the image information to be encrypted to obtain a plurality of color component information of the image to be encrypted.
[0055] In this embodiment, the color space conversion of the image information to be encrypted may be implemented through an RGB model, a YCrCb model, or an HSV model. The image information after the color space conversion is the color component information of the image to be encrypted.
[0056] Step S202 : generating a plurality of image color component matrix information to be encrypted according to the plurality of image color component information to be encrypted.
[0057] In this embodiment, the grayscale values of each pixel in the color component information of the image to be encrypted can be used to generate a matrix as the color component matrix information of the image to be encrypted, or the color component information of the image to be encrypted can be converted into a matrix through OpenCV as the color component matrix information of the image to be encrypted.
[0058] Step S203, extracting elements of the color component matrix information of the image to be encrypted to obtain the row number information of the color component matrix of the image to be encrypted, the column number information of the color component matrix of the image to be encrypted, multiple color component matrix elements of the image to be encrypted, the row number information of multiple color component matrix elements of the image to be encrypted, and the column number information of multiple color component matrix elements of the image to be encrypted; wherein the color component matrix elements of the image to be encrypted have a one-to-one correspondence with the row number information of the color component matrix elements of the image to be encrypted and the column number information of the color component matrix elements of the image to be encrypted.
[0059] In this embodiment, each numerical value in the color component matrix information of each image to be encrypted is extracted. Each numerical value is each element of the matrix. It is necessary to extract the numerical information corresponding to the element and the row number information and column number information in the matrix. Then, the color component matrix elements of the image to be encrypted, the row number information of the color component matrix elements of the image to be encrypted, and the column number information of the color component matrix elements of the image to be encrypted are extracted. At the same time, the row number information of the color component matrix of the image to be encrypted and the column number information of the color component matrix of the image to be encrypted can be obtained based on the color component matrix information of the image to be encrypted.
[0060] Step S204, determine whether the row number information of the color component matrix element of the image to be encrypted and the column number information of the color component matrix element of the image to be encrypted are both not equal to 1; if so, when the row number information of the color component matrix element of the image to be encrypted is not equal to the row number information of the color component matrix of the image to be encrypted, and the row number information of the color component matrix element of the image to be encrypted is not equal to the column number information of the color component matrix of the image to be encrypted, calculate the sum of the row number information and the column number information of each color component matrix element to be encrypted; if not, skip the color component matrix element to be encrypted.
[0061] In this embodiment, when the row number information of the image color component matrix element to be encrypted and the column number information of the image color component matrix element to be encrypted are both equal to 1, the image color component matrix element to be encrypted is skipped, and identification of other image color component matrix elements to be encrypted is performed until all image color component matrix elements to be encrypted are traversed. When the row number information of the image color component matrix element to be encrypted and the column number information of the image color component matrix element to be encrypted are both not equal to 1, it is determined whether the conditions that the row number information of the image color component matrix element to be encrypted is not equal to the row number information of the image color component matrix to be encrypted and the row number information of the image color component matrix element to be encrypted is not equal to the column number information of the image color component matrix to be encrypted are met. If so, the sum of the row number information and the column number information of each image color component matrix element to be encrypted is calculated, that is, the sum of the row number and the column number of the same image color component matrix element to be encrypted is calculated, and then subsequent calculations are performed. If not, the image color component matrix element to be encrypted is skipped, and identification of other image color component matrix elements to be encrypted is performed until all image color component matrix elements to be encrypted are traversed.
[0062] Step S205, determine whether the sum of the row number information and the column number information of the first image color component matrix element to be encrypted is equal to the sum of the row number information and the column number information of the second image color component matrix element to be encrypted. If so, generate an array of image color component matrix elements to be encrypted based on the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted; if not, skip the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted.
[0063] In this embodiment, taking the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted as an example, the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted can be any two elements of all image color component matrix elements to be encrypted. When the sum of the row number information and the column number information of the first image color component matrix element to be encrypted is equal to the sum of the row number information and the column number information of the second image color component matrix element to be encrypted, the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted are extracted to generate an array. It can be understood that in this embodiment, only the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted are taken as examples. If the sum of the row number information and the column number information of the third image color component matrix element to be encrypted or the fourth image color component matrix element to be encrypted is the same as the sum of the row number information and the column number information of the first image color component matrix element to be encrypted, then the third image color component matrix element to be encrypted or the fourth image color component matrix element to be encrypted can be extracted and added to the first image color component matrix element to be encrypted and the second image color component matrix element to be encrypted. The color component matrix elements are used together as elements in the array, so that the generated array is used as the array of color component matrix elements of the image to be encrypted; when the sum of the row number information and the column number information of the first color component matrix element of the image to be encrypted is not equal to the sum of the row number information and the column number information of the second color component matrix element of the image to be encrypted, the matching of the first color component matrix element of the image to be encrypted and the second color component matrix element of the image to be encrypted is skipped, and then the matching of the first color component matrix element of the image to be encrypted and the third color component matrix element of the image to be encrypted is performed, that is, it is judged that the sum of the row number information and the column number information of the first color component matrix element of the image to be encrypted is subsequently equal to the sum of the row number information and the column number information of the third color component matrix element of the image to be encrypted, until all color component matrix elements of the image to be encrypted find other color component matrix elements of the image to be encrypted with the same sum of their row number information and column number information. A one-dimensional array is generated for all the color component matrix elements of the image to be encrypted whose sum of row number information and column number information is the same. Different sums of row number information and column number information correspond to different one-dimensional arrays. The sum of row number information and column number information of all the color component matrix elements of the image to be encrypted in the same one-dimensional array is the same, and these one-dimensional arrays are output as arrays of color component matrix elements of the image to be encrypted.
[0064] Step S206, according to the preset splicing rule of the encoding array of the image to be encrypted, the array of the color component matrix elements of the image to be encrypted, the elements whose row number information of the color component matrix elements of the image to be encrypted and the column number information of the color component matrix elements of the image to be encrypted are all equal to 1, and the elements whose row number information of the color component matrix elements of the image to be encrypted is equal to the row number information of the color component matrix to be encrypted, and the row number information of the color component matrix elements of the image to be encrypted is equal to the column number information of the color component matrix to be encrypted, are spliced to obtain the color component matrix encoding information of the image to be encrypted.
[0065] In this embodiment, the preset splicing rule of the image coding array to be encrypted can be set manually. It can be that the element whose row number information of the image color component matrix element to be encrypted and the column number information of the image color component matrix element to be encrypted are both equal to 1 is first used as the first element of the first row and first column of the image color component matrix coding information to be encrypted, and then the element whose row number information of the image color component matrix element to be encrypted is equal to the row number information of the image color component matrix to be encrypted, and the element whose row number information of the image color component matrix element to be encrypted is equal to the column number information of the image color component matrix to be encrypted is used as the last element of the last row and last column of the image color component matrix coding information to be encrypted, and then the image color component matrix element array to be encrypted is arranged according to the generation order of the image color component matrix element array to be encrypted to form the intermediate elements of the image color component matrix coding information to be encrypted except the first element of the first row and first column and the last element of the last row and last column, thereby generating the image color component matrix coding information to be encrypted.
[0066] Step S207 : Based on a preset image semantic parsing model, semantic parsing is performed on the color component matrix encoding information of the image to be encrypted to generate a plurality of initial encrypted image information.
[0067] In this embodiment, the preset image semantic parsing model can be manually set, and can be set to a trained model by default. It can be a convolutional neural network model, an LLM model, or other Transformer-based models, that is, a model composed of multiple Transformers. It can be used to assign semantic labels to the color component matrix encoding information of the image to be encrypted, so as to segment the semantic information of the color component matrix encoding information of the image to be encrypted. The pixel information of the private part can be used as the initial encrypted image information. It can also be used to capture the connection between the various features of the color component matrix encoding information of the image to be encrypted, so as to further obfuscate these connections in the future to achieve deep encryption processing. The color component matrix encoding information of the image to be encrypted can be used as the input information of the image semantic parsing model, and after calculation by the image semantic parsing model, the output result is multiple initial encrypted image information. It can be understood that after the semantic parsing of the color component matrix encoding information of the image to be encrypted is processed, the output semantic information is incoherent semantic information, and one initial encrypted image information corresponds to one semantic information. Multiple initial encrypted image information can be used to represent the semantic parsing transformation result of the color component matrix encoding information of the image to be encrypted.
[0068] The image encryption method provided in the embodiment of the present application converts the image information to be encrypted into multiple different color component information through color space to generate a matrix, and then extracts the elements, i.e., pixel information, in the color component matrix information of the image to be encrypted and rearranges them, thereby increasing the complexity and confusion of the encryption process to improve the security of image encryption. Subsequently, the image semantic parsing model is used to mine and decompose the image semantics of the color component matrix encoding information of the image to be encrypted after the elements are rearranged, thereby further improving the level and depth of image encryption to increase the difficulty of cracking, reduce the probability of image information being cracked, and ensure that user privacy information and important data are not leaked.
[0069] Figure 3 The following is a flowchart of an implementation of the image encryption method provided in the third embodiment of the present application, which differs from the second embodiment described above in that:
[0070] The preset image semantic parsing model includes a plurality of preset image semantic parsing sub-models and a plurality of preset image semantic parsing sub-model fitness functions; wherein the preset image semantic parsing sub-models and the preset image semantic parsing sub-model fitness functions correspond to each other one by one;
[0071] The step S207 specifically includes:
[0072] Step S301 : calculating and obtaining a plurality of image semantic parsing fitnesses to be encrypted based on the color component matrix encoding information of the image to be encrypted and a plurality of preset image semantic parsing sub-model fitness functions.
[0073] In this embodiment, when the preset image semantic parsing model is a Transformer-based model, the image semantic parsing sub-model can be a Transformer model; when the preset image semantic parsing model is an LLM model, the image semantic parsing sub-model can be an expert model within the LLM model. The preset image semantic parsing sub-model fitness function can be manually set or automatically generated during training of the Transformer-based model or LLM model. The preset image semantic parsing sub-model and the preset image semantic parsing sub-model fitness function correspond one-to-one. By calculating the image semantic parsing sub-model fitness function, the input information is measured with the encrypted image semantic parsing fitness of each image semantic parsing sub-model, and the image semantic parsing sub-model for further encryption is selected for the encrypted image color component matrix encoding information. It can be understood that by dynamically calculating the encrypted image semantic parsing fitness of different image color component matrix encoding information and each image semantic parsing sub-model, different image semantic parsing sub-models are selected for semantic parsing processing for different encrypted image color component matrix encoding information, thereby improving the security of image information encryption and reducing the probability of being cracked. It is understandable that different image semantic parsing sub-models can parse the color component matrix encoding information of the same image to be encrypted into different semantic information from different dimensions. Thus, a combination of different image semantic parsing sub-models can parse the color component matrix encoding information of the encrypted image into semantic information of multiple different dimensions. Even if criminals steal the encrypted image information, it is difficult to determine which dimension to use for semantic recovery processing, thereby increasing the difficulty of cracking the encrypted image information. The color component matrix encoding information of the encrypted image can be used as the independent variable of the fitness function of the image semantic parsing sub-model, and the calculated function value is used as the fitness of the semantic parsing of the encrypted image.
[0074] Step S302, determine whether the semantic analysis fitness of the image to be encrypted is greater than or equal to a preset semantic analysis fitness threshold of the image to be encrypted; if so, use the image semantic analysis sub-model corresponding to the semantic analysis fitness of the image to be encrypted as the semantic analysis processing sub-model of the image to be encrypted; if not, do not use the image semantic analysis sub-model corresponding to the semantic analysis fitness of the image to be encrypted as the semantic analysis processing sub-model of the image to be encrypted.
[0075] In this embodiment, the preset threshold value of the semantic parsing fitness of the image to be encrypted can be manually set. When the semantic parsing fitness of the image to be encrypted is greater than or equal to the preset threshold value of the semantic parsing fitness of the image to be encrypted, the image semantic parsing sub-model corresponding to the semantic parsing fitness of the encrypted image is used as the semantic parsing processing sub-model for the image to be encrypted, for semantic parsing the color component matrix encoding information of the image to be encrypted; when the semantic parsing fitness of the image to be encrypted is less than the preset threshold value of the semantic parsing fitness of the image to be encrypted, the image semantic parsing sub-model corresponding to the semantic parsing fitness of the image to be encrypted is not used as the semantic parsing processing sub-model for the image to be encrypted, and the relationship between the semantic parsing fitness of the next image to be encrypted and the preset threshold value of the semantic parsing fitness of the image to be encrypted is determined to determine whether the next image semantic parsing sub-model can be used as the semantic parsing processing sub-model for the image to be encrypted.
[0076] Step S303 : generating a plurality of initial encrypted image information according to the color component matrix encoding information of the image to be encrypted and the semantic analysis processing sub-model of the image to be encrypted.
[0077] In this embodiment, the color component matrix encoding information of the image to be encrypted can be used as the input information of the semantic parsing processing sub-model of the image to be encrypted, and after calculation by the semantic parsing processing sub-model of the image to be encrypted, the calculation result is used as the initial encrypted image information. Taking the color component matrix encoding information of the image to be encrypted as an example, it can be calculated layer by layer through different semantic parsing processing sub-models of the image to be encrypted according to the generation order of the semantic parsing processing sub-models of the image to be encrypted, that is, the input information of the first semantic parsing processing sub-model of the image to be encrypted is the color component matrix encoding information of the image to be encrypted, and the output information is used as the input information of the second semantic parsing processing sub-model of the image to be encrypted, so that the initial encrypted image information is generated after calculation by all the semantic parsing processing sub-models of the image to be encrypted; it can also be used as the input information of different semantic parsing processing sub-models of the image to be encrypted, and semantic parsing information of different dimensions is obtained after calculation by different semantic parsing processing sub-models of the image to be encrypted, and then the semantic parsing information of different dimensions is fused to generate multiple initial encrypted image information. It can be understood that each time the color component matrix encoding information of the image to be encrypted is calculated by a semantic analysis processing sub-model of the image to be encrypted, semantic analysis information on one dimension is generated, and multiple semantic analysis processing sub-models of the image to be encrypted generate semantic analysis information on multiple dimensions. Therefore, the color component matrix encoding information of the image to be encrypted will generate multiple initial encrypted image information after being processed by multiple semantic analysis processing sub-models of the image to be encrypted.
[0078] The image encryption method provided in the embodiment of the present application calculates the adaptability of the semantic analysis of the image to be encrypted, and selects multiple semantic analysis processing sub-models of the image to be encrypted from multiple image semantic analysis sub-models for semantic analysis processing of the image information to be encrypted, so as to realize semantic analysis of different dimensions for the image information to be encrypted with different semantic features, thereby improving the flexibility and adaptability of image encryption and increasing the difficulty of cracking. Even if criminals intercept the parsed image semantic information, they cannot know from which dimensions the semantic reconstruction is performed, thereby improving the image encryption effect and the security of communication based on image information. The multiple initial encrypted image information generated by the multiple semantic analysis processing sub-models of the image to be encrypted improves the flexibility and scalability for subsequent further encryption processing, and can meet the image encryption requirements for different application scenarios, thereby improving the security and robustness of image encryption.
[0079] Figure 4 The following is a flowchart of an implementation of an image encryption method provided in the fourth embodiment of the present application, which differs from the first embodiment described above in that:
[0080] The plurality of preset multidimensional encrypted mapping functions include a plurality of preset multidimensional encrypted mapping space trajectory calculation functions, a plurality of preset multidimensional encrypted space feature mapping functions, and a preset multidimensional encrypted space feature fusion mapping function;
[0081] The step S103 specifically includes:
[0082] Step S401 : solving a plurality of preset multidimensional encrypted mapping functions according to a plurality of preset multidimensional encrypted mapping space trajectory calculation functions to obtain a plurality of multidimensional encrypted mapping space trajectory information.
[0083] In this embodiment, the multiple preset multidimensional encryption mapping functions can be manually set and can be functions designed based on nonlinear differential equations or ordinary differential equations, and are used to map the initial encrypted image information into a new multidimensional space. The multiple preset multidimensional encryption mapping space trajectory calculation functions can also be manually set and can be functions designed based on the Runge-Kutta method or the Newton-Raphson method, and are used to solve the multiple preset multidimensional encryption mapping functions, that is, to discretize the multiple preset multidimensional encryption mapping functions to gradually approximate the true trajectories of the multiple preset multidimensional encryption mapping functions. The solution results are used as the multiple multidimensional encryption mapping space trajectory information, which is used to re-encrypt the initial encrypted image information.
[0084] Step S402 : performing iterative mapping calculation on the multiple initial encrypted image information according to the multiple multi-dimensional encrypted mapping space trajectory information and the preset multi-dimensional encrypted mapping iteration number to generate non-linear mapped encrypted image information.
[0085] In this embodiment, the preset number of multidimensional encryption mapping iterations can be manually set, and can be 5 or 10. The multidimensional encryption mapping spatial trajectory information and the initial encrypted image information can be first converted into a matrix form to obtain multidimensional encryption mapping spatial trajectory matrix information and initial encrypted image matrix information. The multidimensional encryption mapping spatial trajectory matrix information and the initial encrypted image matrix information can then be subjected to multiple convolution calculations, multiplication operations, or XOR operations, with the number of calculations determined by the preset number of multidimensional encryption mapping iterations. The calculated results are output as nonlinear mapping encrypted image information.
[0086] Step S403, according to the preset first multidimensional encryption space feature mapping function, the preset second multidimensional encryption space feature mapping function, the preset third multidimensional encryption space feature mapping function and the nonlinear mapping encrypted image information, obtain the first multidimensional encryption space mapping image feature information, the second multidimensional encryption space mapping image feature information and the third multidimensional encryption space mapping image feature information.
[0087] In this embodiment, the preset multidimensional encryption space feature fusion mapping function includes a preset first multidimensional encryption space feature mapping function, a preset second multidimensional encryption space feature mapping function, and a preset third multidimensional encryption space feature mapping function, all of which can be artificially designed and can have a certain logical space structure, and are used to map the nonlinear mapping encrypted image information into a new nonlinear space, wherein the first multidimensional encryption space feature mapping function, the second multidimensional encryption space feature mapping function, and the third multidimensional encryption space feature mapping function respectively represent mapping processing from different dimensions. The first multidimensional encryption space feature mapping function, the second multidimensional encryption space feature mapping function, and the third multidimensional encryption space feature mapping function can be respectively multiplied with the nonlinear mapping encrypted image information, and the multiplication results are used as the first multidimensional encryption space mapping image feature information, the second multidimensional encryption space mapping image feature information, and the third multidimensional encryption space mapping image feature information.
[0088] Step S404: obtaining multidimensional encrypted space mapping image feature fusion weight information according to the first multidimensional encrypted space mapping image feature information, the second multidimensional encrypted space mapping image feature information, and the third multidimensional encrypted space mapping image feature information.
[0089] In this embodiment, the Euclidean distances between the first multidimensional encrypted space mapping image feature information and the third multidimensional encrypted space mapping image feature information, and between the second multidimensional encrypted space mapping image feature information and the third multidimensional encrypted space mapping image feature information can be calculated respectively, and the values of these two Euclidean distances can be used as the multidimensional encrypted space mapping image feature fusion weight information.
[0090] Step S405 , performing weighted summation based on the multi-dimensional encrypted space mapping image feature fusion weight information and the third multi-dimensional encrypted space mapping image feature information to obtain multi-dimensional encrypted space mapping image feature fusion information.
[0091] In this embodiment, the third multidimensional encrypted space mapping image feature information may be weighted summed based on the multidimensional encrypted space mapping image feature fusion weight information, and the result of the weighted summation may be used as the multidimensional encrypted space mapping image feature fusion information.
[0092] Step S406 : generating a plurality of intermediate encrypted image information according to the multi-dimensional encrypted space mapping image feature fusion information and a preset multi-dimensional encrypted space feature fusion mapping function.
[0093] In this embodiment, the preset multi-dimensional encrypted space feature fusion mapping function can be manually set, and can be a linear weighted fusion function, wherein the weights can be manually set, or can be a Sigmoid function, a ReLU function, or a softmax function, or can be a convolution function, wherein the convolution kernel can be manually designed. The multi-dimensional encrypted space mapping image feature fusion information can be used as the independent variable of the multi-dimensional encrypted space feature fusion mapping function, and the function value calculated by the multi-dimensional encrypted space feature fusion mapping function is used as the intermediate encrypted image information. It can be understood that the multi-dimensional encrypted space mapping image feature fusion information can be decomposed into multiple matrices, so that multiple intermediate encrypted image information can be calculated.
[0094] In this embodiment, when performing image decryption processing, it is necessary to perform back-mapping processing on the intermediate encrypted image information according to the multi-dimensional encryption space feature fusion mapping function, and then decompose the back-mapping image information according to the multi-dimensional encryption space mapping image feature fusion weight information to obtain the decomposed image semantic information, and then perform back-mapping processing on the decomposed image semantic information through the preset first multi-dimensional encryption space feature mapping function, the preset second multi-dimensional encryption space feature mapping function, and the preset third multi-dimensional encryption space feature mapping function respectively to restore the nonlinear mapping encrypted image information, and then, based on the preset multi-dimensional encryption mapping iteration number and the multi-dimensional encryption mapping space trajectory information, the restored non-linear mapping encrypted image information can be iteratively calculated by back-mapping, thereby generating multiple initial encrypted image information.
[0095] The image encryption method provided in the embodiment of the present application guides the encryption process to perform calculations towards different dimensional trajectories by dynamically calculating multiple multi-dimensional encryption mapping space trajectory information, so that the image information presents extremely complex dynamics in the encryption transformation, greatly improving the diversity and unpredictability of encryption, and effectively increasing the difficulty for attackers to crack. By performing multiple iterative mapping calculations on the initial encrypted image information, the image features are obfuscated and reorganized multiple times, which is used to continuously enhance the encryption effect. It can effectively resist various common cryptanalysis attack methods and effectively ensure the security of encryption. Through multi-dimensional encryption space feature mapping and fusion processing, the key information of the encrypted image at different levels is excavated, and the key information is further obfuscated and hidden, so that the attacker needs to break through the encryption defense line of multiple feature dimensions at the same time to obtain the original image information, which greatly increases the difficulty of cracking, thereby providing a solid and powerful guarantee for image encryption.
[0096] Figure 5 The following is a flowchart of the image decryption method according to the fifth embodiment of the present application, which is described in detail as follows:
[0097] Step S501: Obtain encrypted image information.
[0098] In this embodiment, the encrypted image information is image information that has undergone specific encryption processing. It can be information obtained after a series of encryption processing and used to hide the true content of the original image to protect its security and privacy. Specifically, it refers to information generated by performing multiple steps such as color space conversion, position encoding, semantic analysis, and multi-dimensional encryption mapping iterative calculation on the original image information. These processing processes cause the pixel distribution, feature information, and semantic content of the original image to be disrupted and recombined. Only after a specific decryption process can the original image information be restored.
[0099] Step S502: Decomposing and calculating the encrypted image information to obtain a plurality of initial decrypted image information.
[0100] In this embodiment, a weighted sum calculation is performed on each intermediate encrypted image information using preset weight information, and the calculation result is used as the image encryption method of each target encrypted image information. The encrypted image information can be decomposed and calculated based on the preset weight information to obtain multiple initial decrypted image information.
[0101] Step S503 : performing back-tracing mapping iterative calculations on the multiple initial decrypted image information according to a preset multi-dimensional encryption mapping iteration number and multiple preset multi-dimensional encryption mapping functions to generate multiple intermediate decrypted image information.
[0102] In this embodiment, back-mapping iterative calculations can be performed on the initial decrypted image information based on multiple preset multidimensional encryption mapping functions. The results of the back-mapping iterative calculations serve as multiple intermediate decrypted image information. The number of iterations is determined by a preset number of multidimensional encryption mapping iterations. The preset number of multidimensional encryption mapping iterations can be manually set, such as 5 or 10. The multiple preset multidimensional encryption mapping functions can include a logistic mapping function, a Tent mapping function, a Henon mapping function, a Lorenz mapping function, a hyperbolic tangent function, a sigmoid function, a ReLU function, etc., and the multiple preset multidimensional encryption mapping functions can be the same or different.
[0103] Step S504 : performing semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information.
[0104] In this embodiment, semantic reconstruction is used to recover the semantic information in the encrypted image. This can be achieved by extracting features using the same feature extraction methods used for semantic parsing during encryption, such as size-invariant feature transformation and oriented gradient histogram. The extracted features are then matched with the semantic feature templates used during the encryption phase to determine the locations of the regions containing sensitive information in the image. For the locations of the regions containing sensitive information in the image, a reverse decryption operation can be performed along with the multiple encrypted information recorded during the encryption process. For example, if multiple iterative encryption processes are used for sensitive regions during encryption, a corresponding number of back-mapping iterations are performed during decryption. For non-sensitive regions, since no over-encryption is performed, only a simple feature recovery operation is required. Ultimately, the semantic information of all regions is integrated to complete the semantic reconstruction process. During the image encryption process, the decomposed luminance and color component information undergoes position encoding, such as using one-hot encoding, absolute position encoding, or relative encoding. Position decoding is then used to restore the encoded information to its original position information. During image encryption, the encrypted image information is converted to a color space using the YCrCb, RGB, or HSV models, decomposing it into multiple luminance and color components. During decryption, an inverse color space conversion is performed to restore these components to their original color space. The decryption process is completed by generating the target decrypted image from the intermediate decrypted image information through semantic reconstruction, position decoding, and inverse color space conversion.
[0105] The image decryption method provided in the embodiment of the present application decomposes the encrypted image information to reduce the complexity of subsequent decryption operations, providing technical support for accurate decryption. The initial decrypted image information is back-mapped and iteratively calculated through multi-dimensional encryption mapping iterations and multi-dimensional encryption mapping functions. The encryption trajectory of the image is reversely restored by relying on the multi-dimensional encryption mapping mechanism corresponding to the image encryption, so that the decryption process can flexibly cope with encrypted image information with different encryption mapping mechanisms, thereby enhancing the versatility of the image decryption method. The rationality of the computational complexity is ensured by the multi-dimensional encryption mapping iterations, so that the decryption process can be effectively completed while avoiding excessive computation or insufficient decryption. The semantic content of the encrypted image is restored to the semantic content of the original image information by semantic reconstruction processing of the intermediate decrypted image. The spatial distribution of each image feature can be accurately restored through position decoding processing. The image color is restored to its original state through color space inverse conversion, presenting a visual effect consistent with the image before encryption, thereby gradually restoring image information from different dimensions, greatly improving the accuracy of image decryption and ensuring the integrity of the image information.
[0106] Figure 6 The flowchart of the image decryption method provided in the sixth embodiment of the present application is shown. The difference between the sixth embodiment and the fifth embodiment is that the step S504 specifically includes:
[0107] Step S601 : performing semantic reconstruction processing on the intermediate decrypted image information based on a preset image semantic reconstruction model to obtain intermediate decrypted image coding matrix information and dimension information of the intermediate decrypted image coding matrix information.
[0108] In this embodiment, the preset image semantic reconstruction model can be a convolutional neural network model or a Transformer-based model. It can use the intermediate decrypted image information as the input information of the image semantic reconstruction model, and perform feature extraction and reconstruction processing on the intermediate decrypted image information through various computing layers within the image semantic reconstruction model to automatically restore the semantic information that was obfuscated or hidden during the image encryption process. The image information after the semantic information is restored serves as the output information of the image semantic reconstruction model, that is, the intermediate decrypted image coding matrix information. The dimensional information of the intermediate decrypted image coding matrix information can be determined by the intermediate decrypted image coding matrix information for subsequent further image decryption calculations.
[0109] Step S602 : performing dimension conversion processing on the intermediate decrypted image coding matrix information to obtain intermediate decrypted image coding dimension reduction matrix information; the intermediate decrypted image coding dimension reduction matrix information includes a plurality of intermediate decrypted image coding dimension reduction matrix elements.
[0110] In this embodiment, the dimensionality conversion process may be a dimensionality reduction process, in which the high-dimensional intermediate decrypted image coding matrix information is reduced to a one-dimensional matrix through matrix compression or matrix transformation. This one-dimensional matrix may be used as the intermediate decrypted image coding dimensionality reduction matrix information. All values in the intermediate decrypted image coding dimensionality reduction matrix information are elements of the intermediate decrypted image coding dimensionality reduction matrix.
[0111] Step S603: According to the preset decrypted image coding matrix element truncation rule, the dimension information of the intermediate decrypted image coding matrix information is used as the element number truncation threshold, and multiple intermediate decrypted image coding dimensionality reduction matrix elements are truncate in unequal parts to obtain multiple intermediate decrypted image coding array information.
[0112] In this embodiment, the preset decrypted image coding matrix element interception rule can be manually set. Taking the intermediate decrypted image coding matrix information as a four-dimensional matrix as an example, the dimension information of the intermediate decrypted image coding matrix information is 4, and the intermediate decrypted image coding dimensionality reduction matrix elements have 16. Taking [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] as the intermediate decrypted image coding dimensionality reduction matrix information as an example, the number of elements intercepted each time does not exceed the intermediate decrypted image coding matrix information. The dimension information of the matrix information, that is, not more than 4, can be truncated to [1][2, 3][4, 5, 6][7, 8, 9, 10][11, 12, 13][14, 15]
[16] , so as to achieve non-equal truncation of multiple intermediate decrypted image coding dimensionality reduction matrix elements. In the above example, the truncated [1][2, 3][4, 5, 6][7, 8, 9, 10][11, 12, 13][14, 15]
[16] can be used as multiple intermediate decrypted image coding array information.
[0113] Step S604 , performing splicing processing and dimension-upgrading processing on the plurality of intermediate decrypted image code array information according to a preset decrypted image code array splicing order, to generate intermediate decrypted image decoding matrix information.
[0114] In this embodiment, the preset decrypted image coding array splicing order can be set manually, and the intermediate decrypted image coding array information can be interleaved and spliced. Taking [1][2, 3][4, 5, 6][7, 8, 9, 10][11, 12, 13][14, 15]
[16] as multiple intermediate decrypted image coding array information as an example, the one-dimensional matrix obtained after the interleaved splicing process can be [1, 2, 4, 7, 3, 5, 8, 11, 6, 9, 12, 14, 10, 13, 15, 16], and then the one-dimensional matrix is upscaled, that is, it is restored to a four-dimensional matrix as the intermediate decrypted image decoding matrix information.
[0115] Step S605 , performing color space inverse conversion on the intermediate decrypted image decoding matrix information to generate target decrypted image information.
[0116] In this embodiment, the color space inverse conversion can be performed using the RGB model, the YCrCb model or the HSV model to convert the color component information in the intermediate decrypted image decoding matrix information back to the original color space, thereby restoring the color and content of the original image information, and the image information obtained after the color space inverse conversion is used as the target decrypted image information.
[0117] The image decryption method provided in the embodiment of the present application re-explores the connection between image semantics through an image semantic reconstruction model, and is used to accurately restore the image semantic information that was deeply obfuscated and split during encryption, so as to improve the accuracy and completeness of the image decryption result. Furthermore, a reduced-dimensional matrix is obtained by dimensionality conversion of the intermediate decrypted image encoding matrix information, thereby reducing the computational complexity. By intercepting the reduced-dimensional matrix elements, the image encryption method can be dynamically adapted to enhance the adaptability and flexibility of image decryption. The intercepted reduced-dimensional matrix elements are spliced and increased in dimensionality to accurately restore the matrix structure of the intermediate decrypted image information, ensuring that the decrypted matrix is consistent with the original image structure. By inverse color space conversion, the intermediate decrypted image decoding matrix information is restored to the original color space, and the image color information can be accurately restored. This improves computational efficiency, flexibility and robustness while ensuring the accuracy and completeness of image decryption, thereby providing reliable protection for the secure decryption of image information.
[0118] Figure 7 The following is a flowchart of an implementation of the image decryption method provided in Example 7 of the present application, which differs from the above Example 6 in that:
[0119] The preset image semantic reconstruction model includes a plurality of preset image semantic reconstruction sub-models and a plurality of preset sub-model semantic backtracking fitness functions; wherein the preset image semantic reconstruction sub-models correspond one to one with the preset sub-model semantic backtracking fitness functions;
[0120] The step S601 specifically includes:
[0121] Step S701 : Calculate and obtain the semantic reconstruction fitness of multiple images to be decrypted based on the intermediate decrypted image information and multiple preset sub-model semantic backtracking fitness functions.
[0122] In this embodiment, the preset image semantic reconstruction model can be manually set, can be defaulted to a trained model, can be a model based on Transformer, then the preset sub-model semantic backtracking fitness function can be multiple Transformer models; the preset image semantic reconstruction model can be an LLM model, then the preset sub-model semantic backtracking fitness function can be multiple expert models. The preset sub-model semantic backtracking fitness function can be manually set. The intermediate decrypted image information can be used as the independent variable of the sub-model semantic backtracking fitness function, and the calculated function value can be used as the semantic reconstruction fitness of the image to be decrypted.
[0123] Step S702, determine whether the fitness of the semantic reconstruction of the image to be decrypted is greater than a preset fitness threshold of the semantic reconstruction of the image to be decrypted; if so, use the image semantic reconstruction sub-model corresponding to the fitness of the semantic reconstruction of the image to be decrypted as the semantic reconstruction sub-model for decrypting the image coding information; if not, do not use the image semantic reconstruction sub-model corresponding to the fitness of the semantic reconstruction of the image to be decrypted as the semantic reconstruction sub-model for decrypting the image coding information.
[0124] In this embodiment, the preset threshold for the semantic reconstruction fitness of the image to be decrypted can be manually set and used to compare the fitness with the semantic reconstruction fitness of the image to be decrypted to determine which image semantic reconstruction sub-models are suitable for the current image decryption processing. When the fitness of the semantic reconstruction of the image to be decrypted is greater than the fitness threshold, it indicates that the intermediate decrypted image information has a high degree of match with the corresponding image semantic reconstruction sub-model, and the image semantic reconstruction sub-model can effectively perform semantic reconstruction on the intermediate decrypted image information. Therefore, the image semantic reconstruction sub-model is selected as the semantic reconstruction sub-model for the decrypted image encoding information. Conversely, if the fitness of the semantic reconstruction of the image to be decrypted is less than the fitness threshold, the corresponding image semantic reconstruction sub-model is not adopted.
[0125] Step S703 : Based on the multiple semantic reconstruction sub-models of the decrypted image coding information, semantic reconstruction processing is performed on the intermediate decrypted image coding matrix information to obtain the intermediate decrypted image coding matrix information and the dimension information of the intermediate decrypted image coding matrix information.
[0126] In this embodiment, calculations can be performed layer by layer in the order of the semantic reconstruction sub-models for decrypted image coding information. That is, the input of the first semantic reconstruction sub-model for decrypted image coding information is the intermediate decrypted image coding matrix information, and the output information of the first semantic reconstruction sub-model for decrypted image coding information serves as the input information of the second semantic reconstruction sub-model for decrypted image coding information. This process is repeated in this order. After all selected semantic reconstruction sub-models for decrypted image coding information have been calculated, a semantic reconstruction result, i.e., the intermediate decrypted image coding matrix information, is obtained. The dimensional information of the intermediate decrypted image coding matrix information can be determined based on the intermediate decrypted image coding matrix information.
[0127] The image decryption method provided in the embodiment of the present application can quantitatively evaluate the degree of matching between each image semantic reconstruction sub-model and the intermediate decrypted image information by dynamically calculating the fitness of the semantic reconstruction of the image to be decrypted, thereby avoiding the limitations brought by the blind use of fixed models and improving the accuracy of semantic reconstruction. Furthermore, the semantic reconstruction sub-model of the decrypted image coding information is screened out through the fitness threshold of the semantic reconstruction of the image to be decrypted, thereby enhancing the adaptability of the image semantic reconstruction model to different semantic features to be reconstructed, so that the image decryption process can be flexibly adjusted according to the specific circumstances of the image, thereby improving the flexibility and robustness of image decryption. Through different semantic reconstruction sub-models of the decrypted image coding information, the intermediate decrypted image coding matrix information is analyzed and reconstructed from multiple dimensions. Even if the semantic information is deeply confused and split during the image encryption process, the collaborative work of multiple semantic reconstruction sub-models of the decrypted image coding information can fully and accurately restore the original image semantic information, thereby improving the security and reliability of image decryption.
[0128] Corresponding to the method of the above embodiment, Figure 8 A structural block diagram of the image encryption device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 8 The exemplary image encryption device may be the execution subject of the image encryption method provided in the aforementioned first embodiment.
[0129] Reference Figure 8 , the image encryption device comprises:
[0130] The image information to be encrypted obtaining module 810 is used to obtain the image information to be encrypted;
[0131] The initial encrypted image information generating module 820 is configured to perform color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information;
[0132] The intermediate encrypted image information generating module 830 is configured to perform iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions to generate a plurality of intermediate encrypted image information;
[0133] The target encrypted image information generating module 840 is configured to perform weighted calculation on the plurality of intermediate encrypted image information to generate target encrypted image information.
[0134] The process of each module in the image encryption device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figure 1 The description of the first embodiment is omitted here.
[0135] Corresponding to the method of the above embodiment, Figure 9 A structural block diagram of an image decryption device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 9 The exemplary image decryption device may be the execution subject of the image decryption method provided in the aforementioned fifth embodiment.
[0136] Reference Figure 9 , the image decryption device comprises:
[0137] Encrypted image information acquisition module 910, used to acquire encrypted image information;
[0138] An initial decrypted image information determination module 920 is configured to perform decomposition calculations on the encrypted image information to obtain a plurality of initial decrypted image information;
[0139] The intermediate decrypted image information generating module 930 is configured to perform back-tracing mapping iterative calculations on the multiple initial decrypted image information according to a preset number of multi-dimensional encryption mapping iterations and multiple preset multi-dimensional encryption mapping functions to generate multiple intermediate decrypted image information;
[0140] The target decrypted image information generating module 940 is configured to perform semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information.
[0141] The process of each module in the image decryption device provided in the embodiment of the present application realizing its own function can be specifically referred to the aforementioned Figure 5 The description of the fifth embodiment will not be repeated here.
[0142] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0143] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0144] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0145] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0146] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish descriptions and should not be understood as indicating or implying relative importance. It should also be understood that although the terms "first", "second", etc. are used in the text to describe various elements in some embodiments of the present application, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first table can be named a second table, and similarly, a second table can be named a first table without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.
[0147] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0148] The image encryption method provided in the embodiments of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The embodiments of the present application do not impose any restrictions on the specific type of terminal devices.
[0149] For example, the terminal device can be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a TV set-top box (STB), customer premise equipment (CPE) and / or other devices for communicating on a wireless system and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (PLMN) network.
[0150] As an example and not a limitation, when the terminal device is a wearable device, the wearable device can also be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are full-featured, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0151] Figure 10This is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Figure 10 As shown, the terminal device 100 of this embodiment includes: at least one processor 1000 ( Figure 10 Only one is shown), a memory 1001, wherein the memory 1001 stores a computer program 1002 that can be run on the processor 1000. When the processor 1000 executes the computer program 1002, the steps in the above-mentioned various image encryption method embodiments are implemented, such as Figure 1 Steps S101 to S104 shown in the figure, as well as the steps in implementing the above-mentioned various image decryption method embodiments, for example Figure 5 Alternatively, when the processor 1000 executes the computer program 1002, the functions of the modules / units in the above-mentioned device embodiments are realized, for example, Figure 8 Modules 810 to 840 and Figure 9 Functions of modules 910 to 940 are shown.
[0152] The terminal device 100 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 1000 and a memory 1001. Those skilled in the art will understand that Figure 10 It is only an example of the terminal device 100 and does not constitute a limitation of the terminal device 100. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include an input and sending device, a network access device, a bus, etc.
[0153] The processor 1000 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0154] In some embodiments, the memory 1001 may be an internal storage unit of the terminal device 100, such as a hard disk or memory of the terminal device 100. The memory 1001 may also be an external storage device of the terminal device 100, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device 100. Furthermore, the memory 1001 may include both an internal storage unit of the terminal device 100 and an external storage device. The memory 1001 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 1001 may also be used to temporarily store data that has been sent or is to be sent.
[0155] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0156] An embodiment of the present application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, the terminal device implements the steps of any of the above-mentioned method embodiments.
[0157] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0158] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0159] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0160] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0161] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0162] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0163] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. An image encryption method, characterized in that: include: Obtaining image information to be encrypted; Performing color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information; performing iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions to generate a plurality of intermediate encrypted image information; performing weighted calculation on the plurality of intermediate encrypted image information to generate target encrypted image information; The step of performing color space conversion, position encoding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information specifically includes: Performing color space conversion on the image information to be encrypted to obtain a plurality of color component information of the image to be encrypted; generating a plurality of matrix information of color components of the image to be encrypted according to the plurality of color components of the image to be encrypted; Extracting elements from the plurality of color component matrix information of the image to be encrypted to obtain information on the number of rows of the color component matrix of the image to be encrypted, information on the number of columns of the color component matrix of the image to be encrypted, a plurality of color component matrix elements of the image to be encrypted, information on the number of rows of the color component matrix elements of the image to be encrypted, and information on the number of columns of the color component matrix elements of the image to be encrypted; wherein the color component matrix elements of the image to be encrypted have a one-to-one correspondence with the information on the number of rows of the color component matrix elements of the image to be encrypted and the information on the number of columns of the color component matrix elements of the image to be encrypted; When the row number information of the image color component matrix element to be encrypted and the column number information of the image color component matrix element to be encrypted are both not equal to 1, and the row number information of the image color component matrix element to be encrypted is not equal to the row number information of the image color component matrix to be encrypted, and the row number information of the image color component matrix element to be encrypted is not equal to the column number information of the image color component matrix to be encrypted, then calculating the sum of the row number information and the column number information of each image color component matrix element to be encrypted; When the sum of the row number information and the column number information of the first to-be-encrypted image color component matrix element is equal to the sum of the row number information and the column number information of the second to-be-encrypted image color component matrix element, generating an array of to-be-encrypted image color component matrix elements according to the first to-be-encrypted image color component matrix element and the second to-be-encrypted image color component matrix element; According to a preset splicing rule for the encoding array of the image to be encrypted, the array of the color component matrix elements of the image to be encrypted, the elements whose row number information of the color component matrix elements of the image to be encrypted and the column number information of the color component matrix elements of the image to be encrypted are both equal to 1, and the elements whose row number information of the color component matrix elements of the image to be encrypted is equal to the row number information of the color component matrix to be encrypted, and whose row number information of the color component matrix elements of the image to be encrypted is equal to the column number information of the color component matrix to be encrypted, are spliced together to obtain the encoding information of the color component matrix of the image to be encrypted; Based on a preset image semantic parsing model, semantic parsing is performed on the color component matrix encoding information of the image to be encrypted to generate a plurality of initial encrypted image information; The preset image semantic parsing model includes a plurality of preset image semantic parsing sub-models and a plurality of preset image semantic parsing sub-model fitness functions; wherein the preset image semantic parsing sub-models and the preset image semantic parsing sub-model fitness functions correspond to each other one by one; The step of performing semantic parsing on the color component matrix encoding information of the image to be encrypted based on a preset image semantic parsing model to generate a plurality of initial encrypted image information specifically includes: Calculating multiple image semantic analysis fitnesses according to the color component matrix encoding information of the image to be encrypted and multiple preset image semantic analysis sub-model fitness functions; When the semantic parsing fitness of the image to be encrypted is greater than or equal to a preset semantic parsing fitness threshold of the image to be encrypted, the image semantic parsing sub-model corresponding to the semantic parsing fitness of the image to be encrypted is used as the semantic parsing processing sub-model of the image to be encrypted; A plurality of initial encrypted image information is generated according to the color component matrix encoding information of the image to be encrypted and the semantic analysis processing sub-model of the image to be encrypted.
2. The image encryption method according to claim 1, wherein: The plurality of preset multidimensional encrypted mapping functions include a plurality of preset multidimensional encrypted mapping space trajectory calculation functions, a plurality of preset multidimensional encrypted space feature mapping functions, and a preset multidimensional encrypted space feature fusion mapping function; The step of performing iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multidimensional encryption mapping iterations and a plurality of preset multidimensional encryption mapping functions to generate a plurality of intermediate encrypted image information specifically includes: Solving the plurality of preset multidimensional encrypted mapping functions according to the plurality of preset multidimensional encrypted mapping space trajectory calculation functions to obtain a plurality of multidimensional encrypted mapping space trajectory information; performing iterative mapping calculations on the plurality of initial encrypted image information according to the plurality of multi-dimensional encrypted mapping spatial trajectory information and a preset number of multi-dimensional encrypted mapping iterations to generate nonlinear mapped encrypted image information; Obtaining first multidimensional encrypted space mapping image feature information, second multidimensional encrypted space mapping image feature information, and third multidimensional encrypted space mapping image feature information according to a preset first multidimensional encrypted space feature mapping function, a preset second multidimensional encrypted space feature mapping function, and the nonlinearly mapped encrypted image information; Obtaining multidimensional encrypted space mapping image feature fusion weight information according to the first multidimensional encrypted space mapping image feature information, the second multidimensional encrypted space mapping image feature information, and the third multidimensional encrypted space mapping image feature information; Performing weighted summation based on the multidimensional encrypted space mapping image feature fusion weight information and the third multidimensional encrypted space mapping image feature information to obtain multidimensional encrypted space mapping image feature fusion information; A plurality of intermediate encrypted image information is generated according to the multi-dimensional encrypted space mapping image feature fusion information and a preset multi-dimensional encrypted space feature fusion mapping function.
3. An image decryption method, characterized in that: include: Obtain encrypted image information; Decomposing and calculating the encrypted image information to obtain a plurality of initial decrypted image information; Performing back-tracing mapping iterative calculations on the multiple initial decrypted image information according to a preset number of multi-dimensional encryption mapping iterations and multiple preset multi-dimensional encryption mapping functions to generate multiple intermediate decrypted image information; Performing semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information; The step of performing semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information specifically includes: Based on a preset image semantic reconstruction model, semantic reconstruction processing is performed on the intermediate decrypted image information to obtain intermediate decrypted image coding matrix information and dimension information of the intermediate decrypted image coding matrix information; Performing dimension conversion processing on the intermediate decrypted image coding matrix information to obtain intermediate decrypted image coding dimension reduction matrix information; the intermediate decrypted image coding dimension reduction matrix information includes a plurality of intermediate decrypted image coding dimension reduction matrix elements; According to a preset decrypted image code matrix element truncation rule, the dimension information of the intermediate decrypted image code matrix information is used as an element number truncation threshold, and multiple intermediate decrypted image code dimensionality reduction matrix elements are truncate in unequal portions to obtain multiple intermediate decrypted image code array information; According to a preset decrypted image code array splicing order, a plurality of the intermediate decrypted image code array information are spliced and dimension-upgraded to generate intermediate decrypted image decoding matrix information; Performing color space inverse conversion on the intermediate decrypted image decoding matrix information to generate target decrypted image information; The preset image semantic reconstruction model includes a plurality of preset image semantic reconstruction sub-models and a plurality of preset sub-model semantic backtracking fitness functions; wherein the preset image semantic reconstruction sub-models correspond one to one with the preset sub-model semantic backtracking fitness functions; The step of performing semantic reconstruction processing on the intermediate decrypted image information based on a preset image semantic reconstruction model to obtain intermediate decrypted image coding matrix information specifically includes: Calculating the semantic reconstruction fitness of multiple images to be decrypted based on the intermediate decrypted image information and multiple preset sub-model semantic backtracking fitness functions; When the semantic reconstruction fitness of the image to be decrypted is greater than a preset semantic reconstruction fitness threshold of the image to be decrypted, the image semantic reconstruction sub-model corresponding to the semantic reconstruction fitness of the image to be decrypted is used as the semantic reconstruction sub-model for decrypting the image encoding information; Based on the plurality of semantic reconstruction sub-models of the decrypted image coding information, semantic reconstruction processing is performed on the intermediate decrypted image coding matrix information to obtain the intermediate decrypted image coding matrix information.
4. An image encryption device, characterized in that: include: The module for obtaining the image information to be encrypted is used to obtain the image information to be encrypted; An initial encrypted image information generating module is used to perform color space conversion, position coding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information; an intermediate encrypted image information generating module, configured to perform iterative mapping calculations on the plurality of initial encrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions, to generate a plurality of intermediate encrypted image information; a target encrypted image information generating module, configured to perform weighted calculation on a plurality of the intermediate encrypted image information to generate target encrypted image information; The step of performing color space conversion, position encoding processing, and semantic parsing processing on the image information to be encrypted to generate a plurality of initial encrypted image information specifically includes: Performing color space conversion on the image information to be encrypted to obtain a plurality of color component information of the image to be encrypted; generating a plurality of matrix information of color components of the image to be encrypted according to the plurality of color components of the image to be encrypted; Extracting elements from the plurality of color component matrix information of the image to be encrypted to obtain information on the number of rows of the color component matrix of the image to be encrypted, information on the number of columns of the color component matrix of the image to be encrypted, a plurality of color component matrix elements of the image to be encrypted, information on the number of rows of the color component matrix elements of the image to be encrypted, and information on the number of columns of the color component matrix elements of the image to be encrypted; wherein the color component matrix elements of the image to be encrypted have a one-to-one correspondence with the information on the number of rows of the color component matrix elements of the image to be encrypted and the information on the number of columns of the color component matrix elements of the image to be encrypted; When the row number information of the image color component matrix element to be encrypted and the column number information of the image color component matrix element to be encrypted are both not equal to 1, and the row number information of the image color component matrix element to be encrypted is not equal to the row number information of the image color component matrix to be encrypted, and the row number information of the image color component matrix element to be encrypted is not equal to the column number information of the image color component matrix to be encrypted, then calculating the sum of the row number information and the column number information of each image color component matrix element to be encrypted; When the sum of the row number information and the column number information of the first to-be-encrypted image color component matrix element is equal to the sum of the row number information and the column number information of the second to-be-encrypted image color component matrix element, generating an array of to-be-encrypted image color component matrix elements according to the first to-be-encrypted image color component matrix element and the second to-be-encrypted image color component matrix element; According to a preset splicing rule for the encoding array of the image to be encrypted, the array of the color component matrix elements of the image to be encrypted, the elements whose row number information of the color component matrix elements of the image to be encrypted and the column number information of the color component matrix elements of the image to be encrypted are both equal to 1, and the elements whose row number information of the color component matrix elements of the image to be encrypted is equal to the row number information of the color component matrix to be encrypted, and whose row number information of the color component matrix elements of the image to be encrypted is equal to the column number information of the color component matrix to be encrypted, are spliced together to obtain the encoding information of the color component matrix of the image to be encrypted; Based on a preset image semantic parsing model, semantic parsing is performed on the color component matrix encoding information of the image to be encrypted to generate a plurality of initial encrypted image information; The preset image semantic parsing model includes a plurality of preset image semantic parsing sub-models and a plurality of preset image semantic parsing sub-model fitness functions; wherein the preset image semantic parsing sub-models and the preset image semantic parsing sub-model fitness functions correspond to each other one by one; The step of performing semantic parsing on the color component matrix encoding information of the image to be encrypted based on a preset image semantic parsing model to generate a plurality of initial encrypted image information specifically includes: Calculating multiple image semantic analysis fitnesses according to the color component matrix encoding information of the image to be encrypted and multiple preset image semantic analysis sub-model fitness functions; When the semantic parsing fitness of the image to be encrypted is greater than or equal to a preset semantic parsing fitness threshold of the image to be encrypted, the image semantic parsing sub-model corresponding to the semantic parsing fitness of the image to be encrypted is used as the semantic parsing processing sub-model of the image to be encrypted; A plurality of initial encrypted image information is generated according to the color component matrix encoding information of the image to be encrypted and the semantic analysis processing sub-model of the image to be encrypted.
5. An image decryption device, characterized in that: include: An encrypted image information acquisition module is used to acquire encrypted image information; an initial decrypted image information determination module, configured to perform decomposition calculations on the encrypted image information to obtain a plurality of initial decrypted image information; an intermediate decrypted image information generating module, configured to perform back-tracing mapping iterative calculations on the plurality of initial decrypted image information according to a preset number of multi-dimensional encryption mapping iterations and a plurality of preset multi-dimensional encryption mapping functions, to generate a plurality of intermediate decrypted image information; a target decrypted image information generating module, configured to perform semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information; The step of performing semantic reconstruction processing, position decoding processing, and color space inverse conversion on the intermediate decrypted image information to generate target decrypted image information specifically includes: Based on a preset image semantic reconstruction model, semantic reconstruction processing is performed on the intermediate decrypted image information to obtain intermediate decrypted image coding matrix information and dimension information of the intermediate decrypted image coding matrix information; Performing dimension conversion processing on the intermediate decrypted image coding matrix information to obtain intermediate decrypted image coding dimension reduction matrix information; the intermediate decrypted image coding dimension reduction matrix information includes a plurality of intermediate decrypted image coding dimension reduction matrix elements; According to a preset decrypted image code matrix element truncation rule, the dimension information of the intermediate decrypted image code matrix information is used as an element number truncation threshold, and multiple intermediate decrypted image code dimensionality reduction matrix elements are truncate in unequal portions to obtain multiple intermediate decrypted image code array information; According to a preset decrypted image code array splicing order, a plurality of the intermediate decrypted image code array information are spliced and dimension-upgraded to generate intermediate decrypted image decoding matrix information; Performing color space inverse conversion on the intermediate decrypted image decoding matrix information to generate target decrypted image information; The preset image semantic reconstruction model includes a plurality of preset image semantic reconstruction sub-models and a plurality of preset sub-model semantic backtracking fitness functions; wherein the preset image semantic reconstruction sub-models correspond one to one with the preset sub-model semantic backtracking fitness functions; The step of performing semantic reconstruction processing on the intermediate decrypted image information based on a preset image semantic reconstruction model to obtain intermediate decrypted image coding matrix information specifically includes: Calculating the semantic reconstruction fitness of multiple images to be decrypted based on the intermediate decrypted image information and multiple preset sub-model semantic backtracking fitness functions; When the semantic reconstruction fitness of the image to be decrypted is greater than a preset semantic reconstruction fitness threshold of the image to be decrypted, the image semantic reconstruction sub-model corresponding to the semantic reconstruction fitness of the image to be decrypted is used as the semantic reconstruction sub-model for decrypting the image encoding information; Based on the plurality of semantic reconstruction sub-models of the decrypted image coding information, semantic reconstruction processing is performed on the intermediate decrypted image coding matrix information to obtain the intermediate decrypted image coding matrix information.
6. A terminal device, characterized in that: The terminal device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Low-illumination image enhancement method based on multi-semantic feature fusion network
CN117408924A
Image encryption algorithm based on multi-chaotic system and cyclic DNA operation and electronic equipment
CN117440101A