Medical information privacy protection method and device based on image dual watermarking and medium
By employing a dynamic matching mechanism of high-bit mapping and modality transformation network in medical image dual watermarking technology, combined with a PVT module to achieve cross-modal semantic alignment, the problems of low-bit susceptibility to noise interference and insufficient modality transformation accuracy are solved, improving information recovery accuracy and robustness, and ensuring the integrity and concealment of diagnostic images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-10
- Publication Date
- 2026-04-14
AI Technical Summary
Existing dual-watermarking methods for medical images suffer from limitations such as low-level embedding being susceptible to noise interference and having limited capacity, high-level embedding being difficult to maintain stability, and deep feature attenuation and cross-modal semantic fragmentation during modality transformation, resulting in limited information recovery quality and insufficient robustness.
A dynamic matching mechanism is adopted to map binary ciphertext to the high bits of pixel values in medical images. Combined with the encoder-decoder architecture and PVT module in the modality transformation network, cross-modal semantic alignment is achieved through self-attention and cross-modal attention. High-bit features are logically bound to the ciphertext to enhance robustness and information recovery accuracy.
It achieves stability of high-bit mapping information under noise and compression perturbations, improves information recovery accuracy and capacity, enhances anti-attack capability, ensures the integrity and concealment of diagnostic images, and solves the problems of limited embedding capacity and cross-modal conversion accuracy.
Smart Images

