Medical image multi-dimensional dynamic privacy protection method, device and storage medium

By employing de-identification processing, EMD information hiding, and cascaded chaotic encryption technology, the problem of scene-specificity in medical image protection is solved, achieving multi-dimensional dynamic privacy protection and ensuring the security and privacy of medical images in different application scenarios.

CN122245649APending Publication Date: 2026-06-19JIANGSU OPEN UNIVERSITY (THE CITY VOCATIONAL COLLEGE OF JIANGSU)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU OPEN UNIVERSITY (THE CITY VOCATIONAL COLLEGE OF JIANGSU)
Filing Date
2026-04-28
Publication Date
2026-06-19

Smart Images

  • Figure CN122245649A_ABST
    Figure CN122245649A_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and storage medium for multi-dimensional dynamic privacy protection of medical images. The method includes: determining whether personal information in the medical image is needed; if not, removing the personal information from the medical image and converting the image format to a universal format; if so, determining the current usage scenario; if it is a diagnostic scenario, embedding secret information into the medical image using EMD transformation; if it is an untrusted cloud storage sharing scenario, encrypting the medical image based on chaos theory. This invention constructs a three-dimensional protection framework for application scenarios such as telemedicine, cloud storage, and cross-institutional data sharing. It demonstrates excellent performance in resisting various types of threats such as noise attacks and cropping attacks, effectively addressing unauthorized access, metadata leakage, and tampering attacks, providing an efficient and reliable solution for medical image data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to privacy protection technology, specifically to a method, device, and storage medium for multi-dimensional dynamic privacy protection of medical images. Background Technology

[0002] Information hiding, as a privacy protection technology, aims to embed secret information into seemingly normal carriers (such as images, audio, or video) without arousing suspicion, thereby achieving purposes such as covert communication, copyright protection, or data integrity verification. This field encompasses various technologies, including digital watermarking and steganography, each with its own emphasis in principle and application. Classical information hiding algorithms primarily operate in two domains: in the spatial domain, techniques such as least significant bit (LSB) steganography directly modify pixel values; in the transform domain (such as DCT and DWT), information embedding is achieved by modifying frequency domain coefficients. EMD (exploiting modification direction) technology represents a more advanced paradigm, focusing on embedding information by utilizing the local modification direction of the carrier signal, exhibiting superior performance in scenarios requiring high transparency and robustness.

[0003] Although information hiding and chaos-based encryption technologies have made substantial progress in the protection of medical images, they still have significant limitations in addressing the diverse real-world needs of modern medical applications such as telemedicine, cloud storage, and cross-institutional sharing. This has led to the need for layered and scenario-based privacy protection.

[0004] First, traditional methods exhibit scenario-specific limitations. Single information hiding techniques (such as traditional digital watermarking) may lack sufficient robustness against geometric attacks or image processing operations. Conversely, while standard chaotic encryption provides strong security, the encrypted data is often unusable for direct processing and frequently neglects targeted protection of sensitive metadata embedded in the image.

[0005] More importantly, a single mechanism approach cannot fully meet the layered and multidimensional safety needs arising from actual medical workflows: (1) Metadata removal requirements for analysis scenarios: specific research or diagnostic tasks only require access to fully de-identified image data, so an efficient and irreversible method is needed to remove related patient personal information.

[0006] (2) The need for covert transmission in diagnostic scenarios: In scenarios such as remote consultation, images and their associated patient information need to be transmitted, requiring a protection mechanism with moderate security strength that can covertly protect personal information during transmission.

[0007] (3) High security protection requirements for storage / sharing scenarios: In environments such as untrusted cloud storage, all data (including image pixels and metadata) must be protected with high strength without discrimination in order to resist various threats.

[0008] Reference 1 (Paper: Zhao Qiao. Research on Image Encryption Algorithms Based on Chaotic Systems and DNA Encoding [D]. North University of China, 2023.) discloses three encryption algorithms based on different chaotic systems and DNA encoding: an image encryption algorithm based on one-dimensional piecewise Logistic chaotic mapping and DNA encoding, an image encryption algorithm based on three-dimensional Lorenz chaotic mapping and dynamic DNA encoding, and a color image encryption algorithm based on Chen hyperchaotic system and dynamic DNA encoding. Reference 2 (Chinese Patent No. CN113889232B) discloses a privacy protection method based on medical images. However, the anti-interference and anti-cropping attack capabilities of the above two references are insufficient.

[0009] Although recent research trends have shown a tendency towards integration (such as combining watermarking and encryption technologies), there is still a lack of a systematic framework that can dynamically implement layered, context-aware protection—a framework that should seamlessly integrate EMD-based hiding techniques (for concealed data embedding) and chaos-based encryption techniques (for high-strength scrambling). Summary of the Invention

[0010] This invention addresses the shortcomings of existing technologies by providing a method, device, and storage medium for multidimensional dynamic privacy protection of medical images, precisely addressing the need for multidimensional privacy protection.

[0011] To achieve the above objectives, the present invention adopts the following technical solution: A method for multidimensional dynamic privacy protection in medical images includes the following steps: Determine whether personal information from medical images is needed. If not, remove the personal information from the medical images and convert the image format to a universal format. If yes, determine the current usage scenario. If it is a diagnostic scenario, group the medical images by pixels, embed the secret information into the corresponding pixel groups through EMD transformation, and stitch all pixel groups together in sequence to obtain a medical image containing the secret message. If it is an untrusted cloud storage sharing scenario, use cascaded chaotic mapping to generate a chaotic sequence to scramble the pixel matrix of the medical images to obtain scrambled pixel groups. Then, based on the Chen hyperchaotic system combined with a DNA-encoded diffusion algorithm, perform diffusion encryption on the scrambled pixel groups to obtain the final encrypted image.

