Secure transmission method of medical images based on semi-tensor product compressed sensing and hybrid cloud

By applying semi-tenster backlog sensing and hybrid cloud environments in medical image encryption, embedding authentication information and using chaotic sequences for image processing, the problem of insufficient security and efficiency of image encryption in the prior art is solved, and efficient and secure medical image transmission is achieved.

CN114785483BActive Publication Date: 2025-05-02HENAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210563573.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-23
Publication Date
2025-05-02
Estimated Expiration
2042-05-23

AI Technical Summary

Technical Problem

The existing image encryption algorithm based on compression perception has shortcomings in terms of security and efficiency, especially in the cloud environment, where the key is independent of plaintext images, the algorithm is vulnerable to plaintext attacks, and lacks diffusion operations during the encryption process, reducing the security of the algorithm.

Method used

Using a medical image encryption method based on semi-tenster backlog compression perception (STP-CS) and hybrid cloud, embed authentication information through edge detection, and a measurement matrix is ​​generated using chaotic sequences to sparse, mess, measure, quantify, encode and diffusion of the images to form ciphertext images, and perform corresponding decryption processing at the receiving end.

Benefits of technology

The security and efficiency of image transmission are improved, tampering attacks are prevented through two-layer authentication mechanisms, and the security of the algorithm is enhanced through diffusion operations, ensuring the authenticity and confidentiality of the image during transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114785483B_ABST
    Figure CN114785483B_ABST
Patent Text Reader

Abstract

The present invention provides a medical image secure transmission method based on semi-tensor product compressive sensing and hybrid cloud. Among them, the encryption method includes: generating a chaotic sequence according to the hash key of the original medical image P and a given external key, and generating a measurement matrix by using the chaotic sequence; performing edge detection on the original medical image P, embedding the authentication image into the original medical image P according to the edge detection result to obtain an image P1 containing authentication information, and sending the embedding key, hash key and external key to the receiving end; sparsifying and scrambling the image P1 by using the chaotic sequence to obtain a scrambled sparse matrix P3, and uploading the sparse matrix P3 to the edge cloud; on the edge cloud, measuring and quantifying the sparse matrix P3 by using the measurement matrix to obtain a quantified matrix P5; encoding the matrix P5 to obtain a first authentication sequence and diffusing the matrix P5 to obtain a ciphertext image, and then storing the first authentication sequence and the ciphertext image in the central cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image encryption technology, and in particular to a medical image security transmission method based on half tensor product compressed sensing and hybrid cloud. Background Art

[0002] With the development of cloud technology, people can use cloud servers to improve computing efficiency and realize real-time information sharing. Therefore, in recent years, telemedicine technology has gradually been widely used in rural and urban areas of my country. Through telemedicine diagnosis technology, some resource-constrained areas can transmit patients' diagnostic photos through the cloud to medical centers for diagnosis, which can not only greatly reduce the time and cost of transporting patients, but also enable doctors to break through geographical limitations and share patients' medical records and diagnostic photos, which is conducive to the development of clinical research. However, since the Internet is an open platform, there are still some key issues to be solved to achieve efficient transmission and storage of medical image data.

[0003] The first problem is the limitation of low power consumption to improve computing efficiency and save storage resources. Since compressed sensing (CS) can compress and sample sparse signals at the same time, and successfully reconstruct the signal by solving the convex optimization process. Therefore, if CS is applied to data transmission and storage, the computing and storage overhead can be effectively reduced. Therefore, CS is widely used in the collection, transmission and storage of multimedia data (Unde AS, Deepthi P P. Design and analysis of compressive sensing based lightweight encryption scheme for multimedia IoT. IEEE Transactions on Circuits and Systems II: Express Briefs, 2019, 67 (1): 167-171.).

[0004] The second problem is that in order to prevent image information leakage, the privacy of the image must be protected. Therefore, some scholars have designed a variety of encryption schemes based on CS to ensure the confidentiality and security of image data in transmission and storage. Chen et al. (Chen TH, Zhang M, Wu J, Yuen C, Tong Y. Image encryption and compression based on kronecker compressed sensing and elementary cellular automatascrambling. Optics & Laser Technology, 2016, 84: 118-133.) used Kronecker CS and elementary cellular automata to achieve image compression and encryption. Yao et al. (Yao SY, Chen LF, Zhong Y. An encryption system for color image based on compressive sensing. Optics and Laser Technology, 2019, 120: 105703.) proposed a new color image encryption algorithm based on CS, and used image cross scrambling to resist statistical analysis attacks. Xie et al. (Xie YQ, Yu JY, Guo SY, Ding Q, Wang E. Image encryption scheme with compressed sensing based on new three-dimensional chaotic system. Entropy, 2019, 21(9): 819.) designed a compressed sensing image encryption scheme based on a new three-dimensional chaotic system. However, there are still some shortcomings in the above work. The key used by Chen is independent of the plaintext image, which makes the scheme vulnerable to chosen plaintext attacks. Yao and Xie did not perform diffusion operations during the encryption process, resulting in reduced algorithm security. At the same time, in order to sample the signal more safely, the large-size measurement matrix must be updated each time, resulting in a decrease in the efficiency of the algorithm.

[0005] The third problem is that attackers may tamper with the signal during transmission or storage, thus posing a threat to legitimate receivers. In addition, when using cloud servers for signal processing, the cloud sometimes maliciously deceives users and arbitrarily returns incorrect results to users. However, some algorithms lack security authentication to prevent malicious deception of the cloud. Information authentication technology is an important guarantee for achieving information integrity. Zhang et al. (Zhang YS, Xiang Y, Zhang LY, Yang LX, Zhou JT. Efficiently and securely outsourcing compressed sensing reconstruction to a cloud. Information Sciences, 2019, 496: 150-160.) first designed a secure and efficient outsourcing solution for CS reconstruction, which effectively verified the authenticity of the data. Later, they proposed a new scheme using cascaded chaotic systems and CS (Zhang YS, He Q, Chen G, Zhang XP, Xiang YA low-Overhead, confidentiality-assured, and authenticated data acquisition framework for IoT. IEEE Transactions on Industrial Informatics, 2019, 16(12): 7566-7578.), using different authentication methods to deal with passive and active tampering attacks. On this basis, they designed a secure transmission scheme for industrial big data with CS and fog computing as the underlying framework (Zhang YS, Wang P, Huang H, Zhu YW, Xiao D, Xiang Y. Privacy-assured FogCS: chaotic compressive sensing for secure industrial bigimage data processing in Fog computing. IEEE Transactions on Industrial Informatics, 2021, 17(5): 3401-3411.). Although the above algorithm realizes data authenticity authentication during transmission and storage, and achieves good confidentiality and security, it requires two CS measurements and reconstructions to achieve authentication, which reduces the efficiency of data transmission and is not conducive to the efficient processing of IoT big data. Summary of the invention

[0006] In order to solve the problems of limited algorithm security in some current image encryption algorithms based on compressed sensing, as well as some security and efficiency issues in encryption on the cloud, the present invention provides a medical image secure transmission method based on semi-tensor product compressed sensing (Semi-tensor product compressed sensing, STP-CS) and hybrid cloud.

[0007] In a first aspect, the present invention provides a medical image encryption method based on half tensor product compressed sensing and hybrid cloud, which is applied to a sending end and includes:

[0008] Step 1: Generate a chaotic sequence according to the hash key of the original medical image P and a given external key, and use the chaotic sequence to generate a measurement matrix;

[0009] Step 2: Perform edge detection on the original medical image P, embed the authentication image into the original medical image P according to the edge detection result to obtain an image P1 containing authentication information, and send the embedding key, hash key and external key to the receiving end;

[0010] Step 3: Use the chaotic sequence to sparse and scramble the image P1 to obtain a scrambled sparse matrix P3, and upload the sparse matrix P3 to the edge cloud;

[0011] Step 4: On the edge cloud, the sparse matrix P3 is measured and quantized using the measurement matrix to obtain a quantized matrix P5;

[0012] Step 5: On the edge cloud, encode the matrix P5 to obtain a first authentication sequence, and then store the first authentication sequence on the central cloud;

[0013] Step 6: On the edge cloud, use the chaotic sequence to diffuse the matrix P5 to obtain a ciphertext image, and then store the ciphertext image on the central cloud.

[0014] Furthermore, the generation of the chaotic sequence in step 1 specifically includes:

