Training of generative adversarial network, information processing method and device, medium and program product

CN123015247APending Publication Date: 2026-10-30MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611087922.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

相关技术中提出了将秘密信息嵌入到图像文件中,从而实现信息隐藏的方案,但是,该方案中,只能在原有的图像文件中添加数据量很小的秘密信息,因此,难以实现大数据量的秘密信息的隐藏,即相关技术的方案存在秘密信息的嵌入效率较低的问题

Benefits of technology

[0010]可以看出,本申请实施例可以根据多个样本图像对应的加密数据和多个样本图像的真实轮廓,对第一生成对抗网络进行训练,从而使第一生成对抗网络实现基于加密数据生成图像轮廓的能力。相比于相关技术中只能将数据量很小的秘密信息嵌入到图像文件的方案,本申请实施例无需利用图像文件的冗余空间实现信息隐藏,而是可以利用训练完成的第一生成对抗网络完成加密信息到图像轮廓的直接转换,从而实现信息隐藏,这样有利于通过训练完成的第一生成对抗网络提升秘密信息的嵌入效率,并实现数据量较大的秘密信息的隐藏。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015247A_ABST
    Figure CN123015247A_ABST
Patent Text Reader

Abstract

The application provides a training method and information processing method, device, medium and program product of a generative adversarial network. The training method comprises: obtaining a plurality of sample images; encrypting the plurality of sample images to obtain encrypted data corresponding to the plurality of sample images; and performing contour extraction on the plurality of sample images to obtain real contours of the plurality of sample images; and training a first generative adversarial network according to the encrypted data corresponding to the plurality of sample images and the real contours of the plurality of sample images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and to, but is not limited to, a training and information processing method, device, medium, and program product for Generative Adversarial Networks (GANs). Background Technology

[0002] Information hiding refers to the technique of concealing secret information within publicly available media information, making it difficult for people to detect its presence through direct visual and auditory perception. Information hiding techniques can hide secret data within ordinary files, such as images, text, and audio / video, in a way that is not easily perceived by human visual or auditory organs. Related technologies have proposed embedding secret information into image files to achieve information hiding; however, this approach can only add a small amount of secret information to the original image file, making it difficult to hide large amounts of secret information. In other words, this approach suffers from low embedding efficiency. Summary of the Invention

[0003] This application provides a method, apparatus, medium, and program product for training and information processing of generative adversarial networks.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for training a generative adversarial network, the method comprising: Acquire multiple sample images; The plurality of sample images are encrypted to obtain encrypted data corresponding to the plurality of sample images; and the contours of the plurality of sample images are extracted to obtain the true contours of the plurality of sample images. The first generative adversarial network (GAN) is trained based on the encrypted data corresponding to the multiple sample images and the real contours of the multiple sample images.

[0005] This application embodiment also provides an information processing method, the method comprising: The original information is encrypted to obtain encrypted data; The encrypted data is processed using a trained first generative adversarial network to obtain a first image contour; the first generative adversarial network is trained according to any of the above training methods. The first image contour is processed using a trained second generative adversarial network to obtain a first image, and the contour of the first image is the first image contour.

[0006] This application embodiment also provides another information processing method, the method comprising: Get the first image; The first image is processed using a third generative adversarial network to obtain the outline of the second image; The second image contour is processed using a fourth generative adversarial network to obtain the data to be decrypted; The data to be decrypted is decrypted.

[0007] This application also provides an electronic device, which includes a processor and a memory for storing a computer program that can run on the processor; wherein the processor is used to run the computer program to execute any of the above-described generative adversarial network training methods or any of the information processing methods.

[0008] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described generative adversarial network training methods or any of the information processing methods.

[0009] This application also provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implement any of the above-described generative adversarial network training methods or any of the information processing methods.

[0010] As can be seen, the embodiments of this application can train a first generative adversarial network (GAN) based on encrypted data corresponding to multiple sample images and the real contours of multiple sample images, thereby enabling the first GAN to generate image contours based on encrypted data. Compared with related technologies that can only embed secret information with a small amount of data into image files, the embodiments of this application do not need to utilize the redundant space of image files to achieve information hiding. Instead, they can use the trained first GAN to directly convert encrypted information into image contours, thereby achieving information hiding. This is beneficial for improving the embedding efficiency of secret information through the trained first GAN and achieving the hiding of secret information with a large amount of data. Attached Figure Description