[0012] To optimize the above technical solution, the specific measures also include: Furthermore, the removal of personal information from medical images and the conversion of images to a common format specifically involves: The medical image is in DICOM format. The personal identifier after the DICOM identifier is removed, and then the pixel array in the DICOM format medical image is converted to floating point form. The pixel values ​​are rescaled to the range of 0-255 and saved as JPG format.

[0013] Furthermore, the step of grouping medical images by pixels and calculating group feature values, and embedding secret information into the corresponding pixel groups through EMD transformation, specifically involves: Input the medical image X, the secret information sequence string S, and the pixel group parameter n; The medical image X is segmented into groups of n pixels, and the following embedding operation is performed on each pixel group: The group feature value G for each pixel group is calculated using the following formula:

[0014] In the formula, The first pixel in the pixel group grayscale value of each pixel. This represents the modulo operation; String the secret information Convert to a binary bit sequence and group into fixed-length blocks, each containing... Bit binary information, in which satisfy Each group of bits is converted into one The number system is used as a secret value d; For secret information string A set of binary bit sequences after conversion ,in, This represents the i-th bit. The secret value corresponding to this set of binary bit sequences for:

[0015] For each pixel group, calculate the secret value. With group eigenvalues The difference D:

[0016] according to The value of is used to modify the grayscale value of pixels within the group according to the following rules: like All pixels remain unchanged; like ,in The number of secret bits that can be hidden for each pixel, and the last pixel. Increase At the same time, the first pixel Increase by 1, that is: , It is the modified grayscale value of the nth pixel. It is the grayscale value of the first pixel after modification; like ,Will Convert to Represented in a number system, a set of adjustment values ​​is obtained. , Then modify the pixels at the corresponding positions according to the following rules: ; It is the original grayscale value of the i-th pixel. It is the modified grayscale value of the (i+1)th pixel. It is the modified grayscale value of the i-th pixel; like Similarly, Convert to The number system is adjusted. However, the direction of the modification is opposite: ; Once all pixel groups have completed the embedding operation, the resulting image is a grayscale image containing the secret message. .

[0017] Furthermore, the step of generating a chaotic sequence using cascaded chaotic mapping to scramble the pixel matrix, and then performing diffusion encryption on the scrambled image based on the Chen hyperchaotic system combined with a DNA-encoded diffusion algorithm, specifically involves: Set a key of length 11 bits (k1, k2, k3, k4, k5, k6, k7, k8, k9, k 10 ,k 11 ); Read a medical image of size m×n and convert it into a pixel matrix P. The initial values ​​of the cascaded chaotic map are determined by the first and second keys k1 and k2. and control parameters :

[0018] from To begin, iterate according to the following formula. Second-rate:

[0019] Obtaining the chaotic sequence ; key These are respectively the initial states (u0, y0, z0, q0) of the Chen hyperchaotic system, and the key. As system parameters (a, b, c, d, e), and ensure that the parameters are within the hyperchaotic range; The following set of dynamic differential equations for the Chen hyperchaotic system are solved using the fourth-order Runge-Kutta method:

