Steganographic image generation method, steganographic information extraction method and related device
By converting the hidden information into a hidden bit stream to be encoded and performing compression encoding with the carrier image, the problem of low information recovery rate in the existing technology is solved and efficient information protection and recovery is achieved.
Patent Information
- Application Number
- CN202310087825.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-02-08
AI Technical Summary
Existing steganographic image generation methods result in low information recovery rates, high information loss and error rates during the compression and encoding process, and cannot effectively protect the information that needs to be transmitted.
By converting the hidden information into a hidden bit stream to be encoded, copying and splicing it according to the spatial size and number of channels of the carrier image to form a hidden tensor to be encoded, and then compressing and encoding it with the carrier image to generate the target steganographic image, so that the carrier Each area of the image carries a hidden bitstream, thereby increasing the rate of information recovery.
It improves the information recovery rate and accuracy of steganographic images, reduces the amount of information loss, and enhances the ability to protect information.
Smart Images

Figure CN116156072B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a method for generating a steganographic image, a method for extracting steganographic information, and related devices. Background Art
[0002] The sender can encode the information to be protected into a carrier image through the information stego-image generation method to obtain a stego-image, and then send the stego-image to the receiver. After receiving the stego-image, the receiver can extract the hidden information by decoding, so as to protect the security of the information and avoid information leakage. In the related art, in order to reduce the bandwidth and other resource usage, the stego-image is usually obtained by compression coding. When the receiver decodes such stego-image, a lot of information may be lost, resulting in a low information recovery rate. Therefore, how to generate a stego-image with a high recovery rate has become one of the hot issues in the field of information security technology. Summary of the invention
[0003] The present application provides a method for generating a stego image, a method for extracting stego information, and corresponding devices, equipment, and media, which can improve the information recovery rate and accuracy of the stego image.
[0004] In a first aspect, the present application provides a method for generating a steganographic image, which comprises: obtaining hidden information and a carrier image; converting the hidden information into a hidden bit stream to be encoded, wherein the hidden bit stream to be encoded is a sequence composed of multiple bits; according to a first spatial size and a preset number of channels of the carrier image, copying and splicing the hidden bit stream to be encoded to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image; compressing and encoding the carrier image and the hidden tensor to be encoded to obtain a target steganographic image.
[0005] In a second aspect, the present application provides a method for extracting stego information, which includes: obtaining a target stego image to be processed; wherein the target stego image is obtained by the stego image generation method described in any one of the embodiments of the present application; compressing and decoding the target stego image to obtain a decoded hidden tensor; obtaining multiple decoded hidden bit streams from the decoded hidden tensor, and determining a fused bit stream based on the multiple decoded hidden bit streams; and converting the fused bit stream into decoded hidden information.
[0006] In a third aspect, the present application provides a steganographic image generating device, which includes: an acquisition module, used to acquire hidden information and a carrier image; a conversion module, used to convert the hidden information into a hidden bit stream to be encoded, wherein the hidden bit stream to be encoded is a sequence composed of multiple bits; a processing module, used to copy and splice the hidden bit stream to be encoded according to a first spatial size and a preset number of channels of the carrier image to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image; an encoding module, used to compress and encode the carrier image and the hidden tensor to be encoded to obtain a target steganographic image.
[0007] In a fourth aspect, the present application provides a stego information extraction device, which includes: an acquisition module, used to acquire a target stego image to be processed; wherein the target stego image is obtained by the stego image generation method described in any one of the embodiments of the present application; a decoding module, used to compress and decode the target stego image to obtain a decoded hidden tensor; a processing module, used to obtain multiple decoded hidden bit streams from the decoded hidden tensor, and determine a fused bit stream based on the multiple decoded hidden bit streams; a conversion module, used to convert the fused bit stream into decoded hidden information.
[0008] In a fifth aspect, the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executed by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can execute the above-mentioned steganographic image generation method, or the steganographic information extraction method.
[0009] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the above-mentioned steganographic image generation method, or steganographic information extraction method.
[0010] The embodiment provided by the present application first obtains hidden information and a carrier image to clarify that the object to be protected is the hidden information and the carrier image carrying the hidden information; secondly, the hidden information is converted into a hidden bit stream to be encoded, and a data form that is convenient for stego-writing into the carrier image is obtained; then, according to the first spatial size and the preset number of channels of the carrier image, the hidden bit stream to be encoded is copied and spliced to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image. Through this processing method, the hidden tensor to be encoded can cover the entire image domain of the carrier image; finally, the carrier image and the hidden tensor to be encoded are compressed and encoded to obtain a target stego-image, so that each area of the carrier image carries the hidden bit stream, thereby improving the recovery rate of the hidden information and reducing the amount of information loss when the hidden information is restored based on the target stego-image.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:
[0013] Figure 1 A flowchart of a method for generating a steganographic image provided in an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a process for obtaining a hidden tensor to be encoded provided in an embodiment of the present application;
[0015] Figure 3 A flowchart of a method for generating a steganographic image provided in an embodiment of the present application;
[0016] Figure 4 A flowchart of a method for extracting steganalytic information provided in an embodiment of the present application;
[0017] Figure 5 A flowchart of a method for extracting steganalytic information provided in an embodiment of the present application;
[0018] Figure 6 A schematic diagram of a steganographic processing process provided in an embodiment of the present application;
[0019] Figure 7A block diagram of a steganographic image generating device provided in an embodiment of the present application;
[0020] Figure 8 A block diagram of a stego information extraction device provided in an embodiment of the present application;
[0021] Fig. 9 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solution of the present application, the exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0023] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.
[0024] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0025] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0026] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.
[0027] The information steganography method encodes the binary information to be protected (for example, copyright data, personal privacy data, etc.) into a carrier image to obtain a stego-image. After the receiver obtains the stego-image, it can use the steganalyzer to perform binary classification on the stego-image to determine whether hidden information is embedded, and can extract the hidden binary information through the decoder.
[0028] In related technologies, the capacity of embedded hidden information can be increased through deep learning-based steganographic models, and the ability to resist steganalysis detection can be improved. However, in some scenarios (for example, image transmission scenarios based on social networks), images are compressed, and steganographic technologies that support compression can only support lower information capacity and cannot write more information. After compression and decompression, the degree of information recovery is low and the error rate is high.
[0029] In view of this, the present application discloses a stego image generation method, a stego information extraction method, and corresponding devices, equipment, and media.
[0030] According to the method for generating a stego image in an embodiment of the present application, first, hidden information and a carrier image are obtained to clarify that the object to be protected is the hidden information and the carrier image carrying the hidden information; secondly, the hidden information is converted into a hidden bit stream to be encoded, and a data form that is convenient for stego-writing into the carrier image is obtained; then, according to the first spatial size and the preset number of channels of the carrier image, the hidden bit stream to be encoded is copied and spliced to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image. Through this processing method, the hidden tensor to be encoded can cover the entire image domain of the carrier image; finally, the carrier image and the hidden tensor to be encoded are compressed and encoded to obtain a target stego image, so that each area of the carrier image carries the hidden bit stream, thereby improving the recovery rate of the hidden information and reducing the amount of information loss when the hidden information is restored based on the target stego image.
[0031] The steganographic image generation method and the steganographic information extraction method of the embodiment of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be a vehicle-mounted device, a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory. The server can be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
[0032] The steganographic image generation method and the steganographic information extraction method of the embodiment of the present application can be applied to the encrypted data transmission process, for example, it can be applied to the metaverse scenario. In the metaverse application, each user has personal information, and these personal information have different authorization levels for different objects (for example, unviewable, viewable, etc.). For the administrator of the metaverse application, it may be necessary to know the identity of each user (for example, ID card number), and the user's other identity information (for example, occupation) may not be disclosed to them. Therefore, the user can embed the identity in the personal portrait through the steganographic image generation method, and the administrator can obtain the user's identity by using the user's personal portrait through the steganographic information extraction method. In the virtual hospital of the metaverse, the virtual doctor user can also embed the virtual patient's diagnostic information into an image and send the image to the virtual patient, so as to obtain the diagnostic information from the image through the steganographic information extraction method. It should be noted that the above application scenarios of the steganographic image generation method and the steganographic information extraction method are only examples.
[0033] In a first aspect, an embodiment of the present application provides a method for generating a steganographic image.
[0034] Figure 1 A flowchart of a method for generating a steganographic image provided in an embodiment of the present application. Figure 1 , the steganographic image generation method comprises:
[0035] In step S11, hidden information and a carrier image are obtained.
[0036] In some optional implementations, the hidden information is information that needs to be encrypted for transmission, which may be user identity information, payment information, key information, etc., which is not limited in this embodiment of the present application.
[0037] In some optional implementations, the carrier image is an image that carries hidden information, which can be a solid color image or an image with a pattern, and the carrier image can be in any image format, which is not limited in the embodiments of the present application.
[0038] After obtaining the hidden information and the carrier image, the hidden information can be hidden in the carrier image by steganography.
[0039] In step S12, the hidden information is converted into a hidden bit stream to be encoded, where the hidden bit stream to be encoded is a sequence consisting of a plurality of bits.
[0040] In some optional implementations, in order to facilitate steganography, the hidden information needs to be converted into a bit stream (Bit Torrent) form. The hidden bit stream to be encoded obtained by converting the hidden information includes multiple bits, and these bits form a sequence to form a bit stream.
[0041] Exemplarily, the hidden information is converted into a hidden bit stream to be encoded, including: converting the hidden information into a hidden byte stream to be encoded; performing error correction encoding on the hidden byte stream to be encoded to obtain a hidden error correction code to be encoded; and converting the hidden error correction code to be encoded into a hidden bit stream to be encoded based on a byte-bit conversion method.
[0042] In other words, the hidden information is first converted into bytes, and the sequence formed by the arrangement of multiple bytes is the hidden byte stream to be encoded. On this basis, the hidden byte stream to be encoded is error-corrected and coded to generate the hidden error-correcting code to be encoded. Then, each byte in the hidden error-correcting code to be encoded is converted into a bit through byte-bit conversion to form the hidden bit stream to be encoded. Among them, the error-correcting coding of the hidden byte stream to be encoded is mainly to enable the receiving end to detect or correct errors after errors occur during data transmission, so as to improve the accuracy of data transmission.
[0043] It should be noted that the error correction coding methods include Reed-Solomon (RS) error correction coding, forward error correction (FEC) coding, hybrid error correction (HEC) coding, etc., and the embodiments of the present application are not limited to this.
[0044] In step S13, according to the first spatial size of the carrier image and the preset number of channels, the hidden bit stream to be encoded is copied and concatenated to obtain a hidden tensor to be encoded.
[0045] The number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image.
[0046] Among them, the spatial dimension is usually used to reflect the length and width, and the first spatial dimension is used to represent the length and width of the carrier image. For a tensor, in addition to the spatial dimension, it also includes the channel dimension of the channel dimension, and the channel dimension can usually be characterized by the number of channels. For the hidden tensor to be encoded, in the spatial dimension, its second spatial dimension is the same as the first spatial dimension of the carrier image, and in the channel dimension, its number of channels is the same as the preset number of channels. In other words, the hidden tensor to be encoded can cover the entire image domain of the carrier image.
[0047] It should be noted that the carrier image can be a single-channel image or a multi-channel image, and the embodiments of the present application do not limit this.
[0048] In some optional implementations, step S13 includes: replicating the hidden bit stream to be encoded multiple times in the spatial dimension, and splicing the multiple replicated hidden bit streams to be encoded according to the first spatial size of the carrier image to obtain hidden features to be encoded with the first spatial size; replicating the hidden features to be encoded multiple times in the channel dimension according to a preset number of channels to obtain a hidden tensor to be encoded.
[0049] In other words, first in the spatial dimension, the hidden bit stream to be encoded is copied and spliced multiple times to obtain the hidden features to be encoded with the same size as the first spatial dimension, and then in the channel dimension, the hidden features to be encoded are copied multiple times so that the number of channels is the same as the preset number of channels, thereby obtaining the hidden tensor to be encoded.
[0050] Figure 2 A schematic diagram of a process for obtaining a hidden tensor to be encoded provided in an embodiment of the present application. Figure 2 , the first spatial size of the hidden image is (W, H), and the hidden bit stream to be encoded can be regarded as a one-dimensional vector with a length of L. First, according to the first spatial size of (W, H), the hidden bit stream to be encoded is copied and spliced multiple times in the spatial dimension to obtain the hidden features to be encoded, and the second spatial size of the hidden features to be encoded is also (W, H); further, the number of channels is preset to D, and the hidden features to be encoded are copied D times in the channel dimension to obtain a hidden tensor to be encoded with a size of (D, W, H), where D represents the number of channels of the hidden tensor to be encoded in the channel dimension. In the above process, the hidden bit stream to be encoded is copied (D×W×H) / L times, or the hidden tensor to be encoded includes (D×W×H) / L hidden bit streams to be encoded.
[0051] In step S14, the carrier image and the hidden tensor to be encoded are compressed and encoded to obtain a target stego-image.
[0052] In some optional implementations, if the size of the carrier image is 3×W×H and the size of the hidden tensor to be encoded is D×W×H, then through compression coding, the hidden tensor to be encoded of D×W×H can be embedded into the carrier image of 3×W×H, and a target steganographic image of size 3×W×H can be obtained.
[0053] In some optional implementations, the above compression encoding function can be implemented by an encoder.
[0054] Exemplarily, the carrier image and the hidden tensor to be encoded are input into a preset encoder, and processed by the encoder to obtain a target steganographic image; wherein the encoder is a model built based on a deep convolutional network and has compression coding capabilities.
[0055] For example, the carrier image and the hidden tensor to be encoded are input into the encoder, and after processing, the encoder outputs the target stego-image, which has stego-encoded the hidden tensor to be encoded into the carrier image, and the hidden information cannot be obtained from the target stego-image by naked eyes. The target hidden image can be in the Joint Photographic Experts Group (JPEG) format or other image formats, which is not limited in the embodiments of the present application.
[0056] Take the JPEG format as an example for explanation. When generating a target steganographic image in the JPEG format, the compression encoding process easily causes information loss. Moreover, the image in the JPEG format is mainly compressed for the high-frequency area of the image, so more information is lost in the high-frequency area, while less information is lost in the low-frequency area. Returning to the present application, since the hidden information is written in the entire image domain of the carrier image, the coverage of the hidden information is higher than that of only writing one hidden information in the carrier image, so that there is rich hidden information in both the high-frequency area and the low-frequency area of the target hidden image. Based on this, the hidden information recovered by the corresponding hidden image processing method is not easy to be lost, thereby improving the recovery rate of the hidden information.
[0057] According to an embodiment of the present application, first, hidden information and a carrier image are obtained to clarify that the object to be protected is the hidden information and the carrier image carrying the hidden information; secondly, the hidden information is converted into a hidden bit stream to be encoded, and a data form that is convenient for steganography into the carrier image is obtained; then, according to the first spatial size and the preset number of channels of the carrier image, the hidden bit stream to be encoded is copied and spliced to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image. Through this processing method, the hidden tensor to be encoded can cover the entire image domain of the carrier image; finally, the carrier image and the hidden tensor to be encoded are compressed and encoded to obtain a target stego-image, so that each area of the carrier image carries the hidden bit stream, thereby improving the recovery rate of the hidden information and reducing the amount of information loss when the hidden information is restored based on the target stego-image.
[0058] Figure 3 A flowchart of a method for generating a steganographic image provided in an embodiment of the present application. Figure 3 , the steganographic image generation method comprises:
[0059] Step S301, obtaining hidden information and carrier image.
[0060] Step S302: convert the hidden information into a hidden byte stream to be encoded.
[0061] For example, the hidden information can be encoded by utf-8 (Unicode Transformation Format, 8 bits) encoding method to obtain the hidden byte stream to be encoded. In addition, the hidden information can also be encoded by Unicode (Unicode horizontal tabulation character, Unicode) encoding method, etc., which is not limited in the embodiments of the present application.
[0062] Step S303, compressing the hidden byte stream to be encoded to obtain a compressed hidden byte stream to be encoded.
[0063] Step S304, performing error correction coding on the byte stream to be encoded and compressed to be hidden, to obtain an error correction code to be encoded and hidden.
[0064] Step S305: convert the hidden error correction code to be encoded into a hidden bit stream to be encoded.
[0065] Step S306, the hidden bit stream to be encoded is replicated multiple times in the spatial dimension, and the replicated multiple hidden bit streams to be encoded are spliced according to the first spatial size of the carrier image to obtain the hidden features to be encoded with the first spatial size.
[0066] Exemplarily, the carrier image is divided into multiple image partitions according to information such as the color distribution and grayscale distribution of the carrier image. When generating hidden features to be encoded, the hidden bit stream to be encoded is copied and spliced for each image partition to obtain hidden sub-features to be encoded that match the partition spatial size of each image partition. Then, according to the distribution position of each image partition, the corresponding hidden sub-features to be encoded are spliced to obtain hidden features to be encoded that match the first spatial size of the carrier image.
[0067] Step S307, according to the preset number of channels, the hidden features to be encoded are copied multiple times in the channel dimension to obtain the hidden tensor to be encoded.
[0068] Step S308, input the carrier image and the hidden tensor to be encoded into a preset encoder, and obtain the target stego-image through processing by the encoder.
[0069] Among them, the encoder is a model built based on a deep convolutional network with compression coding capabilities.
[0070] In a second aspect, an embodiment of the present application provides a method for extracting steganalytic information.
[0071] Figure 4 A flowchart of a method for extracting steganographic information provided in an embodiment of the present application. Figure 4 , the steganographic information extraction method comprises:
[0072] Step S41, obtaining the target steganographic image to be processed.
[0073] The target steganographic image is obtained by any steganographic image generation method in any one of the embodiments of the present application.
[0074] In some optional implementations, hidden information and a carrier image are first obtained, and the hidden information is converted into a hidden bit stream to be encoded, wherein the hidden bit stream to be encoded is a sequence composed of multiple bits; then, according to the first spatial size of the carrier image and the preset number of channels, the hidden bit stream to be encoded is copied and spliced to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image; finally, the carrier image and the hidden tensor to be encoded are compression encoded to obtain a target steganographic image.
[0075] Step S42, compress and decode the target steganographic image to obtain a decoded hidden tensor.
[0076] In some optional implementations, according to the compression encoding method used to generate the target steganographic image, a matching compression decoding method is used to process the target steganographic image to obtain a decoded hidden tensor and a decoded image, wherein the decoded hidden tensor corresponds to the encoded hidden tensor, and the decoded image corresponds to the carrier image, and the subsequent processing process is mainly performed on the decoded hidden tensor.
[0077] In some optional implementations, the decoded hidden tensor is a tensor obtained by compressing and decoding the hidden tensor to be encoded used to generate the target stego-image; wherein the hidden tensor to be encoded is obtained by copying and splicing a plurality of hidden bit streams to be encoded to obtain hidden features to be encoded, and the hidden features to be encoded are copied multiple times in the channel dimension according to a preset number of channels, the hidden tensor to be encoded includes a plurality of hidden bit streams to be encoded, the decoded hidden tensor includes a plurality of decoded hidden bit streams, and there is a corresponding relationship between the encoded hidden bit stream and the decoded hidden bit stream. In other words, after each encoded hidden bit stream is compressed and decoded, a corresponding decoded hidden bit stream will be obtained.
[0078] In some optional implementations, the above compression decoding function can be implemented by a decoder.
[0079] Exemplarily, the target steganographic image is input into a preset decoder, and processed by the decoder to obtain a decoded hidden tensor and a decoded image carrying the decoded hidden tensor; wherein the decoder is a model built based on a deep convolutional network and has compression decoding capabilities.
[0080] Step S43, obtaining multiple decoded hidden bit streams from the decoded hidden tensor, and determining a fused bit stream based on the multiple decoded hidden bit streams.
[0081] In some optional implementations, step S43 includes: splitting the decoded hidden tensor into multiple decoded hidden bit streams; determining the value of each bit in each decoded hidden bit stream based on the multiple decoded hidden bit streams, the value including the bit value of the bit and the number of times each bit value corresponds to; determining the fused value of each bit based on the value of each bit in each decoded hidden bit stream; and obtaining a fused bit stream based on the fused value of each bit.
[0082] In other words, similar to the hidden tensor to be encoded, the decoded hidden tensor includes decoded hidden features of multiple channel numbers (which may be the same as the preset channel number), and each decoded hidden feature is formed by splicing multiple decoded hidden bit streams. Therefore, the decoded hidden tensor can be split into multiple decoded hidden bit streams, and each bit of each decoded hidden bit stream has a corresponding value. In an ideal state, the bit values of the same bit in different decoded hidden bit streams should be the same, but due to factors such as information loss in data transmission, loss caused by compression and decompression, there may be errors in the values of some bit values in actual situations, but most of the bit values are accurate. Based on this, according to multiple decoded hidden bit streams, determine which bit values exist for each bit and the number of times each bit value is taken, and then determine the bit value with a larger number of times as the fused value of the bit, and finally obtain the fused bit stream through the fused values of each bit.
[0083] For example, by splitting the decoded hidden tensor, 6 decoded hidden bit streams can be obtained, which are: 10101, 10100, 10101, 00101, 10001, 10101. It can be seen that the length of each decoded hidden bit stream is 5, that is, each decoded hidden bit stream includes 5 bits.
[0084] For the first bit, the values of the 6 decoded hidden bit streams are 1, 1, 1, 0, 1, 1 respectively. The bit value of this bit includes two cases, 1 and 0. The number of times it takes the value of 1 is 5 times, and the number of times it takes the value of 0 is 1 time. Since the number of times it takes the value of 1 is greater than the number of times it takes the value of 0, the fused value of the first bit is determined to be 1.
[0085] For the second bit, the values of the six decoded hidden bit streams are 0, 0, 0, 0, 0, 0 respectively. The bit value of this bit has only one case of 0, so the fused value of the second bit is determined to be 0.
[0086] In a similar manner, the fused values of the remaining three bits can be determined, thereby determining that the corresponding fused bit stream is 10101.
[0087] Step S44, converting the fused bit stream into decoded hidden information.
[0088] In some optional implementations, step S44 includes: converting the fused bit stream into a decoded hidden byte stream, and converting the decoded hidden byte stream into decoded hidden information.
[0089] For example, the fused bit stream is first converted into a decoded hidden byte stream through a bit-to-byte conversion method, and then the decoded hidden byte stream can be converted into decoded hidden information through a UTF-8 decoding method.
[0090] In some optional implementations, the coded hidden bit stream is obtained by hiding the error correction code, and the coded hidden bit stream, the decoded hidden bit stream and the merged bit stream include at least one error correction bit; accordingly, after determining the merged bit stream based on multiple decoded hidden bit streams and before converting the merged bit stream into decoded hidden information, it also includes: correcting the merged bit stream according to the error correction bit in the merged bit stream.
[0091] Exemplarily, after obtaining the fused bit stream, the fused bit stream is error corrected according to the error correction bit to obtain a decoded hidden error correction code, which is then converted into a decoded hidden byte stream, and the decoded hidden byte stream is converted into decoded hidden information through a corresponding decoding method (for example, UTF-8 decoding, Unicode decoding, etc.).
[0092] In some optional implementations, if the hidden byte stream to be encoded is a compressed byte stream, then after obtaining the decoded hidden byte stream, the decoded hidden byte stream needs to be decompressed (for example, in-memory decompression), and then the decompressed data needs to be decoded accordingly.
[0093] The embodiment provided by the present application firstly obtains the target stego image to be processed to clarify the processing object; secondly, compresses and decodes the target stego image to obtain a decoded hidden tensor, thereby obtaining the hidden information in the form of a tensor in the stego image, and because the hidden information covers the entire image domain of the stego image, the decoded hidden tensor better retains the hidden information, providing a data basis for improving the information recovery rate; then, multiple decoded hidden bit streams are obtained from the decoded hidden tensor, and a fused bit stream is determined based on the multiple decoded hidden bit streams. In this processing process, the situation in which the values of some bits are inaccurate due to information loss or transmission errors is fully considered. Therefore, the fused value of each bit is determined by multiple decoded hidden bit streams, and then the fused bit stream is obtained, which can effectively improve the accuracy of information recovery; finally, the fused bit stream is converted into decoded hidden information, thereby obtaining decoded hidden information matching the format of the hidden information, thereby improving the user experience.
[0094] Figure 5 A flowchart of a method for extracting steganographic information provided in an embodiment of the present application. Figure 5 , the steganographic information extraction method comprises:
[0095] Step S501, obtaining a target steganographic image.
[0096] Step S502, input the target steganographic image into a preset decoder, and obtain a decoded hidden tensor after being processed by the decoder.
[0097] Step S503: split the decoded hidden tensor into multiple decoded hidden bit streams.
[0098] Step S504: Determine the bit value of each bit in each decoded concealed bit stream and the number of times each bit value is taken according to the multiple decoded concealed bit streams.
[0099] Step S505, determining the fused value of each bit according to the bit value of each bit and the number of times each bit value is taken.
[0100] Step S506: Obtain a fused bit stream based on the fused value of each bit.
[0101] Exemplarily, if the hidden feature to be encoded is obtained by splicing the hidden sub-features to be encoded according to multiple image partitions of the carrier image, when the decoded hidden feature is split, the decoded hidden sub-features corresponding to each image partition are obtained based on the multiple image partitions, and each decoded hidden sub-feature includes one or more decoded hidden bit streams. For each decoded hidden sub-feature, it is split to obtain one or more decoded hidden bit streams, and a fusion processing method is used for this part of the decoded hidden bit stream to obtain a sub-fusion bit stream corresponding to the decoded hidden sub-feature, and then the multiple sub-fusion bit streams are further fused to obtain the final fusion bit stream.
[0102] The above processing method further takes into account that different color blocks and grayscale blocks of the carrier image may have strong similarities during the transmission, compression, decompression and other processing processes. Therefore, fusion processing is performed on image blocks with smaller granularity. Compared with fusion processing based on the entire image area, it can further improve the information recovery rate and recovery accuracy to a certain extent.
[0103] Step S507: performing error correction on the merged bit stream according to the error correction bits in the merged bit stream.
[0104] Step S508: convert the error-corrected fused bit stream into a decoded hidden byte stream.
[0105] Step S509: convert the decoded hidden byte stream into decoded hidden information.
[0106] Figure 6 A schematic diagram of a steganographic processing process provided in an embodiment of the present application. Figure 6 , the steganographic processing process includes:
[0107] First, the hidden information in text form is obtained, and the hidden information is encoded by utf-8 to obtain a hidden byte stream to be encoded, and the hidden byte stream to be encoded is error-corrected to obtain a hidden error correction code to be encoded, and the hidden error correction code to be encoded is converted into a hidden bit stream to be encoded by byte-bit conversion. The hidden bit stream to be encoded is copied, spliced and channel-expanded to obtain a hidden tensor to be encoded, and the spatial size of the hidden tensor to be encoded is the same as that of the carrier image, and the number of channels can be the same or different.
[0108] Furthermore, the carrier image and the hidden tensor to be encoded are input into the encoder, and the target steganographic image is outputted externally through compression encoding by the encoder, so as to realize the steganography of the hidden information into the carrier image, and the target steganographic image is transmitted to the decoder.
[0109] After receiving the target steganographic image, the decoder performs compression decoding processing on it to obtain a decoded hidden tensor, which has a corresponding relationship with the encoded hidden tensor. The decoded hidden tensor is split to obtain multiple decoded hidden bit streams, each of which is obtained by compressing and decoding the corresponding encoded hidden bit stream. By performing fusion value processing on multiple decoded hidden bit streams, a fused bit stream can be obtained, and the fused bit stream has the same length of bits as the decoded hidden bit stream. Among them, the fusion value processing process includes: according to multiple decoded hidden bit streams, determining the value of each bit in each decoded hidden bit stream, the value situation includes the bit value of the bit and the number of values corresponding to each bit value; according to the value of each bit in each decoded hidden bit stream, determining the fusion value of each bit; based on the fusion value of each bit, obtaining a fused bit stream.
[0110] Furthermore, the fused bit stream is error-corrected and recovered to obtain a decoded hidden error correction code, and a decoded hidden byte stream is obtained through bit-byte conversion, and decoded based on UTF-8 to obtain decoded hidden information.
[0111] It should be noted that the above-mentioned steganographic image generation method and steganographic information extraction method can be applied in social scenarios. Exemplarily, a user sends a target steganographic image (for example, private information containing medical diagnosis results, etc.) to a specific receiving object through a social network, and the hidden information can only be decrypted and obtained by the specific receiving object. For example, the steganographic image generation method and the steganographic information extraction method of the embodiment of the present application can be integrated into a corresponding application software. The first user uses the application software to write hidden information in the carrier image, generate a target steganographic image in JPEG format, and send it to the second user through the social software. After the second user receives the target steganographic image, the application software is used to recover the information of the target steganographic image, thereby obtaining the decoded hidden information.
[0112] In the embodiment provided by the present application, during the steganographic process, the hidden information is spread over the entire image domain of the carrier image, so that each region and each frequency band of the carrier image carries rich hidden information. When recovering the hidden information, multiple decoded hidden bit streams can be recovered from each region and each frequency band of the image domain, and a relatively accurate fused bit stream is determined by taking the values of each bit in the multiple decoded hidden bit streams, and then the decoded hidden information is obtained through various conversion methods, thereby improving the information recovery rate and the accuracy of the recovered information.
[0113] In a third aspect, an embodiment of the present application provides a steganographic image generating device.
[0114] Figure 7 A block diagram of a steganographic image generation device provided in an embodiment of the present application. Figure 7 , the steganographic image generating device 700 comprises:
[0115] The acquisition module 701 is used to acquire hidden information and carrier images.
[0116] The conversion module 702 is used to convert the hidden information into a hidden bit stream to be encoded, where the hidden bit stream to be encoded is a sequence composed of multiple bits.
[0117] The processing module 703 is used to copy and splice the hidden bit stream to be encoded according to the first spatial size of the carrier image and the preset number of channels to obtain the hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image.
[0118] The encoding module 704 is used to compress and encode the carrier image and the hidden tensor to be encoded to obtain a target stego-image.
[0119] In some optional implementations, the conversion module 702 performs the following steps when converting the hidden information into a hidden bit stream to be encoded:
[0120] Convert hidden information into hidden byte stream to be encoded;
[0121] Perform error correction coding on the hidden byte stream to be coded to obtain the hidden error correction code to be coded;
[0122] Based on the byte-bit conversion method, the hidden error correction code to be encoded is converted into a hidden bit stream to be encoded.
[0123] In some optional implementations, the processing module 703 copies and concatenates the hidden bit stream vector to be encoded according to the first spatial size of the carrier image and the preset number of channels to obtain the hidden tensor to be encoded, and performs the following steps:
[0124] The hidden bit stream to be encoded is replicated multiple times in the spatial dimension, and the replicated hidden bit streams to be encoded are spliced according to the first spatial size of the carrier image to obtain the hidden features to be encoded with the first spatial size;
[0125] According to the preset number of channels, the hidden features to be encoded are copied multiple times in the channel dimension to obtain the hidden tensor to be encoded.
[0126] In the embodiment provided by the present application, first, the hidden information and the carrier image are obtained by the acquisition module 701 to clarify that the object to be protected is the hidden information and the carrier image carrying the hidden information; secondly, the hidden information is converted into a hidden bit stream to be encoded by the conversion module 702, and a data form that is convenient for stego-writing into the carrier image is obtained; then, the processing module 703 copies and splices the hidden bit stream to be encoded according to the first spatial size and the preset number of channels of the carrier image to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image. Through this processing method, the hidden tensor to be encoded can cover the entire image domain of the carrier image; finally, the encoding module 704 compresses and encodes the carrier image and the hidden tensor to be encoded to obtain a target stego-image, so that each area of the carrier image carries the hidden bit stream, thereby improving the recovery rate of the hidden information and reducing the amount of information loss when the hidden information is restored based on the target stego-image.
[0127] In a fourth aspect, an embodiment of the present application provides a device for extracting steganalytic information.
[0128] Figure 8 A block diagram of a stego information extraction device provided in an embodiment of the present application. Figure 8 , the steganalysis information extraction device 800 comprises:
[0129] The acquisition module 801 is used to acquire the target steganographic image to be processed.
[0130] The decoding module 802 is used to compress and decode the target steganographic image to obtain a decoded hidden tensor.
[0131] The processing module 803 is used to obtain multiple decoded hidden bit streams from the decoded hidden tensor, and determine a fused bit stream based on the multiple decoded hidden bit streams.
[0132] The conversion module 804 is used to convert the fused bit stream into decoded hidden information.
[0133] Wherein, the target steganographic image is obtained by the steganographic image generation method described in any one of the embodiments of the present application.
[0134] In some optional implementations, the decoded hidden tensor is a tensor obtained by compressing and decoding the hidden tensor to be encoded used to generate the target steganographic image; wherein the hidden tensor to be encoded is obtained by copying and splicing multiple hidden bit streams to be encoded to obtain hidden features to be encoded, and the hidden features to be encoded are copied multiple times in the channel dimension according to a preset number of channels. The hidden tensor to be encoded includes multiple hidden bit streams to be encoded, and the decoded hidden tensor includes multiple decoded hidden bit streams.
[0135] In some optional implementations, the processing module 803 performs the following steps when obtaining multiple decoded hidden bit streams according to the decoded hidden tensor and determining a fused bit stream based on the multiple decoded hidden bit streams:
[0136] Split the decoded hidden tensor into multiple decoded hidden bitstreams;
[0137] Determine, according to the plurality of decoded hidden bit streams, a value of each bit in each decoded hidden bit stream, the value of each bit including a bit value of the bit and a number of times each bit value corresponds to the bit value;
[0138] Determine the fusion value of each bit according to the value of each bit in each decoded hidden bit stream;
[0139] A fused bit stream is obtained based on the fused value of each bit.
[0140] In some optional implementations, the hidden bit stream to be encoded is obtained by hiding the error correction code, and the hidden bit stream to be encoded, the decoded hidden bit stream and the merged bit stream include at least one error correction bit; accordingly, after the processing module 803 determines the merged bit stream based on multiple decoded hidden bit streams, before the conversion module 804 converts the merged bit stream into the decoded hidden information, the following steps are also performed: according to the error correction bit in the merged bit stream, the merged bit stream is corrected.
[0141] In the embodiment provided by the present application, first, the target stego image to be processed is obtained by the acquisition module 801 to clarify the processing object; secondly, the target stego image is compressed and decoded by the decoding module 802 to obtain a decoded hidden tensor, thereby obtaining the hidden information in the form of a tensor in the stego image, and because the hidden information covers the entire image domain of the stego image, the decoded hidden tensor better retains the hidden information, providing a data basis for improving the information recovery rate; then, the processing module 803 obtains multiple decoded hidden bit streams according to the decoded hidden tensor, and determines a fused bit stream based on the multiple decoded hidden bit streams. In this processing process, the situation that some bits are inaccurate due to information loss or transmission errors is fully considered. Therefore, the fused value of each bit is determined by multiple decoded hidden bit streams, and then the fused bit stream is obtained, which can effectively improve the accuracy of information recovery; finally, the fused bit stream is converted into decoded hidden information by the conversion module 804, thereby obtaining decoded hidden information matching the format of the hidden information, thereby improving the user experience.
[0142] It can be understood that the above-mentioned various method embodiments mentioned in this application can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, this application will not go into details. Those skilled in the art can understand that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined by its function and possible internal logic.
[0143] In addition, the present application also provides an electronic device and a computer-readable storage medium, which can be used to implement any of the steganographic image generation methods or steganographic information extraction methods provided in the present application. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.
[0144] Fig. 9 A block diagram of an electronic device provided in an embodiment of the present application.
[0145] Reference Fig. 9 An embodiment of the present application provides an electronic device, which includes: at least one processor 901; at least one memory 902, and one or more I / O interfaces 903, connected between the processor 901 and the memory 902; wherein the memory 902 stores one or more computer programs that can be executed by at least one processor 901, and the one or more computer programs are executed by at least one processor 901, so that at least one processor 901 can execute the above-mentioned steganographic image generation method, or the steganographic information extraction method.
[0146] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned steganographic image generation method or steganographic information extraction method when executed by a processor / processing core. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0147] An embodiment of the present application also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned steganographic image generation method, or the steganographic information extraction method.
[0148] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0149] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0150] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0151] The computer program instructions for performing the operation of the present application can be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on a user's computer, partially on a user's computer, executed as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of a computer-readable program instruction to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute a computer-readable program instruction, thereby realizing various aspects of the present application.
[0152] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0153] Various aspects of the present application are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0154] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0155] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0156] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the function involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a dedicated hardware-based system that performs the function or action of the specification, or can be realized by a combination of special-purpose hardware and computer instructions.
[0157] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.
Claims
1. A method for generating a steganographic image, characterized in that: include: Obtain hidden information and carrier images; Converting the hidden information into a hidden bit stream to be encoded, wherein the hidden bit stream to be encoded is a sequence consisting of a plurality of bits; For each image partition divided by the carrier image, the hidden bit stream to be encoded is copied and spliced to obtain hidden sub-features to be encoded that match the partition space size of each image partition, and according to the distribution position of each image partition, the corresponding hidden sub-features to be encoded are spliced to obtain hidden features to be encoded that match the first spatial size of the carrier image; According to a preset number of channels, the hidden feature to be encoded is replicated multiple times in the channel dimension to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image; The carrier image and the hidden tensor to be encoded are compressed and encoded to obtain a target stego-image.
2. The method according to claim 1, characterized in that The step of converting the hidden information into a hidden bit stream to be encoded comprises: Converting the hidden information into a hidden byte stream to be encoded; Performing error correction coding on the hidden byte stream to be encoded to obtain a hidden error correction code to be encoded; Based on a byte-bit conversion method, the hidden error correction code to be encoded is converted into the hidden bit stream to be encoded.
3. A method for extracting steganalytic information, characterized in that: include: Acquire a target stego image to be processed; wherein the target stego image is obtained by the stego image generation method according to any one of claims 1 to 2; Compressing and decoding the target steganographic image to obtain a decoded hidden tensor; Obtaining a plurality of decoded hidden bit streams from the decoded hidden tensor, and determining a fused bit stream based on the plurality of decoded hidden bit streams; The fused bitstream is converted to decode hidden information.
4. The method according to claim 3, characterized in that The decoded hidden tensor is a tensor obtained by compressing and decoding the hidden tensor to be encoded used to generate the target stego-image; Among them, the hidden tensor to be encoded is obtained by copying and splicing multiple hidden bit streams to be encoded to obtain hidden features to be encoded, and the hidden features to be encoded are copied multiple times in the channel dimension according to a preset number of channels. The hidden tensor to be encoded includes multiple hidden bit streams to be encoded, and the decoded hidden tensor includes multiple decoded hidden bit streams.
5. The method according to claim 4, characterized in that The step of obtaining a plurality of decoded hidden bit streams from the decoded hidden tensor and determining a fused bit stream based on the plurality of decoded hidden bit streams comprises: Splitting the decoded hidden tensor into a plurality of decoded hidden bitstreams; Determine, according to the plurality of decoded concealed bit streams, a value of each bit in each decoded concealed bit stream, wherein the value includes a bit value of the bit and a number of times each bit value corresponds to the value; Determine the fusion value of each bit according to the value of each bit in each decoded hidden bit stream; A fused bit stream is obtained based on the fused value of each bit.
6. The method according to claim 4 or 5, characterized in that: The hidden bit stream to be encoded is obtained by hiding an error correction code, and the hidden bit stream to be encoded, the decoded hidden bit stream and the fused bit stream include at least one error correction bit; After determining the merged bit stream based on the multiple decoded hidden bit streams and before converting the merged bit stream into the decoded hidden information, the method further includes: The merged bit stream is error corrected according to the error correction bits in the merged bit stream.
7. A stego-image generating device, characterized in that: include: An acquisition module, used for acquiring hidden information and carrier images; A conversion module, used for converting the hidden information into a hidden bit stream to be encoded, wherein the hidden bit stream to be encoded is a sequence composed of a plurality of bits; A processing module, for replicating and splicing the hidden bit stream to be encoded for each image partition into which the carrier image is divided, to obtain hidden sub-features to be encoded that match the partition space size of each image partition, and splicing the corresponding hidden sub-features to be encoded according to the distribution positions of each image partition to obtain hidden features to be encoded that match the first spatial size of the carrier image; According to a preset number of channels, the hidden feature to be encoded is replicated multiple times in the channel dimension to obtain a hidden tensor to be encoded, wherein the number of channels of the hidden tensor to be encoded is equal to the preset number of channels, and the second spatial size of the hidden tensor to be encoded is the same as the first spatial size of the carrier image; The encoding module is used to compress and encode the carrier image and the hidden tensor to be encoded to obtain a target steganographic image.
8. A stego information extraction device, characterized in that: include: An acquisition module, used for acquiring a target stego image to be processed; wherein the target stego image is obtained by the stego image generation method according to any one of claims 1 to 2; A decoding module, used for compressing and decoding the target steganographic image to obtain a decoded hidden tensor; A processing module, configured to obtain a plurality of decoded hidden bit streams from the decoded hidden tensor, and determine a fused bit stream based on the plurality of decoded hidden bit streams; The conversion module is used to convert the fused bit stream into decoded hidden information.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs executed by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can execute the stego image generation method as described in any one of claims 1-2, or the stego information extraction method as described in any one of claims 3-6.