[0011] Figure 1 This is a flowchart illustrating a training method for a generative adversarial network according to an embodiment of this application. Figure 2 This is an interactive flowchart illustrating the information hiding and information transmission proposed in an embodiment of this application; Figure 3 This is a schematic diagram of an image for which contour extraction needs to be performed in an embodiment of this application; Figure 4 Examples of embodiments in this application Figure 3 A schematic diagram of the corresponding real contour; Figure 5 This is a flowchart illustrating the data processing of the first generative adversarial network in this embodiment of the application. Figure 6 This is a structural block diagram of the image contour generated by the generator in the embodiments of this application; Figure 7 This is a structural block diagram of the determination result obtained by the discriminator in the embodiments of this application; Figure 8 This is a flowchart illustrating an information processing method proposed in an embodiment of this application; Figure 9 This is a flowchart illustrating the data processing of the second generative adversarial network in this embodiment of the application. Figure 10 This is a flowchart of another information processing method proposed in an embodiment of this application; Figure 11 This is a flowchart illustrating the data processing of the third generative adversarial network in this embodiment of the application. Figure 12 This is a flowchart illustrating the data processing of the fourth generative adversarial network in this embodiment of the application. Figure 13 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] Information hiding refers to the technique of concealing secret information within publicly available media, making it difficult for people to detect its existence through direct visual and auditory means. Information hiding techniques can hide not only the content of information but also its very existence. Among related technologies, image-based information hiding algorithms have been proposed. These algorithms utilize certain characteristics of images to achieve information hiding. For example, image files inherently contain redundant space. The information owner can embed secret information into this redundant space, thus hiding the information. In this case, the image file becomes the carrier of the hidden information. The information recipient, after obtaining the image file containing the hidden information, can use a corresponding reverse algorithm to decrypt and retrieve the hidden information, thereby achieving the covert transmission of the information. It can be seen that only a small amount of secret information can be added to an existing image file; therefore, it is difficult to hide large amounts of secret information.

[0013] Related technologies also propose spatial domain-based information hiding schemes, such as the Least Significant Bit (LSB) method and the Histogram Shifting (HS) method. Additionally, transform domain-based information hiding has been proposed. This involves transforming the spatial domain image to the frequency domain and then hiding the information in the frequency domain. Methods for transforming spatial domain images to the frequency domain include Discrete Cosine Transform (DCT), Discrete Fourier Transform (DFT), and Discrete Wavelet Transform (DWT). After transforming the spatial domain image to the frequency domain, certain coefficients in the frequency domain are modified to embed the hidden information. Finally, the frequency domain data is transformed back to the spatial domain image to obtain an image containing the hidden information.

[0014] Related technologies struggle to hide secret information across large datasets, exhibiting low embedding efficiency. To address this issue, this application proposes a technical solution. This application's embodiment can learn AIGC from real images, generate images based on the information requiring steganography, and utilize Generative Adversarial Networks (GANs) to ensure the authenticity of the final generated image.

[0015] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the embodiments provided herein are merely illustrative of the embodiments of this application and are not intended to limit the embodiments of this application. Furthermore, the embodiments provided below are some embodiments for implementing this application, and not all embodiments for implementing this application. Unless otherwise specified, the technical solutions described in the embodiments of this application can be implemented in any combination.

[0016] It should be noted that, in the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of circuitry, processors, programs, or software, etc.) in the method or apparatus that includes that element.

[0017] The training and information processing method for generative adversarial networks provided in this application includes a series of steps. However, the training and information processing method for generative adversarial networks provided in this application is not limited to the steps described. Similarly, the training apparatus and information processing apparatus for generative adversarial networks provided in this application include a series of modules. However, the apparatus provided in this application is not limited to the modules explicitly described, but may also include modules that need to be set up for obtaining relevant information or processing based on information.

[0018] This application proposes a training method for generative adversarial networks. Figure 1 This is a flowchart of a generative adversarial network training method according to an embodiment of this application, such as... Figure 1 As shown, the process includes: Step 101: Obtain multiple sample images.

[0019] Here, multiple sample images serve as training data for the first generative adversarial network (GAN-1). During the data preparation and processing phase, a sufficient number of sample images can be obtained. For example, the first GAN can be a standard GAN, a Cycle Generative Adversarial Network (CycleGAN), or a Deep Convolutional Generative Adversarial Network (DCGAN). Different types of GANs can transform images into different styles and simultaneously achieve the function of hiding secret information.

[0020] Step 102: Encrypt multiple sample images to obtain encrypted data corresponding to multiple sample images; and extract contours from multiple sample images to obtain the true contours of multiple sample images.

[0021] For example, refer to Figure 2 During the data preparation and processing stage, the training data can be encrypted using an encryption module to obtain encrypted data corresponding to the training data, i.e., encrypted data corresponding to multiple sample images. The first generative adversarial network can be denoted as GAN-1. After obtaining the encrypted data corresponding to multiple sample images, the encrypted data can be input into GAN-1.

[0022] In this embodiment, the encryption module can perform encryption processing on multiple sample images during the training phase of GAN-1, or it can process the original information, which is the secret information to be hidden, after GAN-1 training is completed. Exemplarily, the encryption module can use encryption algorithms to encrypt the original information or sample images. These encryption algorithms include one or more of the following: Advanced Encryption Standard (AES) and RSA (Rivest-Shamir-Adleman). It should be noted that this embodiment does not limit the encryption algorithm used by the encryption module.