[0015] Step 1.1: Generate a hash key for the original medical image using a hash function, and generate two sets of initial values ​​and parameters of the 2D-LSCM chaotic system according to the hash key and the given external key according to formula (1): x0, y0, z0, w0, u0 and k0:

[0016]

[0017] Where x0 and y0 represent one set of initial values ​​of the 2D-LSCM chaotic system, and u0 represents the parameters corresponding to the initial values; z0 and w0 represent another set of initial values ​​of the 2D-LSCM chaotic system, and k0 represents the parameters corresponding to the initial values; k i represents the i-th group of hash keys, i = 1, 2, ..., 32; t1, t2, t3 and t4 represent given external keys; ⊕ represents bitwise XOR operation, | represents bitwise OR operation, & represents bitwise AND operation;

[0018] Step 1.2: According to the two groups of initial values ​​and corresponding parameters, four chaotic sequences are generated using the 2D-LSCM chaotic system, which are respectively denoted as X0, Y0, Z0 and W0.

[0019] Furthermore, obtaining the image P1 containing authentication information in step 2 specifically includes:

[0020] Step 2.1: dividing the original medical image P into a plurality of non-overlapping image blocks B of the same size;

[0021] Step 2.2: Use the Prewitt edge detection method to detect all image blocks B to obtain image B p ;

[0022] Step 2.3: Calculate the image B p The validity of each image block in the image processing unit is calculated, and the image blocks whose validity is less than a preset threshold are recorded as meaningless image blocks;

[0023] Step 2.4: Save the meaningless image blocks in the image B p The coordinates in ;

[0024] Step 2.5: Select any meaningless image block and calculate its p The coordinates in the original medical image P are used to find the corresponding position, and the authentication image Au is embedded into the corresponding position to obtain the image P1 containing the authentication information.

[0025] Furthermore, obtaining the scrambled sparse matrix P3 in step 3 specifically includes:

[0026] Step 3.1: Use the discrete wavelet transform sparse basis ψ to sparse the image P1 to obtain a sparse coefficient matrix P2;

[0027] Step 3.2: convert the sparse coefficient matrix P2 into a one-dimensional sequence l1, arrange the elements in the chaotic sequence Z0 in order to obtain an index sequence s1, use the index sequence s1 to scramble the one-dimensional sequence l1 according to formula (5) to obtain a sequence l2, and reassemble the sequence l2 into a sparse matrix P3 of the same size as the original medical image;

[0028] l2(s1(k))=l1(k) (5)

[0029] Where k represents the element coordinate.

[0030] Furthermore, the step 1 of generating a measurement matrix using a chaotic sequence specifically includes:

[0031] Preprocess the chaotic sequences X0 and Y0 using formula (6) to obtain sequences X1, Y1 and XY1. Select the elements at the corresponding positions from the sequences X1 and Y1 as the elements at the corresponding positions in the new sequence XY according to the values ​​of the elements in the sequence XY1 to obtain a new sequence XY. Reassemble the sequence XY into a random matrix Φ1. Select some elements from the random matrix Φ1 to construct a measurement matrix Φ.

[0032]

[0033] Correspondingly, step 4 specifically includes:

[0034] Step 4.1: Use the measurement matrix Φ to measure the sparse matrix P3 according to formula (7) to obtain a measurement value matrix P4;

[0035]

[0036] in, represents a semi-tensor product;

[0037] Step 4.2: quantize the measurement value matrix P4 using formula (8) to obtain a quantized matrix P5;

[0038]

[0039] Among them, min represents the minimum value of the measurement value matrix P4, max represents the maximum value of the measurement value matrix P4, and round(x) represents the integer closest to x.

[0040] Furthermore, obtaining the first authentication sequence in step 5 specifically includes:

[0041] An element is selected from each row of the matrix P5 to form a sequence L. The sequence L is encoded according to formula (9) to obtain a binary sequence DS. The binary sequence DS is used as the first authentication sequence:

[0042]

[0043] Among them, i represents the element coordinates, and mod represents the modulo operation.

[0044] Furthermore, the diffusion of the matrix P5 in step 6 specifically includes:

[0045] Step 6.1: Divide the matrix P5 into four non-overlapping matrices pa, pb, pc and pd of the same size, and transform the four matrices pa, pb, pc and pd into four sequences pa1, pb1, pc1 and pd1 of the same size respectively; and pre-process some elements of the chaotic sequences Z0 and W0 to obtain sequences Z1 and W1, and perform segmentation operations on the sequences Z1 and W1 respectively to obtain four non-repeating sequences Z of the same size respectively. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ;

[0046] Step 6.2: Arrange the sequences pa1, pb1 and pc1 in order to obtain the index sequence s a 、s b and c ; Using the index sequence s a 、s b and c Correspondingly, the sequence Z b1 , Z c1 , Z d1 Scramble to get the scrambled sequence Z b2 , Z c2 , Z d2 ;

[0047] Step 6.3: According to formula (12), the sequence Z a1 , Z b2 , Z c2 and Z d2 Mapped to integers between [-7, 7], we get four sequences Z a3 , Z b3 , Z c3 and Z d3 ;

[0048]

[0049] Among them, i represents the element coordinate, floor represents the rounding operation, and mod represents the modulus operation;

[0050] Step 6.4: Convert the sequences pa1, pb1, pc1, pd1 into binary sequences pa2, pb2, pc2, pd2, and use the sequence Z according to formula (13) a3 , Z b3 , Zc3 , Z d3 To control the cyclic shift of binary sequences pa2, pb2, pc2, pd2 respectively, and use the sequence W a1 , W b1 , W c1 , W d1 Perform XOR operation on the cyclically shifted sequence to obtain the sequences pa3, pb3, pc3, and pd3;

[0051]

[0052] Among them, bin2dec(x) means converting the binary character x to a decimal value; circshift(x,[0,y]) means circularly shifting the binary character x to the right by y positions;

[0053] Step 6.5: Recombine the sequences pa3, pb3, pc3, and pd3 together to obtain a matrix C, which is the ciphertext image.

[0054] In a second aspect, the present invention provides a medical image decryption method based on half tensor product compressed sensing and hybrid cloud, which is applied to a receiving end and includes:

[0055] Step 1: receiving an embedded key, a hash key and an external key sent by a transmitting end, and generating a chaotic sequence according to the hash key and the external key;

[0056] Step 2: Download the ciphertext image C and the first authentication sequence from the central cloud to the edge cloud, and then use the chaotic sequence to perform inverse diffusion on the ciphertext image C on the edge cloud to obtain the matrix P5′;

[0057] Step 3: On the edge cloud, the matrix P5′ is encoded to obtain a second authentication sequence. If the first authentication sequence is consistent with the second authentication sequence, it means that the ciphertext image C on the central cloud has not been tampered with and the subsequent operation continues; otherwise, it is rejected;

[0058] Step 4: On the edge cloud, the matrix P5′ is inversely quantized to obtain the matrix P4′;

[0059] Step 5: On the edge cloud, a measurement matrix is ​​generated according to the chaotic sequence, and the matrix P4′ is restored using the measurement matrix to obtain the matrix P3′;

[0060] Step 6: Download the matrix P3′ from the edge cloud, use the chaotic sequence to perform inverse scrambling and inverse sparseness on the matrix P3′, and obtain the image P1′;

[0061] Step 7: Use the embedded key to extract the authentication image Au′ from the image P1′ and obtain the decrypted image P′, compare the authentication image Au′ with the existing authentication image Au, and if the comparison result is less than the set error threshold, the decrypted image P′ is considered correct.

[0062] Furthermore, the reverse diffusion of the ciphertext image C in step 2 specifically includes:

[0063] Step 2.1: Divide the ciphertext image C into four matrices of the same size and convert the four matrices into four sequences of the same size pa4, pb4, pc4, pd4 respectively; preprocess the chaotic sequences Z0 and W0 generated in step 1 to obtain sequences Z1 and W1, and segment the sequences Z1 and W1 to obtain four non-repeating sequences Z of the same size respectively. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ;

[0064] Step 2.2: Sequence Z a1 Substituting into formula (12) we get the sequence Z a3 , using the sequence W a1 Perform an XOR operation on sequence pa4 to obtain binary sequence pa3. According to formula (17), use sequence Z a3 To control the cyclic shift of binary sequence pa3 to obtain binary sequence pa2, and convert binary sequence pa2 back into decimal sequence pa1;