[0020] In the formula, a, b, c, d and e represent the control parameters of the hyperchaotic system, and u, y, z and q represent the state variables; It is the first derivative of u. It is the first derivative of y. It is the first derivative of z. It is the first derivative of q; Set step size The total number of iterations is ,in The number of transient steps; iterative solution is started with the initial state (u0, y0, z0, q0), removing the previous state. A transient point (u1, y1, z1, q1) ~ (u T ,y T ,z T ,q T After that, the remaining steady-state point u T+1 ~u T+m×n y T+1 ~y T+m×n , z T+1 ~z T+m×n q T+1 ~q T+m×n Composed of four lines, each with a length of chaotic sequence ; Based on chaotic sequences For pixel matrix Scramble the pixels to obtain the scrambled pixel group. ; For the scrambled pixel group Application based on chaotic sequences A diffusion algorithm based on DNA encoding is used to generate one-dimensional encrypted pixel groups; Reshape the one-dimensional ciphertext pixel group into The two-dimensional matrix is ​​used to obtain the final encrypted image.

[0021] Furthermore, regarding the grayscale image containing the secret message... The decryption process is as follows: Grayscale image containing secret messages According to each The pixels are divided into groups of adjacent pixels to obtain pixel groups. For each pixel group, its extracted feature value is calculated using the following formula. :

[0022] Extracting feature values Convert to a binary sequence, concatenate the binary sequences of all pixel groups in order, and finally recover the complete secret information string. .

[0023] Furthermore, the chaotic sequence-based For pixel matrix Scramble the pixels to obtain the scrambled pixel group. The specific process is as follows: Chaotic sequence Sort by element value in ascending order to obtain the sort index. , Representing the position of the i-th pixel, the pixel matrix... Convert to one-dimensional pixel vector , length is Using sorted indexes For one-dimensional pixel vectors Perform rearrangement, scramble pixel groups The Take 1 pixel The middle position is After scrambling the pixel values, we obtain a one-dimensional scrambled pixel group. .

[0024] Furthermore, the scrambled pixel group Application based on chaotic sequences The specific process of generating a one-dimensional ciphertext pixel group using the diffusion algorithm based on DNA encoding is as follows: For the generated chaotic sequence The sequence is transformed as follows to obtain the sequence used for encoding and operations:

[0025]

[0026] in, and The range of values ​​is , These are sequences used to select DNA coding rules. It is a sequence used to select DNA decoding rules; The range of values ​​is , is a sequence used to select the type of DNA operation; The range of values ​​is , It is a key stream; For each pixel in the scrambled pixel group ,according to The current value is selected using DNA encoding rules to convert the pixel value. Encoding a DNA base sequence of length 4 nucleotides ; according to The current value selects the DNA encoding rule, and the key stream is... The current value is encoded as a DNA base sequence. ; according to The current value selects the DNA operation type for the DNA base sequence. and Perform the calculation to obtain the resulting DNA sequence. ; according to The current value selects the DNA decoding rule, and the sequence Decode the data into an 8-bit binary number, then combine it into a pixel value. After processing all pixels sequentially, a one-dimensional ciphertext pixel group is obtained. .

[0027] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the multidimensional dynamic privacy protection method in medical images as described above.

[0028] The present invention also proposes a computer-readable storage medium storing a computer program that enables a computer to execute the multidimensional dynamic privacy protection method in medical images as described above.

[0029] The beneficial effects of this invention are: This invention comprehensively improves the security and privacy protection of medical image data by integrating various technical means such as image de-identification with metadata removal, EMD-based information hiding methods, and encryption algorithms based on chaos theory.

[0030] This solution employs scenario-based dynamic switching of privacy protection strategies, utilizing de-identification, EMD information hiding, and chaotic encryption protection to address different medical imaging application needs, achieving a comprehensive, layered security guarantee. DICOM image de-identification completely removes personal information, preventing privacy leaks at the source; the improved EMD algorithm boasts strong embedding concealment and minimal image distortion, ensuring secure transmission of private information without affecting diagnostic use; the cascaded chaotic mapping combined with the Chen hyperchaotic system and DNA encoding provides a composite encryption method with a large key space and strong attack resistance, effectively resisting attacks such as noise, cropping, and statistical analysis. The solution is compatible with medical image formats, ensuring data security while balancing practicality and transmission reliability.

[0031] In summary, the organic integration of these technologies not only enhances data security but also provides reliable technical support for the efficient and secure use of medical data. A series of experiments and performance analyses show that this protection strategy exhibits good randomness and attack resistance in terms of statistical performance and anti-attack capability, verifying the practical application value of the solution and its ability to effectively protect patient privacy. Attached Figure Description

[0032] Figure 1 This is a flowchart of the multi-dimensional dynamic privacy protection method for medical images proposed in this invention.

[0033] Figure 2 This is a diagram of the DICOM file structure.

[0034] Figure 3 These are distribution diagrams of chaotic sequences under different chaotic mappings. Figure 3 (a) is a chaotic sequence distribution diagram of the logistic mapping. Figure 3 (b) is the distribution diagram of the chaotic sequence of the sine mapping. Figure 3 (c) is a chaotic sequence distribution diagram of the logistic and sine concatenation mapping.

[0035] Figure 4 These are bifurcation graphs under different chaotic mappings. Figure 4 (a) is the bifurcation graph of the logistic mapping. Figure 4 (b) is the bifurcation diagram of the sine mapping. Figure 4 (c) is the bifurcation diagram of the logistic cascade mapping with sine.

[0036] Figure 5 This is a comparison image of the original image and the image after removing metadata. Figure 5 (a) is the original image. Figure 5 (b) is the image after removing metadata.

[0037] Figure 6 These are comparison images of the carrier image before and after embedding. Figure 6 (a) is the original image. Figure 6 (b) is an image with embedded patient privacy information.

[0038] Figure 7 These are images showing the test results of Gaussian noise attacks using different algorithms. Figure 7 (a) is a graph showing the Gaussian noise attack test results using the algorithm of this invention. Figure 7 (b) is a test result image of the Gaussian noise attack using the algorithm in Reference 1 mentioned in the background section. Figure 7 (c) is a test result of the Gaussian noise attack using the algorithm mentioned in Reference 2 in the background technology; from top to bottom, it is the plaintext image, the ciphertext image attacked by Gaussian noise, and the decrypted image.

[0039] Figure 8 These are images showing the test results of salt-and-pepper noise attacks using different algorithms. Figure 8 (a) is a graph showing the test results of salt-and-pepper noise attack using the algorithm of this invention. Figure 8 (b) is a test result of salt-and-pepper noise attack using the algorithm mentioned in Reference 1 in the background section. Figure 8 (c) is a test result of the salt and pepper noise attack using the algorithm mentioned in Reference 2 in the background technology; from top to bottom, it is the plaintext image, the ciphertext image attacked by salt and pepper noise, and the decrypted image.

[0040] Figure 9 This is the clipping attack test of the present invention.

[0041] Figure 10 This is a test result image of the pruning attack of the algorithm mentioned in Reference 1 in the background section.

[0042] Figure 11 This is a test result image of the pruning attack of the algorithm mentioned in Reference 2 in the background section. Detailed Implementation

[0043] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0044] The model selection, algorithm design and implementation, experimental verification, and countermeasures against various attacks in this invention were all completed using the Python language. The experiments were conducted on a personal computer equipped with a 2.30GHz CPU and 16GB of memory, running Windows 10, and using PyCharm as the development tool. The medical image data used in the experiments came from real images in the hospital information system.

[0045] Example 1 This invention proposes a multi-dimensional dynamic privacy protection method for medical images. The process of this method is as follows: Figure 1 As shown, a "three-dimensional defense" protection strategy was designed for different application scenarios. This strategy consists of three parts: personal information erasure protection (first dimension), medium-level security and privacy protection (second dimension), and high-level security and privacy protection (third dimension).