[0023] For example, after obtaining the encrypted result through encryption processing, the encryption module can further process the encrypted result. For instance, it can iterate through each byte in the encrypted result and convert it into an 8-bit binary representation, thereby converting the encrypted result into byte stream data. The encryption module can then output this byte stream data, which is the encrypted data described above. For example, to ensure the consistency of the final output of the encryption module, the bit stream needs to be limited to a specific length when processing the encrypted result. For example, a hash function can be used to convert the encrypted result into a fixed-length digest. Alternatively, a specific encryption mode and appropriate padding strategy can be used during encryption to ensure that the encryption module outputs a byte stream of the required length. Here, the hash can be a 256-bit Secure Hash Algorithm (SHA-256), and the specific encryption mode can be a Counter mode (CTR), Cipher feedback mode (CFB), etc.

[0024] For example, refer to Figure 2 During the data preparation and processing phase, the contour extraction module can process the training data to obtain the true contours corresponding to the training images, i.e., obtain the true contours of multiple sample images. After obtaining the true contours of multiple sample images, these true contours can be input into GAN-1. The contour extraction module needs to process a sufficient number of images to ensure the training effect of GAN-1.

[0025] In this embodiment, the contour extraction module mainly implements the function of contour extraction of images. Exemplarily, the input data of the contour extraction module is a sufficient number of sample images. The input data of the contour extraction module includes different types of images, such as: natural landscape images, images of clothing, shoes, hats, and other items, portraits, animal images, and text images. In practical applications, the images input to the contour extraction module can be classified, and the classified images can be preprocessed. Here, the preprocessing process for the classified images includes: normalizing the classified images, adjusting their size to a uniform dimension (e.g., 512x512 pixels), and processing the normalized images to convert them into grayscale images. After obtaining the grayscale image through image preprocessing, an edge detection algorithm can be used to process the converted grayscale image to generate the true contour of the image. The edge detection algorithm can be an algorithm such as the Canny edge detection algorithm. Exemplarily, for... Figure 3 The image shown can be processed using a contour extraction module to obtain... Figure 4 The actual outline shown.

[0026] Step 103: Train the first generative adversarial network based on the encrypted data corresponding to multiple sample images and the real contours of multiple sample images.

[0027] In this embodiment of the application, a first generative adversarial network is trained based on encrypted data corresponding to multiple sample images and the real contours of multiple sample images, so that the first generative adversarial network can generate image contours based on encrypted data. At the same time, the processing capability and processing effect of the first generative adversarial network can be verified based on the real contours of multiple sample images.

[0028] In practical applications, steps 101 to 103 can be implemented based on a processor, which can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor.

[0029] As can be seen, the embodiments of this application can train a first generative adversarial network (GAN) based on encrypted data corresponding to multiple sample images and the real contours of multiple sample images, thereby enabling the first GAN to generate image contours based on encrypted data. Compared with related technologies that can only embed secret information with a small amount of data into image files, the embodiments of this application do not need to utilize the redundant space of image files to achieve information hiding. Instead, they can use the trained first GAN to directly convert encrypted information into image contours, thereby achieving information hiding. This is beneficial for improving the embedding efficiency of secret information through the trained first GAN and achieving the hiding of secret information with a large amount of data.

[0030] In some embodiments, the encrypted data corresponding to multiple sample images and the contours of multiple sample images are used to train the first generative adversarial network. This can be achieved by inputting the encrypted data corresponding to multiple sample images into the generator of the first generative adversarial network to obtain a first generation result; inputting the first generation result and the real contours of the multiple sample images into the discriminator of the first generative adversarial network to obtain a first discrimination result; and then, based on the first generation result and the first discrimination result, using an alternating update method to perform adversarial training on the generator and discriminator of the first generative adversarial network to obtain the trained first generative adversarial network.

[0031] GAN-1 is one of the core modules in the embodiments of this application, mainly responsible for converting the byte stream data output by the encryption module into image contours. (Refer to...) Figure 5 GAN-1 mainly consists of a generator and a discriminator. The generator takes a byte stream of data as input and outputs an image contour. The discriminator takes the true contour of the image as input and outputs a judgment result. The judgment result output by the discriminator in GAN-1 represents the probability that the image contour output by the generator is a true contour.

[0032] During the data preparation and processing stage, the generator and discriminator can be trained adversarially based on the real contours obtained by the contour extractor module and the byte stream data output by the encryption module. The training objective is for the generator to output image contours based on the byte stream data, while the discriminator determines that the image contours output by the generator are real contours.

[0033] Both the generator and the discriminator adopt a neural network model structure, and both the generator and the discriminator include the following three parts: input layer, hidden layer and output layer.

[0034] The generator's function is to convert input byte stream data into image contours. The main processing step is to transform the data from a uniform distribution to a probability distribution. In practical applications, the generator can divide the byte stream data into equal parts, and then process each group of byte streams obtained from this division, transforming it into a probability distribution within an n-order bounded space. The coordinates of a blank image of size n are used to optimize the processing using training data until the function of generating image contours from byte stream data is achieved. Here, n is an integer greater than 1, and the value of n can be adjusted according to the computing power of the generator, the computing power of the discriminator, and the amount of information to be hidden. For example, n is 512.