[0065] Step 2.3: Arrange the sequence pa1 in order to obtain the index sequence s a , using the index sequence s a For the sequence Z b1 Scramble to get the scrambled sequence Z b2 , according to formula (12), we get the sequence Z b3 , using the sequence W b1 Perform an XOR operation on sequence pb4 to obtain binary sequence pb3. According to formula (17), use sequence Z b3 To control the cyclic shift of binary sequence pb3 to obtain binary sequence pb2, and convert binary sequence pb2 back into decimal sequence pb1;

[0066] Arrange the sequence pb1 in order to obtain the index sequence s b , using the index sequence s b For the sequence Z c1Scramble to get the scrambled sequence Z c2 , according to formula (12), we get the sequence Z c3 , using the sequence W c1 Perform an XOR operation on the sequence pc4 to obtain the binary sequence pc3. According to formula (17), use the sequence Z c3 To control the cyclic shift of binary sequence pc3 to obtain binary sequence pc2, and convert binary sequence pc2 back into decimal sequence pc1;

[0067] Arrange the sequence pc1 in order to obtain the index sequence s c , using the index sequence s c For the sequence Z d1 Scramble to get the scrambled sequence Z d2 , according to formula (12), we get the sequence Z d3 , using the sequence W d1 Perform an XOR operation on the sequence pd4 to obtain the binary sequence pd3. According to formula (17), use the sequence Z d3 To control the cyclic shift of the binary sequence pd3 to obtain the binary sequence pd2, and convert the binary sequence pd2 back into the decimal sequence pd1;

[0068]

[0069]

[0070] Step 2.4: Convert the sequences pa1, pb1, pc1 and pd1 into four matrices pa, pb, pc and pd of the same size respectively, and recombine the four matrices according to formula (18) to obtain the matrix P5′;

[0071]

[0072] In a third aspect, the present invention further provides a method for secure transmission of medical images based on half-tensor product compressed sensing and hybrid cloud, comprising:

[0073] The first health center encrypts the original medical image using the encryption method described in any one of claims 1 to 7 and transmits the encrypted image to the second health center;

[0074] The second health center uses the decryption method described in claim 8 or 9 to decrypt the ciphertext image for subsequent diagnosis.

[0075] Beneficial effects of the present invention:

[0076] (1) The present invention designs an image security transmission algorithm based on STP-CS in a hybrid cloud environment, which ensures the security and efficiency of the image during transmission. First, based on edge detection, authentication information is embedded into the non-sensitive area of ​​the image to protect the authenticity of the data; secondly, STP-CS is used to measure and encrypt the image, thereby improving the efficiency of data transmission.

[0077] (2) The present invention establishes a two-layer authentication mechanism to prevent tampering attacks. Before the plaintext image is transmitted to the edge cloud, the authentication image is embedded into the non-important area of ​​the plaintext image using the edge detection algorithm to prevent the medical image stored on the edge cloud from being tampered with and deceived. Before the image is transmitted to the central cloud, the authentication information is embedded into the image again to prevent the image stored on the central cloud from being tampered with.

[0078] (3) The diffusion operation in the present invention is a new adaptive cyclic shift diffusion operation based on chaotic sequences. Before diffusing the image, the chaotic sequence is preprocessed using the quantized matrix to generate parameters for controlling the cyclic shift, and then these generated parameters are used to control the cyclic shift diffusion of the quantized matrix, which effectively reduces the correlation between adjacent pixels of the image and enhances the security of the algorithm. In addition, the quantized measurement value is encoded, which can be used as an anti-tampering authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 A schematic flow chart of a medical image encryption method based on half tensor product compressed sensing and hybrid cloud provided in an embodiment of the present invention;

[0080] Figure 2 A schematic diagram of edge detection and authentication image embedding provided by an embodiment of the present invention;

[0081] Figure 3 Schematic diagram of the diffusion process provided by the embodiment of the present invention: (a) a schematic diagram of the generation of the displacement sequence; (b) a schematic diagram of the adaptive cyclic shift;

[0082] Figure 4 A schematic diagram of a process flow of a medical image decryption method based on half tensor product compressed sensing and hybrid cloud provided in an embodiment of the present invention;

[0083] Figure 5 A schematic diagram of a flow chart of a method for secure transmission of medical images based on half tensor product compressed sensing and hybrid cloud provided in an embodiment of the present invention;

[0084] Figure 6 Encryption and decryption effect diagram provided for the embodiment of the present invention: (a) plaintext Brone; (b) ciphertext Brone; (c) decrypted Brone;

[0085] Figure 7The Brone image decryption key sensitivity test results provided by the embodiment of the present invention are as follows: (a) t1+10 -14 Decryption graph of t2+10; (b) t2+10 -14 Decryption graph; (c) t3+10 -14 Decryption graph; (d) t4+10 -14 Decryption diagram of

[0086] Figure 8 Provided for the embodiments of the present invention: (a) a histogram of a plaintext image; (b) a histogram of a ciphertext image;

[0087] Fig. 9 Provided for an embodiment of the present invention are: (a) an original image with information embedded in the upper left corner, (b) a decrypted image with embedded information in the upper left corner, and (c) a decrypted image after the embedded information is extracted. DETAILED DESCRIPTION

[0088] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0089] Example 1

[0090] like Figure 1 As shown, an embodiment of the present invention provides a medical image encryption method based on half tensor product compressed sensing and hybrid cloud, which is applied to a sending end and includes the following steps:

[0091] S101: Generate a chaotic sequence according to a hash key of an original medical image P and a given external key, and generate a measurement matrix using the chaotic sequence;

[0092] S102: Perform edge detection on the original medical image P, embed the authentication image into the original medical image P according to the edge detection result to obtain an image P1 containing authentication information, and send the embedding key, hash key and external key to the receiving end;

[0093] Specifically, since the cloud platform is semi-trusted, it is necessary to ensure that the cloud does not arbitrarily return calculation results when processing data. Therefore, in order to ensure the authenticity of the data, the embodiment of the present invention embeds authentication information in the image before uploading it to the cloud platform.

[0094] S103: Using the chaotic sequence to perform sparse and scramble operations on the image P1 to obtain a scrambled sparse matrix P3, and uploading the sparse matrix P3 to the edge cloud;

[0095] S104: On the edge cloud, using the measurement matrix to measure and quantize the sparse matrix P3 to obtain a quantized matrix P5;

[0096] S105: On the edge cloud, encode the matrix P5 to obtain a first authentication sequence, and then store the first authentication sequence on the central cloud;

[0097] Specifically, in order to ensure that the result returned by the central cloud is correct, the embodiment of the present invention encodes the image before uploading it to the central cloud, so that after the return result from the central cloud is subsequently received, the return result is verified according to the first authentication sequence.

[0098] S106: On the edge cloud, the matrix P5 is diffused using the chaotic sequence to obtain a ciphertext image, and then the ciphertext image is stored on the central cloud.

[0099] The medical image encryption method based on semi-tensor product compressed sensing and hybrid cloud provided in an embodiment of the present invention first embeds authentication information into a non-sensitive area of ​​a medical image based on edge detection to protect the authenticity of the data; secondly, semi-tensor product compressed sensing (Semi-tensor product compressed sensing, STP-CS) is used to measure and encrypt the image, thereby improving the efficiency of data transmission; then, the quantized measurement value is encoded, and the encoded authentication sequence can be used as an anti-tampering authentication; thereby, the method of the present invention can effectively improve the image reconstruction effect, transmission efficiency and security.

[0100] Example 2

[0101] On the basis of the above embodiments, an embodiment of the present invention provides a medical image encryption method based on half tensor product compressed sensing and hybrid cloud, setting the size of the original medical image to M×N, and comprising the following steps:

[0102] S201: Generate a chaotic sequence according to the hash key of the original medical image P and a given external key, and use the chaotic sequence to generate a measurement matrix; generating a chaotic sequence in this step includes the following sub-steps:

[0103] S2011: Generate a hash key for the original medical image using a hash function; generate two sets of initial values ​​and parameters of the 2D-LSCM chaotic system according to the hash key and a given external key according to formula (1): x0, y0, z0, w0, u0 and k0;

[0104] As an implementation method, in the embodiment of the present invention, the SHA-256 function is used to generate a 256-bit hash key for the original medical image P, and then the 256-bit hash keys are combined in groups of 8 bits each to obtain 32 groups of hash keys k i , i=1,2,…,32.