[0046] The selection of a suitable security protection solution is based on system or user needs. Here we assume three use cases: The first category is medical imaging research: Medical experts focus on analyzing large amounts of medical imaging data to study specific diseases (such as lung cancer), and recommend using "data removal methods" to protect patient privacy.

[0047] The second category is pharmaceutical research and auxiliary diagnosis: Pharmaceutics experts not only need to analyze medical images, but also need to combine patient personal information (such as age and living area) to conduct research on disease patterns, and then evaluate medication regimens. For this type of scenario, a second-dimensional strategy should be adopted, that is, allowing limited access to personal information while protecting individual privacy, to support auxiliary diagnosis and research.

[0048] The third category is telemedicine services: In telemedicine scenarios, doctors need to access patients' medical images and sensitive personal information simultaneously, requiring high-security data transmission to prevent information leakage and tampering. In this case, a third-dimensional strategy should be adopted, implementing end-to-end encrypted communication and strict data access control to ensure the security of information during transmission and processing.

[0049] The method includes the following steps: Determine whether personal information in medical images is needed. If not, perform the first dimension of privacy protection: remove personal information from medical images and convert the image format to a universal format. If yes, determine the current usage scenario. If it is a diagnostic scenario, perform the second dimension of privacy protection: embed secret information into medical images using EMD transformation. If it is an untrusted cloud storage sharing scenario, perform the third dimension of privacy protection: encrypt medical images based on chaos theory.

[0050] The first dimension: Removing personal information from medical images and converting the images to a universal format specifically involves: Common imaging techniques in medical imaging include CT, X-ray, MRI, ultrasound, and various endoscopic images. These images all conform to the unified Medical Digital Imaging and Communication Standard (DICOM). A DICOM file typically consists of two parts: a header and a dataset. The header contains information such as a file description and the DICOM prefix, while the dataset is the core of the DICOM file, composed of DICOM data elements arranged in a specific order. The basic unit of a data element is a data cell, which is ordered in ascending order of its label.

[0051] Figure 2 The image shows a DICOM file. The leftmost part is the storage address, the middle part is the specific information in hexadecimal representation, and the rightmost part is the character display of the middle data. Figure 2 The part marked in red is the file header, which begins with "DICM" (4449434D). The subsequent data is patient-related information, i.e., metadata. Figure 2 The bottom displays the parsed metadata information.

[0052] When opening a standard DICOM file, it typically contains image information and personally identifiable information. However, in many applications, users only need the image information and not the personal information. To minimize the risk of privacy breaches, personal information (such as name, address, or date of birth) in medical images can be protected through metadata removal methods, and the images can ultimately be converted to the universal JPG format for easy reading.

[0053] De-identification: Removing personal identifiers from images and retaining only image data before processing and sharing medical image data can effectively protect personal privacy information.

[0054] Format conversion: Converting DICOM format medical images to JPG images. Because only image pixel data is retained during the conversion process, a large amount of metadata containing personal and other medical information is removed. The resulting JPG image retains the visual image information, while patient identity and treatment information are discarded.

[0055] DICOM to JPG conversion process: (1) Extract the pixel array, i.e., obtain the pixel array from the DICOM file and convert it to floating-point form for subsequent processing; (2) Rescale the image, rescaling the pixel values ​​to the 0-255 range to fit the JPG format; (3) Save as a JPG, this process discards all metadata except for the image data. The converted JPG image no longer contains any patient information, thus effectively protecting patient privacy. The original image and the image after metadata removal are shown below. Figure 5 As shown. From Figure 5 (a) It can be seen that the original image contains original personal information in the four corners. After metadata removal, Figure 5 (b) Only retain image information and directly clear original personal information.

[0056] The second dimension: The information hiding and protection method based on EMD transformation is as follows: Input the medical image X, the secret information sequence string S, and the pixel group parameter n; The medical image X is segmented into groups of n pixels, and the following embedding operation is performed on each pixel group: The group feature value G for each pixel group is calculated using the following formula:

[0057] In the formula, The first pixel in the pixel group grayscale value of each pixel. This represents the modulo operation; String the secret information Convert to a binary bit sequence and group into fixed-length blocks, each containing... Bit binary information, in which satisfy Each group of bits is converted into one The number system is used as a secret value d; For secret information string A set of binary bit sequences after conversion ,in, This represents the i-th bit. The secret value corresponding to this set of binary bit sequences for:

[0058] For each pixel group, calculate the secret value. With group eigenvalues The difference D:

[0059] according to The value of is used to modify the grayscale value of pixels within the group according to the following rules: like All pixels remain unchanged; like ,in The number of secret bits that can be hidden for each pixel, and the last pixel. Increase At the same time, the first pixel Increase by 1, that is: , It is the modified grayscale value of the nth pixel. It is the grayscale value of the first pixel after modification; like ,Will Convert to Represented in a number system, a set of adjustment values ​​is obtained. , Then modify the pixels at the corresponding positions according to the following rules: ; It is the original grayscale value of the i-th pixel. It is the modified grayscale value of the (i+1)th pixel. It is the modified grayscale value of the i-th pixel; like Similarly, Convert to The number system is adjusted. However, the direction of the modification is opposite: ; Once all pixel groups have completed the embedding operation, the resulting image is a grayscale image containing the secret message. .

[0060] Grayscale images containing secret messages The decryption process is as follows: Grayscale image containing secret messages According to each The pixels are divided into groups of adjacent pixels to obtain pixel groups. For each pixel group, its extracted feature value is calculated using the following formula. :

[0061] Extracting feature values Convert to a binary sequence, concatenate the binary sequences of all pixel groups in order, and finally recover the complete secret information string. .