[0035] Figure 6 This is a structural block diagram of the image contour generated by the generator in the embodiments of this application, referring to... Figure 6 The input data of the input layer is byte stream data, typically represented as a fixed-length (e.g., 8-bit, 16-bit) vector. For example, the input layer is a fully connected layer. Through linear transformation, the input layer maps the low-dimensional input vector to a high-dimensional vector, thus expanding the dimensionality of the input data. In the input layer, a non-linear activation function can be added to increase the network's non-linear expressive power; for example, the non-linear activation function is the Rectified Linear Activation Function (ReLU). The formula for data processing using the ReLU function is Equation (1).

[0036] Activated_Outpt=ReLU(W input+b) (1) Where Activated_Outpt represents the output data obtained through the ReLU function, ReLU( ) represents the ReLU function, W is a weight matrix used in the input layer, b is a bias vector used in the input layer, and input is the input data that needs to be processed by the ReLU function.

[0037] Hidden layers, also known as hidden layers, employ multiple convolutional and deconvolutional layers (transposed convolutional layers) to progressively transform high-dimensional feature representations into feature maps with spatial structure. These feature maps serve as feature representations. The role of convolutional layers is to extract local features and preserve the spatial information of the image; multiple convolutional kernels are typically used for convolution operations. Deconvolutional layers, also known as transposed convolutional layers or upsampling layers, progressively upsample low-resolution feature maps to higher resolutions, ultimately generating the target image. Convolutional and deconvolutional layers are used alternately for data processing. The calculation formulas used for convolutional and deconvolutional layers include formulas (2) and (3).

[0038] Outpt1=ReLU(W1 input1+b1) (2) Outpt2=ReLU(W2 t input2+b2) (3) Where W1 and W2 represent the two weight matrices used in the hidden layer, and b1 and b2 represent the two bias vectors used in the hidden layer. For convolution operations, the superscript t indicates the transpose operation. input1 and input2 represent the two input data in the hidden layer that need to be processed by the ReLU function. Outpt1 represents the function value of the ReLU function corresponding to input1, and Outpt2 represents the function value of the ReLU function corresponding to input2. In formulas (2) and (3), the ReLU function can be replaced by the Leaky ReLU function.

[0039] Typically, batch normalization is performed after each convolutional or deconvolutional layer in the hidden layers. This involves standardizing the results of each convolutional or deconvolutional layer by calculating the mean and variance of each batch, followed by scaling and translation to reduce internal covariate bias and improve the generator's training speed and stability. Non-linear activation functions (such as ReLU or Leaky ReLU) can be used in the convolutional and deconvolutional layers of the hidden layers, enabling the trained generator to learn complex function mappings and increase the network's expressive power.

[0040] For example, the formula for batch normalization of the processing results of convolutional or deconvolutional layers is formula (4).

[0041] (4) in, For the normalized result, This refers to the processing results of convolutional or deconvolutional layers. This is the mean of the processing results from the convolutional or deconvolutional layer. This represents the variance of the processing results from the convolutional or deconvolutional layer. It is a very small positive number, used to avoid the case where the denominator is zero.

[0042] The output layer is used to generate image contours, which are represented as images. The dimensions of the data output by the output layer match the preset dimensions; for example, the dimensions of the data output by the output layer can be limited to a reasonable range using Tanh or Sigmoid activation functions.

[0043] In this embodiment, the discriminator aims to distinguish between the real contours of an image and the fake image contours output by the generator. Figure 7 This is a structural block diagram of the determination result obtained by the discriminator in the embodiments of this application, referring to... Figure 7 The input data of the discriminator's input layer includes the following two types of two-dimensional image data: the true contour of the image and the image contour output by the generator.

[0044] The hidden layers of the discriminator can include convolutional layers and pooling layers. Convolutional layers can extract local features from the input two-dimensional image data, and higher-level features can be extracted layer by layer through convolutional operations. Each convolutional layer can use multiple convolutional kernels (filters) to scan the input two-dimensional image data and extract local spatial features. During the feature extraction process of the convolutional layers, batch normalization operations can also be introduced to improve the stability and speed of discriminator training. The role of pooling layers is to reduce the size of the feature map, retain the most important features, and reduce computational complexity. For example, the pooling operations used by the pooling layers can include max pooling and average pooling operations. Max pooling extracts the maximum value through a sliding window on the feature map, and average pooling extracts the average value through a sliding window on the feature map. The formula corresponding to max pooling is formula (5), and the formula corresponding to average pooling is formula (6).

[0045] Max Pooling(x)=Max(x)(5) (6) Where x represents each piece of data extracted through a sliding window on the feature map. This represents the i-th data point extracted through a sliding window on the feature map, where i ranges from 1 to n, and n represents the number of data points extracted through the sliding window on the feature map. This represents the operation of finding the maximum value. Max Pooling(x) represents the result obtained through the max pooling operation. This represents the processing result obtained through the average pooling operation.

[0046] The discriminator's output layer can map the features extracted by the hidden layer to a low-dimensional space, and the discriminator's output layer can output a judgment result. The judgment result can be a scalar value, which represents the authenticity of the two-dimensional image data input to the discriminator. For example, the discriminator's output layer can map the high-dimensional feature vector to a scalar through a linear transformation. For example, the sigmoid activation function can be used to restrict the output value of the output layer to between 0 and 1. The calculation formula used for the discriminator's output layer can be formula (7).