[0105]

[0106] Where x0 and y0 represent one set of initial values ​​of the 2D-LSCM chaotic system, and u0 represents the parameters corresponding to the initial values; z0 and w0 represent another set of initial values ​​of the 2D-LSCM chaotic system, and k0 represents the parameters corresponding to the initial values; k i represents the i-th group of hash keys, i = 1, 2, …, 32; t1, t2, t3 and t4 represent given external keys; ⊕ represents a bitwise XOR operation, | represents a bitwise OR operation, and & represents a bitwise AND operation; for example, x⊕y represents a bitwise XOR operation on x and y, x|y represents a bitwise OR operation on x and y, and x&y represents a bitwise AND operation on x and y.

[0107] The specific implementation of the process of generating a measurement matrix using a chaotic sequence is given below and will not be described here again.

[0108] S2012: according to the two groups of initial values ​​and corresponding parameters, four chaotic sequences are generated by using the 2D-LSCM chaotic system, which are respectively denoted as X0, Y0, Z0 and W0;

[0109] Specifically, the 2D-LSCM chaotic system refers to the two-dimensional Logistic-Sine chaotic mapping (2D-LSCM) designed by Hua et al. (Hua ZY, Jin F, Xu BX, Huang H J. 2DLogistic-Sine-coupling map for image encryption. Signal Processing, 2018, 149: 148-161.). The chaotic system can be expressed by formula (2):

[0110]

[0111] In formula (2), the initial values ​​x(0), y(0)∈(0,1), and the parameter θ∈[0,1].

[0112] As an implementation method, a set of initial values ​​x0, y0 and parameter u0 are substituted into the 2D-LSCM shown in formula (2) and iterated r 2+N0 times, in order to avoid transient effects, the first N0 values ​​are discarded to obtain two values ​​of size 1×r 2 Chaotic sequences X0 and Y0; where N0≥500.

[0113] In the same way, another set of initial values ​​z0, w0 and parameter k0 are substituted into the 2D-LSCM shown in formula (2) and iterated M×N+N0 times, discarding the first N0 values, and obtaining two chaotic sequences Z0 and W0 of size 1×MN, where N0≥500, M and N are the sizes of the plaintext image.

[0114] S202: Perform edge detection on the original medical image P, embed the authentication image into the original medical image P according to the edge detection result to obtain the image P1 containing the authentication information, and send the embedding key, hash key and external key to the receiving end; obtaining the image P1 containing the authentication information in this step includes the following sub-steps:

[0115] S2021: dividing the original medical image P into a plurality of non-overlapping image blocks B of the same size;

[0116] S2022: Use the Prewitt edge detection method to detect all image blocks B to obtain image B p ;

[0117] S2023: Calculate the image B p The validity of each image block in the image processing unit is determined, and the image blocks with validity less than a preset threshold are recorded as meaningless image blocks. It can be understood that meaningful image blocks are also called sensitive image blocks, and meaningless image blocks are also called non-sensitive image blocks.

[0118] As a possible implementation method, to calculate image B p Image block B in p Taking the validity of (i, j) as an example, the calculation process is as follows: First, calculate the image block B p The number of pixels in (i,j) that are not zero s (i,j), then use S(i,j)=b s (i,j) / M s Calculate its effectiveness S(i,j); where M s Indicates the total number of pixels of each image block. In addition, assuming that in step S2021, the size of each non-overlapping image block B is b×b, it can be understood that the value range of i, j here is: 1≤i≤M / b, 1≤j≤N / b.

[0119] In order to explain whether a certain image block in the medical image P can be embedded in the authentication image, we first set a threshold t, and 0≤t≤1. p(i, j), when S(i, j) ≥ t, it means image block B p (i, j) is meaningful, that is, the authentication image cannot be embedded, and the image block is recorded as "1"; when S(i, j) < t, it means that the image block B p (i, j) is meaningless, that is, it can be embedded in the authentication image, and the image block is recorded as "0", and finally a matrix with elements of 0 or 1 is obtained, that is, image B p It should be noted that the values ​​of the meaningful image blocks and the values ​​of the meaningless image blocks can be different, and are not limited to the values ​​of "1" and "0".

[0120] S2024: Save the meaningless image blocks in the image B p The coordinates in ;

[0121] S2025: Select any meaningless image block according to its p The coordinates in the original medical image P are used to find the corresponding position, and the authentication image Au is embedded into the corresponding position to obtain the image P1 containing the authentication information.

[0122] It can be understood that the original medical image P may contain multiple meaningless image blocks, and the purpose of ensuring the authenticity of the data can be achieved by only embedding the authentication image into one of the image blocks.

[0123] For example, the coordinates of the first meaningless image block obtained by edge detection are labeled B p (i0,j0), according to B p (i0, j0) finds the corresponding position in the original medical image P, and then embeds the authentication image Au into the corresponding position to obtain the image P1 containing the authentication information, as shown in Figure 2 Schematic diagram of the process of edge detection and embedding of authentication images.

[0124] S203: Using the chaotic sequence to perform sparse and scrambled operations on the image P1, obtaining a scrambled sparse matrix P3, and uploading the sparse matrix P3 to the edge cloud; obtaining the scrambled sparse matrix P3 in this step specifically includes the following sub-steps:

[0125] S2031: Use the discrete wavelet transform sparse basis ψ to sparse the image P1 to obtain a sparse coefficient matrix P2; this process is shown in formula (3):

[0126] P2=ψ×P1×ψ′ (3)

[0127] S2032: Convert the sparse coefficient matrix P2 into a one-dimensional sequence l1, arrange the elements in the chaotic sequence Z0 of size 1×MN in order (for example, arrange them in ascending or descending order; in this embodiment of the present invention, ascending order is taken as an example) to obtain an index sequence s1 (this process can be represented by formula (4)), use the index sequence s1 to scramble the one-dimensional sequence l1 according to formula (5) to obtain a sequence l2, and recombine the sequence l2 into a sparse matrix P3 of the same size as the original medical image;

[0128] [Z′1,s1]=sort(Z0) (4)

[0129] l2(s1(k))=l1(k) (5)

[0130] where k represents the element coordinate, 1≤k≤MN.

[0131] S204: On the edge cloud, use the measurement matrix to measure and quantize the sparse matrix P3 to obtain a quantized matrix P5;

[0132] Here, first, the process of generating the measurement matrix using the chaotic sequence in step S201 is introduced. As an implementable manner, this process specifically includes:

[0133] First, preprocess the chaotic sequences X0 and Y0 of size 1×r 2 to obtain sequences X1, Y1, and XY1 using formula (6). Select the corresponding elements at the corresponding positions from the sequence X1 and the sequence Y1 as the elements at the corresponding positions in the new sequence XY according to the values of the elements in the sequence XY1 to obtain a new sequence XY, and recombine the sequence XY into a random matrix Φ1;

[0134]

[0135] For example, if XY1(i) = 0, then select the i-th element of the chaotic sequence X1 as the i-th element of the sequence XY; if XY1(i) = 1, then select the i-th element of the chaotic sequence Y1 as the i-th element of the sequence XY; finally, combine the sequence XY into a random matrix Φ1 of size r×r.

[0136] Then, select some elements from the random matrix Φ1 to construct a measurement matrix Φ;

[0137] For example, select some row sequences of the random matrix Φ1 to construct a measurement matrix Φ of size q×r, where q < r; where q = m / 4, r = M / 4, m = CR×M, and CR is the compression ratio.

[0138] Correspondingly, step S204 specifically includes:

[0139] S2041: Using the measurement matrix Φ to measure the sparse matrix P3 according to formula (7) to obtain a measurement value matrix P4;

[0140]

[0141] in, represents a semi-tensor product;

[0142] For example, the sparse matrix P3 is measured using the measurement matrix Φ to obtain a measurement value matrix P4 of size m×N;

[0143] S2042: quantizing the measurement value matrix P4 using formula (8) to obtain a quantized matrix P5;

[0144]

[0145] Among them, min represents the minimum value of the measurement value matrix P4, max represents the maximum value of the measurement value matrix P4, and round(x) represents the integer closest to x. Through quantization, the value of each element of the matrix P5 is between 0 and 255.

[0146] S205: On the edge cloud, encode the matrix P5 to obtain a first authentication sequence, and then store the first authentication sequence on the central cloud;