[0062] With the help of EMD transformation, information can be hidden in different frequency layers of medical images. This protection mechanism ensures that even if some data is damaged or tampered with, the original information can still be effectively recovered or identified.

[0063] The experimental design and results analysis of information hiding based on the EMD algorithm are as follows: In the information hiding algorithm based on EMD, after opening the source DICOM file, patient information is selected from the metadata and stored as a private file. The system then automatically locks the file address, reads and writes the information, and embeds it into the carrier image (medical image X). Parameters n and k are set to 4 and 2, respectively. The carrier images before and after information embedding are observed as follows: Figure 6 As shown in the image, the patient's private information is hidden within it, thus achieving the purpose of discreetly storing the information.

[0064] In information hiding algorithms, the image quality inevitably changes after the carrier image undergoes certain transformations and information embedding. Peak Signal-to-Noise Ratio (PSNR) is the most widely used metric for evaluating image distortion, and the PSNR value is negatively correlated with the degree of distortion. A higher PSNR indicates lower image distortion and better information hiding quality. However, due to the characteristics of human vision, subjective perception often differs from test results, making this an important indicator for evaluating the performance of information hiding algorithms. The formula for calculating PSNR is as follows:

[0065] MSE stands for Mean Squared Error. The larger the value, the lower the similarity between two images. The formula for calculating the Mean Squared Error is as follows:

[0066] MAX represents the maximum value of an image pixel. If each sampling point is represented by 8 bits, then according to the formula, the smaller the MSE, the larger the PSNR, and the better the image quality. In the EMD algorithm, n represents the number of pixels in a pixel group, and k represents the k bits of secret information that can be hidden in each pixel. The magnitudes of these two parameters directly affect the changes in the carrier image before and after the information is hidden. This change is very small and cannot be directly perceived by the naked eye; it needs to be reflected by the peak signal-to-noise ratio (PSNR). Therefore, by modifying the PSNR corresponding to the k value, the effect before and after information embedding is tested. The different PSNR values ​​under different n and k values ​​are shown in Table 1.

[0067] Table 1

[0068] The third dimension: a comprehensive privacy protection algorithm based on chaos theory.

[0069] To address the issues of narrow chaotic range and uneven distribution of chaotic sequences in Logistic and Sine mappings, this invention designs a novel one-dimensional cascaded chaotic mapping, specifically as follows: Set a key of length 11 bits (k1, k2, k3, k4, k5, k6, k7, k8, k9, k 10 ,k 11 ); Read a medical image of size m×n and convert it into a pixel matrix P. The initial values ​​of the cascaded chaotic map are determined by the first and second keys k1 and k2. and control parameters :

[0070] from To begin, iterate according to the following formula. Second-rate:

[0071] Obtaining the chaotic sequence "mod1" means taking the decimal part, ensuring that the state variable x always stays within the range of [0,1).

[0072] key These are respectively the initial states (u0, y0, z0, q0) of the Chen hyperchaotic system, and the key. As system parameters (a, b, c, d, e), and ensure that the parameters are within the hyperchaotic range; The following set of dynamic differential equations for the Chen hyperchaotic system are solved using the fourth-order Runge-Kutta method:

[0073] In the formula, a, b, c, d and e represent the control parameters of the hyperchaotic system, and u, y, z and q represent the state variables; It is the first derivative of u. It is the first derivative of y. It is the first derivative of z. It is the first derivative of q; Set step size The total number of iterations is ,in The number of transient steps; iterative solution is started with the initial state (u0, y0, z0, q0), removing the previous state. A transient point (u1, y1, z1, q1) ~ (u T ,y T ,z T ,q T After that, the remaining steady-state point u T+1 ~u T+m×n y T+1 ~y T+m×n , z T+1 ~z T+m×n q T+1 ~q T+m×n Composed of four lines, each with a length of chaotic sequence ; Based on chaotic sequences For pixel matrix Scramble the pixels to obtain the scrambled pixel group. The specific process is as follows: Chaotic sequence Sort by element value in ascending order to obtain the sort index. (That is, the mapping of the original sequence positions after sorting). Representing the position of the i-th pixel, the pixel matrix... Convert to one-dimensional pixel vector , length is Using sorted indexes For one-dimensional pixel vectors Perform rearrangement, scramble pixel groups The Take 1 pixel The middle position is After scrambling the pixel values, a one-dimensional scrambled pixel group is obtained. .

[0074] For the scrambled pixel group Application based on chaotic sequences Using a diffusion algorithm based on DNA encoding, a one-dimensional ciphertext pixel group is generated; the specific process is as follows: For the generated chaotic sequence The sequence is transformed as follows to obtain the sequence used for encoding and operations:

[0075]

[0076] in, and The range of values ​​is , These are sequences used to select DNA coding rules. It is a sequence used to select DNA decoding rules; The range of values ​​is , is a sequence used to select the type of DNA operation; The range of values ​​is , It is a key stream; For each pixel in the scrambled pixel group ,according to The current value is selected using DNA encoding rules to convert the pixel value. Encoding a DNA base sequence of length 4 nucleotides ; according to The current value selects the DNA encoding rule, and the key stream is... The current value is encoded as a DNA base sequence. ; according to The current value selects the DNA operation type (such as addition, subtraction, XOR, etc.) for the DNA base sequence. and Perform the calculation to obtain the resulting DNA sequence. ; according to The current value selects the DNA decoding rule, and the sequence Decode the data into an 8-bit binary number, then combine it into a pixel value. After processing all pixels sequentially, a one-dimensional ciphertext pixel group is obtained. .

[0077] Reshape the one-dimensional ciphertext pixel group into The two-dimensional matrix is ​​used to obtain the final encrypted image.

[0078] Image decryption algorithms are the inverse process of encryption. Decryption requires the same key and must be performed in reverse order: 1) Generate the same chaotic sequence using the same key; 2) Perform reverse DNA operation and decoding; 3) Perform image scrambling operation in reverse.