[0047] (7) Where output3 represents the output value of the discriminator's output layer. It is the Sigmoid activation function, and input3 represents the feature map output to the hidden layer. This represents the operation of unfolding a multidimensional feature map into a one-dimensional vector. W3 represents the weight matrix used in the output layer, and b3 represents the bias vector used in the output layer.

[0048] It can be seen that the scalar value output by the discriminator can represent the authenticity of the two-dimensional image data. For example, when the scalar value output by the discriminator is 1, it means that the two-dimensional image data is real image data, and when the scalar value output by the discriminator is 0, it means that the two-dimensional image data is fake image data.

[0049] In this embodiment, the generator in the first generative adversarial network includes deconvolutional layers and fully connected layers. The generator converts low-dimensional vectors into high-dimensional image data through progressive upsampling. The discriminator in the first generative adversarial network includes convolutional layers and pooling layers. The discriminator converts high-dimensional image data into low-dimensional feature vectors through progressive downsampling and finally outputs a scalar value.

[0050] The following provides an illustrative example of the adversarial training process between the generator and discriminator in GAN-1. Adversarial training of the generator and discriminator in GAN-1 is a crucial step in realizing the intended functionality of GAN-1. For example, an alternating update method can be used for adversarial training of the generator and discriminator in GAN-1. That is, the generator and discriminator can be trained alternately. When training the generator, the parameters of the discriminator are fixed while the parameters of the generator are updated to improve the quality of the generated images; when training the discriminator, the parameters of the generator are fixed while the parameters of the discriminator are updated to improve the discriminator's ability to distinguish between real and fake images.

[0051] For example, when training the generator and discriminator in GAN-1 adversarially, the training process can be observed and adjusted based on the loss function (such as cross-entropy loss) to ensure the balance between the discriminator and the generator.

[0052] In this embodiment of the application, when performing adversarial training on the generator and discriminator in GAN-1, the performance of the generated image can also be evaluated. For example, objective indicators such as peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) can be used to evaluate the performance of the generated image.

[0053] For example, when performing adversarial training on the generator and discriminator in GAN-1, the Adam optimizer can be used, and the learning rate of the generator and discriminator can be set to 0.0002, with training parameter beta_1=0.5.

[0054] In this embodiment, the above adversarial training process can be continuously executed based on the real contour of the image until the relevant parameters of the generator and discriminator in GAN-1 converge.

[0055] The following explains the process of training a GAN-1 based on real image contours. An image contour is composed of a series of contour pixels, where each contour pixel is represented by two-dimensional plane coordinates, such as... Let P represent the pixel with coordinates {c, d}. The final image contour can be denoted as P, for example... Where m and q are positive numbers. The process of generating an image contour can be viewed as generating a sequence of contour pixels on a two-dimensional plane step by step over time. Therefore, the process of generating an image contour can be considered as a temporal action. In the embodiments of this application, the goal of training the generator is to enable the generator to generate the optimal sequence set of contour pixels step by step over time.

[0056] When training the generator and discriminator in GAN-1 adversarially, any action taken by the generator in each state will receive feedback from the discriminator. The goal of training the generator is to maximize the discriminator's judgment result and make the discriminator judge the image generated by the generator as a real image as much as possible.

[0057] In this embodiment of the application, it is assumed that the time taken to generate the entire image contour is T, and the set of contour pixels generated at time t is... The generator's state at time t is The next action the generator takes after time t is: ,go through The set of contour pixels generated later is ,go through The subsequent state is .

[0058] The Monte Carlo (MC) algorithm is used to search and select the remaining [items] within a time period Tt. Each contour point, all possible searchable points. The complete sequence matrix corresponding to each contour point is as follows:

[0059] Among them, j takes values ​​from 1 to 1 in sequence. hour, to This represents the generator's state from time t to time T-1 when searching for the j-th contour point. to This indicates the next action taken by the generator between time t and time T-1 when searching for the j-th contour point.

[0060] The discriminator can calculate Corresponding discrimination probability value All that can be searched The discrimination probability value corresponding to each contour point can be represented by the following discrimination probability matrix:

[0061] Among them, j takes values ​​from 1 to 1 in sequence. hour, to This represents the discrimination probability value generated by the discriminator between time t and time T when searching for the j-th contour point.

[0062] By averaging each row of the discrimination probability matrix, we can obtain the complete discrimination probability value after each search. The values ​​for j are sequentially 1 to... When, the complete discrimination probability obtained after searching the j-th contour point is It can be seen that the set of complete discriminant probability values ​​corresponding to each row of the discriminant probability matrix can be represented by formula (8).

[0063] (8) Understandably, the closer the discrimination probability value is to 1, the higher the quality of the image generated by the generator. In practical applications, the training process of the generator and discriminator can be repeated multiple times, and the parameters of the generator and discriminator can be continuously adjusted through the gradient descent strategy until the relevant parameters of the generator and discriminator in GAN-1 converge.