[0147] Specifically, an element is selected from each row of the matrix P5 to form a sequence L, and the sequence L is encoded according to formula (9) to obtain a binary sequence DS, and the binary sequence DS is used as the first authentication sequence:

[0148]

[0149] Among them, i represents the element coordinates, and mod represents the modulo operation.

[0150] For example, the size of matrix P5 is m×N, then selecting one element from each of the m rows in turn can form a sequence L of size 1×m; further, L(i)=P5(i,i), 1≤i≤m.

[0151] S206: On the edge cloud, the matrix P5 is diffused using the chaotic sequence to obtain a ciphertext image, and then the ciphertext image is stored on the central cloud. The diffusion of the matrix P5 in this step specifically includes the following sub-steps:

[0152] S2061: Split the matrix P5 into four non-overlapping matrices pa, pb, pc and pd of the same size, and convert the four matrices pa, pb, pc and pd into four sequences pa1, pb1, pc1 and pd1 of the same size respectively; see Figure 3 The "p(i)1" stage of the neutron graph (a); and preprocess some elements of the chaotic sequences Z0 and W0 to obtain sequences Z1 and W1, and segment the sequences Z1 and W1 to obtain four non-repeating sequences Z of the same size. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ;

[0153] For example, if the size of matrix P5 is m×N, the sizes of non-overlapping matrices pa, pb, pc, and pd are all m / 2×N / 2; correspondingly, the sizes of sequences pa1, pb1, pc1, and pd1 are all 1×mN / 4;

[0154] For example, the first (m×N) elements of chaotic sequences Z0 and W0 are preprocessed according to formula (10) to obtain sequences Z1 and W1;

[0155]

[0156] Among them, abs means taking absolute value operation;

[0157] For example, the size of sequences Z1 and W1 is 1×mN, and the non-repeating sequence Z a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 The size of is 1×mN / 4.

[0158] S2062: Arrange the sequences pa1, pb1, and pc1 in order (for example, in ascending order or in descending order; in the embodiment of the present invention, arranging in ascending order is taken as an example) to obtain an index sequence s a 、s b and c ; See Figure 3 The "Z(i)1" stage in the a 、s b and c Correspondingly, the sequence Z b1 , Z c1 , Zd1 Scramble to get the scrambled sequence Z b2 , Z c2 , Z d2 , the scrambling process is as shown in formula (11); see Figure 3 The “Z(i)2” stage in the neutron diagram (a);

[0159]

[0160] Where v is the coordinate of the element in the sequence.

[0161] S2063: According to formula (12), the sequence Z a1 , Z b2 , Z c2 and Z d2 Mapped to integers between [-7, 7], we get four sequences Z a3 , Z b3 , Z c3 and Z d3 ; See Figure 3 The “Z(i)3” stage in the neutron diagram (a);

[0162]

[0163] Among them, i represents the element coordinate, floor represents the floor operation, and mod represents the modulus operation; based on the above example, it can be understood that 1≤i≤mN / 4;

[0164] S2064: Convert the sequences pa1, pb1, pc1, and pd1 into binary sequences pa2, pb2, pc2, and pd2, using sequence Z according to formula (13) a3 , Z b3 , Z c3 , Z d3 To control the cyclic shift of binary sequences pa2, pb2, pc2, pd2 respectively, and use the sequence W a1 , W b1 , W c1 , W d1 Performing XOR operation on the cyclically shifted sequence yields the sequences pa3, pb3, pc3, and pd3; see Figure 3 Subgraph (b) in ;

[0165]

[0166] Among them, bin2dec(x) means converting the binary character x to a decimal value; circshift(x,[0,y]) means circularly shifting the binary character x to the right by y positions;

[0167] S2065: Recombining the sequences pa3, pb3, pc3, and pd3 together to obtain a matrix C, where the matrix C is the ciphertext image.

[0168] For example, based on the above example, the size of the sequences pa3, pb3, pc3, and pd3 are all 1×mN / 4, so it can be understood that the size of the final ciphertext image is m×N. Figure 3 Schematic diagram of the diffusion process shown.

[0169] Example 3

[0170] Corresponding to the above-mentioned medical image encryption method based on half tensor product compressed sensing and hybrid cloud, such as Figure 4 As shown, the embodiment of the present invention provides a corresponding decryption method, which is applied to a receiving end and includes the following steps:

[0171] S301: receiving an embedded key, a hash key and an external key sent by a transmitting end, and generating a chaotic sequence according to the hash key and the external key;

[0172] Specifically, the process of generating the chaotic sequence may refer to step S201 in the above-mentioned embodiment 2, and the chaotic sequence X0, Y0, Z0, and W0 may be obtained; it will not be described in detail here.

[0173] S302: Download the ciphertext image C and the first authentication sequence from the central cloud to the edge cloud, and then use the chaotic sequence to perform inverse diffusion on the ciphertext image C on the edge cloud to obtain the matrix P5′;

[0174] S303: On the edge cloud, the matrix P5′ is encoded to obtain a second authentication sequence. If the first authentication sequence is consistent with the second authentication sequence, it means that the ciphertext image C on the central cloud has not been tampered with and the subsequent operation continues; otherwise, it is rejected;

[0175] Specifically, an element is selected from each row of the matrix P5′ to form a sequence L′, which is encoded according to formula (14) to obtain a binary sequence DS′, and the binary sequence DS′ is used as the second authentication sequence. For example, if the size of the matrix P5′ is m×N, then an element is selected from each of the m rows to form a sequence L′ of size 1×m. Furthermore, L′(i)=P5′(i,i), 1≤i≤m.

[0176] Next, the binary sequences DS′ and DS are compared. If |DS-DS′|=0, it indicates that the ciphertext image has not been tampered with during storage in the central cloud.

[0177]

[0178] S304: On the edge cloud, inverse quantize the matrix P5′ to obtain a matrix P4′;

[0179] Specifically, the inverse quantization process is expressed as shown in formula (15):

[0180]

[0181] Among them, min and max represent the minimum value and maximum value of the matrix P5′ respectively.

[0182] S305: On the edge cloud, a measurement matrix is ​​generated according to the chaotic sequence, and the matrix P4′ is restored by using the measurement matrix to obtain the matrix P3′;

[0183] Specifically, the process of generating the measurement matrix can refer to step S204 in the above embodiment 2 to obtain the measurement matrix Φ; then according to the OMP algorithm, the measurement matrix Φ is used to restore the matrix P4′ to obtain the matrix P3′ of size M×N.

[0184] S306: Download the matrix P3′ from the edge cloud, and use the chaotic sequence to perform inverse scrambling and inverse sparseness on the matrix P3′ to obtain the image P1′;

[0185] Specifically, the elements in the chaotic sequence Z0 are arranged in order (for example, in ascending order or in descending order; in the embodiment of the present invention, ascending order is taken as an example) to obtain the index sequence s1; the matrix P3′ is converted into a one-dimensional sequence l2; then the sequence l2 is inversely scrambled using the index sequence s1 to obtain the sequence l1 (this process can be expressed by formula (16)), and finally the sequence l1 is converted into a sparse coefficient matrix P2′; the sparse coefficient matrix P2′ after inverse scrambling is inversely sparsely operated to finally obtain an M×N image P1′.

[0186] l2(k)=l1(s1(k)) (16)

[0187] Where k represents the element coordinate;

[0188] S307: Using the embedded key to extract the authentication image Au′ from the image P1′ and obtain the decrypted image P′, compare the authentication image Au′ with the existing authentication image Au, and if the comparison result is less than the set error threshold, the decrypted image P′ is considered correct.

[0189] As an implementation method, the reverse diffusion of the ciphertext image C in the above step S302 specifically includes:

[0190] S3021: Divide the ciphertext image C into four matrices of the same size and convert the four matrices into four sequences of the same size pa4, pb4, pc4, and pd4 respectively; preprocess the chaotic sequences Z0 and W0 generated in step S301 to obtain sequences Z1 and W1, and segment the sequences Z1 and W1 to obtain four non-repeating sequences Z of the same size respectively. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ;

[0191] For example, if the size of the ciphertext image C is m×N, the sizes of the sequences pa4, pb4, pc4, and pd4 are all 1×mN / 4;

[0192] For example, the chaotic sequences Z0 and W0 are preprocessed according to formula (10) to obtain sequences Z1 and W1;