Figure CN121682900B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical information security technology, and in particular to a method, device and medium for protecting medical information privacy based on dual image watermarking. Background Technology
[0002] With the rapid development of medical informatics, the digital storage and cross-institutional sharing of medical images have significantly improved the efficiency of medical services. However, their high sensitivity makes them vulnerable to cyberattacks and privacy breaches. While traditional encryption and access control technologies can provide basic protection, they struggle to balance concealment, robustness, and recovery quality in dynamic data sharing. Digital watermarking technology, which can ensure data security while achieving imperceptibility, has become a research hotspot in the field of medical informatics. In real-world medical scenarios, medical privacy information and images often coexist and require high protection; dual watermarking technology can simultaneously ensure the security and invisibility of both.
[0003] In existing technologies, dual watermarking typically involves first embedding patient privacy information into the patient's medical image to form the first layer of watermark, and then performing modal transformation on the medical image to hide the watermark, thus forming a dual watermark. During data recovery, the medical image is recovered first, and then the medical privacy data is extracted and recovered from it. However, the above approach has the following problems:
[0004] 1. In order to preserve the diagnostic value of medical images, existing technologies typically hide information in the low-order bits of the medical image when hiding privacy information in the first-layer watermark generation stage. For example, the Least Significant Bit (LSB) method is used to modify the embedded information of the low-order pixels. However, this type of method is susceptible to noise (such as Gaussian or salt-and-pepper) or compression interference, which leads to an increased bit error rate. Moreover, the capacity of the low-order embedding is limited, which is difficult to meet the hiding requirements of highly sensitive medical data. Although the high-order data is relatively stable, it directly carries organ structure, contrast and diagnostic semantics, and is more sensitive to slight disturbances. Therefore, maintaining the stability of the high-order data itself is more difficult.
[0005] 2. In existing technologies, the modality transformation methods used in the second-layer watermark generation stage are usually based on image patch feature learning. This involves decomposing the image into multiple small patches and then learning the mapping relationship between these patches. This approach suffers from deep feature attenuation and cross-modal semantic fragmentation, affecting the preservation of lesion details. Although Generative Adversarial Networks (GAN) inpainting techniques use global and local discriminative networks and can restore some details in image restoration, they neglect the high contrast and lesion sensitivity of medical images, thus limiting the restoration quality and lacking robustness under noise attacks. Summary of the Invention
[0006] This application provides a method, device, and medium for protecting medical information privacy based on dual image watermarking. It establishes a mapping relationship between the high bits of the pixel values of medical images and binary ciphertext through a dynamic matching mechanism. It introduces a pixel-level visual converter in the modality conversion network to achieve cross-modal semantic alignment, which enables the structural information carrying the high bit mapping to remain stable under modality conversion and noise / compression disturbances. This can improve the accuracy and capacity of information recovery and enhance robustness.
[0007] To achieve the above objectives, this application adopts the following technical solution:
[0008] On the one hand, embodiments of this application provide a method for protecting medical information privacy based on dual image watermarking, the steps of which include:
[0009] Step S01. Obtain the medical information to be protected and preprocess it to form binary ciphertext;
[0010] Step S02. Dynamically match and map the binary ciphertext with the high-order bits of the corresponding pixel values in the medical image bit by bit, so as to map the binary ciphertext into the medical image to form a medical image with ciphertext, and generate a mapping key;
[0011] Step S03. Input the medical image with ciphertext into the forward hiding modality transformation network to transform the input medical image with ciphertext into another modality medical image with ciphertext, so that the hidden content is not visible to the eye. The modality transformation network adopts an encoder-decoder architecture, transmits multi-scale features through skip connections, and uses a PVT module as the core processing module. The PVT module aligns the semantics of the source domain and the target domain through self-attention and cross-modal attention.
[0012] Step S04. In the recovery phase, the medical image with encrypted text obtained after the conversion in step S03 is input into the reverse recovery modal conversion network to recover the corresponding medical image, and the medical information contained therein is recovered using the mapping key. The reverse recovery modal conversion network is the reverse network of the forward hidden modal conversion network.
[0013] As a further improvement of this application, the encoder in the modality conversion network adopts a multi-layer convolutional neural network. It extracts local texture, edge and shape features of the input image through continuous convolution, activation and pooling operations to transform high-dimensional input data into low-dimensional semantic feature vectors. The deep features output from the lowest level of the encoding path are input to the PVT module. The encoding path uses multi-level cascaded convolution and downsampling modules to extract features at multiple scales. The feature map output from each level is transmitted to the decoder through skip connections and fused with the upsampled latent features of the corresponding scale. The decoder restores the spatial resolution step by step through deconvolution or upsampling layers. At each decoding level, the upsampled latent features are fused with the same-scale encoded features from the skip connections. After nonlinear transformation, the decoded features at each level are obtained.
[0014] As a further improvement of this application, the PVT module includes an input embedding layer, a positional encoding layer, and a Transformer encoder stack. The input embedding layer unfolds the two-dimensional feature map output by the encoder along the spatial dimension into a labeled sequence and obtains the sequence features through linear mapping. The positional encoding layer explicitly preserves the pixel-level spatial topological relationships by performing two-dimensional Fourier positional encoding on the sequence features. The Transformer encoder stack is composed of multiple encoder blocks connected in series. Each encoder block contains a normalization layer, a multi-head self-attention module, and a feedforward neural network. The feature transfer and training process is stabilized through residual connections. Layered attention is used in the stack, where the shallow layer uses local windows to capture texture edges, the middle layer uses deformable attention to establish organ-level associations, and the deep layer uses global sparse attention to form cross-modal semantic mappings. The sequence features processed by the encoder stack are then reconstructed into a two-dimensional feature map through linear mapping and passed to the decoding path for subsequent reconstruction and modality transformation.
[0015] As a further improvement to this application, step S02 includes:
[0016] Step S201. High-level information extraction: Traverse the pixel matrix of the medical image , , Representing the number of rows and columns of the matrix, respectively, and representing the pixel value in the matrix. Convert to a binary string and extract the first few characters. High-position feature segment composed of 1 , , These represent row and column indices, respectively.
[0017] Step S202. Dynamic binary matching mapping: This involves mapping the binary ciphertext... according to The ciphertext segment is obtained by dividing the bit length into multiple segments. ,in Each encrypted segment High-level characteristic segment According to each k Perform a sliding window search to find consecutive substrings that are equal digit by digit, and record the starting position of the match. Matching length with the current segment The process iterates through pixels until all ciphertext segments are matched, then combines the matched information to form the mapping key. , The matching information includes the matched binary ciphertext and the binary pixel value information of the medical image;
[0018] Step S203. Mapping Key Encapsulation: Using the recipient's public key For the mapping key Asymmetric encryption is performed to obtain the encapsulated mapping key. .
[0019] As a further improvement to this application, the matching information includes the matched binary ciphertext and the binary pixel value information of the medical image, which constitute the mapping key. The calculation expression is:
[0020] ,
[0021] in, Indicates the first The mapping key corresponding to each pixel value secret This represents the binary ciphertext that needs to be hidden. image Represents the binary pixel values of a medical image. and These refer to the starting position and mapping length of the information in the pixel, respectively. Indicating the first in a medical image Each pixel value.
[0022] As a further improvement to this application, in step S04, the hidden binary information is extracted from the recovered medical image using a mapping key, including:
[0023] Step S401. Key decryption: using your own private key For the encrypted mapping key Decryption yields the original mapping key. ;
[0024] Step S402. High-order pixel extraction: Traverse the recovered medical image pixel matrix , each pixel value Convert to binary string Before extraction k The high-position feature segment is composed of the position. ;
[0025] Step S403. Ciphertext Reconstruction: Reconstruct the high-order feature segments According to length Perform segmentation and mapping of the key. Divide into two-digit groups, with the first digit corresponding to the starting position. The second digit corresponds to the length. and with each high-bit feature segment The extracted binary information is then combined to recover the privacy information. ;
[0026] Step S404. Error Correction Decoding: Recover the privacy information Error correction and decoding are performed to obtain the final recovered privacy information.
[0027] As a further improvement of this application, before the encoder in the inverse recovery mode conversion network, a denoising network block is also included to denoise the input features. This denoising network block combines image features of multiple different scales, and obtains the denoised features through dynamic weighting and fusion of multi-scale features. The calculation expression is as follows:
[0028] ,
[0029] ,
[0030] in, For input features, The output characteristics after noise reduction processing. For convolution operations, For splicing operations, Indicates the scale number. Indicates the scale quantity. Indicates the first Output features of each scale branch.
[0031] As a further improvement of this application, both the forward hiding modality transfer network and the inverse recovery modality transfer network are equipped with a discriminator network to determine whether the converted image is real. The forward hiding modality transfer network and the inverse recovery modality transfer network use the following loss function during training:
[0032] ,
[0033] in, For the overall loss function, Let the cycle consistency loss function be... for loss function Let be the semantic consistency loss function for anatomical structures. These are the loss functions for optimizing the discriminator. For discriminator, The loss function for the denoising network block. For secret medical image domain, For dense medical image domain, For mode conversion networks, For noise reduction network blocks;
[0034] ,
[0035] ,
[0036] ,
[0037] ,
[0038] ,
[0039] ,
[0040] ,
[0041] ,
[0042] in, For secret medical image domain The real input image, namely, a secret medical image. For dense medical image domain The actual input image, i.e., a dense medical image. for The paradigm is used to calculate the difference between the original image and the transformed and restored image. These are the weighting coefficients. Expressing expectations, , , , These are secret medical images. From secret medical images Generated target domain pseudo-image , containing medical images and medical images containing density Generated source domain pseudo-image In the Feature vectors at each position This is used to prevent positive numbers with a denominator of 0.
[0043] On the other hand, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the method as described above.
[0044] On the other hand, embodiments of this application also provide a storage medium storing a computer program that, when executed, implements the steps of the above-described method.
[0045] Compared with the prior art, this application has the following advantages:
[0046] 1. This application addresses the characteristics of medical data requiring lossless recovery and high-capacity embedding. It employs a high-bit mapping method to efficiently match large-capacity data without modifying pixel values at this stage. Leveraging the inherent stability of high-bit data, it establishes an intrinsic connection between the data and the image, achieving semantic binding. The original matching region can be accurately located via a key, thus avoiding the cumulative errors caused by low-bit random perturbations in traditional methods and preserving the diagnostic integrity of the image. The dual binding of high-bit features and ciphertext logic also enhances anti-attack capabilities, ensuring the integrity and concealment of diagnostic images, thereby improving the accuracy of privacy information recovery. Furthermore, the use of dynamic matching and lightweight key design significantly improves robustness and efficiency, solving the problem of limited embedding capacity and meeting the concealment requirements of highly sensitive medical data.
[0047] 2. This application addresses the needs of high-contrast, lesion-sensitive, and complex noisy environments in medical images. After mapping medical information onto medical images to form dense medical images, the dense medical images are transformed using a modality transformation network based on a PVT module. This modality transformation network, based on an encoder-decoder architecture, introduces a pixel-level visual transformer (PVT) module as the core processing module. Through self-attention mechanism and cross-modal attention collaborative modeling of global dependencies and local fine-grained features, it can achieve pixel-by-pixel semantic pairing and transformation and recovery under anatomical region constraints in modality transformation, realizing cross-modal semantic alignment. This allows the region carrying the high-level mapping to maintain intensity order and boundary continuity even under window width / window level adjustment, intensity standardization, and noise interference. From the structural and process level, it cooperates with high-level matching to achieve pixel-by-pixel semantic pairing and transformation and recovery under anatomical region constraints, improving the limitations of "indirect alignment + hierarchical feature compression" and helping to improve the accuracy and security of cross-modal transformation. Attached Figure Description
[0048] The present application will be described in more detail below based on embodiments and with reference to the accompanying drawings. Wherein:
[0049] Figure 1 This is a schematic diagram illustrating the implementation process of the medical information privacy protection method based on dual image watermarking in this application embodiment.
[0050] Figure 2 This is a schematic diagram illustrating the overall architecture principle of medical information privacy protection based on dual image watermarking in the embodiments of this application.
[0051] Figure 3 This is a schematic diagram of the mode conversion network in an embodiment of this application.
[0052] Figure 4 This is a schematic diagram of the structure of the PVT module in the embodiments of this application.
[0053] Figure 5 This is a structural schematic diagram of the noise reduction module in the application embodiment.
[0054] Figure 6 This is a schematic diagram illustrating the implementation principle of the loss function in the embodiments of this application. Detailed Implementation
[0055] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments, but this does not limit the scope of protection of the present application.
[0056] This embodiment takes the dual protection and high-quality recovery of patient privacy information and patient medical images in a medical privacy protection scenario as an example. (See also...) Figure 1 The detailed steps of the medical information privacy protection method based on image dual watermarking are as follows:
[0057] Step S01. Obtain the medical information to be protected and preprocess it to form binary ciphertext.
[0058] In this embodiment, the medical information to be protected can specifically be the patient's personal medical information. First, the patient's medical information can be converted into binary data using methods such as ASCII encoding. Then, the binary data is preprocessed using methods such as Reed-Solomon codes (RS-codes) to generate binary ciphertext. RS codes are based on finite field theory, using a polynomial generator matrix to encode privacy information, and decoding is based on root-based error correction, which can generate binary ciphertext with error correction capabilities, achieving highly reliable recovery within a certain range and improving the fault tolerance of hidden data during transmission or storage.
[0059] Step S02. Perform bit-by-bit matching and mapping between the binary ciphertext and the high-order bits of the corresponding pixel values in the medical image to map the binary ciphertext into the medical image to form a medical image with ciphertext, and generate a mapping key.
[0060] In this embodiment, a high-bit mapping method based on a binary dynamic matching mechanism of medical privacy information and medical images is adopted to establish a mapping relationship between ciphertext and pixel high bits. The binary ciphertext is matched and mapped bit by bit with the binary high bits of the pixel values in the medical image, thereby mapping the binary ciphertext that needs to be hidden and protected to the patient's medical image, forming a medical image with ciphertext, and generating a lightweight location key at the same time.
[0061] The higher-order bits are more stable during transmission, and medical images require pixel values to remain unchanged to preserve diagnostic value. This application employs a higher-order bit mapping method to efficiently match large-capacity data while ensuring concealment. Furthermore, it embeds information without modifying pixel values, unlike traditional steganography methods (such as LSB, QIM, and DCT domain embedding) which suffer from image distortion and high error rates in embedded information. This application leverages the inherent stability of the higher-order bits to establish an intrinsic connection between data and the image, achieving semantic binding. Even if the image undergoes lossy operations, as long as the higher-order bits do not jump, the original matching region can be accurately located using the key. This avoids the accumulated errors caused by random perturbations in lower-order bits in traditional methods, preserving the diagnostic integrity of the image. The dual binding of higher-order features and ciphertext logic enhances anti-attack capabilities, ensuring the integrity and concealment of diagnostic images and improving the accuracy of privacy information recovery. Simultaneously, the use of dynamic matching and lightweight key design significantly improves robustness and efficiency, solving the problem of limited embedding capacity and meeting the concealment requirements of highly sensitive medical data.
[0062] As an optional implementation, the step of performing bit-by-bit matching and mapping between the binary ciphertext and the high-order bits of the corresponding pixel values in the medical image, and generating a mapping key, includes:
[0063] Step S201. High-level information extraction: Traverse the pixel matrix of the medical image , , Representing the number of rows and columns of the matrix, respectively, and representing the pixel value in the matrix. Convert to a binary string and extract the first few characters. High-position feature segment composed of 1 , , These represent row and column indices, respectively.
[0064] Step S202. Dynamic binary matching mapping: This involves mapping the binary ciphertext... according to The ciphertext segment is obtained by dividing the bit length into multiple segments. ,in Each encrypted segment High-level characteristic segment According to each kPerform a sliding window search to find consecutive substrings that are equal digit by digit, and record the starting position of the match. Matching length with the current segment The process iterates through the pixels until the entire ciphertext segment is matched; that is, if the target exists... This makes it possible for all All satisfied If the match is successful, then each matching segment is combined to form the mapping key. The matching information includes the matched binary ciphertext and the binary pixel value information of the medical image;
[0065] Step S203. Mapping Key Encapsulation: Using the recipient's public key Mapping key Asymmetric encryption is performed to obtain the encapsulated mapping key. .
[0066] Specifically, in step S202, for each ciphertext segment... According to each When performing a matching search, the high-bit feature segment sequence of the current pixel... China and Israel Perform a sliding window search with a step size of 1 to find consecutive segments that are related to the current ciphertext segment. When substrings are identical digit by digit, record the corresponding starting position. and matching length Iterate through all pixels in sequence until the entire ciphertext segment is matched. If there exists a certain This makes it possible for all All satisfied If the match is successful, it is recorded as a successful match. .
[0067] In this embodiment, the mapping key is constituted. The calculation expression is:
[0068] ,
[0069] in, Indicates the first The pixel value (corresponding to the first pixel value) The mapping key corresponding to each ciphertext segment. secret This represents the binary ciphertext that needs to be hidden. image Represents the binary pixel values of a medical image. and These refer to the starting position and mapping length of the information in the pixel, respectively. Indicating the first in a medical image Each pixel value.
[0070] Specifically, in the matching mapping process, a sequential traversal is used to process each pixel value of the medical image in turn. Binary expansion is performed, employing a high-bit matching strategy. Since the high 4 bits possess statistical stability, the binary ciphertext is processed through a sliding window to find consecutive matching segments in the high 4-bit sequence of pixels, recording their positions and lengths as a lightweight mapping key. This process continues until all information data is mapped. Finally, the lightweight mapping key is transmitted using asymmetric encryption. A specific implementation can employ the high-bit information mapping algorithm shown in Table 1 (Algorithm 1).
[0071] Table 1: High-level information mapping algorithm
[0072]
[0073] Step S03. Input the medical image with ciphertext into the forward hiding modality transformation network to transform the input medical image with ciphertext into another modality medical image with ciphertext, so that the hidden content is not visible to the eye. The modality transformation network adopts an encoder-decoder architecture, passes multi-scale features through skip connections, and uses the PVT module as the core processing module. The PVT module aligns the semantics of the source domain and the target domain through self-attention and cross-modal attention.
[0074] The modality transfer network consists of a forward-hiding modality transfer network and an inverse-recovery modality transfer network. These two networks exist in pairs and have essentially the same structure to achieve mutual conversion between different modalities of medical images. Skip connections are used to transfer multi-scale features, such as... Figure 2 As shown, the inverse recovery modal transformation network is the inverse of the forward hiding modal transformation network. The forward hiding modal transformation network is used to add binary ciphertext to the original medical image and convert it into a ciphertext-containing medical image during the privacy data protection stage. The inverse recovery modal transformation network is used to restore the ciphertext-containing medical image to the original medical image during the privacy data recovery stage.
[0075] The modality transfer network employs an encoder-decoder architecture, consisting of an encoder, a decoder, and a core processing module. Based on this architecture, it can efficiently extract key information from the input image and compress it into a low-dimensional latent representation. Then, it progressively reconstructs and generates the target domain image based on these latent features. For example... Figure 3As shown in this embodiment, the encoder in the modality transfer network employs a multi-layer convolutional neural network. It extracts local texture, edge, and shape features from the input image through continuous convolution, activation, and pooling operations to transform high-dimensional input data into low-dimensional semantic feature vectors. The deep features output from the lowest level of the encoding path are then input to the PVT module. The decoder gradually recovers the latent features into a high-dimensional image through deconvolution or upsampling layers. Furthermore, it fuses the multi-scale information extracted by the encoder with the details generated by the decoder through non-linear activation functions and skip connections. Skip connection technology is used between the encoder and decoder to directly pass the high-level, multi-scale features extracted during the encoding process to the corresponding layer of the decoder. This effectively alleviates the information loss problem caused by relying solely on low-dimensional latent representations, preserving the texture and structural details of lesion areas in medical images.
[0076] In this embodiment, the encoding path employs multi-level (e.g., four-level) cascaded convolutional and downsampling modules for multi-scale feature extraction. The feature map output from each level is transmitted to the decoding layer via skip connections and fused with the corresponding latent features. Specifically, the input image is first converted to a dimension of [dimension value missing]. The initial feature tensor, where , These represent the width and height of the feature map, respectively. The initial feature dimension is used, and this feature tensor is then processed by four downsampling modules: each downsampling block halves the feature map spatial resolution (width and height), with the first downsampling block keeping the feature dimension unchanged, and the last three downsampling blocks increasing the feature dimension to [value missing]. The final output dimension is The encoded features are used as input to the PVT module for depth processing. The feature map output from each level of the encoder is transmitted to the corresponding scale of the decoder via skip connections and fused with the upsampled latent features at that scale. The decoder first recovers the spatial resolution step-by-step through deconvolution or upsampling, and then at each decoding level, fuses the upsampled latent features with the same-scale encoded features from the skip connections. A nonlinear activation function is then used to perform a nonlinear transformation on the fused response, effectively coupling the multi-scale structural information retained in the encoding stage with the gradually generated detail information in the decoding stage, ensuring high-fidelity restoration of the structural contours and local textures in the output image. The computational expression for the above process can be represented as:
[0077] ,
[0078] in, For the s-th level decoding feature, For features of the same scale at the encoding end, For a deeper level of potential features, For upsampling / deconvolution, For channel-dimensional integration, To fuse the mapping convolution operator, It is a non-linear activation function.
[0079] Traditional medical modality transformation methods typically employ architectures such as UNet, ResNet, and CycleGAN, which suffer from problems such as implicit semantic alignment, difficulty in precisely controlling the alignment process, and structural drift in the restored images. In this embodiment, the core processing module between the encoder and decoder uses a PVT module. By introducing a pixel-level visual transducer (PVT) module as the core processing module and employing an explicit PVT mapping mechanism, pixel-by-pixel semantic pairing and transformation and restoration under anatomical region constraints can be achieved. This overcomes the "indirect alignment + hierarchical feature compression" mode of traditional modality transformation networks, replacing the bias problem of traditional implicit alignment and improving the accuracy and safety of cross-modal transformation. The PVT module integrates self-attention and cross-modal attention mechanisms. The former is used to capture long-distance dependencies between pixels within a modality (such as spatial relationships between multiple organs) to maintain global structural consistency, while the latter achieves precise local pixel-level semantic mapping by explicitly calculating the semantic similarity of pixel pairs between the original and target modalities (such as the feature matching degree of corresponding anatomical regions in CT and MRI), aligning the source and target domains and avoiding the alignment bias caused by implicit mapping in traditional methods.
[0080] like Figure 4 As shown, the PVT module in this embodiment includes an input embedding layer, a position encoding layer, and a Transformer encoder stack. It achieves global dependency modeling through a self-attention mechanism and combines a hierarchical feature processing mechanism to achieve precise control of cross-modal image transformation. First, the embedding layer inputs the low-level features of the 2D feature map output by the encoder to generate a sequence of structured feature vectors. Then, it uses 2D Fourier positional encoding to explicitly preserve pixel-level spatial topological relationships, replacing the traditional convolutional strategy of implicitly learning positional information. This effectively alleviates structural distortion caused by downsampling. This sequence is then input into a Transformer encoder stack consisting of multiple Transformer encoder blocks. Each encoder contains a normalization layer, a multi-head pixel attention module (MSA), and an extended feedforward neural network. A pixel-wise attention mechanism enables multi-granularity feature modeling: the shallow module focuses on capturing detailed features such as tissue texture and edge sharpness through local receptive field constraints, and enhances the continuity of anatomical boundaries using neighborhood context modeling; the middle module gradually expands the attention range, establishing organ-level semantic associations to achieve component-level representation of anatomical structures; and the deep module constructs cross-modal semantic mapping relationships through a global self-attention mechanism, forming a high-level semantic expression with global consistency.
[0081] Specifically, the processing flow of the PVT module includes: first, unfolding the two-dimensional feature map along the spatial dimension into... eigenvectors, forming a length of ... A sequence of tokens, each token carrying Dimensional feature information; then append dimensional feature information to each token. Two-dimensional Fourier positional encoding of the token dimension is expanded to [dimensionality] through feature concatenation. Then, the data is fed into a multi-layer Transformer encoder stack. Each layer consists of a multi-head self-attention module, a feedforward network, residuals, and normalization. The multi-head self-attention module models long-range dependencies and global consistency within the domain. The stack employs layered attention: shallow local windows capture texture edges, mid-layer deformable attention establishes organ-level associations, and deep global sparse attention forms cross-modal semantic mappings. This is combined with cross-modal attention gating and anatomical mask-guided loss to achieve explicit alignment of the source / target domains. The encoder stack output is linearly projected onto... The dimension is then reshaped back into a two-dimensional feature map, which is then fused with the decoding path and skip connections to complete a high-fidelity conversion.
[0082] Specifically, the token sequence During the modeling process using the Transformer encoder stack, the encoder stack contains 12 cascaded encoder blocks, each of which sequentially includes a normalization encoder. Bullish Self-Attention Residual summation, normalization, feedforward neural network And the structure of residual summation, its calculation process can be expressed as follows:
[0083] ,
[0084] ,
[0085] in, For normalization operations, The scaling factor is a learnable scaling factor; it is introduced by employing the ReZero regularization strategy. Dynamically adjust the weights of residual branches.
[0086] Multi-head self-attention with token sequence Linear projection constructs queries, keys, and values:
[0087] ,
[0088] The output is obtained through the following attention calculation:
[0089] ,
[0090] in, For querying the matrix, The key matrix, For value matrices, , , The projective matrix is learnable. For single-head feature dimensions, the multi-head mechanism concatenates the outputs of each attention head and linearly maps them to obtain... Each encoder is configured with the following key dimension parameter: basic feature dimension. Location encoding dimension Projection feature dimension Hidden layer dimension of feedforward network The feature sequence processed by the Transformer is then restored to its original feature dimensions through linear projection. And reconstruct it into a two-dimensional feature map. Passed to the decoding path.
[0091] Step S04. In the recovery phase, the medical image with ciphertext obtained after the conversion in step S03 is input into the reverse recovery modal conversion network to recover the corresponding medical image, and the medical information contained therein is recovered using the mapping key. The reverse recovery modal conversion network is the reverse network of the forward hidden modal conversion network.
[0092] In this embodiment, the step of extracting hidden binary information from the recovered medical image using a mapping key includes:
[0093] Step S401. Key decryption: using your own private key For the encrypted mapping key Decryption yields the original mapping key. ;
[0094] Step S402. High-order pixel extraction: Traverse the recovered medical image pixel matrix , each pixel value Convert to binary string Before extraction k The high-position feature segment is composed of the position. ;
[0095] Step S403. Ciphertext Reconstruction: Reconstruct the high-order feature segments According to length Perform segmentation and mapping of the key. Divide into two-digit groups, with the first digit corresponding to the starting position. The second digit corresponds to the length. and with each high-bit feature segment The extracted binary information is then combined to recover the privacy information. ;
[0096] Step S404. Error Correction Decoding: Recover the privacy information Error correction and decoding are performed to obtain the final recovered privacy information.
[0097] Specifically, the encrypted mapping key is first decrypted using the user's private key. The mapping key is then used to precisely extract hidden binary information from the recovered medical images. Finally, this information is passed to the Reed-Solomon error correction code module for error correction and decoding. Leveraging its powerful error correction capabilities, through redundant verification and error correction, the original patient privacy data is fully restored. A specific implementation can employ the high-order information extraction algorithm (Algorithm 2) shown in Table 2.
[0098] Table 2: High-level information extraction algorithm
[0099]
[0100] In this embodiment, before the encoder in the inverse recovery modality conversion network, a denoising network block is used to denoise the input features. That is, before inputting to the encoder of the conversion network, the input features are first processed by the denoising network block to prevent noise attacks during transmission that could prevent proper recovery. Traditional modality conversion or watermarking methods often do not consider the impact of transmission noise interference or treat denoising as a post-processing step, which carries the risk of disconnect and distortion. This embodiment improves overall robustness by embedding the denoising process into the main path of the conversion network. Figure 5 As shown, the denoising network block combines image features of various scales and obtains denoised features through dynamic weighting and fusion of multi-scale features, which can enhance the network's ability to repair noise. During the processing, the network can capture local information of the image at different scales and effectively repair pixel loss or anomalies caused by noise, thereby restoring the structure and details of the image.
[0101] The computational expression for the denoising network block can be represented as:
[0102] ,
[0103] ,
[0104] in, For input features, The output characteristics after noise reduction processing. For convolution operations, For splicing operations, This represents a non-linear activation function. Indicates the scale number. To represent the scale quantity, specifically, we can take... This corresponds to five branches from five different scales. Indicates the first Output features of each scale branch.
[0105] The two modality transformation networks (forward hiding modality transformation network and inverse recovery modality transformation network) correspond to the hiding and extraction stages respectively. The inverse recovery modality transformation network also integrates a multi-scale noise reduction module to repair noise. The two modality transformation networks need to be trained simultaneously. They can be jointly trained in advance using adversarial training. Both networks have corresponding discriminator networks to judge whether the transformed image is real. The adversarial training method ensures that the security of personal medical images can be effectively protected.
[0106] Loss function design is a crucial part of constraining the network to achieve the conversion between different modalities of medical images, thereby achieving effective privacy protection and image restoration. A single loss function is insufficient to balance privacy protection and image quality, such as... Figure 6 As shown, this embodiment comprehensively considers cycle consistency loss, GAN loss, optimized discriminator loss, and noise reduction module loss to form an overall loss function, which can ensure high-fidelity reconstruction of medical images, cross-modal semantic consistency, and noise robustness. Here, A and B represent real samples in the two domains, corresponding to the secret medical image domain X and the cryptic medical image domain Y, respectively. Discriminators acting on domains A and B (i.e., domains X and Y) are used to distinguish between real and generated images. A' and B' represent pseudo samples output by the generator, where A' is the result of transforming a sample from domain B to domain A (B→A), and B' is the result of transforming a sample from domain A to domain B (A→B). C B C For the cycle-consistent reconstruction graph, A C Reconstructing the loop from A→B'→A, for Loss_CycleA, B C For loop closure reconstruction of B→A'→B, Loss_CycleB is used. Loss_DisA represents the loss of the A discriminator, Loss_DisB represents the loss of the B discriminator, Loss_GerA and Loss_GerB represent the adversarial loss (GAN loss) of the generator, corresponding to the B→A and A→B directions respectively, to make the generated result more "realistic" in the target domain. Loss_CycleA and Loss_CycleB represent the cycle consistency loss to measure the loop closure reconstruction error (A→B'→A and B→A'→B), ensuring that the original image can be returned after cross-domain transformation. Loss_noise is the noise reduction loss to resist transmission noise and improve robustness.
[0107] Specifically, since network training does not rely on paired data but achieves image domain transformation through unsupervised learning, cycle consistency loss is needed to ensure the effectiveness and reversibility of the transformation process. Cycle consistency loss ensures that the image transformed by the two generators can be restored to the original image. The cycle consistency loss is as follows:
[0108] ,
[0109] in, For secret medical image domain The real input image, namely, a secret medical image. For dense medical image domain The actual input image, i.e., a dense medical image. for The paradigm is used to calculate the difference between the original image and the transformed and restored image. , These are the weighting coefficients. For secret medical image domain, For dense medical image domain, It is a mode conversion network.
[0110] exist In this model, the generator and discriminator continuously optimize each other through adversarial learning, with the goal of making the generated images increasingly realistic, to the point that the discriminator cannot distinguish between the generated and real images. Specifically, The loss function can be expressed as:
[0111] ,
[0112] in, For the discriminator, there is a specific target for the image domain. With image domain The network employs two discriminators to optimize the generation of more realistic, privacy-protected medical images by evaluating the generated images. By combining these two loss functions, the network ensures the diversity of the generated medical images while accurately recovering privacy data, thus guaranteeing information integrity during the concealment and recovery processes.
[0113] To address the issues of anatomical structure drift and cross-modal semantic fragmentation that easily occur in medical images during modality conversion, this embodiment further designs an anatomical structure semantic consistency loss function. This function measures the structural semantic differences within organ / anatomical regions before and after modality transfer, revealing the semantic distribution between the aligned medical modality domain and the target medical image domain. This reduces detail loss and content distortion, contributing to accurate semantic transfer. The specific implementation of this loss function is as follows:
[0114] ,
[0115] ,
[0116] ,
[0117] in, Cosine similarity, i.e. , , , , Secret medical images x From secret medical images Generated target domain pseudo-image , containing medical images and medical images containing density Generated source domain pseudo-image x In the Feature vectors at each position The value should be a very small positive number to prevent the denominator from being 0.
[0118] Furthermore, the loss function for optimizing the discriminator can be expressed as:
[0119] ,
[0120] ,
[0121] in, It expresses expectation.
[0122] To address noise attacks, this embodiment also designs a dedicated denoising loss function to measure the error between the original clear image and the noise level. This allows for continuous adjustment of network parameters through backpropagation, driving the model to learn how to effectively suppress and remove noise. This loss function optimizes the performance of the denoising network and improves system robustness. The specific implementation of this loss function is as follows:
[0123] ,
[0124] in, This is a noise reduction network block, and it simulates noise that may exist during transmission to attack the modally converted medical image.
[0125] Furthermore, by combining the above losses, the overall loss function for the training process of the forward-hiding mode transition network and the inverse-recovery mode transition network is as follows:
[0126] ,
[0127] in, Let be the semantic consistency loss function for anatomical structures. For the overall loss function, Let the cycle consistency loss function be... for loss function , These are the loss functions for optimizing the discriminator. The loss function for the denoising network block.
[0128] This embodiment adopts the above-mentioned loss function, comprehensively considering the cycle consistency loss, While incorporating loss, anatomical structure semantic consistency loss, and discriminator optimization loss, the noise reduction process is embedded into the main path of the transformation network and optimized synchronously during the training phase. This effectively ensures high-fidelity reconstruction of medical images, cross-modal semantic consistency, and noise robustness, thereby improving overall robustness and practicality.
[0129] In summary, this application addresses the needs of high contrast, lesion sensitivity, and complex noise environments in medical images. After mapping medical information onto the medical image to form a dense medical image, the dense medical image is subjected to modality transformation using a modality transformation network based on a PVT module. This modality transformation network, based on an encoder-decoder architecture, introduces a pixel-level visual transducer (PVT) module as the core processing module. Through self-attention and cross-modal attention mechanisms, it collaboratively models global dependencies and local fine-grained features, achieving cross-modal semantic alignment during modality transformation. Considering the specific requirements of lossless recovery and high-capacity embedding of medical data, a high-bit mapping method based on dynamic matching of medical privacy information and binary data in the medical image is adopted. A dynamic matching mechanism establishes the mapping relationship between the high bits of the medical image pixel values and the binary ciphertext, and records the matching positions to form a lightweight key for extraction and recovery. This decouples the dependence on privacy information recovery from changes in low-bit pixel values, effectively improving recovery accuracy. Further integration of a denoising network block combined with multi-scale convolutional information to repair noise further enhances overall robustness.
[0130] This application is applicable to the dual protection and high-quality recovery of patient privacy information and medical images in medical privacy protection scenarios, and can also be applied to other types of medical privacy information and medical images.
[0131] This application also provides a phase-calibrated power signal noise level estimation, including a processor and a memory, the memory for storing a computer program and the processor for executing the computer program to perform the method described above.
[0132] This application also provides a storage medium storing a computer program that, when executed, performs the above steps.
[0133] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0134] Although this application has been described with reference to preferred embodiments, various modifications can be made thereto and components can be replaced with equivalents without departing from the scope of this application. In particular, the technical features mentioned in the various embodiments can be combined in any manner, provided there is no structural conflict. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for protecting medical information privacy based on dual image watermarking, characterized in that the steps include... include: Step S01. Obtain the medical information to be protected and preprocess it to form binary ciphertext; Step S02. Dynamically match and map the binary ciphertext with the high-order bits of the corresponding pixel values in the medical image bit by bit, so as to map the binary ciphertext into the medical image to form a medical image with ciphertext, and generate a mapping key; Step S03. Input the medical image with ciphertext into the forward hiding modality transformation network to transform the input medical image with ciphertext into another modality medical image with ciphertext, so that the hidden content is not visible to the eye. The modality transformation network adopts an encoder-decoder architecture, transmits multi-scale features through skip connections, and uses a PVT module as the core processing module. The PVT module aligns the semantics of the source domain and the target domain through self-attention and cross-modal attention. Step S04. In the recovery phase, the medical image with encrypted text obtained after the conversion in step S03 is input into the reverse recovery modal conversion network to recover the corresponding medical image, and the medical information contained therein is recovered using the mapping key. The reverse recovery modal conversion network is the reverse network of the forward hidden modal conversion network.
2. The medical information privacy protection method based on dual image watermarking according to claim 1, characterized in that, In the modality transformation network, the encoder employs a multi-layer convolutional neural network. Through continuous convolution, activation, and pooling operations, it extracts local texture, edge, and shape features from the input image to transform high-dimensional input data into low-dimensional semantic feature vectors. The deep features output from the lowest level of the encoding path are then input into the PVT module. The encoding path uses multi-level cascaded convolution and downsampling modules for multi-scale feature extraction. The feature map output from each level is transmitted to the decoder via skip connections and fused with the upsampled latent features of the corresponding scale. The decoder then restores the spatial resolution step by step through deconvolution or upsampling layers. At each decoding level, the upsampled latent features are fused with the same-scale encoded features transmitted from the skip connections. After nonlinear transformation, the decoded features at each level are obtained.
3. The medical information privacy protection method based on dual image watermarking according to claim 1, characterized in that, The PVT module includes an input embedding layer, a position encoding layer, and a Transformer encoder stack. The input embedding layer unfolds the two-dimensional feature map output by the encoder into a labeled sequence along the spatial dimension and obtains the sequence features through linear mapping. The positional encoding layer explicitly preserves pixel-level spatial topological relationships by performing two-dimensional Fourier positional encoding on the sequence features. The Transformer encoder stack consists of multiple encoder blocks connected in series. Each encoder block contains a normalization layer, a multi-head self-attention module, and a feedforward neural network. The feature transfer and training process is stabilized through residual connections. The stack employs hierarchical attention, where the shallow layer uses local windows to capture texture edges, the middle layer uses deformable attention to establish organ-level associations, and the deep layer uses global sparse attention to form cross-modal semantic mappings. The sequence features processed by the encoder stack are then reconstructed into a two-dimensional feature map through linear mapping and passed to the decoding path for subsequent reconstruction and mode conversion.
4. The medical information privacy protection method based on dual image watermarking according to claim 1, characterized in that, Step S02 includes: Step S201. High-level information extraction: Traverse the pixel matrix of the medical image , , Representing the number of rows and columns of the matrix, respectively, and representing the pixel value in the matrix. Convert to a binary string and extract the first few characters. High-position feature segment composed of 1 , , These represent row and column indices, respectively. Step S202. Dynamic binary matching mapping: This involves mapping the binary ciphertext... according to The ciphertext segment is obtained by dividing the bit length into multiple segments. ,in Each encrypted segment High-level characteristic segment According to each Perform a sliding window search to find consecutive substrings that are equal digit by digit, and record the starting position of the match. Matching length with the current segment The process iterates through pixels until all ciphertext segments are matched, then combines the matched information to form the mapping key. , The matching information includes the matched binary ciphertext and the binary pixel value information of the medical image; Step S203. Mapping Key Encapsulation: Using the recipient's public key For the mapping key Asymmetric encryption is performed to obtain the encapsulated mapping key. .
5. The medical information privacy protection method based on dual image watermarking according to claim 4, characterized in that, The matching information includes the matched binary ciphertext and the binary pixel value information of the medical image, which constitute the mapping key. The calculation expression is: , in, Indicates the first The mapping key corresponding to each pixel value secret This represents the binary ciphertext that needs to be hidden. image Represents the binary pixel values of a medical image. and These refer to the starting position and mapping length of the information in the pixel, respectively. Indicating the first in a medical image Each pixel value.
6. The medical information privacy protection method based on image dual watermarking according to any one of claims 1 to 5, characterized in that, In step S04, hidden binary information is extracted from the recovered medical image using a mapping key, including: Step S401. Key decryption: using your own private key For the encrypted mapping key Decryption yields the original mapping key. ; Step S402. High-order pixel extraction: Traverse the recovered medical image pixel matrix , each pixel value Convert to binary string Before extraction The high-position feature segment is composed of the position. ; Step S403. Ciphertext Reconstruction: Reconstruct the high-order feature segments According to length Perform segmentation and mapping of the key. Divide into two-digit groups, with the first digit corresponding to the starting position. The second digit corresponds to the length. and with each high-bit feature segment The extracted binary information is then combined to recover the privacy information. ; Step S404. Error Correction Decoding: Recover the privacy information Error correction and decoding are performed to obtain the final recovered privacy information.
7. The medical information privacy protection method based on image dual watermarking according to any one of claims 1 to 6, characterized in that, Before the encoder in the inverse recovery mode conversion network, a denoising network block is used to denoise the input features. This denoising network block combines image features of multiple scales, obtaining the denoised features through dynamic weighting and fusion of multi-scale features. The calculation expression is as follows: , in, For input features, The output characteristics after noise reduction processing. For convolution operations, For splicing operations, Indicates the scale number. Indicates the scale quantity. Indicates the first Output features of each scale branch.
8. The medical information privacy protection method based on image dual watermarking according to any one of claims 1 to 6, characterized in that, Both the forward hiding mode conversion network and the reverse recovery mode conversion network are equipped with a discriminator network to determine whether the converted image is real. The forward-hiding modality transfer network and the inverse-recovering modality transfer network use the following loss function during training: , in, For the overall loss function, Let the cycle consistency loss function be... for loss function Let be the semantic consistency loss function for anatomical structures. These are the loss functions for optimizing the discriminator. For discriminator, The loss function for the denoising network block. For secret medical image domain, For dense medical image domain, For mode conversion networks, For noise reduction network blocks; , , , , , , , , in, For secret medical image domain The real input image, namely, a secret medical image. For dense medical image domain The actual input image, i.e., a dense medical image. for The paradigm is used to calculate the difference between the original image and the transformed and restored image. These are the weighting coefficients. Expressing expectations, , , , These are secret medical images. From secret medical images Generated target domain pseudo-image , containing medical images and medical images containing density Generated source domain pseudomap In the Feature vectors at each position To prevent positive numbers with a denominator of 0, Let be the cosine similarity.
9. An electronic device comprising a processor and a memory, the memory being used to store a computer program, characterized in that, The processor is used to execute the computer program to perform the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Medical image identity confusion sharing method and system, terminal equipment and storage medium
CN115914488A
Multi-Modal Tone-Mapping of Images
US20100226547A1