Digital image steganography method and system based on generative adversarial network
Through the adaptive information embedding and real-time feedback mechanism of the generated adversarial network, the problems of insufficient concealment and high complexity in the steganography method are solved, and efficient and secure information embedding and evaluation are achieved to adapt to the lighting changes and noise influences of different image types.
Patent Information
- Application Number
- CN202510318031.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-11
AI Technical Summary
The existing steganography methods are insufficient in terms of concealment and information capacity, and have high complexity in processing high-resolution images, which cannot adapt to the lighting changes and noise influences of different types of images, resulting in steganography information being easily detected and cracked, and the image quality evaluation is incomplete.
Adaptive information embedding strategy is constructed using generative adversarial networks, and through adversarial training generators and discriminators, combined with real-time feedback mechanisms, the embedding strategy is dynamically adjusted, and the structural similarity index is used to evaluate the quality and concealment of steganographic images, and the location and quantity of information embedding are optimized.
It improves the concealment and robustness of steganographic images, reduces detection risks, improves the comprehensiveness and processing efficiency of visual quality evaluation, and adapts to the influence of lighting changes and noise in different image types.
Smart Images

Figure CN120301981A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image information hiding, and specifically provides a digital image steganography method and system based on a generative adversarial network. Background Technique
[0002] With the rapid development of deep learning technology, GAN, with its powerful generation ability and adversarial training mechanism, can effectively embed information into images without significantly affecting the visual quality of the images. This method not only improves the concealment of steganographic information but also enables a higher embedding capacity, meeting the increasing requirements for security and robustness.
[0003] Currently, the research in this field is gradually shifting from basic theory to application practice, and related technologies are constantly maturing, covering multiple application scenarios such as image watermarking, digital copyright protection, and privacy protection. At the same time, researchers are also exploring more advanced model architectures and embedding strategies, such as improved network structures, adaptive information embedding methods, and real-time feedback mechanisms, to enhance the steganographic effect and reduce the risk of being detected. Generally speaking, the digital image steganography method based on GAN shows broad application prospects and research value.
[0004] In the prior art, there are problems of insufficient concealment and information capacity limitation in the process of embedding steganographic information. Traditional steganography methods often rely on fixed embedding strategies and are easily detected and cracked, increasing the risk of discovery of steganographic information. In addition, the means for evaluating the quality of steganographic images in the prior art are relatively single and cannot comprehensively reflect the balance between the visual quality and concealment of steganographic images, resulting in unsatisfactory steganographic effects.
[0005] When traditional steganography methods are used to process high-resolution images, the computational complexity is relatively high, resulting in a slow processing speed and being unsuitable for real-time applications. In addition, existing steganography technologies often lack the ability to adapt to different types of images and cannot effectively handle the influence of factors such as illumination changes and noise in images, making the embedding quality and stability of steganographic information insufficient.
[0006] Therefore, it is necessary to provide a digital image steganography method and system based on a generative adversarial network to solve the above problems.
[0007] The above information disclosed in the background technique section is only used to enhance the understanding of the background of the present disclosure, and thus it may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0008] The purpose of the present invention is to provide a digital image steganography method and system based on a generative adversarial network to solve the problems raised in the above background technique.
[0009] To achieve the above object, the present invention provides the following technical solutions:
[0010] A digital image steganography method based on a generative adversarial network, the specific steps including:
[0011] Step 1: Obtain multiple real images with known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, brightness mean, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be steganographed into a binary format;
[0012] Step 2: Construct a generative adversarial network. The generator in the adversarial network receives random noise, the information to be steganographed after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized stego image. The discriminator in the adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and stego images;
[0013] Step 3: Perform adversarial training on the generator and the discriminator. The generator takes minimizing the discrimination ability of the discriminator as the training objective, and the discriminator takes maximizing the discrimination ability of real images as the training objective. Both use cross-entropy as the loss function. In each iteration, the discriminator updates its weights by calculating the loss and backpropagation, and the generator updates its weights according to the feedback of the discriminator to generate a more concealed and realistic stego image;
[0014] Step 4: Obtain the relevant feature data of the generated stego image. The relevant feature data of the stego image includes edge intensity, brightness mean, and color contrast. Calculate the difference values of the edge intensity, brightness mean, and color contrast between the stego image and multiple real images. Based on the difference values of the feature data of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego image, and select the smallest index as the structural similarity index of the stego image;
[0015] Step 5: Introduce a real-time feedback mechanism, set a steganography information embedding threshold. When the generated structural similarity index is lower than the set steganography information embedding threshold, dynamically adjust the embedding strategy to improve the steganography effect.
[0016] Further, the data preprocessing includes:
[0017] All the collected real images are uniformly adjusted to the same resolution to ensure the consistency of the input data. Image scaling is performed using interpolation method, and each image is normalized by scaling the pixel values of the image to the range of [0, 1]. Data cleaning is performed on the feature data, including the detection and deletion of outliers and duplicate data, and the handling of missing values. Specifically, statistical methods are used to identify outliers and duplicate data in the feature data, and the outliers and duplicate data in the feature data are deleted. The mean, median or mode of the feature data is used to fill the missing values in the feature data;
[0018] The normalization of the feature data is min-max normalization, which scales the data to the range of [0, 1] so that all feature data have the same scale. The formula is as follows:
[0019]
[0020] where Y ′ is the normalized feature data, Y is the original feature data, Y min is the minimum value of the same type of feature data in the dataset, and Y max is the maximum value of the same type of feature data in the dataset;
[0021] The information data to be steganographed is converted into the corresponding ASCII code, each character corresponds to a binary value, and these binary values are concatenated into a binary string in the processing order of character by character, from left to right. Each character is processed in turn, and finally a complete binary sequence is formed.
[0022] Furthermore, a generative adversarial network is constructed, and the generator and discriminator in the adversarial network are designed. An adaptive information embedding strategy is designed, and the method is as follows:
[0023] A random noise vector z is determined from the normal distribution or uniform distribution of the feature data, and the random noise vector is randomly generated based on the existing libraries in the Python programming language. The generator takes the random noise vector z and the information m to be steganographed after binary processing as inputs;
[0024] The dynamic LSB adaptive embedding method is adopted to combine the information to be steganographed with the image to be steganographed. The features of the image to be steganographed are extracted through a multi-layer convolutional neural network. Each layer in the multi-layer convolutional neural network processes the input data using convolutional operations and ReLU activation functions to generate a stego image. The formula is as follows:
[0025] z′ = concat(z, m)
[0026] where z′ represents the feature vector of the stego image, and concat is a concatenation operation that combines the random noise vector z and the information m to be steganographed;
[0027] During the embedding process, an embedding mask generated based on a specific strategy is used to embed the information to be steganographed into the least significant bits of the image. When the generator generates the stego image, it needs to maintain the authenticity of the image and cover up the traces of information embedding;
[0028] The discriminator takes the generated stego image as input and outputs a probability value representing the probability that the stego image is a real image. The range of the probability value is [0,1].
[0029] Furthermore, adversarial training is performed on the generator and the discriminator. The method is as follows:
[0030] The main task of the discriminator is to distinguish whether the input image is a real image or a generated stego image. Its training objective is to maximize the discrimination ability of real images, give a lower probability value to the generated stego image, and the loss function uses the cross-entropy function. The range of the calculated value of the cross-entropy function is [0,1], where the real image is 1 and the generated stego image is 0. By calculating the loss and backpropagating to update the weights of the discriminator, its ability to distinguish real images and generated stego images is improved;
[0031] The generator generates a stego image so that the discriminator cannot effectively distinguish it as a generated image or a real image. Its training objective is to minimize the discrimination ability of the discriminator. The loss function of the generator is usually based on the cross-entropy loss. In each iteration, the generator updates its weights according to the feedback of the discriminator, so that the output probability of the stego image is close to 1.
[0032] Furthermore, calculate the difference values of the edge intensity, brightness mean, and color contrast between the stego image and multiple real images. The method is as follows:
[0033] Input the stego data into the generator and combine it with N real images to generate a stego image set. The stego image set contains M stego images. Calculate the difference values of the edge intensity, brightness mean, and color contrast between each real image and the corresponding generated stego image. The formula is as follows:
[0034]
[0035]
[0036] Among them, respectively represent the difference values of the edge intensity, brightness mean, and color contrast between the i-th real image and the corresponding j-th stego image, are respectively the edge intensity, brightness mean, and color contrast of the j-th stego image, They are respectively the edge intensity, brightness mean, and color contrast of the i-th real image, where i is the index of the real image and i ∈ [1, N], j is the index of the stego image and j ∈ [1, M], and N and M are respectively the total number of real images and the total number of stego images.
[0037] Furthermore, based on the difference value of the feature data of the two types of images, a structural similarity index for evaluating the quality and concealment of the stego image is generated, and the smallest index is selected as the structural similarity index of the stego image. The formula is as follows:
[0038]
[0039] Among them, SSIM ij represents the structural similarity index between the i-th real image and the corresponding j-th stego image;
[0040] Among all the calculated structural similarity indices, select the smallest structural similarity index SSIM min as the structural similarity index of the stego image.
[0041] Among all the calculated structural similarity indices, select the smallest structural similarity index SSIM min as the structural similarity index of the stego image.
[0042] Furthermore, introduce a real-time feedback mechanism, set a steganographic information embedding threshold, and dynamically adjust the embedding strategy to improve the steganographic effect. The method is as follows:
[0043] Introduce a real-time feedback mechanism. During the process of embedding the steganographic information into the target image, calculate the structural similarity index in real time and set a threshold. When the structural similarity index of the stego image is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy. The logical formula is as follows:
[0044]
[0045] Among them, Q represents the logical value for judging whether to dynamically adjust the embedding strategy. When Q = 0, it indicates that the structural similarity index of the stego image is greater than or equal to the steganographic information embedding threshold, and there is no need to dynamically adjust the embedding strategy; when Q = 1, it indicates that the structural similarity index of the stego image is less than the steganographic information embedding threshold, and it is necessary to dynamically adjust the embedding strategy.
[0046] The present invention also provides a digital image steganography system based on a generative adversarial network. The system is used to execute the above-mentioned digital image steganography method based on a generative adversarial network, including:
[0047] Feature data acquisition and preprocessing module, which is used to obtain real images of multiple known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, average brightness, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be hidden into binary format;
[0048] Adversarial network construction module, which is used to construct a generative adversarial network. The generator in the adversarial network receives random noise, the information to be hidden after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized stego image. The discriminator in the adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and stego images;
[0049] Generator and discriminator adversarial training module, which is used to perform adversarial training on the generator and the discriminator. The generator aims to minimize the discrimination ability of the discriminator during training, and the discriminator aims to maximize the discrimination ability of real images. Both use cross-entropy as the loss function. In each iteration, the discriminator updates its weights by calculating the loss and backpropagation. The generator updates its weights according to the feedback of the discriminator to generate a stego image with higher concealment and realism;
[0050] Stego image feature evaluation module, which is used to obtain the relevant feature data of the generated stego image. The relevant feature data of the stego image includes edge intensity, average brightness, and color contrast. Calculate the difference values of the edge intensity, average brightness, and color contrast between the stego image and multiple real images. Based on the feature data difference values of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego image, and select the smallest index as the structural similarity index of the stego image;
[0051] Dynamic adjustment and feedback mechanism module, which is used to introduce a real-time feedback mechanism and set a steganographic information embedding threshold. When the generated structural similarity index is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy to improve the steganographic effect.
[0052] Compared with the prior art, the beneficial effects of the present invention are:
[0053] By introducing an adaptive information embedding strategy, the method of the present invention can dynamically adjust the information embedding position and quantity according to the local features of the image, thereby improving the concealment and robustness of the stego image. This flexibility makes the stego information not easily detected and cracked, significantly reducing the risk of privacy leakage. At the same time, the use of a generative adversarial network ensures that the stego image is highly similar to the original image in terms of visual quality, thus enhancing the user experience;
[0054] Secondly, the present invention uses the structural similarity index as the standard for evaluating the quality of the stego image, which can comprehensively reflect the balance between the visual quality and concealment of the stego image. The introduction of a real-time feedback mechanism enables the embedding strategy to be dynamically adjusted according to the evaluation results during the steganography process, further optimizing the steganography effect. This comprehensive evaluation and dynamic adjustment method not only improves the security and stability of the stego information, but also meets the higher requirements for processing efficiency and adaptability in practical applications, thus promoting the development of digital image steganography technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a schematic diagram of the overall method flow of the present invention.
[0056] Figure 2 It is a schematic diagram of the system module flow of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0057] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the following further elaborates on the present invention in conjunction with specific embodiments.
[0058] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the present invention should have the ordinary meanings understood by those of ordinary skill in the field to which the present invention belongs. The "first", "second" and similar terms used in the present invention do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or items appearing before this word cover the elements or items listed after this word and their equivalents, without excluding other elements or items. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0059] Example:
[0060] Please refer to Figure 1 , a digital image steganography method based on a generative adversarial network, and the specific steps include:
[0061] Step 1: Obtain real images of multiple known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, brightness mean, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be steganographed into binary format;
[0062] Step 2: Construct a generative adversarial network. The generator in the adversarial network receives random noise, the information to be steganographed after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized stego-image. The discriminator in the adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and stego-images;
[0063] Step 3: Conduct adversarial training on the generator and the discriminator. The generator aims to minimize the discrimination ability of the discriminator, and the discriminator aims to maximize the discrimination ability of real images. Both use cross-entropy as the loss function. In each iteration, the discriminator updates its weights by calculating the loss and backpropagation. The generator updates its weights according to the feedback of the discriminator to generate a more concealed and realistic stego-image;
[0064] Step 4: Obtain the relevant feature data of the generated stego-image. The relevant feature data of the stego-image includes edge intensity, brightness mean, and color contrast. Calculate the difference values of the edge intensity, brightness mean, and color contrast between the stego-image and multiple real images. Based on the difference values of the feature data of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego-image, and select the smallest index as the structural similarity index of the stego-image;
[0065] Step 5: Introduce a real-time feedback mechanism and set a steganographic information embedding threshold. When the generated structural similarity index is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy to improve the steganographic effect.
[0066] It should be noted that by uniformly adjusting the real images to the same resolution and performing standardization processing, the consistency of the input data can be ensured, and the efficiency and accuracy of the steganographic process can be improved. In addition, cleaning the feature data, handling outliers and missing values makes the steganographed information more reliable and reduces the information embedding risk caused by data quality problems. At the same time, converting the data to be steganographed into binary format not only facilitates the storage and transmission of information, but also provides a necessary basis for subsequent steganographic operations, making the entire steganographic process more efficient and secure, and ultimately improving the concealment and robustness of the stego-image; among them, the data to be steganographed refers to the data that needs to be hidden in the real image and is not easily discovered, including image data, video files, voice texts, etc.
[0067] Therefore, it is necessary to convert the information to be steganographed in the real image into binary format, and perform data preprocessing on the collected real image. The methods are as follows:
[0068] Uniformly adjust all the collected real images to the same resolution to ensure the consistency of the input data. Use interpolation method for image scaling, perform standardization processing on each image, scale the image pixel values to the range of [0, 1]. Perform data cleaning on the feature data, including the detection and deletion of outliers and duplicate data, and the processing of missing values. Specifically, use statistical methods to identify outliers and duplicate data in the feature data, delete outliers and duplicate data in the feature data, and use the mean, median or mode of the feature data to fill in the missing values in the feature data;
[0069] The normalization processing of the feature data is min-max normalization, which scales the data to the range of [0, 1], so that all feature data have the same scale. The formula is as follows:
[0070]
[0071] where Y ′ is the feature data after normalization processing, Y is the original feature data, Y min is the minimum value of the same type of feature data in the dataset, and Y max is the maximum value of the same type of feature data in the dataset;
[0072] Convert the information data to be steganographed into the corresponding ASCII codes, each character corresponding to a binary value, and concatenate these binary values into a binary string in the processing order of character by character, from left to right. Process each character in turn to finally form a complete binary sequence; the information data to be encrypted includes text information, image data, audio files, and video clips. Determine the most suitable embedding position and method for the encrypted information by the edge intensity, brightness mean, and color contrast of the encrypted information. For example, the edge intensity can be used to select complex texture areas for information embedding because the visual changes in these areas are difficult to detect; the brightness mean can be used to avoid embedding information in over-bright or over-dark areas to maintain visual consistency; through color contrast analysis, select areas with low color contrast for embedding to reduce the impact on the overall visual effect.
[0073] It should be noted that by combining the random noise vector with the information to be steganographed, the generator can create highly concealed steganographic images. At the same time, the adaptive information embedding strategy ensures the reasonable distribution of information in the image, enabling more information to be embedded in complex texture areas while reducing embedding in flat areas, thereby optimizing the security and robustness of the steganographed information. In addition, the design of the discriminator provides a real-time evaluation of the steganographic quality by comparing the generated steganographic images with real images, enabling the steganographic process to be dynamically adjusted and further improving the authenticity and concealment of the steganographic images. This entire set of mechanisms not only enhances the effectiveness of steganography technology but also promotes innovation and development in the field of information security.
[0074] Therefore, it is necessary to construct a generative adversarial network and design the generator and discriminator in the adversarial network, and design an adaptive information embedding strategy. The methods are as follows:
[0075] Determine the random noise vector z from the normal distribution or uniform distribution of the feature data, and randomly generate the random noise vector based on the existing libraries in the Python programming language. The generator takes the random noise vector z and the information m to be steganographed after binary processing as inputs;
[0076] Adopt the dynamic LSB adaptive embedding method to combine the information to be steganographed with the image to be steganographed, and extract the features of the image to be steganographed through a multi-layer convolutional neural network. Each layer in the multi-layer convolutional neural network processes the input data using convolutional operations and ReLU activation functions to generate the steganographic image. The formula is as follows:
[0077] z′ = concat(z, m)
[0078] Among them, z′ represents the feature vector of the steganographic image, and concat is the concatenation operation, which combines the random noise vector z and the information m to be steganographed together;
[0079] During the embedding process, an embedding mask generated based on a specific strategy is used to embed the information to be steganographed into the least significant bits of the image. When generating the steganographic image, the generator needs to maintain the authenticity of the image and conceal the traces of information embedding; the specific specific strategy can be designed according to the characteristics of the image and application requirements, and based on the local features of the image to be steganographed, such as brightness, texture complexity, and noise level, to determine the embedding position. The information is better embedded in complex texture or noisy areas because the visual changes in these areas are more difficult to detect; based on the embedding depth, determine the depth of embedding information in different parts of the image. For example, modify the least significant bit of the embedding mask, such as modifying the last bit of each byte corresponding to each color channel in an 8-bit grayscale image or a 24-bit color image, because the change of these bits has the least impact on the overall visual effect of the image;
[0080] The discriminator takes the generated steganographic image as input and outputs a probability value representing the probability that the steganographic image is a real image. The range of the probability value is [0, 1]. The closer the probability value is to 1, the closer the generated steganographic image is to the real image, and the better the hiding effect.
[0081] It should be noted that the main task of the discriminator is to accurately distinguish between real images and generated steganographic images. Its training goal is to maximize the ability to distinguish real images and reduce the discrimination rate for generated images. This is achieved through the use of the cross-entropy loss function, thereby continuously improving the accuracy and reliability of the discriminator. At the same time, the goal of the generator is to generate steganographic images that are difficult for the discriminator to effectively distinguish as true or false. By minimizing the discriminator's discrimination ability, the generator continuously optimizes its output based on the discriminator's feedback in each iteration, making the features of the steganographic image more and more similar to those of the real image.
[0082] This dynamic adversarial process not only promotes the mutual improvement between the generator and the discriminator but also ensures the high concealment and authenticity of the steganographic image, thus effectively protecting the security of the steganographic information. This adversarial training method plays a crucial role in enhancing the robustness of steganography technology and reducing the detection risk, making the application of digital image steganography technology in the field of information security more extensive and effective.
[0083] Therefore, it is necessary to perform adversarial training on the generator and the discriminator, and the method is as follows:
[0084] The main task of the discriminator is to distinguish whether the input image is a real image or a generated steganographic image. Its training goal is to maximize the ability to distinguish real images and give a lower probability value to the generated steganographic image. The loss function uses the cross-entropy function. The calculated value range of the cross-entropy function is [0, 1], where the real image is 1 and the generated steganographic image is 0. By calculating the loss and backpropagating to update the weights of the discriminator, its ability to distinguish real images and generated steganographic images is improved;
[0085] The generator generates steganographic images that the discriminator cannot effectively distinguish as generated or real images. Its training goal is to minimize the discriminator's discrimination ability. The loss function of the generator is usually based on the cross-entropy loss. In each iteration, the generator updates its weights according to the discriminator's feedback, making the output probability of the steganographic image close to 1.
[0086] It should be noted that the edge strength reflects the details and contours of the image, while the brightness mean and color contrast affect the overall visual effect and realism of the image. By accurately measuring these difference values, the similarity between the stego image and the real image can be evaluated, thereby determining whether the embedding effect of the stego information is successful, ensuring that the stego process does not significantly change the appearance of the image, and reducing the risk of detection and recognition. This not only improves the effectiveness of the steganography technique but also provides an important reference basis for further optimizing and improving the steganography algorithm.
[0087] Therefore, it is necessary to calculate the difference values of the edge strength, brightness mean, and color contrast between the stego image and multiple real images. The method is as follows:
[0088] Input the stego data into the generator, combine it with N real images to generate a set of stego images. The set of stego images contains M stego images. Calculate the difference values of the edge strength, brightness mean, and color contrast between each real image and the corresponding generated stego image. The formulas are as follows:
[0089]
[0090] Among them, respectively represent the difference values of the edge strength, brightness mean, and color contrast between the i-th real image and the corresponding j-th stego image. are respectively the edge strength, brightness mean, and color contrast of the j-th stego image. are respectively the edge strength, brightness mean, and color contrast of the i-th real image. i is the index of the real image, and i ∈ [1, N], j is the index of the stego image, and j ∈ [1, M]. N and M are respectively the total number of real images and the total number of stego images. In the above formulas, the smaller the difference values of the edge strength, brightness mean, and color contrast between the stego image and the real image, the better, which means that the stego image and the real image are more similar in visual features. This indicates that the stego process successfully embeds the information into the image without significantly changing its appearance, thereby improving the concealment and authenticity of the stego image. The reason for selecting the maximum value in the data as the difference representation of the edge strength, brightness mean, and color contrast between the stego image and the real image is that by choosing the maximum value of the difference, it can be ensured that the stego image still maintains sufficient visual similarity with the real image in the worst case, and the maximum difference value provides a unified standard to evaluate the visual consistency of different features, ensuring that the quality of the stego image is acceptable in all possible feature changes.
[0091] It should be noted that by considering the differences in edge strength, average brightness, and color contrast, SSIM can quantify the structural similarity between the stego image and the real image, thus more accurately reflecting the success and concealment of the steganography effect. A higher SSIM value means that the stego image is visually closer to the real image, reducing the risk of detection, which is crucial for information security and the practical application of steganography technology.
[0092] Therefore, based on the difference values of the feature data of the two images, a structural similarity index for evaluating the quality and concealment of the stego image needs to be generated, and the smallest index is selected as the structural similarity index of the stego image. The formula is as follows:
[0093]
[0094] where SSIM ij represents the structural similarity index between the i-th real image and the corresponding j-th stego image;
[0095] Among all the calculated structural similarity indices, a smallest structural similarity index SSIM min is selected as the structural similarity index of the stego image; in the above formula a decrease in will result in an increase in the structural similarity index, meaning an enhanced visual similarity between the stego image and the real image. Specifically, a smaller difference value indicates that the stego image is closer to the real image in terms of features such as edge strength, average brightness, and color contrast, indicating that the embedded information has not significantly affected the appearance and quality of the image. This high similarity not only improves the concealment of the stego image, reducing the risk of detection and recognition, but also reflects the success of the steganography process. Therefore, the larger the structural similarity index, the better. The reason for selecting a smallest index as the structural similarity index SSIM min of the stego image is that the smaller the structural similarity index, the greater the difference between the stego image and the real image, which means that the embedded information has not significantly affected the appearance and quality of the image, indicating a good steganography effect.
[0096] It should be noted that by dynamically calculating the structural similarity index and comparing it with a set threshold, the degradation of the quality of the stego image can be identified in a timely manner. When SSIM is lower than the set threshold, the system will automatically adjust the embedding strategy to optimize the information embedding method to ensure high visual similarity of the image. This intelligent adjustment mechanism not only improves the effectiveness and security of steganography technology, but also enhances its adaptability in different application scenarios, ensuring the reliability and concealment of information embedding, thus better meeting the actual needs
[0097] Therefore, it is necessary to introduce a real-time feedback mechanism and set a steganographic information embedding threshold to dynamically adjust the embedding strategy and improve the steganographic effect. The method is as follows:
[0098] Introduce a real-time feedback mechanism. During the process of embedding the steganographic information into the target image, calculate the structural similarity index in real time and set a threshold. When the structural similarity index of the steganographic image is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy. The logical formula is as follows:
[0099]
[0100] Among them, Q represents the logical value for judging whether to dynamically adjust the embedding strategy. When Q = 0, it indicates that the structural similarity index of the steganographic image is greater than or equal to the steganographic information embedding threshold, and there is no need to dynamically adjust the embedding strategy; when Q = 1, it indicates that the structural similarity index of the steganographic image is less than the steganographic information embedding threshold, and it is necessary to dynamically adjust the embedding strategy.
[0101] Please refer to Figure 2 , the present invention also provides a digital image steganography system based on a generative adversarial network. The system is used to execute the above-mentioned digital image steganography method based on a generative adversarial network, including:
[0102] A feature data acquisition and preprocessing module, which is used to obtain multiple real images with known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, brightness mean, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be steganographed into a binary format;
[0103] A generative adversarial network construction module, which is used to construct a generative adversarial network. The generator in the generative adversarial network receives random noise, the information to be steganographed after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized steganographic image. The discriminator in the generative adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and steganographic images;
[0104] A steganographic image feature evaluation module, which is used to obtain the relevant feature data of the generated steganographic image. The relevant feature data of the steganographic image includes edge intensity, brightness mean, and color contrast. Calculate the difference values of the edge intensity, brightness mean, and color contrast between the steganographic image and multiple real images. Based on the feature data difference values of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the steganographic image, and select the smallest index as the structural similarity index of the steganographic image;
[0105] A dynamic adjustment and feedback mechanism module, which is used to introduce a real-time feedback mechanism, set a steganographic information embedding threshold, and when the generated structural similarity index is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy to improve the steganographic effect.
[0106] All the above formulas are dimensionless and take their numerical calculations. The formula is obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formula are set by those skilled in the art according to the actual situation.
[0107] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0108] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application.
Claims
1. A digital image steganography method based on a generative adversarial network, characterized in that, The specific steps include: Step 1: Obtain real images of multiple known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, average brightness, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be steganographed into a binary format. Step 2: Construct a generative adversarial network. The generator in the adversarial network receives random noise, the information to be steganographed after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized stego image. The discriminator in the adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and stego images. Step 3: Conduct adversarial training on the generator and the discriminator. The generator aims to minimize the discrimination ability of the discriminator during training, and the discriminator aims to maximize the discrimination ability of real images. Both use cross-entropy as the loss function. In each iteration, the discriminator calculates the loss and updates the weights through backpropagation. The generator updates its weights according to the feedback of the discriminator to generate a stego image with higher concealment and realism. Step 4: Obtain the relevant feature data of the generated stego image. The relevant feature data of the stego image includes edge intensity, average brightness, and color contrast. Calculate the difference values of the edge intensity, average brightness, and color contrast between the stego image and multiple real images. Based on the difference values of the feature data of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego image, and select the smallest index as the structural similarity index of the stego image. Step 5: Introduce a real-time feedback mechanism and set a steganographic information embedding threshold. When the generated structural similarity index is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy to improve the steganographic effect.
2. The digital image steganography method based on a generative adversarial network according to claim 1, wherein The data preprocessing includes: Uniformly adjust all collected real images to the same resolution to ensure the consistency of input data. Use interpolation for image scaling, perform normalization processing on each image, and scale the image pixel values to the range of [0, 1]. Data cleaning of the feature data includes detection and deletion of outliers and duplicate data, and handling of missing values. Specifically, use statistical methods to identify outliers and duplicate data in the feature data, delete outliers and duplicate data in the feature data, and fill in the missing values in the feature data with the mean, median, or mode of the feature data. The normalization processing of the feature data is min-max normalization, which scales the data to the range of [0, 1] so that all feature data have the same scale. The formula is as follows: Among them, Y' is the feature data after normalization, Y is the original feature data, Y min is the minimum value among the same type of feature data in the dataset, Y max is the maximum value among the same type of feature data in the dataset; Convert the information data to be steganographed into the corresponding ASCII code, with each character corresponding to a binary value, and concatenate these binary values into a binary string in the order of processing each character from left to right. Process each character in turn to finally form a complete binary sequence.
3. A digital image steganography method based on a generative adversarial network according to claim 1, characterized in that Construct a generative adversarial network, design the generator and discriminator in the adversarial network, and design an adaptive information embedding strategy. The method is as follows: Determine a random noise vector z from the normal distribution or uniform distribution of feature data, and randomly generate the random noise vector based on the existing libraries in the Python programming language. The generator takes the random noise vector z and the information m to be hidden after binary processing as inputs. Adopt the dynamic LSB adaptive embedding method to combine the information to be hidden with the image to be hidden. Extract the features of the image to be hidden through a multi-layer convolutional neural network. Each layer in the multi-layer convolutional neural network processes the input data using convolutional operations and ReLU activation functions to generate a stego image. The formula is as follows: z′ = concat(z, m) where z′ represents the feature vector of the stego image, and concat is a concatenation operation that combines the random noise vector z and the information m to be hidden. Use an embedding mask generated based on a specific strategy during the embedding process to embed the information to be hidden into the least significant bits of the image. When generating the stego image, the generator needs to maintain the authenticity of the image and cover up the traces of information embedding. The discriminator takes the generated stego image as input and outputs a probability value representing the probability that the stego image is a real image. The range of the probability value is [0, 1].
4. A digital image steganography method based on a generative adversarial network according to claim 1, characterized in that, Conduct adversarial training on the generator and the discriminator. The method is as follows: The main task of the discriminator is to distinguish whether the input image is a real image or a generated stego image. Its training goal is to maximize the discrimination ability of real images and give a lower probability value to the generated stego image. The loss function uses the cross-entropy function. The range of the calculated value of the cross-entropy function is [0, 1]. The real image is 1, and the generated stego image is 0. Update the weights of the discriminator by calculating the loss and backpropagation to improve its ability to distinguish real images and generated stego images. The generator generates stego images so that the discriminator cannot effectively distinguish them as generated images or real images. Its training goal is to minimize the discrimination ability of the discriminator. The loss function of the generator is usually based on cross-entropy loss. In each iteration, the generator updates its weights according to the feedback of the discriminator, making the output probability of the stego image close to 1.
5. A digital image steganography method based on a generative adversarial network according to claim 1, characterized in that Calculate the difference values of the edge intensity, brightness mean, and color contrast between the stego image and multiple real images. The method is as follows: Input the stego data into the generator and combine it with N real images to generate a set of stego images. The set of stego images contains M stego images. Calculate the difference values of the edge intensity, brightness mean, and color contrast between each real image and the corresponding generated stego image. The formula is as follows: Among them, respectively represent the difference values of the edge intensity, the average brightness, and the color contrast between the i-th real image and the corresponding j-th stego image, are respectively the edge intensity, the average brightness, and the color contrast of the j-th stego image, are respectively the edge intensity, the average brightness, and the color contrast of the i-th real image. i is the index of the real image, and i ∈ [1, N], j is the index of the stego image, and j ∈ [1, M]. N and M are respectively the total number of real images and the total number of stego images.
6. A digital image steganography method based on a generative adversarial network according to claim 5, characterized in that , Based on the difference values of the feature data of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego image, and select the smallest index as the structural similarity index of the stego image. The formula is as follows: Among them, SSIM ij represents the structural similarity index between the i-th real image and the corresponding j-th stego image; Among all the calculated structural similarity indices, select the smallest structural similarity index SSIM min as the structural similarity index of the stego image.
7. A digital image steganography method based on a generative adversarial network according to claim 1, characterized in that Introduce a real-time feedback mechanism, set a stego information embedding threshold, and dynamically adjust the embedding strategy to improve the stego effect. The method is as follows: Introduce a real-time feedback mechanism. During the process of embedding the information to be steganographed into the target image, calculate the structural similarity index in real time and set a threshold. When the structural similarity index of the stego image is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy. The logical formula is as follows: Among them, Q represents the logical value for judging whether to dynamically adjust the embedding strategy. When Q = 0, it indicates that the structural similarity index of the stego image is greater than or equal to the steganographic information embedding threshold, and there is no need to dynamically adjust the embedding strategy. When Q = 1, it indicates that the structural similarity index of the stego image is less than the steganographic information embedding threshold, and it is necessary to dynamically adjust the embedding strategy.
8. A digital image steganography system based on a generative adversarial network, characterized in that, The system is used to execute the digital image steganography method based on the generative adversarial network described in any one of claims 1-7, including: A feature data acquisition and preprocessing module, which is used to obtain real images of multiple known relevant feature data, and perform data preprocessing on the relevant feature data. The relevant feature data of the real images includes edge intensity, brightness mean, and color contrast. The data preprocessing includes data cleaning, normalization of the relevant feature data of the real images, and conversion of the data to be steganographed into binary format; An adversarial network construction module, which is used to construct a generative adversarial network. The generator in the adversarial network receives random noise, the information to be steganographed after binary conversion, and multiple real images as inputs, and designs an adaptive information embedding strategy to output a synthesized stego image. The discriminator in the adversarial network is used to receive the image to be discriminated and output a probability value representing the authenticity of the image to be discriminated. The images to be discriminated include real images and stego images; A generator and discriminator adversarial training module, which is used to perform adversarial training on the generator and the discriminator. The generator aims to minimize the discrimination ability of the discriminator during training, and the discriminator aims to maximize the discrimination ability of real images. Both use cross-entropy as the loss function. In each iteration, the discriminator updates its weights by calculating the loss and backpropagation. The generator updates its weights according to the feedback of the discriminator to generate a stego image with higher concealment and realism; A stego image feature evaluation module, which is used to obtain the relevant feature data of the generated stego image. The relevant feature data of the stego image includes edge intensity, brightness mean, and color contrast. Calculate the difference values of the edge intensity, brightness mean, and color contrast between the stego image and multiple real images. Based on the feature data difference values of the two types of images, generate a structural similarity index for evaluating the quality and concealment of the stego image, and select the smallest index as the structural similarity index of the stego image; A dynamic adjustment and feedback mechanism module, which is used to introduce a real-time feedback mechanism, set a steganographic information embedding threshold, and when the generated structural similarity index is lower than the set steganographic information embedding threshold, dynamically adjust the embedding strategy to improve the steganographic effect.