[0193]

[0194] For example, if the sizes of sequences Z1 and W1 are both 1×mN, then the non-repeating sequence Z a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 The size of is 1×mN / 4.

[0195] S3022: Sequence Z a1 Substituting into formula (12) we get the sequence Z a3 , using the sequence W a1 Perform an XOR operation on sequence pa4 to obtain binary sequence pa3. According to formula (17), use sequence Z a3 To control the cyclic shift of binary sequence pa3 to obtain binary sequence pa2, and convert binary sequence pa2 back into decimal sequence pa1;

[0196] S3023: Arrange the sequence pa1 in order to obtain the index sequence s a , using the index sequence s a For the sequence Z b1 Scramble to get the scrambled sequence Z b2 , according to formula (12), we get the sequence Z b3 , using the sequence W b1Perform an XOR operation on sequence pb4 to obtain binary sequence pb3. According to formula (17), use sequence Z b3 To control the cyclic shift of binary sequence pb3 to obtain binary sequence pb2, and convert binary sequence pb2 back into decimal sequence pb1;

[0197] Arrange the sequence pb1 in order to obtain the index sequence s b , using the index sequence s b For the sequence Z c1 Scramble to get the scrambled sequence Z c2 , according to formula (12), we get the sequence Z c3 , using the sequence W c1 Perform an XOR operation on the sequence pc4 to obtain the binary sequence pc3. According to formula (17), use the sequence Z c3 To control the cyclic shift of binary sequence pc3 to obtain binary sequence pc2, and convert binary sequence pc2 back into decimal sequence pc1;

[0198] Arrange the sequence pc1 in order to obtain the index sequence s c , using the index sequence s c For the sequence Z d1 Scramble to get the scrambled sequence Z d2 , according to formula (12), we get the sequence Z d3 , using the sequence W d1 Perform an XOR operation on the sequence pd4 to obtain the binary sequence pd3. According to formula (17), use the sequence Z d3 To control the cyclic shift of the binary sequence pd3 to obtain the binary sequence pd2, and convert the binary sequence pd2 back into the decimal sequence pd1;

[0199]

[0200]

[0201] S3024: Convert the sequences pa1, pb1, pc1 and pd1 into four matrices pa, pb, pc and pd of the same size respectively, and recombine the four matrices according to formula (18) to obtain the matrix P5′;

[0202]

[0203] As an implementable method, the above step S307 specifically includes:

[0204] S3071: Divide the image P1′ into a number of non-overlapping image blocks B′ of the same size (for example, a size of b×b);

[0205] S3072: Find the corresponding image block embedded with the authentication image from all non-overlapping image blocks B′ according to the embedded key and determine the position of the image block in the image P1′ to extract the authentication image Au′ and obtain the decrypted image P′;

[0206] For example, embedding key B p (1,1) corresponds to the image block with a size of b×b at the upper left corner in the image P1′, from which the authentication image Au′ and the decrypted image P′ are obtained.

[0207] S3073: Calculate the l2 norm distance μ between the authentication images Au and Au′ according to formula (19); or, respectively calculate the peak signal-to-noise ratios of the authentication images Au and Au′ and calculate the peak signal-to-noise ratio difference between the two;

[0208]

[0209] S3074: If the μ value is less than the set error threshold ε1, the decrypted image P′ is considered correct; or if the absolute value of the peak signal-to-noise ratio difference is less than the set error threshold ε2, the decrypted image P′ is considered correct. Otherwise, the encrypted image is considered to have been tampered with and the decryption result is rejected.

[0210] It should be noted that, since a completely black matrix block will be left after the authentication information is extracted from the decrypted image, the surrounding pixels of the matrix block can be used to complete the completely black matrix block.

[0211] Example 4

[0212] like Figure 5 As shown, the embodiment of the present invention provides a method for secure transmission of medical images based on half-tensor product compressed sensing and hybrid cloud. The overall process includes eight steps, of which the first four steps are the process of the first health center transmitting the patient's medical image to the second health center, and the last four steps are the process of the second health center diagnosing the obtained medical image and then encrypting and transmitting the diagnosis result in the form of an image to the first health center. The details are as follows:

[0213] (1) The process from the first health center (e.g., lower-level health center) to the second health center (e.g., medical diagnosis center):

[0214] The lower-level health center uses a local server to pre-process the original medical image according to the relevant steps in the encryption method in the above embodiment and then uploads it to the corresponding edge cloud server, wherein the pre-processing includes edge detection and embedding authentication information on the original medical image, as well as sparse and scrambling;

[0215] On the edge cloud server, the pre-processed image is measured, quantized, diffused and encoded by STP-CS according to the relevant steps in the encryption method in the above embodiment, and then the diffused ciphertext image and the encoded first authentication sequence are uploaded to the central cloud for storage;

[0216] According to the relevant steps of the decryption method in the above embodiment, the ciphertext data and the first authentication sequence are downloaded from the central cloud to the edge cloud server, the ciphertext data is partially decrypted on the edge cloud server and the partially decrypted ciphertext data is transmitted to the medical diagnosis center; the partial decryption process includes inverse diffusion, encoding, comparison of the consistency of the authentication sequence, inverse quantization and STP-CS reconstruction of the ciphertext data;

[0217] The medical diagnosis center performs inverse scrambling, inverse sparseness, authentication image extraction and authentication image consistency comparison on the partially decrypted ciphertext data according to the relevant steps in the decryption method in the above embodiment to obtain a decrypted image and determine the correctness of the decrypted image.

[0218] (2) The process from the second health center (e.g. medical diagnosis center) to the first health center (e.g. lower-level health center):

[0219] The medical imaging diagnosis center diagnoses the authenticated decrypted image and obtains the diagnosis result image;

[0220] Referring to the above process (1), the same processing is performed on the "diagnosis result image", specifically including:

[0221] The medical diagnosis center uses a local server to pre-process the diagnosis result image according to the relevant steps in the encryption method in the above embodiment and then uploads it to the corresponding edge cloud server, wherein the pre-processing includes edge detection and embedding authentication information on the diagnosis result image, as well as sparse and scrambling;

[0222] On the edge cloud server, the pre-processed image is measured, quantized, diffused and encoded by STP-CS according to the relevant steps in the encryption method in the above embodiment, and then the diffused ciphertext image and the encoded first authentication sequence are uploaded to the central cloud for storage;

[0223] According to the relevant steps of the decryption method in the above embodiment, the ciphertext data and the first authentication sequence are downloaded from the central cloud to the edge cloud server, the ciphertext data is partially decrypted on the edge cloud server and the partially decrypted ciphertext data is transmitted to the subordinate health center; the partial decryption process includes inverse diffusion, encoding, comparison of authentication sequence consistency, inverse quantization and STP-CS reconstruction of the ciphertext data;

[0224] The lower-level health center performs inverse scrambling, inverse sparseness, authentication image extraction and authentication image consistency comparison on the partially decrypted ciphertext data according to the relevant steps in the decryption method in the above embodiment to obtain a decrypted image and determine the correctness of the decrypted image.

[0225] In order to verify the effectiveness of the medical image secure transmission method based on half-tensor product compressed sensing and hybrid cloud provided by the present invention, the present invention provides the following experimental results.

[0226] The experimental simulation platform is as follows: CPU: Intel(R) Core(TM) i7-6700, 3.40GHz; Memory: 8.00GB; Operating system: Windows10; Coding tool: Matlab2016a. The parameters used in this experiment are as follows: external key t1 = 0.354564, t2 = 0.154354, t3 = 0.254168, t4 = 0.445635, OMP reconstruction method is used. In the experimental simulation, the 512×512 "Brone" image is selected as the plaintext image for the test.

[0227] Depend on Figure 6 It can be seen that when CR = 0.5, a noise-like ciphertext image with a size reduced to half of the plaintext image is obtained, from which no useful information can be obtained, and the plaintext image information is protected. The image obtained after decryption is almost the same as the original image, with good image visual quality. Since the ciphertext image is 50% of the plaintext image, more transmission bandwidth and storage space are saved when transmitting the ciphertext image, which is more convenient for transmission in the network.

[0228] 1. Key space analysis

[0229] The key of the encryption method proposed in the present invention mainly includes: (1) given external keys: t1, t2, t3, t4; (3) a 256-bit hash value generated by the SHA-256 function.