[0064] After GAN-1 training is completed, the generator in GAN-1 can generate image contours based on byte streams. That is, based on the trained GAN-1 model, it can convert the binary data output by the encryption module into image contours.

[0065] As can be seen, the embodiments of this application can obtain the first generation result based on the encrypted data corresponding to multiple sample images, or obtain the first discrimination result based on the first generation result and the real contours of multiple sample images. Thus, when the generator and discriminator are trained adversarially using an alternating update method, the first generative adversarial network after training can reliably generate image contours based on encrypted data. That is, the first generative adversarial network after training can be used to directly convert encrypted information into image contours, thereby achieving information hiding.

[0066] In this embodiment, the encrypted data corresponding to multiple sample images can be in one of several forms. For example, the encrypted data corresponding to multiple sample images is a byte stream of data of a set length. The first generative adversarial network is used to generate image contours based on the byte stream of data of the set length. In this way, when the first generative adversarial network is trained based on the byte stream of data of the set length and the real contours of multiple sample images, the trained first generative adversarial network can have the ability to generate image contours based on the byte stream of data of the set length.

[0067] This application also proposes an information processing method. Figure 8 This is a flowchart of an information processing method proposed in an embodiment of this application, such as... Figure 8 As shown, the process includes: Step 801: Encrypt the original information to obtain the encrypted data.

[0068] Here, the original information is the information that needs to be hidden. (Refer to...) Figure 2 During the encryption process, the original information can be encrypted using an encryption module to obtain encrypted data.

[0069] Step 802: Use the trained first generative adversarial network to process the encrypted data to obtain the first image contour.

[0070] Here, the first generative adversarial network is trained according to the training method of the first generative adversarial network described above.

[0071] For example, refer to Figure 2 In the encryption process, the encrypted data can be input into GAN-1, and GAN-1 can process the encrypted data to obtain the first image contour.

[0072] Step 803: Use the trained second generative adversarial network to process the contour of the first image to obtain the first image, and the contour of the first image is the first image contour.

[0073] Here, the second generative adversarial network can be denoted as GAN-2, referring to... Figure 2 In the encryption process, the first image contour can be input into GAN-2, and the first image can be obtained by processing the first image contour through GAN-2.

[0074] In this embodiment, GAN-2 can be trained. During the data preparation and processing stage, multiple sample images can be acquired; these sample images serve as training data for GAN-2. (Refer to...) Figure 2 In the data preparation and processing stage, training data can be input into GAN-2. Simultaneously, the contour extraction module can process the training data to obtain the corresponding real contours, i.e., the real contours of multiple sample images. After obtaining the real contours of multiple sample images, these real contours can be input into GAN-2. Based on the real contours corresponding to the training images and the training data, GAN-2 can be trained, enabling it to output images based on image contours. Furthermore, the processing capabilities and effects of GAN-2 can be verified using multiple sample images.

[0075] In practical applications, steps 801 to 803 can be implemented based on a processor, which can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0076] As can be seen, the embodiments of this application can train a first generative adversarial network (GAN) based on encrypted data corresponding to multiple sample images and the real contours of multiple sample images, thereby enabling the first GAN to generate image contours based on encrypted data. Thus, by processing the encrypted data through the trained first GAN, the first image contour can be accurately and reliably obtained. After processing the first image contour using a trained second GAN, the encrypted data can be hidden within the first image. Compared to related technologies that can only embed small amounts of secret information into image files, the embodiments of this application do not need to utilize the redundant space of the image file to achieve information hiding. Instead, they can use the trained first GAN to directly convert the encrypted data into the first image contour, thereby achieving information hiding. This is beneficial for improving the embedding efficiency of secret information through the trained first GAN and for hiding large amounts of secret information.

[0077] In this embodiment, the encrypted data can be in one of several forms; for example, the encrypted data is a byte stream of a set length. Thus, the first generative adversarial network can convert the byte stream data into a first image contour, thereby hiding the content within the byte stream data.

[0078] GAN-2 is one of the core modules in the embodiments of this application. GAN-2 mainly converts the first image contour output by GAN-1 into a first image. The structure of GAN-2 is similar to that of GAN-1. (Refer to...) Figure 9 GAN-2 mainly consists of a generator and a discriminator. The generator in GAN-2 takes image contours as input and outputs an image. The discriminator in GAN-2 takes real images as input and outputs a judgment result, which represents the probability that the image output by the generator is a real image. After training GAN-2 with a large number of sample images, the generator in GAN-2 can achieve the effect and ability to generate images based on image contours.

[0079] Both the generator and discriminator in GAN-2 consist of three parts: an input layer, a hidden layer, and an output layer. The differences between GAN-2 and GAN-1 include: in GAN-2, the generator takes image contours as input and outputs an image; while the discriminator in GAN-2 takes both real images and images generated by the generator as input.

[0080] The training method for GAN-2 is similar to that for GAN-1. That is, the generator and discriminator in GAN-2 can be trained adversarially by using an alternating update method. By training the generator and discriminator in GAN-2 adversarially, the generator and discriminator in GAN-2 can be continuously optimized.