[0079] The chaotic performance of one-dimensional cascaded chaotic mappings is analyzed below.

[0080] 1) Distribution diagrams of chaotic sequences under different chaotic mappings are shown below. Figure 3 As shown; from Figure 3 The following conclusions can be drawn: The logistic mapping exhibits a U-shaped distribution, with values ​​clustered around 0 and 1, demonstrating statistical bias and weak randomness, which reduces encryption security and increases vulnerability to statistical attacks. The sine mapping shows a sharp peak around 0.5, reflecting poor uniformity, obvious numerical bias, and low randomness, making it unsuitable for high-security encryption. In contrast, the cascaded chaotic mapping exhibits an approximately uniform distribution in the [0,1) interval, with no obvious clustering. Its balanced frequency distribution confirms strong ergodicity and unpredictability, verifying that the cascaded design effectively overcomes the non-uniformity of the original mapping and expands the effective chaotic range.

[0081] 2) Bifurcation graphs under different chaotic mappings, such as Figure 4 As shown based on Figure 4 Comparative analysis shows that the logistic and sinusoidal maps suffer from limitations such as a narrow range of chaotic parameters, uneven state distribution (the former clusters at both ends, while the latter concentrates in the middle region), and obvious periodic windows, restricting their application in cryptography. In contrast, the cascaded chaotic map proposed in this invention significantly expands the range of chaotic parameters, achieves a uniform and dense phase space distribution, and effectively suppresses periodic windows. Therefore, this map exhibits superior performance in terms of parameter sensitivity, ergodicity, and chaotic robustness, providing a more reliable dynamic basis for constructing highly secure chaotic encryption systems.

[0082] To analyze and verify the image encryption effect, this paper conducts a simulation experiment. The experimental design and result analysis based on chaos theory are as follows: (1) Key space and sensitivity analysis The key space is the set of all possible keys. In encryption algorithms, the key is controlled by several parameters, including initial values, bifurcation parameters, and the number of encryption rounds. These parameters ensure that the key space is large enough to effectively resist brute-force attacks. Assume the computer's precision is 10^- ... -14 The chaotic and DNA-encoded image encryption algorithm proposed in this invention has a key space determined by its 11 external keys. As shown in the following formula:

[0083] As can be seen, the key space of the algorithm presented in this paper far exceeds 2. 100This demonstrates that the algorithm effectively resists brute-force attacks. A single bit change in the key should produce a completely different encryption result; this is called key sensitivity. This property is evaluated using two parameters: the non-volatile percentage change (NPCR) and the uniform average change intensity (UACI). NPCR and UACI represent the proportion of changed pixels and the average intensity difference between the two ciphertext images, respectively. The formula for calculating NPCR is as follows:

[0084] In this formula, M and N represent the width and height of the two encrypted images, respectively, and D(i,j) is defined as follows:

[0085] UACI can be calculated using the following formula:

[0086] Key sensitivity testing can be performed by modifying a single bit of the key K to obtain K'. Encrypting the same image using K and K' generates two ciphertext images C1 and C2. The difference between the two ciphertext images is quantized using NPCR and UACI. The ideal values ​​for NPCR and UACI are 99.6094% and 33.4635%, respectively. The closer the calculated NPCR and UACI values ​​of the image encryption algorithm are to these ideal values, the higher the key sensitivity of the algorithm, the stronger its resistance to differential attacks, and the better its security.

[0087] Table 2 presents the key sensitivity evaluation parameters of the algorithm of this invention and two other image encryption algorithms. As shown in Table 2, the NPCR and UACI values ​​of the algorithm of this invention are 99.6128% and 33.4732%, respectively. Compared with the algorithms of References 1 and 2 mentioned in the background art, these values ​​are closer to the ideal values ​​(99.6094% and 33.4635%), indicating that the algorithm of this invention has better key sensitivity and differential attack resistance.

[0088] Table 2

[0089] (2) Pixel Correlation Analysis The strength of the linear relationship between adjacent pixels is typically measured by calculating the correlation coefficient. Lower correlation indicates better encryption and a lower risk of information leakage. Excellent image encryption algorithms should significantly reduce the correlation between adjacent pixels in an image to effectively resist statistical attacks. The specific calculation method is shown in the following formula:

[0090]

[0091]

[0092]

[0093] in Describing covariance, Here, N represents the grayscale value of adjacent pixels in the image, and N represents the total number of pixels. The correlation coefficient. Standard deviation, For variance, The value is the mean. The correlation coefficient between adjacent pixels ranges from -1 to 1. A value close to 1 indicates that adjacent pixels change in the same direction, i.e., a positive correlation; a value close to -1 indicates that adjacent pixels change in opposite directions, i.e., a negative correlation; a value close to 0 indicates that there is no significant correlation between adjacent pixels. Table 3 shows the correlation coefficients between adjacent pixels in the original and encrypted images under different algorithms.

[0094] Table 3 shows the correlation coefficients of adjacent pixels in the original and encrypted images under different algorithms.

[0095] Table 3

[0096] In Table 3, the correlation coefficient decreased significantly after encryption, indicating that the encryption algorithm effectively destroyed the correlation and could effectively resist statistical attacks.