[0230] Assume that the computer's calculation precision is 10 -14 , then the key space of the method of the present invention is approximately (10 14 ) 4 =10 56 >2 186 If we add a 256-bit hash value, the overall key space far exceeds 2 100 , so the key space of this method is large enough to resist brute force attacks.

[0231] (II) Key sensitivity analysis

[0232] A secure cryptographic system should have good key sensitivity, that is, a small change in the key will cause a drastic change in the cryptographic image. Figure 6 (a) Brone plaintext image, Figure 6 (b) Brone ciphertext image, Figure 6 (c) The Brone decrypted image is used for testing. In the test, the parameter t1+10 with a slight change is used. -14 , t2+10 -14 , t3+10 -14 , t4+10 -14 Decryption Figure 6 The Brone ciphertext image in (b) is shown in the following figure. Figure 7 As shown in (a)-(d).

[0233] Depend on Figure 7 It can be seen that because the method of the present invention contains the part of authentication image pixel extraction, the decrypted image obtained by changing the key contains a completely black image block. However, since the authentication image is embedded in the insensitive area according to edge detection, it will not affect the correct decrypted image. This can be seen from Figure 6 (c) can be seen. At the same time, Figure 7 It can be concluded that a slight change in the decryption key will result in a meaningless noise-like image. Therefore, the scheme is highly sensitive to the key, making it difficult for attackers to obtain useful information through brute force.

[0234] (III) Histogram analysis

[0235] Figure 8 The histogram of the plaintext image and the corresponding ciphertext image (CR=0.5) of the image Brone is given. As can be seen from the figure, the histogram of the plaintext image fluctuates, while the histogram of the ciphertext image is very uniform and significantly different from the histogram of the plaintext image, which makes it very difficult for attackers to analyze the ciphertext image through statistical attacks.

[0236] (IV) Information entropy analysis

[0237] Information entropy reflects the randomness and unpredictability of test information. The information entropy H(m) of information source m can be defined as:

[0238]

[0239] In the formula, p(m i ) represents m i For a ciphertext image with 256 gray levels, the theoretical value of information entropy is H(m)=8, obtained by formula (20). Therefore, the closer the ciphertext information entropy is to 8, the more random the ciphertext is, indicating that the probability of information leakage in the cryptographic system is smaller.

[0240] When CR=0.5, the information entropy test is performed on the 512×512 Brone image. From Table 1, we can see that the information entropy value of the ciphertext image reaches 7.9985, which shows that the ciphertext image in this paper has high randomness and the effectiveness of the proposed encryption algorithm.

[0241] Table 1 Information entropy test of plaintext image and ciphertext image

[0242]

[0243] (V) Cloud Platform Reconstruction Security Analysis

[0244] In the secure transmission method provided by the present invention, in the process of transmitting data from the lower-level health center to the medical diagnosis center, information is first embedded and partially encrypted in the lower-level health center, and then the partially encrypted image is transmitted to the edge cloud on the side of the lower-level health center for secondary encryption, and then transmitted to the central cloud for storage. Secondly, after the edge cloud on the side of the medical diagnosis center obtains the ciphertext data from the central cloud, it first partially decrypts and encrypts the data, and after the authentication is passed, the partially decrypted ciphertext image is sent to the medical diagnosis center for a second decryption and authentication judgment, and finally the original medical image is obtained and diagnosed; when the data is transmitted from the medical diagnosis center to the lower-level health center, the same algorithm is used to transmit the diagnosis result data, and finally the lower-level health center obtains the diagnosis result data.

[0245] Because the cloud is an open data interaction platform, the proposed algorithm must ensure the security of private data. In the method of the present invention, the image data transmitted to the edge cloud and the central cloud are all pre-processed noise-like images, and the image data output by the edge cloud and the central cloud are also meaningless noise-like images, and the plaintext image information cannot be obtained from these noise-like images. Therefore, the cloud cannot obtain any information of the plaintext image, ensuring the privacy and security of the image.

[0246] In addition, the cloud may arbitrarily return incorrectly calculated results in some cases, and decryption on the cloud also requires consideration of whether the cloud has deceived the user. Therefore, in order to prevent cloud deception, two authentications are used to judge the results returned by the cloud. The first authentication is performed on the edge cloud to determine whether the result returned by the central cloud is correct; the second authentication is performed on the local side to authenticate the embedded information to determine whether the result returned by the edge cloud is correct. Fig. 9 It is the result of embedding and extracting information from the “Brone” image.

[0247] As can be seen from the figure, by embedding and extracting the small-sized authentication information contained in the image, it is possible to determine whether the cloud has deceived the user, that is, to compare the similarity between the extracted authentication information and the authentication information owned by the user. If the authentication is successful, it means that the image data returned by the cloud is correct; if the authentication fails, it means that the cloud has deceived the user, and the result returned by the cloud is rejected. In addition, the size of the authentication information used in this experiment is 32×32. In specific operations, users can freely choose the size of the embedded authentication information according to the characteristics of the image used and their own needs.

[0248] Therefore, the medical image secure transmission method based on STP-CS and hybrid cloud proposed in the present invention can not only ensure the security and efficiency of images during transmission, but also prevent the cloud from maliciously deceiving users.

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

Claims

1. A medical image encryption method based on semi-tensor product compressed sensing and hybrid cloud, characterized in that: Applied to the sending end, including: Step 1: Generate a chaotic sequence according to the hash key of the original medical image P and a given external key, and use the chaotic sequence to generate a measurement matrix; Step 2: Perform edge detection on the original medical image P, embed the authentication image into the original medical image P according to the edge detection result to obtain an image P1 containing authentication information, and send the embedding key, hash key and external key to the receiving end; Step 3: Use the chaotic sequence to sparse and scramble the image P1 to obtain a scrambled sparse matrix P3, and upload the sparse matrix P3 to the edge cloud; Step 4: On the edge cloud, the sparse matrix P3 is measured and quantized using the measurement matrix based on the semi-tensor product compressed sensing algorithm to obtain a quantized matrix P5; Step 5: On the edge cloud, encode the matrix P5 to obtain a first authentication sequence, and then store the first authentication sequence on the central cloud; Step 6: On the edge cloud, use the chaotic sequence to diffuse the matrix P5 to obtain a ciphertext image, and then store the ciphertext image on the central cloud.

2. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 1, characterized in that: The generation of chaotic sequence in step 1 specifically includes: Step 1.1: Generate a hash key for the original medical image using a hash function, and generate two sets of initial values ​​and parameters of the 2D-LSCM chaotic system according to the hash key and the given external key according to formula (1): x0, y0, z0, w0, u0 and k0: Where x0 and y0 represent one set of initial values ​​of the 2D-LSCM chaotic system, and u0 represents the parameters corresponding to the initial values; z0 and w0 represent another set of initial values ​​of the 2D-LSCM chaotic system, and k0 represents the parameters corresponding to the initial values; k i represents the i-th group of hash keys, i = 1, 2, ..., 32; t1, t2, t3 and t4 represent given external keys; Indicates bitwise XOR operation, | indicates bitwise OR operation, & indicates bitwise AND operation; Step 1.2: According to the two groups of initial values ​​and corresponding parameters, four chaotic sequences are generated using the 2D-LSCM chaotic system, which are respectively denoted as X0, Y0, Z0 and W0.

3. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 1, characterized in that: The step 2 of obtaining the image P1 containing the authentication information specifically includes: Step 2.1: dividing the original medical image P into a plurality of non-overlapping image blocks B of the same size; Step 2.2: Use the Prewitt edge detection method to detect all image blocks B to obtain image B p ; Step 2.3: Calculate the image B p The validity of each image block in the image processing unit is calculated, and the image blocks whose validity is less than a preset threshold are recorded as meaningless image blocks; Step 2.4: Save the meaningless image blocks in the image B p The coordinates in ; Step 2.5: Select any meaningless image block and calculate its p The coordinates in the original medical image P are used to find the corresponding position, and the authentication image Au is embedded into the corresponding position to obtain the image P1 containing the authentication information.

4. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 2, characterized in that: The scrambled sparse matrix P3 obtained in step 3 specifically includes: Step 3.1: Use the discrete wavelet transform sparse basis ψ to sparse the image P1 to obtain a sparse coefficient matrix P2; Step 3.2: convert the sparse coefficient matrix P2 into a one-dimensional sequence l1, arrange the elements in the chaotic sequence Z0 in order to obtain an index sequence s1, use the index sequence s1 to scramble the one-dimensional sequence l1 according to formula (5) to obtain a sequence l2, and reassemble the sequence l2 into a sparse matrix P3 of the same size as the original medical image; l2(s1(k))=l1(k) (5) Where k represents the element coordinate.

5. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 2, characterized in that: The generation of the measurement matrix using the chaotic sequence in step 1 specifically includes: Preprocess the chaotic sequences X0 and Y0 using formula (6) to obtain sequences X1, Y1 and XY1. Select the elements at the corresponding positions from the sequences X1 and Y1 as the elements at the corresponding positions in the new sequence XY according to the values ​​of the elements in the sequence XY1 to obtain a new sequence XY. Reassemble the sequence XY into a random matrix Φ1. Select some elements from the random matrix Φ1 to construct a measurement matrix Φ. Among them, floor means rounding down; Correspondingly, step 4 specifically includes: Step 4.1: Use the measurement matrix Φ to measure the sparse matrix P3 according to formula (7) to obtain a measurement value matrix P4; in, represents a semi-tensor product; Step 4.2: quantize the measurement value matrix P4 using formula (8) to obtain a quantized matrix P5; Among them, min represents the minimum value of the measurement value matrix P4, max represents the maximum value of the measurement value matrix P4, and round(x) represents the integer closest to x.

6. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 1, characterized in that: Obtaining the first authentication sequence in step 5 specifically includes: An element is selected from each row of the matrix P5 to form a sequence L. The sequence L is encoded according to formula (9) to obtain a binary sequence DS. The binary sequence DS is used as the first authentication sequence: Among them, i represents the element coordinates, and mod represents the modulo operation.

7. The medical image encryption method based on half tensor product compressed sensing and hybrid cloud according to claim 1, characterized in that: The diffusion of the matrix P5 in step 6 specifically includes: Step 6.1: Divide the matrix P5 into four non-overlapping matrices pa, pb, pc and pd of the same size, and transform the four matrices pa, pb, pc and pd into four sequences pa1, pb1, pc1 and pd1 of the same size respectively; and pre-process some elements of the chaotic sequences Z0 and W0 to obtain sequences Z1 and W1, and perform segmentation operations on the sequences Z1 and W1 respectively to obtain four non-repeating sequences Z of the same size respectively. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ; Step 6.2: Arrange the sequences pa1, pb1 and pc1 in order to obtain the index sequence s a 、s b and c ; Using the index sequence s a 、s b and c Correspondingly, the sequence Z b1 , Z c1 , Z d1 Scramble to get the scrambled sequence Z b2 , Z c2 , Z d2 ; Step 6.3: According to formula (12), the sequence Z a1 , Z b2 , Z c2 and Z d2 Mapped to integers between [-7, 7], we get four sequences Z a3 , Z b3 , Z c3 and Z d3 ; Among them, i represents the element coordinate, floor represents the rounding operation, and mod represents the modulus operation; Step 6.4: Convert the sequences pa1, pb1, pc1, pd1 into binary sequences pa2, pb2, pc2, pd2, and use the sequence Z according to formula (13) a3 , Z b3 , Z c3 , Z d3 To control the cyclic shift of binary sequences pa2, pb2, pc2, pd2 respectively, and use the sequence W a1 , W b1 , W c1 , W d1 Perform XOR operation on the cyclically shifted sequence to obtain the sequences pa3, pb3, pc3, and pd3; Among them, bin2dec(x) means converting the binary character x to a decimal value; circshift(x,[0,y]) means circularly shifting the binary character x to the right by y positions; Step 6.5: Recombine the sequences pa3, pb3, pc3, and pd3 together to obtain a matrix C, which is the ciphertext image.

8. A medical image decryption method based on semi-tensor product compressed sensing and hybrid cloud, characterized in that: Applied to the receiving end, including: Step 1: receiving an embedded key, a hash key and an external key sent by a transmitting end, and generating a chaotic sequence according to the hash key and the external key; Step 2: Download the ciphertext image C and the first authentication sequence from the central cloud to the edge cloud, and then use the chaotic sequence to perform inverse diffusion on the ciphertext image C on the edge cloud to obtain the matrix P5′; Step 3: On the edge cloud, the matrix P5′ is encoded to obtain a second authentication sequence. If the first authentication sequence is consistent with the second authentication sequence, it means that the ciphertext image C on the central cloud has not been tampered with and the subsequent operation continues; otherwise, it is rejected; Step 4: On the edge cloud, the matrix P5′ is inversely quantized to obtain the matrix P4′; Step 5: On the edge cloud, a measurement matrix is ​​generated according to the chaotic sequence, and the measurement matrix is ​​used to restore the matrix P4′ based on the semi-tensor product compressed sensing algorithm to obtain the matrix P3′; Step 6: Download the matrix P3′ from the edge cloud, use the chaotic sequence to perform inverse scrambling and inverse sparseness on the matrix P3′, and obtain the image P1′; Step 7: Use the embedded key to extract the authentication image Au′ from the image P1′ and obtain the decrypted image P′, compare the authentication image Au′ with the existing authentication image Au, and if the comparison result is less than the set error threshold, the decrypted image P′ is considered correct.

9. The medical image decryption method based on half tensor product compressed sensing and hybrid cloud according to claim 8, characterized in that: The reverse diffusion of the ciphertext image C in step 2 specifically includes: Step 2.1: Divide the ciphertext image C into four matrices of the same size and convert the four matrices into four sequences of the same size pa4, pb4, pc4, pd4 respectively; preprocess the chaotic sequences Z0 and W0 generated in step 1 to obtain sequences Z1 and W1, and segment the sequences Z1 and W1 to obtain four non-repeating sequences Z of the same size respectively. a1 , Z b1 , Z c1 , Z d1 and W a1 , W b1 , W c1 , W d1 ; Step 2.2: Sequence Z a1 Substituting into formula (12) we get the sequence Z a3 , using the sequence W a1 Perform an XOR operation on sequence pa4 to obtain binary sequence pa3. According to formula (17), use sequence Z a3 To control the cyclic shift of binary sequence pa3 to obtain binary sequence pa2, and convert binary sequence pa2 back into decimal sequence pa1; Step 2.3: Arrange the sequence pa1 in order to obtain the index sequence s a , using the index sequence s a For the sequence Z b1 Scramble to get the scrambled sequence Z b2 , according to formula (12), we get the sequence Z b3 , using the sequence W b1 Perform an XOR operation on sequence pb4 to obtain binary sequence pb3. According to formula (17), use sequence Z b3 To control the cyclic shift of binary sequence pb3 to obtain binary sequence pb2, and convert binary sequence pb2 back into decimal sequence pb1; Arrange the sequence pb1 in order to obtain the index sequence s b , using the index sequence s b For the sequence Z c1 Scramble to get the scrambled sequence Z c2 , according to formula (12), we get the sequence Z c3 , using the sequence W c1 Perform an XOR operation on the sequence pc4 to obtain the binary sequence pc3. According to formula (17), use the sequence Z c3 To control the cyclic shift of binary sequence pc3 to obtain binary sequence pc2, and convert binary sequence pc2 back into decimal sequence pc1; Arrange the sequence pc1 in order to obtain the index sequence s c , using the index sequence s c For the sequence Z d1 Scramble to get the scrambled sequence Z d2 , according to formula (12), we get the sequence Z d3 , using the sequence W d1 Perform an XOR operation on the sequence pd4 to obtain the binary sequence pd3. According to formula (17), use the sequence Z d3 To control the cyclic shift of the binary sequence pd3 to obtain the binary sequence pd2, and convert the binary sequence pd2 back into the decimal sequence pd1; Among them, floor means rounding down, circshift(x,[0,y]) means the binary character x is circularly shifted to the right by y positions; Step 2.4: Convert the sequences pa1, pb1, pc1 and pd1 into four matrices pa, pb, pc and pd of the same size respectively, and recombine the four matrices according to formula (18) to obtain the matrix P5′; 10. A medical image secure transmission method based on half tensor product compressed sensing and hybrid cloud, characterized in that: include: The first health center encrypts the original medical image using the encryption method described in any one of claims 1 to 7 and transmits the encrypted image to the second health center; The second health center uses the decryption method described in claim 8 or 9 to decrypt the ciphertext image for subsequent diagnosis.