[0081] For example, when training GAN-2, the training data and the corresponding real contours can be saved. By training GAN-2 with a sufficient number of sample images, the training effect of GAN-2 can be improved.

[0082] For example, random noise can be added to the input of the hidden layer of the GAN-2 generator to further increase the complexity of the image and mask traces of information hiding. Note that the additional noise needs to be weighed in the loss function to ensure that it does not affect the quality of the generated image and the information hiding effect.

[0083] It can be seen that the trained GAN-2 can generate a first image based on the first image contour output by GAN-1.

[0084] This application also proposes another information processing method. Figure 10A flowchart of another information processing method proposed in the embodiments of this application is shown below. Figure 10 As shown, the process includes: Step 1001: Obtain the first image.

[0085] Step 1002: Process the first image using a third generative adversarial network to obtain the contour of the second image.

[0086] Step 1003: Use the fourth generative adversarial network to process the contour of the second image to obtain the data to be decrypted.

[0087] In this embodiment, the parsing module includes a third generative adversarial network and a fourth generative adversarial network. (Refer to...) Figure 2 During the decryption process, the parsing module can process the first image to obtain the outline of the second image, and then process the outline of the second image to extract the data to be decrypted.

[0088] The parsing module extracts hidden information from the first image output by GAN-2. Specifically, it can recover the outline of the second image from the first image and then extract the data to be decrypted from the second image outline. For example, the data to be decrypted can be a binary byte stream, which is used by the decryption module for further processing.

[0089] Step 1004: Decrypt the data to be decrypted.

[0090] Reference Figure 2 During the decryption phase, the decryption module can decrypt the data to be decrypted, obtaining the decrypted data, which is the original information recorded above. It can be seen that the decryption process of the decryption module is the reverse process of the encryption process of the encryption module.

[0091] For example, the decryption module processes the byte stream output by the parsing module as follows: the byte stream is converted into a raw data file according to a preset conversion rule, and then the raw data file is decrypted using the corresponding decryption algorithm to obtain the decrypted data. Here, the decryption algorithm used corresponds to the encryption algorithm used by the encryption module, such as AES, RSA, etc.

[0092] In practical applications, steps 1001 to 1004 can be implemented based on a processor, which can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0093] As can be seen, when the original information is hidden in the first image, the embodiments of this application can process the first image through a third generative adversarial network to obtain the outline of the second image; and use a fourth generative adversarial network to process the outline of the second image to obtain the data to be decrypted; thus, when the data to be decrypted is decrypted, the decrypted original information can be restored from the first image, thereby reliably realizing the secret transmission of the original information.

[0094] In this embodiment, the generators for the third and fourth generative adversarial networks (GANs) can be configured according to functional requirements. In some embodiments, the computation process of the third GAN generator is the inverse of the computation process of the second GAN generator; the computation process of the fourth GAN generator is the inverse of the computation process of the first GAN generator.

[0095] It can be seen that the generator of the second generative adversarial network (GAN) can generate images based on image contours. Therefore, when the operation process of the generator of the third GAN is the inverse operation process of the generator of the second GAN, the generator of the third GAN can reliably generate image contours based on images. The generator of the first GAN can generate image contours based on encrypted data. Therefore, when the operation process of the generator of the fourth GAN is the inverse operation process of the generator of the first GAN, the generator of the first GAN can generate data to be decrypted based on image contours.

[0096] The third generative adversarial network (GAN) consists of a generator and a discriminator. The generator in the third GAN can be denoted as Generator-1, and the discriminator can be denoted as Discriminator-1. Generator-1 performs the function of recovering the image contour from the image. (See reference...) Figure 11 The input to generator-1 is an image (e.g., a first image), which generator-1 processes. The input to discriminator-1 includes the image generated by generator-1 and the true contour of the image. The output of discriminator-1 is the judgment result. The judgment result of discriminator-1 in the third generative adversarial network represents the probability that the image contour output by generator-1 is a true contour. For example, the generator in the third generative adversarial network has a similar structure to the generator in the second generative adversarial network, both adopting a three-layer structure consisting of an input layer, a hidden layer, and an output layer, and using a convolutional algorithm.

[0097] The fourth generative adversarial network (GAN) consists of a generator and a discriminator. The generator in the fourth GAN can be denoted as Generator-2, and the discriminator can be denoted as Discriminator-2. Generator-2 extracts the binary bitstream based on the pixel distribution of the contour image. (See reference...) Figure 12 The input to generator-2 is an image contour (e.g., a second image contour). Generator-2 processes the image contour to obtain byte stream data, which is the byte stream corresponding to each pixel in the contour image. The input to discriminator-2 includes the real byte stream data and the byte stream data generated by generator-2. The output of discriminator-2 is the judgment result. The judgment result of discriminator-2 in the fourth generative adversarial network represents the probability that the byte stream data generated by generator-2 is the real byte stream data. For example, the generator in the fourth generative adversarial network has a similar structure to the generator in the first generative adversarial network, both adopting a three-layer structure consisting of an input layer, a hidden layer, and an output layer, and using a convolutional algorithm.

