Image encryption method based on deep neural network and medical system
Through the image encryption method based on deep neural networks, discrete wavelet transformation and reversible neural network are used to encrypt and decrypt medical images, solving the problems of insufficient security and poor visual quality of medical images, and achieving convenient and efficient encryption and decryption processes and powerful privacy protection.
Patent Information
- Application Number
- CN202510040524.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-23
AI Technical Summary
Medical image transmission is insufficient security, privacy is easy to leak, the encryption and decryption process is inconvenient, and the visual quality of the image after decryption is poor.
The image encryption method based on deep neural network is adopted to encrypt and decrypt the key and image through discrete wavelet transformation and reversible neural network to generate and recover encrypted images with high visual quality.
It realizes the convenience of the encryption and decryption process, strengthens privacy protection, improves the encryption and decryption speed, and ensures the visual quality of the decrypted image.
Smart Images

Figure CN120034611A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an image encryption method and a medical system based on a deep neural network. Background Art
[0002] With the rapid development of modern computer and signal integration technology, medical imaging is also exploring, innovating and improving. The digitization and informatization of medical imaging equipment has become the trend of the times and a new development trend. Various imaging technologies such as CR / DR, computer tomography (CT), magnetic resonance imaging (MRI), positron emission tomography, etc. have played an important role in clinical practice.
[0003] In the past decade, with the popularization of 5G technology and the maturity of cloud computing technology, the smart medical model has developed significantly. In this model, the combination of the Internet of Things and cloud computing can quickly integrate and store patients' medical data, allowing doctors to quickly obtain detailed information about patients. This model also significantly improves the convenience of referral when patients are referred between different medical institutions. Medical image data, including CT, MRI, and X-ray, is an important part of medical diagnosis and is therefore regarded as one of the most critical contents in medical data. However, since these image data contain patients' privacy information, once illegally stolen or abused, it will have a huge impact on patients and medical institutions. Therefore, it is crucial to ensure the security of medical images and prevent them from being illegally obtained. Medical image encryption has gradually become a rapidly growing encryption application field, which puts higher requirements on the efficiency of encryption algorithms and requires them to be able to complete encryption at a lower cost and time. In the process of medical image encryption, symmetric or asymmetric encryption technology can be used to convert the input image into an encrypted image through a symmetric or asymmetric key. This process is called image encryption. There are various methods for medical image encryption, such as high-speed scrambling, bitwise exclusive OR (XOR) diffusion, chaotic encryption, and edge mapping.
[0004] Telemedicine, telesurgery, and teleradiology are advanced technologies currently in the clinical trial and implementation stages. There are certain risks in the process of transmitting sensitive patient data over the network. In particular, medical images (such as MRI, CT, and X-ray) are vulnerable to attacks due to their large data volume, redundancy, and high correlation between pixels. Therefore, it is particularly important to develop a medical image encryption method that combines high performance and high efficiency. Summary of the invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an image encryption method and medical system based on deep neural network, so as to solve or partially solve the problems of insufficient security of medical image transmission, easy leakage of privacy, inconvenient encryption and decryption process, and poor visual quality of decrypted images.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] One aspect of the present invention provides an image encryption method based on a deep neural network, comprising the following steps:
[0008] Obtain the image to be encrypted;
[0009] Generate a key;
[0010] Performing discrete wavelet transform on the key and the image to be encrypted respectively, and using them as forward inputs of a trained reversible neural network to obtain output features;
[0011] Performing inverse discrete wavelet transform on the output features to obtain an encrypted image.
[0012] As a preferred technical solution, it also includes:
[0013] Obtaining an image to be decrypted;
[0014] Performing discrete wavelet transform on the image to be decrypted and the key respectively, and using them as reverse inputs of the trained reversible neural network to obtain new output features;
[0015] The new output features are inversely transformed into discrete wavelet transform to obtain the decrypted image.
[0016] As a preferred technical solution, the key generation process includes the following steps:
[0017] Performing hash processing on the image to be encrypted using the SHA-256 algorithm to obtain a hash value;
[0018] A random seed is synthesized based on the hash value and the preset seed, and a random parameter μ and an initial value x are generated by a linear congruential generator. 0 ;
[0019] Based on the random parameters and initial values, a one-dimensional Logistic-Tent chaotic model is configured to generate a chaotic sequence;
[0020] The chaotic sequence is subjected to Fisher-Yates random sorting processing, and the key is obtained through normalization and other processing.
[0021] As a preferred technical solution, the discrete wavelet transform process includes:
[0022] The input data of size (B, C, H, W) is split into low-frequency wavelet subbands and high-frequency wavelet subbands, and the mapping transformation is performed to obtain an output of size (B, 4C, H / 2, W / 2), where B is the batch size, H is the height, W is the width, and C is the number of channels.
[0023] As a preferred technical solution, the reversible neural network includes multiple reversible blocks with the same structure.
[0024] As a preferred technical solution, during the forward propagation process of the reversible neural network, the output of any reversible block is:
[0025]
[0026] in, are the key and image features of the current reversible block output respectively. is the corresponding feature of the key of the current reversible block or the key after discrete wavelet transformation, is the corresponding feature of the image of the current reversible block or the image to be encrypted after discrete wavelet transform, α is the sigmoid function multiplied by a constant factor, ⊙ represents the dot product operation, ρ(·), φ(·) and η(·) are arbitrary functions, and exp(·) represents an exponential function with the natural constant e as the base.
[0027] As a preferred technical solution, during the back propagation process of the reversible neural network, the output of any reversible block is:
[0028]
[0029] in, are the key and image features of the current reversible block output respectively. is the corresponding feature of the key of the current reversible block or the key after discrete wavelet transformation, is the corresponding feature of the image of the current reversible block or the image to be decrypted after discrete wavelet transform, α is the sigmoid function multiplied by a constant factor, ⊙ represents the dot product operation, ρ(·), φ(·) and η(·) are arbitrary functions, and exp(·) represents the exponential function with the natural constant e as the base.
[0030] As a preferred technical solution, the training process of the reversible neural network includes the following steps:
[0031] Obtain a medical image dataset and convert the images into grayscale images of a preset size to construct a training set;
[0032] Based on the training set, the reversible neural network is used for forward propagation and backward propagation, with the goal of minimizing one or more of encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss, so as to achieve the training of the reversible neural network.
[0033] As a preferred technical solution, encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss are:
[0034]
[0035]
[0036] L key =1 / N*∑(S_correct-S_encoder) 2 +α*max(0,margin-1 / N*∑(S - wrong-S_encoder) 2 )
[0037] Among them, L guide , L reconstruction , L freq (θ), L key They are encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss, respectively. key 、x encoder are the key and the corresponding features of the image output by the reversible neural network during the forward propagation process, N is the total number of pixels in the image, and x i is the original image, x decoder is the image generated after decryption, Represents the distance between the key and the encrypted image in low-frequency features, which is measured by the mean square error. It means that the low-frequency component is extracted by Fourier transform. S_correct, S_encoder and S_wrong represent the ideal feature after encoding with the correct key, the feature generated by the current encoder according to the input and the encoded feature with the wrong key input respectively. Margin and balance factor α are preset parameters.
[0038] Another aspect of the present invention provides a medical system, comprising:
[0039] A key generation server, used to generate keys;
[0040] An image capturing terminal, used for acquiring medical images and encrypting the medical images by the aforementioned image encryption method based on deep neural network;
[0041] A cloud server, establishing a connection with the image capturing terminal, receiving and storing encrypted medical images;
[0042] The data consumption end establishes a connection with the cloud server, obtains the encrypted medical image from the cloud server, and obtains the original medical image after decryption.
[0043] Compared with the prior art, the present invention has at least one of the following beneficial effects:
[0044] (1) Convenient encryption and decryption process: The present invention adopts a reversible neural network that can forward propagate and reverse propagate. In the encryption process, the key after discrete wavelet transformation and the image to be encrypted are used as the input objects of the reversible neural network to obtain the encrypted image. The encryption process and the decryption process use the reversible neural network with the same network parameters.
[0045] (2) Strong privacy protection: The reversible neural network of the present invention includes multiple reversible blocks, each block has a forward calculation and a reverse calculation. After the image is input into the network, it is divided into two parts, each part is encrypted independently, and the degree of change of the image is controlled by an exponential function to ensure the reversibility of the transformation. According to experiments, the encrypted image generated by the present invention does not show any information of the original image at all, and has strong privacy protection.
[0046] (3) Fast encryption and decryption speed: Compared with the method of using parallel perturbation or serial diffusion, the present invention uses a network to perform encryption and decryption. Each reversible block performs the same operation in the forward and reverse calculations, but in the opposite order. This enables the network to "reverse" back to the original image, and the encryption and decryption speed is faster.
[0047] (4) Good decryption recovery effect: The present invention minimizes the low-frequency wavelet loss to ensure that the encrypted image can retain the relevant information of the original image in the low-frequency sub-band part, so that the decrypted image can restore the original image information in the low-frequency part. Minimize the encryption loss to ensure the visual quality of the encrypted image, and no relevant information of the original image can be seen. Minimize the reconstruction loss to ensure the reliability of the visual quality recovery of the decrypted image. Minimize the key uniqueness loss to ensure the security of decryption. By training the neural network with the goal of minimizing these four losses, it is ensured that the decrypted image recovery effect is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flowchart of the image encryption method based on deep neural network in the embodiment;
[0049] Figure 2 Schematic diagram of the application framework of the image encryption method in the medical system in the embodiment;
[0050] Figure 3 This is a schematic diagram of the image encryption and decryption process in the embodiment;
[0051] Figure 4This is a schematic diagram of a network structure diagram of a key generator in an embodiment;
[0052] Figure 5 A schematic diagram of the structure of a reversible neural network in an embodiment;
[0053] Figure 6 This is a schematic diagram of the visual quality of image encryption and decryption in the embodiment;
[0054] Figure 7 : The original image, the encrypted image and the corresponding histogram in the embodiment;
[0055] Figure 8 Schematic diagram of adjacent pixel correlation analysis in an embodiment;
[0056] Fig. 9 This is the decrypted image after the noise attack in the embodiment;
[0057] Fig.10 This is a schematic diagram of a key uniqueness test in an embodiment;
[0058] Fig.11 Schematic diagram of an electronic device in an embodiment. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0060] Example 1
[0061] In view of the problems existing in the above-mentioned prior art, this embodiment provides an image encryption method based on a deep neural network, which aims to ensure the robustness and security of the encrypted image during transmission while improving the visual quality of the decrypted image. Figure 3 ,This method first obtains the key required for encryption from the key generator, then performs discrete wavelet transform (DWT) on the key and the original image A respectively, inputs the four frequency subbands processed by DWT into the invertible neural network (INN) for encryption, and obtains the encrypted image B after the output result is subjected to inverse discrete wavelet transform (IWT), and then inputs the encrypted image into the simulated noise layer (NoiseLevel) to obtain the encrypted image B after the simulated noise attack ′Then it is processed with the key key through DWT operation and input into the INN network for image decryption. The output result is processed through IWT operation to obtain the decrypted image C.
[0062] For details, see Figure 1 , the method comprises the following steps, wherein steps S1-S4 are the encryption process, and steps S5-S7 are the decryption process:
[0063] Step S1, obtaining an image to be encrypted.
[0064] Step S2, generate a key.
[0065] The key for this step is obtained from Figure 4 The key generation network designed by the researchers is generated in the following process: first, the original image is hashed using the SHA-256 algorithm to obtain a hash value, which is combined with an external seed to form a random seed. Then, a random parameter μ and an initial value x are generated from a linear congruential generator. 0 ; Input the parameters into the one-dimensional Logistic-Tent chaotic system to generate a chaotic sequence, use the Fisher-Yates algorithm to disrupt the sequence, and finally perform a normalization operation.
[0066] Step S3, performing discrete wavelet transform on the key and the image to be encrypted respectively, and using them as forward inputs of the trained reversible neural network to obtain output features.
[0067] Image encryption in the pixel domain can easily lead to texture replication artifacts and color distortion. Compared with the pixel domain, the frequency domain, especially the high-frequency domain, is more suitable for image encryption. In this step, DWT is used to divide the image into low-frequency and high-frequency wavelet subbands, and then enter the reversible block, so that the network can better encrypt the original image. In addition, the perfect reconstruction characteristics of the wavelet transform help reduce the information loss of the original image and improve the image encryption performance. After the DWT operation, the feature map of size (B, C, H, W) is converted to (B, 4C, H / 2, W / 2), where B is the batch size, H is the height, W is the width, and C is the number of channels.
[0068] Step S4, performing inverse discrete wavelet transform on the output features to obtain an encrypted image.
[0069] Step S5, obtaining the image to be decrypted.
[0070] Step S6, performing discrete wavelet transform on the image to be decrypted and the key respectively, and using them as reverse input of the reversible neural network trained in step S3 to obtain new output features.
[0071] Step S7, performing inverse discrete wavelet transform on the new output features to obtain a decrypted image.
[0072] Specifically, the training process of the reversible neural network in step S3 and step S6 includes:
[0073] Step 1: Construct training samples.
[0074] The training image datasets were obtained from public channels, with a total of 2,100 images, including 1,300 lung X-ray images and 800 brain MRI images. During training, all images were converted to 8-bit grayscale images of 256×256 size. After obtaining the encryption key key from the key generator network, they were input into the INN network after DWT operation, and the output results were further subjected to IWT operation to obtain an encrypted image of 256×256 size.
[0075] Step 2, based on the training set, use the reversible neural network to perform forward propagation and back propagation.
[0076] See also Figure 5 The structure diagram of the reversible neural network for image encryption is shown in Figure 2. The encryption and decryption networks have the same submodules and share the same network parameters, but the image information flow is reversed. There are M reversible blocks with the same architecture in the network, which are constructed as follows: For the i-th reversible block in the forward process, the input is and The output is The formula is as follows:
[0077]
[0078] Where α is a sigmoid function multiplied by a constant factor, representing the dot product operation. Here ρ(·), φ(·), and η(·) are all arbitrary functions, and we adopt the widely used dense block to represent them. After the last reversible block, the output can be obtained Then, the encrypted image B can be obtained by performing IWT operation.
[0079] During the decryption process, the direction of the image information flow is from the (i+1)th decryption block to the (i)th decryption block, which is the opposite order of the encryption process. Specifically, the input of the Mth decryption block is and They are the encrypted images B after the simulated noise layer. ′ And the encryption key key is generated by DWT.
[0080]
[0081] Step 3, with the goal of minimizing one or more of the encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss, the training of the reversible neural network is realized.
[0082] This step is based on the back propagation theory, with the batch size set to 4, the learning rate size to 3.16e-5, and the Adam optimizer to control the decay rate of the first-order moment and the second-order moment. The initial weight scaling value is set to 0.01 to control the complexity of the model and prevent overfitting.
[0083] The total loss function of this step includes four different losses: encryption loss to ensure encryption performance, reconstruction loss to ensure recovery performance, low-frequency wavelet loss to enhance encryption security, and key uniqueness loss to enhance model security.
[0084] (1) Encryption loss.
[0085] The encryption loss is used to guide the learning of a certain specific relationship between the encrypted image and the key, so that the generated encrypted image has strong randomness and ensures that the model learns the appropriate encryption strategy. The L2 loss (mean square error, MSE) is used to measure the difference between the encrypted image and the key time. The expression formula is as follows:
[0086]
[0087] (2) Reconstruction loss.
[0088] It is used to calculate the difference between the decrypted image and the original image. By minimizing this loss, a decrypted image that is highly similar to the original image can be generated. The L2 loss is used to measure the difference between the two. The loss function formula is expressed as:
[0089]
[0090] Among them, x i is the original image, x decoder is the image generated after decryption, and N is the total number of pixels in the image.
[0091] (3) Low-frequency wavelet loss.
[0092] The low-frequency component represents the overall outline, structure, and large-scale features of the image, while the high-frequency part usually represents details and noise. In image encryption tasks, the low-frequency part is often the most important part because it contains the main structural information of the image. The purpose of the low-frequency loss is to ensure that the low-frequency components of the encrypted image and the key image are consistent to some extent. The loss function formula is expressed as:
[0093]
[0094] (4) Loss of key uniqueness.
[0095] The loss function consists of two main parts: correct decryption loss and incorrect decryption loss. The correct decryption loss uses the mean square error (MSE) to measure the difference between the correct key decryption result and the original image; the incorrect decryption loss is based on a margin-based design, and a penalty term is generated when the difference between the incorrect key decryption result and the original image is less than a preset threshold. By setting margin = 0.5 and the balance factor α = 0.3, the loss function effectively enhances the model's resistance to incorrect keys while maintaining training stability. This design ensures that the correct key can accurately reconstruct the original image, and that the incorrect key decryption result is sufficiently different from the original image, thereby improving the security of the encryption system.
[0096] L key =1 / N*∑(S_correct-S_encoder) 2 +α*max(0,margin-1 / N*∑(S_wrong-S_encoder) 2 )
[0097] The effectiveness of this method is verified through experiments below.
[0098] (1) Visual quality of image encryption and decryption.
[0099] See also Figure 6 For the comparison of three samples, (a) original image (b) encrypted image (c) decrypted image. Figure 6 It can be seen that the image encrypted by this method protects the privacy of the original image well. At the same time, at the visual level, the decrypted image is basically consistent with the original image.
[0100] (2) Image histogram distribution analysis.
[0101] See also Figure 7 The following is a sample image histogram distribution diagram, where (a) the original image and its histogram (b) the encrypted image and its histogram. Figure 7 It can be seen that the encrypted pixel distribution of this method basically does not contain the distribution information of the original image.
[0102] (3) Correlation analysis of adjacent pixels.
[0103] See also Figure 8 Schematic diagram of diagonal pixel correlation of three samples, where (a) diagonal pixel correlation of original image and (b) diagonal pixel correlation of encrypted image. Figure 8 It can be seen that the encrypted diagonal pixel correlation of this method basically does not include the diagonal pixel correlation information of the original image.
[0104] (4) Key uniqueness test.
[0105] See also Fig.10 This is a key uniqueness test comparison of a sample, where (a) the original image (b) the image decrypted with the correct key (c) the image decrypted with the wrong key. Fig.10 It can be seen that the key of this method is highly unique and has strong privacy protection.
[0106] (5) Peak signal-to-noise ratio and structural similarity test.
[0107] Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) are usually regarded as the standards for measuring image decryption performance. As the number of attacks that encrypted images may encounter during transmission and storage increases, the quality of reconstructed decrypted images is also decreasing. Therefore, how to improve the reconstructed visual quality of decrypted images while ensuring the robustness and security of image transmission is our goal.
[0108] The above datasets are selected as the datasets used for training and testing, and the PSNR value and SSIM value of the decrypted image are tested respectively. See Table 1 for the test results. The test results show that the decrypted image of this method has a higher image visual quality under the premise of ensuring that the encrypted image does not have any original image information.
[0109] Table 1 Decrypted image evaluation results
[0110] Dataset PSNR SSIM Lung CT 42.607dB 0.9916 Brain MRI 44.626dB 0.9937
[0111] Example 2
[0112] Based on Example 1, see Figure 2 This embodiment provides a medical system, including a sender, a public channel (cloud), and a receiver connected in sequence. After obtaining the encryption key, the sender inputs it together with the image to be encrypted into the encryption network for encryption, and uploads the obtained encrypted image to the cloud or the public channel for transmission. The receiver inputs the received key and the encrypted image into the decryption network to obtain the final decrypted image.
[0113] For details, see Figure 2 , the healthcare system can include:
[0114] (1) a key generation server, used to generate keys;
[0115] (2) an image capturing terminal, used to acquire medical images and encrypt the medical images using the image encryption method based on a deep neural network as described in Example 1;
[0116] (3) Cloud server, establishing a connection with the imaging terminal, receiving and storing encrypted medical images;
[0117] (4) One or more data consumption terminals establish a connection with the cloud server, obtain the encrypted medical images from the cloud server, and obtain the original medical images after decryption.
[0118] This system not only helps to ensure the confidentiality of patient medical records during communication, but also prevents medical images from being tampered with and leading to misdiagnosis, while preventing medical institutions from becoming targets of cyber attacks. The image is encrypted after being processed by the encryption algorithm, which greatly improves the security and privacy of the transmission process and ensures the effectiveness of the receiving end in making medical judgments.
[0119] In summary, the present invention aims to invent an image that needs to be encrypted and protected into a secure noise-like image, and then upload it to the cloud or a public communication channel. The receiver decrypts the received encrypted image according to the key and reconstructs the original image. The present invention combines the characteristics of a reversible neural network to design a high-performance image encryption method, which improves the PSNR value and SSIM value of the decrypted image. The present invention has made positive contributions to promoting the construction of smart medical care, telemedicine, etc. and increasing the security of medical data.
[0120] Example 3
[0121] Based on the aforementioned embodiments, this embodiment provides an electronic device, comprising: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the aforementioned deep neural network-based image encryption method.
[0122] like Fig.11 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, the present invention does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0123] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0124] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0125] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. An image encryption method based on deep neural network, characterized in that: The steps include: Obtain the image to be encrypted; Generate a key; Performing discrete wavelet transform on the key and the image to be encrypted respectively, and using them as forward inputs of a trained reversible neural network to obtain output features; Performing inverse discrete wavelet transform on the output features to obtain an encrypted image.
2. The image encryption method based on deep neural network according to claim 1, characterized in that: Also includes: Obtain the image to be decrypted; Performing discrete wavelet transform on the image to be decrypted and the key respectively, and using them as reverse inputs of the trained reversible neural network to obtain new output features; The new output features are inversely transformed into discrete wavelet transform to obtain the decrypted image.
3. The image encryption method based on deep neural network according to claim 1, characterized in that: The key generation process includes the following steps: Performing hash processing on the image to be encrypted using the SHA-256 algorithm to obtain a hash value; Based on the hash value and a preset seed, a random seed is synthesized, and random parameters and an initial value are generated by linear congruential method; Based on the random parameters and initial values, a one-dimensional Logistic-Tent chaotic model is configured to generate a chaotic sequence; The chaotic sequence is subjected to Fisher-Yates random sorting processing, and the key is obtained through normalization processing.
4. The image encryption method based on deep neural network according to claim 1, characterized in that: The discrete wavelet transform process includes: The input data of size (B, C, H, W) is split into low-frequency wavelet subbands and high-frequency wavelet subbands, and the mapping transformation is performed to obtain an output of size (B, 4C, H / 2, W / 2), where B is the batch size, H is the height, W is the width, and C is the number of channels.
5. The image encryption method based on deep neural network according to claim 1, characterized in that: The reversible neural network includes a plurality of reversible blocks with the same structure.
6. The image encryption method based on deep neural network according to claim 5, characterized in that: During the forward propagation of the reversible neural network, the output of any reversible block is: in, are the key and image features of the current reversible block output respectively. is the corresponding feature of the key of the current reversible block or the key after discrete wavelet transformation, is the corresponding feature of the image of the current reversible block or the image to be encrypted after discrete wavelet transform, α is the sigmoid function multiplied by a constant factor, ⊙ represents the dot product operation, ρ(·), φ(·) and η(·) are arbitrary functions, and exp(·) represents an exponential function with the natural constant e as the base.
7. The image encryption method based on deep neural network according to claim 5, characterized in that: During the back propagation process of the reversible neural network, the output of any reversible block is: in, are the key and image features of the current reversible block output respectively. is the corresponding feature of the key of the current reversible block or the key after discrete wavelet transformation, is the corresponding feature of the image of the current reversible block or the image to be decrypted after discrete wavelet transform, α is the sigmoid function multiplied by a constant factor, ⊙ represents the dot product operation, ρ(·), φ(·) and η(·) are arbitrary functions, and exp(·) represents the exponential function with the natural constant e as the base.
8. The image encryption method based on deep neural network according to claim 1, characterized in that: The training process of the reversible neural network includes the following steps: Obtain a medical image dataset and convert the images into grayscale images of a preset size to construct a training set; Based on the training set, the reversible neural network is used for forward propagation and backward propagation, with the goal of minimizing one or more of encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss, so as to achieve the training of the reversible neural network.
9. The image encryption method based on deep neural network according to claim 8, characterized in that: The encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss are: L key =1 / N * ∑(S_correct-S_encoder) 2 +α * max(0,margin-1 / N * ∑(S_wrong-S_encoder) 2 ) Among them, L guide , L reconstruction , L freq (θ), L key They are encryption loss, reconstruction loss, low-frequency wavelet loss, and key uniqueness loss, respectively. key 、x encoder are the key and the corresponding features of the image output by the reversible neural network during the forward propagation process, N is the total number of pixels in the image, and x i is the original image, x decoder is the image generated after decryption, represents the distance between the key and the encrypted image in low-frequency features, It means extracting the low-frequency component through Fourier transform, S_correct means the ideal feature after encoding with the correct key, S_encoder means the feature generated by the current encoder according to the input, S_wrong means the encoded feature input with the wrong key, margin and balance factor α are preset parameters.
10. A medical system, characterized in that: include: A key generation server, used to generate keys; An image capturing terminal, used for acquiring medical images, and encrypting the medical images by the image encryption method based on a deep neural network as described in any one of claims 1 to 9; A cloud server, establishing a connection with the image capturing terminal, receiving and storing encrypted medical images; The data consumption end establishes a connection with the cloud server, obtains the encrypted medical image from the cloud server, and obtains the decrypted and reconstructed medical image after decryption.