Video steganography method and device
By constructing the N-dimensional space of 4×4 residual coefficient blocks and using high-frequency residual coefficients to embed secret information, the problem of large embedding error in the prior art is solved, and the video visual quality and security of the carrier video of video steganography are improved.
Patent Information
- Application Number
- CN202310121868.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-02-15
AI Technical Summary
In the existing video steganography algorithm based on DCT/DST residual coefficients, the embedding error is large and the visual quality of the carrier video is poor.
By constructing the N-dimensional space of 4×4 residual coefficient blocks, high-frequency residual coefficients are collected using preset scanning order, the residual coefficient array is modified according to the mapping values of the target point and the adjacent point for embedding of secret information, and a compressed video code stream is generated through entropy encoding.
It achieves small embedding errors and high carrier video visual quality, improving the transparency and security of video steganography.
Smart Images

Figure CN116132691B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a video steganography method and device. Background Art
[0002] In recent years, video-based online applications (such as video conferencing, short video dissemination, and live streaming) have developed rapidly both domestically and internationally and have become an integral part of people's daily lives. However, this booming video application landscape has also been plagued by numerous video security issues, including video piracy, illegal tampering, and unauthorized video editing. Video steganography, due to its stealthy and secure nature, leverages the redundant space in human vision within video signals to embed secret information. It can be used as an effective video security processing technique for copyright protection, illegal dissemination, and source tracking, and has therefore become a hot topic in video security research.
[0003] Traditional video steganography techniques are primarily categorized into original domain and compressed domain based on the embedding location of the secret information. Original domain-based video steganography primarily embeds secret information into the raw pixels of the video. However, since videos are often compressed on the Internet, the embedded secret information is easily damaged by compression and cannot be restored. Therefore, original domain-based video steganography has significant limitations. Compressed domain-based video steganography is the mainstream research direction in video steganography. Based on the specific embedding location, it can be divided into four main types of video steganography algorithms: DCT / DST residual coefficient-based, prediction mode-based, motion vector-based, and entropy coding-based. Because DCT / DST residual coefficients occupy the majority of the compressed video bitstream, the embedding error they introduce is less impactful than syntactic elements such as prediction mode, motion vector, and entropy coding. Video steganography algorithms based on DCT / DST residual coefficients can embed secret information while achieving better embedding capacity, lower embedding error, and higher transmission transparency. Therefore, DCT / DST residual coefficient-based video steganography algorithms have become a hot topic in video steganography research.
[0004] In current video steganography algorithms based on DCT / DST residual coefficients, how to minimize the embedding error and improve the visual quality of the carrier video has always been the core focus of such algorithms and a problem that needs to be solved urgently. Summary of the Invention
[0005] The present invention provides a video steganography method and device, which are used to solve the defects of the prior art, such as large embedding error and poor visual quality of the carrier video.
[0006] In a first aspect, the present invention provides a video steganography method, comprising: determining a 4×4 residual coefficient block suitable for embedding from candidate 4×4 residual coefficient blocks based on the embedding strength of each candidate 4×4 residual coefficient block and a random seed;
[0007] Acquiring first N high-frequency residual coefficients of the 4×4 residual coefficient block in a preset scanning order to construct a residual coefficient array; wherein the value of N is determined according to a random seed of the 4×4 residual coefficient block;
[0008] Converting the residual coefficient array into an intermediate array according to a preset conversion rule, determining a target point in an N-dimensional space using the intermediate array, and calculating mapping values of the target point and its 2N neighboring points according to a preset spatial encoding rule;
[0009] According to the mapping values of the target point and 2N adjacent points and the value of the secret information, the residual coefficient array is modified to the target residual coefficient array to embed the secret information; the value of the secret information is the decimal value of the encrypted secret information bit string of the secret information; the length of the encrypted secret information bit string is in, Indicates rounding down;
[0010] Obtaining a compressed video code stream file by performing entropy coding on the target residual coefficient array and preset syntax elements;
[0011] The residual coefficients in the 4×4 residual coefficient block are not all zero, and the DC coefficients in the 4×4 residual coefficient block are not zero; the value range of the coordinate axis of each dimension of the N-dimensional space is [0, 2N], and the preset spatial coding rule is configured so that the mapping values of the target point and all the adjacent points of the target point completely traverse the preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows:
[0012] Assume that the target point is P = (x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are:
[0013] P + =(x1,x2,…,x i +1,…,x N );
[0014] P - =(x1,x2,…,x i -1,…,x N );
[0015] Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i If -1<0, reset x i +1=2N.
[0016] According to a video steganography method provided by the present invention, the method of modifying the residual coefficient array to a target residual coefficient array based on the mapping values of the target point and 2N adjacent points and the value of the secret information to embed the secret information includes:
[0017] When the mapping value of the target point is equal to the value of the secret information, determining the target residual coefficient array to be the original residual coefficient array to complete the embedding of the secret information;
[0018] In the case that the mapping value of the target point is not equal to the value of the secret information, the residual coefficient array is modified to be a target residual coefficient array to complete the embedding of the secret information.
[0019] The step of modifying the residual coefficient array to a target residual coefficient array to complete embedding of the secret information specifically includes:
[0020] Determine a target adjacent point from the 2N adjacent points; the mapping value of the target adjacent point is equal to the value of the secret information;
[0021] The residual coefficient array is modified into a target residual coefficient group to complete the embedding of the secret information; the coordinates determined by the intermediate array of the target residual coefficient group are equal to the coordinates of the target adjacent point in the N-dimensional space.
[0022] According to a video steganography method provided by the present invention, in the residual coefficient array C coeff ={c1,c2,c3,…,c N}, the intermediate array is T temp ={t1,t2,t3,…,t N}, the residual coefficient array is converted into an intermediate array according to a preset conversion rule, specifically:
[0023]
[0024] Among them, t i Indicates the i-th data in the intermediate array, c i represents the i-th data in the residual coefficient array, and mod() represents the modulo operation.
[0025] According to a video steganography method provided by the present invention, the mapping value of the target point is calculated according to a preset spatial coding rule, specifically:
[0026] f(x1,x2,x3,…,x N )=(x1+2x2+3x3+…+Nx N )mod(2N+1);
[0027] Among them, f(x1,x2,x3,…,x N ) is the mapping value corresponding to the target point;
[0028] Calculate the adjacent point P according to the preset spatial coding rules + The mapping value is:
[0029] f(x1,x2,…,x i +1…,x N )=(X+i)mod(2N+1);
[0030] Where X is the mapping value of the target point, f(x1, x2,…, x i +1…,x N ) is the adjacent point P + The mapping value of
[0031] Calculate the adjacent point P according to the preset spatial coding rules - The mapping value is:
[0032] f(x1,x2,…,x i -1…,x N )=(Xi)mod(2N+1);
[0033] Among them, f(x1,x2,…,x i -1…,x N ) is the adjacent point P - The mapping value of .
[0034] According to a video steganography method provided by the present invention, the extraction of the method further includes:
[0035] Determining a dense 4×4 residual coefficient block in the compressed video stream file;
[0036] Acquire the first N high-frequency dense residual coefficients of the dense 4×4 residual coefficient block according to a preset scanning order to construct a dense residual coefficient array;
[0037] Converting the encrypted residual coefficient array into a encrypted intermediate array according to a preset conversion rule, treating the encrypted intermediate array as a encrypted target point in N-dimensional space, and calculating a mapping value of the encrypted target point according to a preset spatial encoding rule;
[0038] Performing a debinarization operation on the mapping value of the secret target point to obtain an encrypted secret information bit string of the secret information;
[0039] The encrypted secret information bit string is decrypted to obtain the original secret information bit string of the secret information, so as to obtain the secret information.
[0040] According to a video steganography method provided by the present invention, determining a 4×4 residual coefficient block suitable for embedding in any video based on the embedding strength of each candidate 4×4 residual coefficient block and a random seed includes:
[0041] In a case where the random seed is smaller than the embedding strength, the candidate 4×4 residual coefficient block is determined to be a 4×4 residual coefficient block suitable for embedding.
[0042] According to a video steganography method provided by the present invention, before modifying the residual coefficient array to a target residual coefficient array based on the mapping values of the target point and 2N adjacent points and the value of the secret information to embed the secret information, the method further includes:
[0043] Obtaining an original secret information bit string of the secret information;
[0044] Encrypting the original secret information bit string to obtain an encrypted secret information bit string;
[0045] The decimal value of the encrypted secret information bit string of the secret information is calculated as the value of the secret information.
[0046] In a second aspect, the present invention further provides a video steganography device, wherein the embedded module of the device comprises:
[0047] The first unit is configured to determine a 4×4 residual coefficient block suitable for embedding from the candidate 4×4 residual coefficient blocks according to the embedding strength of each candidate 4×4 residual coefficient block and a random seed;
[0048] A second unit is configured to collect first N high-frequency residual coefficients of the 4×4 residual coefficient block according to a preset scanning order to construct a residual coefficient array; wherein the value of N is determined according to a random seed of the 4×4 residual coefficient block;
[0049] A third unit is configured to convert the residual coefficient array into an intermediate array according to a preset conversion rule, determine a target point in the N-dimensional space using the intermediate array, and calculate mapping values of the target point and 2N adjacent points of the target point according to a preset spatial coding rule;
[0050] a fourth unit, configured to modify the residual coefficient array into a target residual coefficient array based on the mapping values of the target point and the 2N adjacent points and the value of the secret information, so as to embed the secret information; the value of the secret information being a decimal value of the encrypted secret information bit string of the secret information;
[0051] A fifth unit is configured to obtain a compressed video stream file by performing entropy coding on the target residual coefficient array and the preset syntax element;
[0052] The residual coefficients in the 4×4 residual coefficient block are not all zero, and the DC coefficients in the 4×4 residual coefficient block are not zero; the value range of the coordinate axis of each dimension of the N-dimensional space is [0, 2N], and the preset spatial coding rule is configured so that the mapping values of the target point and all the adjacent points of the target point completely traverse the preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows:
[0053] Assume that the target point is P = (x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are:
[0054] P + =(x1,x2,…,x i +1,…,x N );
[0055] P - =(x1,x2,…,x i -1,…,x N );
[0056] Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i If -1<0, reset x i +1=2N.
[0057] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described video steganography methods are implemented.
[0058] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described video steganography methods.
[0059] The video steganography method and device provided by this invention utilizes high-frequency coefficients from the DCT / DST residual coefficients within 4×4 blocks of I, B, and P frames to construct an N-dimensional space. By integrating the secret information to be embedded and the mapping rules of the N-dimensional space, the method and device can embed and extract secret information. Compared to existing technologies, this method offers advantages such as large embedding capacity, minimal embedding error caused by embedding secret information, high visual quality of the carrier video, and enhanced transparency and security of video steganography. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0061] Figure 1 It is a flow chart of the embedding method of the video steganography method provided by the present invention;
[0062] Figure 2 Schematic diagram of selecting a 4×4 TB block suitable for embedding provided by the present invention;
[0063] Figure 3 Schematic diagram of selecting high-frequency residual coefficients suitable for embedding in a 4×4 TB block provided by the present invention;
[0064] Figure 4 Schematic diagram of the three-dimensional spatial encoding process of residual coefficients provided by the present invention;
[0065] Figure 5 This is a schematic diagram of the embedding process based on the mapping relationship between the residual coefficient N-dimensional space and the secret information provided by the present invention;
[0066] Figure 6 It is a flow chart of the extraction method of the video steganography method provided by the present invention;
[0067] Figure 7 It is a schematic diagram of the extraction process based on the mapping value of the residual coefficient N-dimensional space provided by the present invention;
[0068] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0069] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0070] It should be noted that, in the description of the embodiments of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0071] The terms "first," "second," and the like in this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, so that embodiments of this application can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "first," "second," and the like generally distinguish objects of a class and do not limit the number of objects; for example, the first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the connected objects.
[0072] The video steganography method provided by the present invention includes an embedding method and an extraction method. As an optional embodiment, the embedding method includes:
[0073] Step 101: Determine a 4×4 residual coefficient block suitable for embedding from the candidate 4×4 residual coefficient blocks according to the embedding strength and random seed of each candidate 4×4 residual coefficient block.
[0074] The residual coefficients in the 4×4 residual coefficient block are not all 0, and the DC coefficients in the 4×4 residual coefficient block are not 0.
[0075] Step 102: Acquire the first N high-frequency residual coefficients of the 4×4 residual coefficient block according to a preset scanning order to construct a residual coefficient array.
[0076] The value of N is determined according to the random seed of the 4×4 residual coefficient block.
[0077] Step 103: Convert the residual coefficient array into an intermediate array according to a preset conversion rule, use the intermediate array to determine a target point in the N-dimensional space, and calculate the mapping values of the target point and its 2N adjacent points according to a preset spatial encoding rule.
[0078] The coordinate axis of each dimension of the N-dimensional space has a value range of [0, 2N].
[0079] The preset spatial encoding rule is configured such that the mapping values of the target point and all of its adjacent points completely traverse a preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows:
[0080] Assume that the target point is P = (x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are:
[0081] P + =(x1,x2,…,x i +1,…,x N );
[0082] P - =(x1,x2,…,x i -1,…,x N );
[0083] Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i If -1<0, reset x i +1=2N.
[0084] Step 104: According to the mapping values of the target point and the 2N adjacent points and the value of the secret information, the residual coefficient array is modified to be a target residual coefficient array to embed the secret information.
[0085] The value of the secret information is the decimal value of the encrypted secret information bit string of the secret information; the length of the encrypted secret information bit string is in, Indicates rounding down.
[0086] Step 105: Obtain a compressed video code stream file by performing entropy coding on the target residual coefficient array and the preset syntax elements.
[0087] Based on the content of the above embodiments, as an optional embodiment, the method of determining a 4×4 residual coefficient block suitable for embedding in any video based on the embedding strength and random seed of each alternative 4×4 residual coefficient block includes: when the random seed is less than the embedding strength, determining the alternative 4×4 residual coefficient block as a 4×4 residual coefficient block suitable for embedding.
[0088] The following combination Figures 1-8 The video steganography method and apparatus provided by the embodiments of the present invention are described.
[0089] Figure 1 This is a flow chart of the embedding method of the video steganography method provided by the present invention. Figure 1 The embedding method is described with the contents of the above embodiment. Figure 1 As shown, the embedding method includes four parts: selecting 4×4 small block DCT / DST residual coefficients, constructing N-dimensional space encoding of residual coefficients, establishing a mapping relationship between N-dimensional space and secret information, and entropy encoding into a bitstream file.
[0090] Part 1: Selection of 4×4 small block DCT / DST residual coefficients
[0091] In this solution, in order to reduce the impact of embedding errors, the present invention selects 4×4 small blocks with complex texture features as potential embedding locations. Specifically, for intra-frame prediction, the selection of 4×4 small blocks needs to meet the requirements that the current PB (Prediction Block) size is 4×4, and the TB (Transform Block) size must also be 4×4. The present invention selects the high-frequency coefficients in the lower right corner of the DST residual coefficients in the TB block as the embedding location where secret information can be embedded; for inter-frame prediction, the selection of 4×4 small blocks needs to meet the requirements that the current PB size is 4×4, and the TB block size is also 4×4. Similarly, the DCT residual coefficients select the high-frequency coefficients in the lower right corner as the embedding location. The purpose of these restrictions is to ensure that the impact range of the embedding error is as small as possible, and to ensure that video steganography has high transparency and security.
[0092] To further enhance the security and resistance to steganalysis of video steganography, this scheme uses an embedding strength ε and a random number generator G to further increase the randomness of video steganography. As mentioned above, this scheme selects high-frequency coefficients in a 4×4 TB block as an alternative embedding location. The specific alternative 4×4 TB block (i.e., the alternative 4×4 residual coefficient block) depends not only on the block size constraints of PB and TB, but also on the embedding strength and random number constraints. The specific constraints are as follows:
[0093] (1) Constraints on embedding strength ε. The embedding strength ε ranges from (0, 1). The value of the embedding strength ε determines the probability that the current candidate 4×4TB block is used as the embedding block. For example, if the embedding strength ε = 0.6, then the probability that the current candidate 4×4TB block is used as the embedding block is 60%. It should be noted that if the value of the embedding strength ε is larger, the embedding capacity of this scheme will also be larger. Correspondingly, the embedded error introduced will also be larger, and the visual quality of the carrier video will be more significantly degraded. The present invention can flexibly adjust the embedding strength ε according to the size of the secret information to be embedded.
[0094] (2) Constraints on the random seed ρ. The random seed ρ is generated by a random number generator G. Each candidate 4×4TB block corresponds to a random seed ρ. If the random seed ρ is less than the embedding strength ε, then the current candidate 4×4TB block is the embedded block. If the random number ρ is greater than the embedding strength ε, then the current candidate 4×4TB block is not considered an embedded block and the embedding process for the current candidate 4×4TB block is skipped. To ensure that the embedded secret information can be correctly extracted at the extraction end, the random seeds of the random number generators G at the embedding and extraction ends should be the same.
[0095] (3) Constraints of the candidate 4×4TB blocks. In entropy coding, if the residual coefficients of the 4×4TB blocks are all zero, the residual coefficients are not encoded into the bitstream, and only the syntax element CBF is used to indicate that the residual coefficients are all zero. Therefore, in order to avoid this situation, if the residual coefficients of the current 4×4TB blocks are all zero, the current 4×4TB blocks are skipped; if the DC coefficients of the residual coefficients of the current 4×4TB blocks are not zero, the current 4×4TB blocks are embedded blocks; if the residual coefficients of the current 4×4TB blocks are not all zero but the DC coefficients are zero, the current 4×4TB blocks are skipped.
[0096] Figure 2 Schematic diagram of selecting a 4×4TB block suitable for embedding provided by the present invention, such as Figure 2 As shown, the 4×4 TB blocks in the backslash background part are the embedded blocks selected according to the above conditions. The size of these PB blocks is 4×4, and the size of the TB blocks is also 4×4. Figure 2 The shaded blocks are not used as embedding blocks because their PB blocks are 8×8 in size. Therefore, even if the TB blocks are 4×4 in size, they are not used as embedding blocks. This selection is done to reduce the impact of the introduced embedding error.
[0097] Figure 3 Schematic diagram of selecting high-frequency residual coefficients suitable for embedding in a 4×4TB block provided by the present invention, such as Figure 3 As shown, the DC coefficient Y needs to be satisfied 0,0≠0. The purpose of satisfying this restriction is that no matter how the subsequent high-frequency residual coefficients change due to the embedding of secret information, the present invention can always ensure that the current 4×4TB syntactic element CBF is not 0, that is, the secret residual coefficients are encoded into the final video bitstream file.
[0098] Optionally, Figure 3 The 10 coefficients marked in bold black boxes are the high-frequency residual coefficients selected by the present invention for embedding secret information.
[0099] Part 2: Constructing N-dimensional space encoding of residual coefficients
[0100] The purpose of constructing N-dimensional space coding of residual coefficients is to use the high-frequency residual coefficients of the selected 4×4TB blocks to construct an N-dimensional coefficient space for embedding secret information. Since the present invention can select up to 10 high-frequency residual coefficients in a 4×4TB block, the range of N value should be less than 10. The specific N value can be calculated by the random number ρ of the current 4×4TB block. The purpose of this is to ensure that the N-dimensional space of high-frequency residual coefficients is variable when embedding secret information in each 4×4TB block, further enhancing the security of the scheme. After the N value is determined, the present invention is based on Figure 3 The coefficient scanning order pointed to by the directed arrow selects N residual coefficients for constructing the N-dimensional space of residual coefficients, that is, "collecting the first N high-frequency residual coefficients of the 4×4 residual coefficient block according to the preset scanning order" recorded in step 102.
[0101] Based on the first N high-frequency residual coefficients in the current 4×4TB, the residual coefficient array can be constructed as C coeff ={c1,c2,c3,…,c N}, since the residual coefficient (c i ,1≤i≤N) may be a negative number or a large integer. Therefore, in order to prevent overflow and facilitate processing, we need to convert the selected N residual coefficients into an N-dimensional intermediate array T temp ={t1,t2,t3,…,t N}, the preset conversion rule is performed according to formula 1:
[0102]
[0103] Among them, t i Indicates the i-th data in the intermediate array, c i represents the i-th data in the residual coefficient array, and mod() represents the modulo operation.
[0104] If you define an intermediate array T temp The element t i is the coordinate value on the i-th dimension, then the array Ttemp The values of all elements in form a point in N-dimensional space, which can be called the residual coefficient N-dimensional space. Obviously, in the residual coefficient N-dimensional space, the range of values of the coordinate axis of each dimension is limited, ranging from (0, 2N). We calculate the mapping value of each point in N-dimensional space according to the following process:
[0105] The mapping value of the residual coefficient one-dimensional space point x1 is calculated according to formula 2:
[0106] f(x1)=x1mod(2N+1) (2)
[0107] The mapping value of the residual coefficient two-dimensional space point (x1, x2) is calculated according to formula 3:
[0108] f(x1,x2)=(x1+2x2)mod(2N+1) (3)
[0109] The mapping value of the residual coefficient three-dimensional space point (x1, x2, x3) is calculated according to formula 4:
[0110] f(x1,x2,x3)=(x1+2x2+3x3)mod(2N+1) (4)
[0111] By analogy, the residual coefficient N-dimensional space point (x1, x2, x3, ..., x N The mapping value of |N>3) is calculated according to Formula 5:
[0112] f(x1,x2,x3,…,x N )=(x1+2x2+3x3+…+Nx N )mod(2N+1) (5)
[0113] The process of calculating the mapping value of each point in the residual coefficient N-dimensional space can be called residual coefficient N-dimensional space encoding. Figure 4 Schematic diagram of the three-dimensional space coding process of residual coefficients provided by the present invention, such as Figure 4 As shown in the figure, when N=3, the coordinate axis value range of each dimension is (0,6), and the mapping value range of each point in the three-dimensional space is also (0,6).
[0114] For example, suppose there is a point (0,1,2), then the mapping value of this point is f(0,1,2)=(0×1+1×2+2×3)mod(2×3+1)=1, such as Figure 4 The construction and mapping of the residual coefficient N-dimensional space provides an operational basis for the subsequent embedding of secret information in the present invention.
[0115] The following describes an important property of N-dimensional space coding of residual coefficients, namely: for any point P in N-dimensional space of residual coefficients, assuming its coordinates are (x1, x2, x3, ..., x N ), then the number of adjacent points around point P is 2N, and the mapping values of the adjacent points and the mapping values of point P completely traverse the array {0,1,2,3,…,2N}.
[0116] Assume that the neighboring point of point P in the i-th dimension is P + and P - , then P + and P - The coordinates are:
[0117] P + =(x1,x2,…,x i +1,…,x N )
[0118] P - =(x1,x2,…,x i -1,…,x N )
[0119] It should be noted that if point P is at the boundary of the i-th dimension, then its neighbor point P + and P - The coordinates will exceed the range of (0,2N).
[0120] Assume x i +1>2N, that is, point P is on the right boundary of the i-th dimension, then its neighbor point P + The coordinate of the i-th dimension takes the value of the left boundary, that is, x i +1=0; assuming x i -1<0, that is, point P is at the left boundary of the i-th dimension, then its neighbor point P - The coordinate of the i-th dimension takes the value of the right boundary, that is, x i -1=2N.
[0121] Assume that the mapping value of point P in the N-dimensional space of residual coefficients is X, that is, f(x1,x2,x3,…,x N )=X, according to formula 5, we can get (x1+2x2+3x3+…+Nx N )mod(2N+1)=X.
[0122] Similarly, point P in the i-th dimension has a neighboring point P + and P - , their mapping values are:
[0123] P + :f(x1,x2,…,x i +1…,xN )=(x1+2x2+…i×(x i +1)+…+Nx N )mod(2N+1)
[0124] =(x1+2x2+3x3+…+Nx N +i)mod(2N+1)
[0125] =(X+i)mod(2N+1)
[0126] P - :f(x1,x2,…,x i -1…,x N )=(x1+2x2+…i×(x i -1)+…+Nx N )mod(2N+1)
[0127] =(x1+2x2+3x3+…+Nx N -i)mod(2N+1)
[0128] =(Xi)mod(2N+1)
[0129] Among them, f(x1,x2,x3,…,x N ) is the mapping value corresponding to the target point P; X is the mapping value of the target point, f(x1, x2,…, x i +1…,x N ) is the adjacent point P + The mapping value of f(x1,x2,…,x i +1…,x N ) is the adjacent point P + The mapping value of .
[0130] When i traverses from 1 to N in sequence, the point P + and P - There are 2N in total, and the set of their mapped values is {(X+1)mod(2N+1),(X-1)mod(2N+1),(X+2)mod(2N+1),(X-2)mod(2N+1),…,(X+N)mod(2N+1),(XN)mod(2N+1)}, which together with the value X constitutes a complete residue system modulo 2N+1.
[0131] For example, for the point (3,3,1), its mapping value f(3,3,1) = 5, as Figure 4 The bold part has 6 adjacent points, and its mapping value set is {1, 0, 6, 3, 4, 2}. Figure 4In the underlined part, the mapping values of the point (3,3,1) and its six adjacent points completely traverse the array {0,1,2,…,6}; for the boundary point (6,1,1), its mapping value f(6,1,1)=4, as shown in Figure 4 The bold part. Since it is at the right boundary of the first dimension, it is close to point P + The coordinates of the first dimension are set to 0, close to point P + The coordinates of the boundary point (6,1,1) are (0,1,1), and the mapping value set of the 6 adjacent points of the boundary point (6,1,1) is {0,6,5,2,3,1}. The mapping values of the boundary point (6,1,1) and its 6 adjacent points also completely traverse the array {0,1,2,…,6}.
[0132] The significance of this property is that when the present invention subsequently embeds secret information, the point corresponding to the high-frequency residual coefficient can be adjusted to its adjacent point to achieve the embedding of the secret information, and at most only one high-frequency residual coefficient is modified, and an operation of adding or subtracting 1 is performed on it. The specific embedding process is described below as establishing a mapping relationship between the N-dimensional space and the secret information.
[0133] Part III: Establishing the mapping relationship between N-dimensional space and secret information
[0134] This solution uses 4×4TB of high-frequency residual coefficients as the embedding carrier for secret information. For intra-frame prediction, the DST residual coefficients are used to construct the N-dimensional space of residual coefficients; for inter-frame prediction, the DCT residual coefficients are used to construct the N-dimensional space of residual coefficients. The use of 4×4TB residual coefficients as the embedding carrier can maximize the reduction of the embedding error introduced by embedding secret information. The introduction of embedding strength ε and random number ρ can further flexibly control the embedding capacity and security of video steganography. Establishing a mapping relationship between the N-dimensional space of residual coefficients and secret information can achieve the embedding of multiple bits of secret information at a time while modifying at most one residual coefficient, thereby improving the visual quality of the carrier video. The following present invention elaborates on the mapping relationship between the N-dimensional space of residual coefficients and secret information.
[0135] Optionally, before modifying the residual coefficient array to a target residual coefficient array based on the mapping values of the target point and 2N adjacent points and the value of the secret information to embed the secret information, the method further includes: obtaining an original secret information bit string of the secret information; encrypting the original secret information bit string to obtain an encrypted secret information bit string; and calculating a decimal value of the encrypted secret information bit string as the value of the secret information.
[0136] The length of the secret information that can be embedded in a single 4×4TB residual coefficient block is determined by the parameter N, and its length is l = [log2(2N+1)]. Assume that the encrypted secret information bit string of length l is S = {s1, s2, …, s l}, then the encrypted secret information bit string can be converted into a decimal value D sec for:
[0137]
[0138] Based on the content of the above embodiment, as an optional embodiment, the residual coefficient array is modified to a target residual coefficient array according to the mapping value of the target point and 2N adjacent points and the value of the secret information to embed the secret information, including: when the mapping value of the target point is equal to the value of the secret information, determining the target residual coefficient array to be the original residual coefficient array to complete the embedding of the secret information; when the mapping value of the target point is not equal to the value of the secret information, modifying the residual coefficient array to the target residual coefficient array to complete the embedding of the secret information.
[0139] Among them, the modification of the residual coefficient array to the target residual coefficient array to complete the embedding of the secret information specifically includes: determining the target adjacent point from 2N adjacent points; the mapping value of the target adjacent point is equal to the value of the secret information; modifying the residual coefficient array to the target residual coefficient group to complete the embedding of the secret information; the coordinates determined by the intermediate array of the target residual coefficient group are equal to the coordinates of the target adjacent point in the N-dimensional space.
[0140] Specifically, referring to the content of the above embodiment, the mapping relationship between the residual coefficient N-dimensional space and the secret information is performed according to the following rules:
[0141] The first rule: If the decimal value D sec Equal to the mapping value of the currently selected residual coefficient N-dimensional space point P (target point), that is, D sec =X, then for the current 4×4TB residual coefficient array C coeff The embedding of the secret information can be completed without any modification; that is, the original residual coefficient array is used to complete the embedding of the secret information.
[0142] The second rule: If the decimal value D sec It cannot be equal to the mapping value of the currently selected residual coefficient N-dimensional space point P, that is, D sec ≠X, then traverse all the adjacent points of point P in turn until a target adjacent point P′ is found, so that the mapping value X′ of the target adjacent point P′ satisfies D sec = X′, the traversal ends, and the current 4×4TB residual coefficient array is modified to the target residual coefficient array, so that the intermediate array T formed by the target residual coefficient temp The coordinates formed by the elements in are the coordinates of point P′. At this point, the embedding is completed.
[0143] Figure 5 This is a schematic diagram of the embedding process based on the mapping relationship between the residual coefficient N-dimensional space and the secret information provided by the present invention, as shown in FIG. Figure 5 As shown, in this example, we select the 4×4TB marked with a bold black frame, whose PB size is also 4×4 and the DC coefficient of the residual coefficient is not equal to 0.
[0144] Assume that the value of N is 3, according to Then select the encrypted secret information bit string "10" with a length of 2, and get D according to formula 6 sec = 2. Accordingly, the first three residual coefficients of the target 4×4TB (i.e., the 4×4 residual coefficient block suitable for embedding) are selected for scanning, and the three residual coefficients constitute the array C coeff ={-3,1,2}, the intermediate array converted according to formula 1 is T temp ={4,1,2}. According to Formula 4, the present invention can obtain the mapping value of the target point P(4,1,2) in this 3D space as X=f(4,1,2)=5. Thus, the mapping value of the current residual coefficient array in the 3D space and the decimal value of the secret information to be embedded are obtained.
[0145] According to the second rule of the mapping relationship between the residual coefficient N-dimensional space and the secret information, all adjacent points of point P(4,1,2) are traversed in sequence until an adjacent point P′(4,1,1) is found, whose mapping value X′ satisfies the condition X′=f(4,1,1)=2=D sec According to the adjacent point P′(4,1,1), we can get the intermediate array T′ after embedding the secret information. temp ={4,1,1}, according to formula 1, we can get the residual coefficient after embedding the secret information should be C′ coeff ={-3,1,1}. At this point, we have modified the third element 2 in the original residual coefficient array to 1, thus completing the embedding of the encrypted secret bit string "10" of the current secret information. From the above example, we can see that using N-dimensional residual coefficient space encoding for video steganography can embed multiple bits of secret information while only adding or subtracting 1 from a single residual coefficient. Therefore, this scheme has excellent embedding performance and can minimize the impact of embedding errors.
[0146] Part 4: Entropy encoding to bitstream file
[0147] This section's main function is to encode the modified DCT / DST residual coefficients and other syntactic elements, such as intra-frame prediction mode and inter-frame motion vectors, into a bitstream file using CABAC entropy coding after the previous three parts of the secret information are embedded. This ultimately forms a compressed video bitstream file suitable for network transmission. The compressed video file provides the target video file for subsequent video steganalysis extraction operations.
[0148] Based on the content of the above embodiment, the extraction method of the video steganography method provided by the present invention is described below. The extraction method includes:
[0149] Determining a dense 4×4 residual coefficient block in the compressed video stream file;
[0150] Acquire the first N high-frequency dense residual coefficients of the dense 4×4 residual coefficient block according to a preset scanning order to construct a dense residual coefficient array;
[0151] Converting the encrypted residual coefficient array into a encrypted intermediate array according to a preset conversion rule, treating the encrypted intermediate array as a encrypted target point in N-dimensional space, and calculating a mapping value of the encrypted target point according to a preset spatial encoding rule;
[0152] The mapping value of the secret target point is debinarized to obtain an encrypted secret information bit string of the secret information; and the encrypted secret information bit string is decrypted to obtain an original secret information bit string of the secret information to obtain the secret information.
[0153] Figure 6 The flowchart of the extraction method of the video steganography method provided by the present invention is as follows. Corresponding to the above embedding process, the extraction part also includes four parts: selection of the secret 4×4TB block, construction of the residual coefficient N-dimensional space, calculation of the residual coefficient N-dimensional space mapping value and decoding the video. Figure 6 As well as the process of the above extraction embodiment, the extraction process is described, which is still divided into 4 parts and described separately.
[0154] Part 1: Selection of encrypted 4×4TB blocks
[0155] The selection rule of the dense 4×4TB block (i.e., the dense 4×4 residual coefficient block) is consistent with that of the embedding end, that is, for intra-frame prediction, the selection of the 4×4TB block needs to meet the current PB size of 4×4, and the high-frequency coefficients in the lower right corner of the DST residual coefficients in the TB block are selected as the dense residual coefficients; for inter-frame prediction, the selection of the 4×4TB block needs to meet the current PB size of 4×4. Similarly, the DCT residual coefficients select the high-frequency coefficients in the lower right corner as the embedding position, and the scanning of the high-frequency dense residual coefficients is based on Figure 3 In addition, the selection of the secret 4×4TB block is also subject to the constraints of the embedding strength ε and the random number ρ. The comparison method of the embedding strength ε and the random number ρ must be consistent with that of the embedding end, and the random seed of the random number generator G must be consistent with that of the embedding end. Otherwise, the selection of the secret 4×4TB block will fail.
[0156] Part 2: Constructing N-dimensional space of residual coefficients
[0157] The dimension N of the N-dimensional residual coefficient space is calculated using the random number ρ of the current encrypted 4×4TB block. The calculation method should be consistent with the embedding end. Among the high-frequency encrypted residual coefficients obtained by scanning, the first N residual coefficients are taken as the encrypted residual coefficient array.
[0158] Assume that the array of dense residual coefficients is C′ coeff ={c′1,c′2,c′3,…,c′ N Similarly, since the high-frequency dense residual coefficients may be negative or exceed the range of 2N+1, the present invention needs to perform the original dense residual coefficient array C′ coeff ={c′1,c′2,c′3,…,c′ N} is standardized according to formula 1. Assume that the encrypted residual coefficient array after standardization is the encrypted intermediate array T′ temp ={t′1,t′2,t′3,…,t′ N}.
[0159] Furthermore, the present invention uses the dense residual coefficient array T′ temp Construct an N-dimensional space of residual coefficients, where each element t′ i (1≤i≤N) is the coordinate of the i-th dimension, array T′ temp That is, a secret target point in the N-dimensional space of the residual coefficient, and the coordinates of the secret target point are expressed as (t′1, t′2, t′3,…, t′ N ). At this point, the construction of the residual coefficient N-dimensional space is completed.
[0160] Part 3: Calculating the N-dimensional space mapping value of the residual coefficient
[0161] According to equations (2)-(5), we calculate the N-dimensional space mapping value of point P′ as X′=f(t′1,t′2,t′3,…,t′ N ), the value X′ is the decimal value D of the secret information embedded in the current 4×4TB block s ' ec .
[0162] The present invention uses this decimal value D s ' ec Debinarization can be performed to obtain an encrypted secret information bit string; further, decryption of the encrypted secret information bit string can be performed to obtain the embedded original secret information bit string sequence. It is important to note that the decryption here corresponds to the encryption operation on the original secret information bit string during embedding, and the extraction end has the decryption key from the embedding time.
[0163] Figure 7This is a schematic diagram of the extraction process based on the mapping value of the residual coefficient N-dimensional space provided by the present invention, as shown in FIG. Figure 7 As shown, the present invention selects the 4×4TB block marked with a bold black frame as the extraction block, i.e., the encrypted 4×4TB block, where the PB size of the current 4×4TB block is also 4×4 and the DC coefficient of the residual coefficient is not equal to 0 after entropy decoding. Assuming that the value of N is 3, the high-frequency residual coefficient array after scanning is {-3, 1, 1, 0, 2, 5, 0, 0, 0, 0}. According to the dimension N, the original encrypted residual coefficient array C′ can be obtained. coeff ={-3,1,1}, the encrypted intermediate array after normalization according to formula 1 is T′ temp ={4,1,1}, then the high-frequency secret residual coefficients constitute a point P′(4,1,1) in the 3-dimensional space. According to formula (4), the mapping value of point P′(4,1,1) can be obtained as X′=f(4,1,1)=2, which is the decimal value D′ of the extracted secret information. sec =2, debinarized value D′ sec The extracted encrypted secret information bit string S′={1,0} can be obtained.
[0164] The original secret information bit string of the private information can be obtained by decrypting the encrypted secret information bit string.
[0165] Part 4: Decoding Video
[0166] Decoding video has nothing to do with extracting secret information, but after extracting the secret information, the carrier video should often have functions such as playback. The main function of this part of the video decoding is to extract the secret information from the DCT / DST residual coefficients containing the secret information according to the previous text. Then, based on other entropy decoding, such as intra-frame prediction mode and inter-frame motion vectors, it undergoes inverse transformation and dequantization, intra-frame and inter-frame prediction reconstruction modules to obtain the decoded video file (.yuv format) for normal carrier video playback and other functions.
[0167] In summary, this solution proposes constructing an N-dimensional residual coefficient matrix space using high-frequency coefficients from the DCT / DST residual coefficients in 4×4 blocks of I, B, and P frames. By integrating the secret information bit string to be embedded and the N-dimensional space mapping rules, secret information can be embedded and extracted. Compared to existing related technologies, this technical solution offers advantages such as large embedding capacity, minimal embedding error caused by embedding secret information, high visual quality of the carrier video, and enhanced transparency and security of video steganography.
[0168] The present invention also provides a video steganography device, wherein the embedded module of the device comprises:
[0169] The first unit is configured to determine a 4×4 residual coefficient block suitable for embedding from the candidate 4×4 residual coefficient blocks according to the embedding strength of each candidate 4×4 residual coefficient block and a random seed;
[0170] A second unit is configured to collect first N high-frequency residual coefficients of the 4×4 residual coefficient block according to a preset scanning order to construct a residual coefficient array; wherein the value of N is determined according to a random seed of the 4×4 residual coefficient block;
[0171] A third unit is configured to convert the residual coefficient array into an intermediate array according to a preset conversion rule, determine a target point in the N-dimensional space using the intermediate array, and calculate mapping values of the target point and 2N adjacent points of the target point according to a preset spatial coding rule;
[0172] The fourth unit is configured to modify the residual coefficient array into a target residual coefficient array according to the mapping values of the target point and the 2N adjacent points and the value of the secret information, so as to embed the secret information; the value of the secret information is a decimal value of the encrypted secret information bit string of the secret information; the length of the encrypted secret information bit string is in, Indicates rounding down;
[0173] A fifth unit is configured to obtain a compressed video stream file by performing entropy coding on the target residual coefficient array and the preset syntax element;
[0174] The residual coefficients in the 4×4 residual coefficient block are not all zero, and the DC coefficients in the 4×4 residual coefficient block are not zero; the value range of the coordinate axis of each dimension of the N-dimensional space is [0, 2N], and the preset spatial coding rule is configured so that the mapping values of the target point and all the adjacent points of the target point completely traverse the preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows:
[0175] Assume that the target point is P = (x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are:
[0176] P + =(x1,x2,…,x i +1,…,x N );
[0177] P - =(x1,x2,…,x i -1,…,x N );
[0178] Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i If -1<0, reset x i +1=2N.
[0179] It should be noted that the video steganography device provided in the embodiment of the present invention can execute the video steganography method described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0180] Figure 8 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the above-mentioned video steganography method.
[0181] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0182] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the video steganography method provided by the above embodiments.
[0183] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the video steganography method provided in the above embodiments.
[0184] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A video steganography method, characterized in that: The embedding method of the method includes: determining a suitable 4×4 residual coefficient block for embedding from the candidate 4×4 residual coefficient blocks according to the embedding strength of each candidate 4×4 residual coefficient block and the random seed; Acquiring first N high-frequency residual coefficients of the 4×4 residual coefficient block in a preset scanning order to construct a residual coefficient array; wherein the value of N is determined according to a random seed of the 4×4 residual coefficient block; Converting the residual coefficient array into an intermediate array according to a preset conversion rule, determining a target point in an N-dimensional space using the intermediate array, and calculating mapping values of the target point and its 2N neighboring points according to a preset spatial encoding rule; According to the mapping values of the target point and 2N adjacent points and the value of the secret information, the residual coefficient array is modified to the target residual coefficient array to embed the secret information; the value of the secret information is the decimal value of the encrypted secret information bit string of the secret information; the length of the encrypted secret information bit string is in, Indicates rounding down; Obtaining a compressed video code stream file by performing entropy coding on the target residual coefficient array and preset syntax elements; The residual coefficients in the 4×4 residual coefficient block are not all zero, and the DC coefficients in the 4×4 residual coefficient block are not zero; the value range of the coordinate axis of each dimension of the N-dimensional space is [0, 2N], and the preset spatial coding rule is configured so that the mapping values of the target point and all adjacent points of the target point completely traverse the preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows: Assume that the target point is P = (x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are: P + =(x1,x2,…,x i +1,…,x N ): P - =(x1,x2,…,x i −1,…,x N ): Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i If -1<0, reset x i +1=2N.
2. The video steganography method according to claim 1, characterized in that: The modifying the residual coefficient array into a target residual coefficient array according to the mapping values of the target point and the 2N adjacent points and the value of the secret information to embed the secret information includes: When the mapping value of the target point is equal to the value of the secret information, determining the target residual coefficient array to be the original residual coefficient array to complete the embedding of the secret information; When the mapping value of the target point is not equal to the value of the secret information, modifying the residual coefficient array to a target residual coefficient array to complete the embedding of the secret information; The step of modifying the residual coefficient array to a target residual coefficient array to complete embedding of the secret information specifically includes: Determine a target adjacent point from the 2N adjacent points; the mapping value of the target adjacent point is equal to the value of the secret information; The residual coefficient array is modified into a target residual coefficient group to complete the embedding of the secret information; the coordinates determined by the intermediate array of the target residual coefficient group are equal to the coordinates of the target adjacent point in the N-dimensional space.
3. The video steganography method according to claim 2, characterized in that: The residual coefficient array is C coeff ={c1,c2,c3,…,c N }, the intermediate array is T temp ={t1,t2,t3,…,t N }, the residual coefficient array is converted into an intermediate array according to a preset conversion rule, specifically: Among them, t i Indicates the i-th data in the intermediate array, c i represents the i-th data in the residual coefficient array, and mod() represents the modulo operation.
4. The video steganography method according to claim 3, characterized in that: The mapping value of the target point is calculated according to the preset spatial coding rule, specifically: <h2 style=";text-align:left;direction:ltr">f(x1,x2,x3,…,x<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> )=(x1+2x2+3x3+…+Nx<h2 style=";text-align:left;direction:ltr"> N <h2 style=";text-align:left;direction:ltr"> )mod(2N+1); Among them, f(x1, x2, x3, ..., x N ) is the mapping value corresponding to the target point; Calculate the adjacent point P according to the preset spatial coding rules + The mapping value is: f(x1,x2,…,x i +1…,x N )=(x+i)mod(2N+1); Where X is the mapping value of the target point, f(x1, x2, ..., x i +1…,x N ) is the adjacent point P + The mapping value of Calculate the adjacent point P according to the preset spatial coding rules - The mapping value is: f(x1,x2,…,x i -1…,x N )=(X-i)mod(2N+1); Among them, f(x1, x2, ..., x i -1...., x N ) is the adjacent point P - The mapping value of .
5. The video steganography method according to claim 4, characterized in that: The extraction method of the method comprises: Determining a dense 4×4 residual coefficient block in the compressed video stream file; Acquire the first N high-frequency dense residual coefficients of the dense 4×4 residual coefficient block according to a preset scanning order to construct a dense residual coefficient array; Converting the encrypted residual coefficient array into a encrypted intermediate array according to a preset conversion rule, treating the encrypted intermediate array as a encrypted target point in N-dimensional space, and calculating a mapping value of the encrypted target point according to a preset spatial encoding rule; Performing a debinarization operation on the mapping value of the secret target point to obtain an encrypted secret information bit string of the secret information; The encrypted secret information bit string is decrypted to obtain the original secret information bit string of the secret information, so as to obtain the secret information.
6. The video steganography method according to claim 1, characterized in that: The step of determining a 4×4 residual coefficient block suitable for embedding in any video according to the embedding strength of each candidate 4×4 residual coefficient block and the random seed includes: In a case where the random seed is smaller than the embedding strength, the candidate 4×4 residual coefficient block is determined to be a 4×4 residual coefficient block suitable for embedding.
7. The video steganography method according to claim 1, characterized in that: Before modifying the residual coefficient array into a target residual coefficient array according to the mapping values of the target point and the 2N adjacent points and the value of the secret information to embed the secret information, the method further includes: Obtaining an original secret information bit string of the secret information; Encrypting the original secret information bit string to obtain an encrypted secret information bit string; Calculate the decimal value of the encrypted secret information bit string as the value of the secret information.
8. A video steganography device, characterized in that: The embedded module of the device includes: The first unit is configured to determine a 4×4 residual coefficient block suitable for embedding from the candidate 4×4 residual coefficient blocks according to the embedding strength of each candidate 4×4 residual coefficient block and a random seed; A second unit is configured to collect first N high-frequency residual coefficients of the 4×4 residual coefficient block according to a preset scanning order to construct a residual coefficient array; wherein the value of N is determined according to a random seed of the 4×4 residual coefficient block; A third unit is configured to convert the residual coefficient array into an intermediate array according to a preset conversion rule, determine a target point in the N-dimensional space using the intermediate array, and calculate mapping values of the target point and 2N adjacent points of the target point according to a preset spatial coding rule; The fourth unit is configured to modify the residual coefficient array into a target residual coefficient array according to the mapping values of the target point and the 2N adjacent points and the value of the secret information, so as to embed the secret information; the value of the secret information is a decimal value of the encrypted secret information bit string of the secret information; the length of the encrypted secret information bit string is in, Indicates rounding down; A fifth unit is configured to obtain a compressed video stream file by performing entropy coding on the target residual coefficient array and the preset syntax element; The residual coefficients in the 4×4 residual coefficient block are not all zero, and the DC coefficients in the 4×4 residual coefficient block are not zero; the value range of the coordinate axis of each dimension of the N-dimensional space is [0, 2N], and the preset spatial coding rule is configured so that the mapping values of the target point and all the adjacent points of the target point completely traverse the preset array {0, 1, 2, 3, ..., 2N}; wherein the adjacent points are defined as follows: Assume that the target point is P=(x1, x2, x3, ..., x N ), then the neighboring point P of the target point in the i-th dimension of the N-dimensional space + and P - The coordinates are: P + (x1,x2,...,x i +1,...,x N ): P - (x1,x2,...,x i -1,...,x N ): Where 1≤i≤N; and, in the case of pre-determined x i When +1>2N, reset x i +1=0; in the pre-determined x i When -1<0, reset x i +1=2N.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the video steganography method according to any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the video steganography method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Video steganography algorithm based on motion vector difference
CN106713917A
Video encryption method capable of carrying secret information
CN110809192A