[0098] For example, the fourth generative adversarial network can process the pixel positions according to the pixel distribution of the image contour, convert them into a fixed-length binary byte stream, and concatenate all the binary bit streams together to obtain the final output byte stream data.

[0099] In summary, when performing information hiding, the embodiments of this application can utilize a trained first generative adversarial network to directly convert encrypted information into image contours. This is beneficial for improving the embedding efficiency of secret information, the amount of secret information to be hidden, and the reliability of information hiding through the trained first generative adversarial network. At the same time, it can maintain the naturalness of the visual image during information hiding, making it less likely to be detected.

[0100] This application embodiment can achieve information hiding and extraction of hidden information based on AIGC. Through reasonable model design and adversarial training, the generative adversarial network can generate high-quality images, thereby achieving information hiding and transmission. In this application embodiment, the model architecture and training process of the generative adversarial network can be adjusted according to requirements, data, and image characteristics to achieve optimal steganography results and high image generation quality.

[0101] The solutions presented in this application have broad application prospects. For example, as the importance of information security and data privacy protection becomes increasingly prominent, various organizations and enterprises are increasingly demanding information hiding and steganography extraction technologies. Adopting the solutions presented in this application can provide enterprises with robust data security guarantees, meeting the data security needs of different industries, especially in certain fields where there is widespread demand and application potential. For example, the solutions presented in this application can provide professional industry solutions. Through customized services tailored to specific industry needs, such as watermarking based on information hiding, more discreet and secure watermarking functions can be achieved, allowing enterprises to provide customers with more accurate and effective information security solutions.

[0102] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0103] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a terminal, server, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0104] Correspondingly, this application embodiment further provides a computer program product, which includes computer-executable instructions for implementing any of the generative adversarial network training methods or any of the information processing methods provided in this application embodiment.

[0105] Accordingly, this application embodiment further provides a computer storage medium storing computer-executable instructions, which are used to implement any of the generative adversarial network training methods or any of the information processing methods provided in the above embodiments.

[0106] This application also provides an electronic device. Figure 13 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application, such as... Figure 13As shown, the electronic device 130 may include: Memory 1301 is used to store executable instructions; The processor 1302 is used to execute executable instructions stored in the memory 1301 to implement any of the above-described generative adversarial network training methods or any of the information processing methods.

[0107] The processor 1302 mentioned above can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.

[0108] The aforementioned computer-readable storage medium and memory 1301 may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it may also be various terminals that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0109] In some embodiments, the functions or modules of the apparatus provided in this application can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0110] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0111] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.

[0112] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0113] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0115] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims. All of these forms are within the protection scope of this application.

Claims

1. A training method for generative adversarial networks, characterized in that, The method includes: Acquire multiple sample images; The plurality of sample images are encrypted to obtain encrypted data corresponding to the plurality of sample images; and the contours of the plurality of sample images are extracted to obtain the true contours of the plurality of sample images. The first generative adversarial network is trained based on the encrypted data corresponding to the multiple sample images and the real contours of the multiple sample images.

2. The method according to claim 1, characterized in that, The step of training the first generative adversarial network based on the encrypted data corresponding to the plurality of sample images and the contours of the plurality of sample images includes: The encrypted data corresponding to the multiple sample images is input into the generator of the first generative adversarial network to obtain the first generation result; The first generated result and the true contours of the multiple sample images are input into the discriminator of the first generative adversarial network to obtain the first discrimination result; Based on the first generation result and the first discrimination result, the generator and discriminator of the first generative adversarial network are trained adversarially using an alternating update method to obtain the trained first generative adversarial network.

3. The method according to claim 1, characterized in that, The encrypted data corresponding to the multiple sample images is a byte stream of data of a set length.

4. An information processing method, characterized in that, The method includes: The original information is encrypted to obtain encrypted data; The encrypted data is processed using a first generative adversarial network that has been trained to obtain a first image contour; the first generative adversarial network is trained using the training method according to any one of claims 1 to 3; The first image contour is processed using a trained second generative adversarial network to obtain a first image, and the contour of the first image is the first image contour.

5. The method according to claim 4, characterized in that, The encrypted data is a byte stream of a set length.

6. An information processing method, characterized in that, The method includes: Acquire a first image; the first image is obtained by the information processing method according to claim 4 or 5. The first image is processed using a third generative adversarial network to obtain the outline of the second image; The second image contour is processed using a fourth generative adversarial network to obtain the data to be decrypted; The data to be decrypted is decrypted.

7. The method according to claim 6, characterized in that, The computation process of the generator of the third generative adversarial network is the inverse computation process of the generator of the second generative adversarial network; the computation process of the generator of the fourth generative adversarial network is the inverse computation process of the generator of the first generative adversarial network.

8. An electronic device, characterized in that, The electronic device includes a processor and a memory for storing computer programs that can run on the processor; wherein, The processor is used to run the computer program to perform the method according to any one of claims 1 to 7.

9. A computer storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.