[0097] (3) Information Entropy Information entropy is a quantitative measure of the randomness of a signal source and can be used to assess the randomness of pixel distribution in an image. The more uniform the pixel distribution, the stronger the resistance to statistical attacks. For a 256-level grayscale image, the ideal entropy value for an encrypted image is 8. The closer this value is to 8, the more uniform the pixel distribution, the better the randomness, and the stronger the resistance to statistical attacks.

[0098] The same image was encrypted using three different image encryption algorithms, resulting in three ciphertext images. The information entropy of the original image and the three ciphertext images was calculated, and the results are shown in Table 4. It can be seen that the information entropy of the ciphertext images is significantly higher than that of the plaintext images, indicating that the pixel distribution in the ciphertext images is more uniform and random, thus providing stronger resistance to statistical attacks.

[0099] Table 4

[0100] (4) Anti-attack experiments and verification (a) Resistance to noise attacks During internet transmission, encrypted images are inevitably affected by noise and other interference, with distortion, degradation, and damage caused by communication noise being common phenomena. Recovering the original image from noise-affected ciphertext is challenging; therefore, image encryption algorithms must possess sufficient robustness to effectively resist noise attacks. This is particularly crucial for high-precision medical image encryption. Here, we test the anti-noise attack capabilities by adding Gaussian noise with a variance of 0.005 and salt-and-pepper noise of 0.05% to the ciphertext images of three algorithms.

[0101] Figure 7 For the test image with 0.05% Gaussian noise added, Figure 8 The test image shows an image with 0.05% salt-and-pepper noise added. The experimental results show that all three algorithms exhibit some resistance to salt-and-pepper noise. However, under Gaussian noise conditions, the encryption algorithm proposed in this invention demonstrates significantly better anti-interference capabilities compared to the two algorithms in References 1 and 2. Therefore, the image encryption algorithm proposed in this invention exhibits good overall noise resistance performance.

[0102] (b) Resistance to clipping attacks Encrypted images may experience partial data loss during internet transmission; therefore, image encryption algorithms must possess a certain degree of resistance to cropping attacks. In simulation experiments, data loss is simulated by setting the pixel values ​​of certain regions of the encrypted image to zero. Figure 9 , Figure 10 and Figure 11 The decryption results of the algorithm of this invention, the algorithm of Reference 1, and the algorithm of Reference 2 after being subjected to a pruning attack are shown respectively. Figure 9 , Figure 10 and Figure 11 This paper compares the decryption performance of encrypted images after being subjected to cropping attacks at different ratios (6.25%, 12.5%, 25%, and 50%). It can be seen that the quality of the decrypted image gradually decreases as the cropping ratio increases. However, even at a high cropping rate of 50%, the main outlines and key information of the image are still identifiable. This indicates that even if some data in the encrypted image is lost, the encryption algorithm can still effectively recover the original image information, demonstrating strong resistance to cropping attacks. Furthermore, it can be observed that the decrypted images from the algorithms in References 1 and 2 still exhibit obvious regular pixel loss, indicating insufficient uniformity in pixel distribution after scrambling. In contrast, the algorithm of this invention uses a more uniformly distributed cascaded chaotic sequence for pixel scrambling, resulting in irregular pixel loss in the decrypted image and demonstrating superior resistance to cropping attacks.

[0103] Example 2 This invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the multidimensional dynamic privacy protection method in medical images as described in Embodiment 1.

[0104] Example 3 This invention proposes a computer-readable storage medium storing a computer program that causes a computer to execute the multidimensional dynamic privacy protection method in medical images as described in Embodiment 1.

[0105] In the embodiments disclosed in this application, a computer storage medium may be a tangible medium that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of computer storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0106] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0107] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A method for multidimensional dynamic privacy protection in medical images, characterized in that, Includes the following steps: Determine whether personal information from medical images is needed. If not, remove the personal information from the medical images and convert the image format to a universal format. If yes, determine the current usage scenario. If it is a diagnostic scenario, group the medical images by pixels, embed the secret information into the corresponding pixel groups through EMD transformation, and stitch all pixel groups together in sequence to obtain a medical image containing the secret message. If it is an untrusted cloud storage sharing scenario, use cascaded chaotic mapping to generate a chaotic sequence to scramble the pixel matrix of the medical images to obtain scrambled pixel groups. Then, based on the Chen hyperchaotic system combined with a DNA-encoded diffusion algorithm, perform diffusion encryption on the scrambled pixel groups to obtain the final encrypted image.

2. The method for multidimensional dynamic privacy protection in medical images as described in claim 1, characterized in that, The process of removing personal information from medical images and converting the images to a common format specifically involves: The medical image is in DICOM format. The personal identifier after the DICOM identifier is removed, and then the pixel array in the DICOM format medical image is converted to floating point form. The pixel values ​​are rescaled to the range of 0-255 and saved as JPG format.

3. The method for multidimensional dynamic privacy protection in medical images as described in claim 1, characterized in that, The process of grouping medical images by pixels, embedding secret information into corresponding pixel groups through EMD transformation, and sequentially stitching together all pixel groups to obtain a medical image containing secret information specifically involves: Input the medical image X, the secret information sequence string S, and the pixel group parameter n; The medical image X is segmented into groups of n pixels, and the following embedding operation is performed on each pixel group: The group feature value G for each pixel group is calculated using the following formula: In the formula, The first pixel in the pixel group grayscale value of each pixel. This represents the modulo operation; String the secret information Convert to a binary bit sequence and group into fixed-length blocks, each containing... Bit binary information, in which satisfy Each group of bits is converted into one The number system is used as a secret value d; For secret information string A set of binary bit sequences after conversion ,in, This represents the i-th bit. The secret value corresponding to this set of binary bit sequences for: For each pixel group, calculate the secret value. With group eigenvalues The difference D: according to The value of is used to modify the grayscale value of pixels within the group according to the following rules: like All pixels remain unchanged; like ,in The number of secret bits that can be hidden for each pixel, and the last pixel. Increase At the same time, the first pixel Increase by 1, that is: , It is the modified grayscale value of the nth pixel. It is the grayscale value of the first pixel after modification; like ,Will Convert to Represented in a number system, a set of adjustment values ​​is obtained. , Then modify the pixels at the corresponding positions according to the following rules: ; It is the original grayscale value of the i-th pixel. It is the modified grayscale value of the (i+1)th pixel. It is the modified grayscale value of the i-th pixel; like Similarly, Convert to The number system is adjusted. However, the direction of the modification is opposite: ; Once all pixel groups have completed the embedding operation, the resulting image is a grayscale image containing the secret message. .

4. The method for multidimensional dynamic privacy protection in medical images as described in claim 1, characterized in that, The process involves using cascaded chaotic mapping to generate chaotic sequences to scramble the pixel matrix of medical images, resulting in scrambled pixel groups. Then, based on the Chen hyperchaotic system and a DNA-encoded diffusion algorithm, the scrambled pixel groups are subjected to diffusion encryption. Specifically, this process is as follows: Set a key of length 11 bits (k1, k2, k3, k4, k5, k6, k7, k8, k9, k 10 ,k 11 ); Read a medical image of size m×n and convert it into a pixel matrix P. The initial values ​​of the cascaded chaotic map are determined by the first and second keys k1 and k2. and control parameters : from Begin by iterating according to the following formula. Second-rate: Obtaining a chaotic sequence ; key These are respectively the initial states (u0, y0, z0, q0) of the Chen hyperchaotic system, and the key. As system parameters (a, b, c, d, e), and ensure that the parameters are within the hyperchaotic range; The following set of dynamic differential equations for the Chen hyperchaotic system are solved using the fourth-order Runge-Kutta method: In the formula, a, b, c, d and e represent the control parameters of the hyperchaotic system, and u, y, z and q represent the state variables; It is the first derivative of u. It is the first derivative of y. It is the first derivative of z. It is the first derivative of q; Set step size The total number of iterations is ,in The number of transient steps; iterative solution is started with the initial state (u0, y0, z0, q0), removing the previous state. A transient point (u1, y1, z1, q1) ~ (u T ,y T ,z T ,q T After that, the remaining steady-state point u T+1 ~u T+m×n y T+1 ~y T+m×n , z T+1 ~z T+m×n q T+1 ~q T+m×n Composed of four lines, each with a length of chaotic sequence ; Based on chaotic sequences For pixel matrix Scramble the pixels to obtain the scrambled pixel group. ; For the scrambled pixel group Application based on chaotic sequences A diffusion algorithm based on DNA encoding is used to generate one-dimensional encrypted pixel groups; Reshape the one-dimensional ciphertext pixel group into The two-dimensional matrix is ​​used to obtain the final encrypted image.

5. The method for multidimensional dynamic privacy protection in medical images as described in claim 3, characterized in that, For the grayscale image containing the secret message The decryption process is as follows: Grayscale image containing secret messages According to each The pixels are divided into groups of adjacent pixels to obtain pixel groups. For each pixel group, its extracted feature value is calculated using the following formula. : Extracting feature values Convert to a binary sequence, concatenate the binary sequences of all pixel groups in order, and finally recover the complete secret information string. .

6. The method for multidimensional dynamic privacy protection in medical images as described in claim 4, characterized in that, The chaotic sequence-based For pixel matrix Scramble the pixels to obtain the scrambled pixel group. The specific process is as follows: Chaotic sequence Sort by element value in ascending order to obtain the sort index. , Representing the position of the i-th pixel, the pixel matrix is... Convert to one-dimensional pixel vector , length is Using sorted indexes For one-dimensional pixel vectors Perform rearrangement, scramble pixel groups The Take 1 pixel The middle position is After scrambling the pixel values, we obtain a one-dimensional scrambled pixel group. .

7. The method for multidimensional dynamic privacy protection in medical images as described in claim 4, characterized in that, The scrambled pixel group Application based on chaotic sequences The specific process of generating a one-dimensional ciphertext pixel group using the diffusion algorithm based on DNA encoding is as follows: For the generated chaotic sequence The sequence is transformed as follows to obtain the sequence used for encoding and operations: in, and The range of values ​​is , These are sequences used to select DNA coding rules. It is a sequence used to select DNA decoding rules; The range of values ​​is , is a sequence used to select the type of DNA operation; The range of values ​​is , It is a key stream; For each pixel in the scrambled pixel group ,according to The current value is selected using the DNA encoding rule, which will convert the pixel value... Encoding a DNA base sequence of length 4 ; according to The current value selects the DNA encoding rule, and the key stream is... The current value is encoded as a DNA base sequence. ; according to The current value selects the DNA operation type for the DNA base sequence. and Perform the calculation to obtain the resulting DNA sequence. ; according to The current value selects the DNA decoding rule, and the sequence Decode the data into an 8-bit binary number, then combine it into a pixel value. After processing all pixels sequentially, a one-dimensional ciphertext pixel group is obtained. .

8. An electronic device, characterized in that, include: The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the multidimensional dynamic privacy protection method in medical images as described in any one of claims 1-7.

9. A computer-readable storage medium storing a computer program, characterized in that, The computer program causes the computer to execute the multidimensional dynamic privacy protection method in medical images as described in any one of claims 1-7.