A method and device for reversible information hiding in large-capacity video

By grouping according to the number of macroblock motion vectors and using histograms to embed information, it achieves reversible information hiding in videos, solves the problems of video compression distortion and information embedding capacity, improves embedding capacity, and is suitable for high-information situations.

CN115052151BActive Publication Date: 2024-10-15ENG UNIV OF THE CHINESE PEOPLES ARMED POLICE FORCE
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210667340.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2024-10-15
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

The existing technology is difficult to reduce video compression distortion while increasing information embedding capacity.

Method used

By grouping according to the number of motion vectors of macroblocks during video encoding, using a single-layer or double-layer secret information embedding method, and using the prediction error and histogram of motion vectors for information embedding and extraction, reversible information hiding in videos is achieved.

Benefits of technology

While maintaining low bit rate expansion and imperceptibility, the information embedding capacity is significantly increased, which is suitable for situations with large amounts of information, such as medical and military transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115052151B_ABST
    Figure CN115052151B_ABST
Patent Text Reader

Abstract

The present invention provides a large-capacity video reversible information hiding method and device, the method includes, when performing video encoding, obtaining the motion vector of the macroblock, and grouping according to the number of motion vectors in each macroblock; when the motion vector of the macroblock does not exceed two, the macroblock is not embedded with secret information; when the motion vector of the macroblock is greater than two and less than four, the macroblock is embedded with a single layer of secret information; when the motion vector of the macroblock is greater than four and less than sixteen, the macroblock is embedded with a double layer of secret information; when performing video decoding, the inverse operation of encoding is performed to decode the macroblock. The beneficial effect of the present invention is that while maintaining good invisibility and small bit rate expansion, the embedding capacity is significantly increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information hiding in video compression, and in particular to a method and device for reversible information hiding in large-capacity video. Background Art

[0002] With the rapid development of computer and network technology, the distribution and application of digital multimedia are becoming more and more popular, but digital information can be easily accessed, intercepted and tampered in public channels. Therefore, information security has become an issue that cannot be ignored. The purpose of reversible information hiding is to embed secret information into it by modifying the carrier. More importantly, it can not only accurately extract the embedded information at the decoding end, but also restore the original carrier without loss. Therefore, it is widely used in military, medical, aerospace and multimedia management and other fields with high requirements for carrier quality. In recent years, short video platforms have continued to rise, and the amount of video transmission on the Internet has increased. Video has the characteristics of large data volume, large absolute amount of embedded information and good concealment. It is an ideal digital carrier. The development of multimedia technology has significantly improved the quality of video, and the video file has also increased accordingly. In order to speed up the upload and download speed and meet user needs, videos on the Internet are usually compressed before transmission. Compared with uncompressed videos, the application value of information hiding technology for compressed videos is greater. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method and device for reversible information hiding of large-capacity video, aiming to increase the embedding capacity while minimizing distortion.

[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: a large-capacity video reversible information hiding method, comprising the steps of:

[0005] When performing video encoding, the motion vectors of the macroblocks are obtained and grouped according to the number of motion vectors in each macroblock;

[0006] When there are no more than two motion vectors in a macroblock, no secret information is embedded in the macroblock;

[0007] When the motion vector of a macroblock is greater than two and less than four, a single layer of secret information is embedded in the macroblock;

[0008] When the motion vector of a macroblock is greater than four and less than sixteen, a double-layer secret information embedding is performed on the macroblock;

[0009] When decoding a video, the inverse operation of encoding is performed to decode the macroblocks.

[0010] The single-layer secret information embedding of the macroblock specifically includes:

[0011] Sort the motion vectors in the macroblock in ascending order;

[0012] Calculate the maximum motion vector error in the macroblock, where the maximum motion vector error is the prediction error between the maximum motion vector and other motion vectors;

[0013] According to the prediction errors between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram;

[0014] The minimum motion vector error is then calculated and the secret information is embedded.

[0015] Among them, according to the prediction error between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram. Specifically,

[0016] According to the combination of two adjacent prediction errors, a prediction error pair is formed, forming a two-dimensional histogram for two-dimensional embedding; if there is any remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding to complete the embedding of the secret information of the macroblock.

[0017] The double-layer secret information embedding of the macroblock specifically includes:

[0018] Calculate the maximum motion vector error for the first n-1 motion vectors of the macroblock and embed the secret information, sort the modified motion vectors in ascending order, calculate the maximum motion vector error and the minimum motion vector error and embed the secret information, and complete the first layer of secret information embedding;

[0019] The maximum motion vector error and the minimum motion vector error are calculated for the last n-1 motion vectors of the macroblock and the secret information is embedded therein to complete the embedding of the second layer of secret information.

[0020] When decoding the video, the inverse operation of encoding is performed, and decoding the macroblock specifically includes determining the number of motion vectors of the encoded macroblock;

[0021] If the motion vectors of the encoded macroblock do not exceed two, the macroblock is directly decoded to obtain a decoded macroblock;

[0022] If the motion vectors of the encoded macroblock are greater than two and less than four, the minimum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, the secret information is extracted, and the motion vector is restored to obtain a decoded macroblock;

[0023] If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

[0024] The present invention also provides a large-capacity video reversible information hiding device, comprising:

[0025] A grouping module, used for obtaining motion vectors of macroblocks during video encoding, and grouping according to the number of motion vectors in each macroblock;

[0026] An embedding skip module, used for not embedding secret information into the macroblock when the motion vectors of the macroblock do not exceed two;

[0027] A single-layer embedding module, used for embedding a single-layer secret information into the macroblock when the motion vector of the macroblock is greater than two and less than four;

[0028] A double-layer embedding module, used for embedding double-layer secret information into the macroblock when the motion vector of the macroblock is greater than four and less than sixteen;

[0029] The decoding module is used to perform the inverse operation of encoding when decoding the video, and decode the macroblock.

[0030] Among them, the single-layer embedded module is specifically used for:

[0031] Sort the motion vectors in the macroblock in ascending order;

[0032] Calculate the maximum motion vector error in the macroblock, where the maximum motion vector error is the prediction error between the maximum motion vector and other motion vectors;

[0033] According to the prediction errors between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram;

[0034] The minimum motion vector error is then calculated and the secret information is embedded.

[0035] Among them, in the single-layer embedding module, according to the prediction error between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram. Specifically,

[0036] According to the combination of two adjacent prediction errors, a prediction error pair is formed, forming a two-dimensional histogram for two-dimensional embedding; if there is any remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding to complete the embedding of the secret information of the macroblock.

[0037] Among them, the double-layer embedded module is specifically used for:

[0038] Calculate the maximum motion vector error for the first n-1 motion vectors of the macroblock and embed the secret information, sort the modified motion vectors in ascending order, calculate the maximum motion vector error and the minimum motion vector error and embed the secret information, and complete the first layer of secret information embedding;

[0039] The maximum motion vector error and the minimum motion vector error are calculated for the last n-1 motion vectors of the macroblock and the secret information is embedded therein to complete the embedding of the second layer of secret information.

[0040] The decoding module is specifically used for:

[0041] Determine the number of motion vectors of the encoded macroblock;

[0042] If the motion vectors of the encoded macroblock do not exceed two, the macroblock is directly decoded to obtain a decoded macroblock;

[0043] If the motion vectors of the encoded macroblock are greater than two and less than four, the minimum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, the secret information is extracted, and the motion vector is restored to obtain a decoded macroblock;

[0044] If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

[0045] The beneficial effects of the present invention are: using a prediction method based on the spatial position of a motion vector to obtain a prediction error, using a method combining two-dimensional and one-dimensional histograms to embed secret information, and using a double-layer embedding method to achieve reversible information hiding of compressed video on motion vectors. The designed algorithm not only maintains good imperceptibility and low bit rate expansion, but also has the advantage of large embedding capacity, and is suitable for occasions such as medicine and military where a large amount of information is transmitted; using a prediction algorithm based on the spatial position of a motion vector to calculate the prediction error, obtain a prediction error pair, and then using the designed embedding strategy combining two-dimensional and one-dimensional histograms to embed secret information. The algorithm adopts a double-layer embedding idea to further increase the embedding capacity. Compared with the latest information hiding algorithms of the same type, the embedding capacity of the algorithm has increased by an average of 16.31%. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The specific structure of the present invention is described in detail below in conjunction with the accompanying drawings.

[0047] Figure 1 This is a flow chart of a method for reversible information hiding in large-capacity video according to an embodiment of the present invention;

[0048] Figure 2 is a prediction error distribution diagram of the spatial position of the motion vector according to an embodiment of the present invention;

[0049] Figure 3 is a two-dimensional histogram embedding diagram of an embodiment of the present invention;

[0050] Figure 4 is a one-dimensional histogram embedding graph of an embodiment of the present invention;

[0051] Figure 5 This is a diagram of the first layer division method of the double-layer embedding according to an embodiment of the present invention;

[0052] Figure 6 This is a diagram of the second layer division method of the double-layer embedding according to an embodiment of the present invention;

[0053] Figure 7 A schematic block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0056] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0057] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0058] like Figure 1 As shown, the first embodiment of the present invention is: a method for reversible information hiding of large-capacity video, comprising the steps of:

[0059] S10, when performing video encoding, obtaining motion vectors of macroblocks, and grouping according to the number of motion vectors in each macroblock;

[0060] S20, when the number of motion vectors of the macroblock does not exceed two, the secret information is not embedded into the macroblock;

[0061] At this time, it is considered that the motion vector is relatively smooth, and embedding information will cause greater distortion to the original video, so no information is embedded here.

[0062] S30, when the motion vector of the macroblock is greater than two and less than four, a single layer of secret information is embedded in the macroblock;

[0063] There are fewer motion vectors in this type of macroblock. If double-layer embedding is performed here, it will not only reduce the embedding capacity but also cause more distortion, so the information is embedded only in a single-layer embedding manner.

[0064] S40, when the motion vector of the macroblock is greater than four and less than sixteen, embedding double-layer secret information into the macroblock;

[0065] This type of macroblock contains more motion vectors, and the embedding capacity can be increased by using a double-layer embedding method.

[0066] S50: When decoding the video, perform an inverse operation of encoding to decode the macroblock.

[0067] Among them, in step S30, embedding a single layer of secret information into the macroblock specifically includes:

[0068] S31, sorting the motion vectors in the macroblock in ascending order;

[0069] S32, calculating the maximum motion vector error in the macroblock, wherein the maximum motion vector error is a prediction error obtained between the maximum motion vector and other motion vectors;

[0070] S33, embedding secret information using a two-dimensional histogram and a one-dimensional histogram according to prediction errors obtained between the maximum motion vector and other motion vectors;

[0071] S34, then calculate the minimum motion vector error and embed the secret information.

[0072] Among them, in step S33, according to the prediction error obtained between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram, specifically,

[0073] According to the combination of two adjacent prediction errors, a prediction error pair is formed, forming a two-dimensional histogram for two-dimensional embedding; if there is any remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding to complete the embedding of the secret information of the macroblock.

[0074] Prediction method based on the spatial position of motion vector:

[0075] In the PVO-based prediction error expansion method, for two related pixels, the grayscale value of the pixel is used to determine the predicted pixel. In the IPVO scheme, the spatial relative position of the pixel is used to determine the predicted pixel. This method of using spatial correlation is also applicable to multi-channel prediction, and its embedding capacity is better than the original prediction error expansion method.

[0076] To improve this method and combine it with video coding, it is necessary to group the motion vectors before calculating the prediction error and arrange all the motion vectors in a macroblock in ascending order:

[0077] mv σ(1) <mv σ(2) <…<mv σ(n-1) <mv σ(n)

[0078] Maximum prediction error e max It is the prediction error between the maximum motion vector and other motion vectors, which can be expressed as:

[0079] e max (i) = mv u -mv v

[0080] Where u = min(σ(n), i), v = max(σ(n), i), i∈{σ(1),σ(2),…,σ(n-1)}, σ(n) is the original position of the maximum motion vector. The n-1 prediction errors e are calculated. max Afterwards, the motion vector embedding information can be fine-tuned according to the designed embedding method.

[0081] In e max After embedding the information, the motion vectors are sorted in ascending order again to obtain a new sequence mv σ(1) ,mv σ(2) ,…,mv σ(n-1) ,mv σ(n) Similarly, calculate the minimum prediction error e min :

[0082] e min (i) = mv s -mv t (0)

[0083] where s = min(σ(1),i), t = max(σ(1),i), i∈{σ(2),σ(3),…,σ(n)}, σ(1) is the original position of the minimum motion vector, again in e min Embed information in .

[0084] Using the above prediction method, a smaller prediction error can be obtained. Figure 2 The figure shows the prediction error distribution histogram obtained on 4 different videos. As can be seen from the figure, using this prediction method, the errors obtained are concentrated between -2-2, accounting for 67.70% of the total error. The prediction method has high accuracy and concentrated error distribution, which makes it easy to redesign an embedding rule that can make full use of the embeddable space based on the obtained error distribution.

[0085] Embedding method combining one-dimensional and two-dimensional histograms:

[0086] Histogram modification is an effective algorithm for reversible data hiding in H.264 / AVC video. It can obtain a larger embedding capacity while modifying smaller motion vectors. Compared with the one-dimensional histogram, the two-dimensional histogram has a larger embedding capacity. However, if the number of motion vectors in a macroblock is even, the prediction error obtained according to the prediction method based on the spatial position of the motion vector is an odd number. When the prediction error is embedded in two dimensions, it cannot meet the pairing, so that the remaining single motion vector cannot be used. In order to make full use of all motion vectors, this paper proposes an embedding method based on the combination of one-dimensional and two-dimensional histogram modification. The motion vector of the video is divided into horizontal component and vertical component, and the two components can be embedded with information separately. Since the embedding and extraction process of the two components is exactly the same, only the horizontal motion vector is explained here.

[0087] like Figure 3 As shown in the figure, two adjacent prediction errors are combined into pairs as points in the two-dimensional histogram. The horizontal and vertical coordinates of the points in the figure represent the values ​​of the two prediction errors respectively. All points in the two-dimensional histogram can be divided into non-intersecting point sets, and different point sets have different translation rules when modified. When embedding information to modify the motion vector, the points in each quadrant are translated in a way that spreads from the center to the surroundings. Taking the first quadrant as an example, all points can be divided into A 1 -A 7 There are 7 collections in total:

[0088] A 1 ={1,1} A 2 ={2,1}

[0089] A 3 ={1,2} A 4 ={2,2}

[0090] A 5 ={e 1 ,1|e 1 >2} A 6 ={1,e 2 |e 2 >2}

[0091] A 7 ={e 1 ,e 2 |(e 1 >2||e 2 >2)&e 1 ≠1&e 2 ≠1}

[0092] The translation rules are as follows:

[0093] (1) If (e 1 ,e 2 )∈A1 , then the modified error (e' 1 ,e' 2 ) becomes:

[0094]

[0095] (2) If (e 1 ,e 2 )∈A 2 ,but:

[0096]

[0097] (3) If (e 1 ,e 2 )∈A 3 ,but:

[0098]

[0099] (4) If (e 1 ,e 2 )∈A 4 ,but:

[0100]

[0101] (5) If (e 1 ,e 2 )∈A 5 ∪A 6 ∪A 7 , which only translates the error but does not embed information:

[0102]

[0103] like Figure 4 As shown, it is a schematic diagram of one-dimensional histogram modification;

[0104] When using one-dimensional histogram to embed information, it is embedded only when e=0 or e=1, and other positions are only translated. It is divided into the following four cases:

[0105] (1) When e = 0:

[0106]

[0107] (2) When e=1:

[0108]

[0109] (3) When e<0 or e>1:

[0110]

[0111] The algorithm in this paper combines two adjacent prediction errors in the same group to form a prediction error pair for two-dimensional embedding. If there are still prediction errors left, the remaining one prediction error is used for one-dimensional embedding. For ease of understanding, the following example is given:

[0112] If there are the following 6 motion vectors in a group: mv = {2, 2, 1, 2, 0, 1}, the prediction error e can be obtained. max {1,2,3,5,6}=(0,0,-1,2,1). According to the strategy of two-dimensional histogram, first put e max (1) and e max (2) Combined to form the prediction error pair (0,0), e max (3) and e max (5) Combined to form a prediction error pair (-1, 2), and two-dimensional embedding is performed. max (6) has not been used yet, so it is embedded in one dimension.

[0113] Among them, in step S40, the double-layer secret information embedding of the macroblock specifically includes:

[0114] S41, calculating the maximum motion vector error for the first n-1 motion vectors of the macroblock and embedding the secret information, and sorting the modified motion vectors in ascending order, calculating the maximum motion vector error and the minimum motion vector error and embedding the secret information, completing the first layer of secret information embedding; Figure 5 The first layer division is shown.

[0115] S42, respectively calculating the maximum motion vector error and the minimum motion vector error for the last n-1 motion vectors of the macroblock and embedding the secret information, completing the embedding of the second layer of secret information; Figure 6 This is the second-level division method.

[0116] Table 1 Capacity comparison between single-layer embedding and double-layer embedding

[0117]

[0118] Table 1 compares the capacity of single-layer embedding and double-layer embedding in different video sequences. The data shows that the maximum embedding capacity of double-layer embedding increases by 55.85% compared with single-layer embedding, which shows the effectiveness of the motion vector double-layer embedding method designed in this paper.

[0119] Among them, step S50, when performing video decoding, performs the inverse operation of encoding, and decodes the macroblock specifically includes:

[0120] S51, determining the number of motion vectors of the encoded macroblock;

[0121] S52, if the motion vectors of the encoded macroblock do not exceed two, directly decode the macroblock to obtain a decoded macroblock;

[0122] S53, if the motion vectors of the encoded macroblock are greater than two and less than four, then calculate the minimum motion vector error in the macroblock, extract the secret information according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, restore the motion vector, and then calculate the maximum motion vector error in the macroblock, extract the secret information, restore the motion vector, and obtain a decoded macroblock;

[0123] S54. If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

[0124] In this embodiment, a prediction method based on the spatial position of a motion vector is used to obtain a prediction error, a method combining two-dimensional and one-dimensional histograms is used to embed secret information, and a double-layer embedding method is used to achieve reversible information hiding of compressed video on the motion vector. In addition to maintaining good imperceptibility and low bit rate expansion, the designed algorithm also has the advantage of large embedding capacity, which is suitable for occasions such as medicine and military where a large amount of information is transmitted; the prediction error is calculated using a prediction algorithm based on the spatial position of a motion vector to obtain a prediction error pair, and then the secret information is embedded using the designed embedding strategy combining two-dimensional and one-dimensional histograms. The algorithm adopts a double-layer embedding idea to further increase the embedding capacity. Compared with the latest information hiding algorithms of the same type, the embedding capacity of this algorithm has increased by an average of 16.31%.

[0125] Another embodiment of the present invention is a large-capacity video reversible information hiding device, comprising:

[0126] The grouping module 10 is used to obtain the motion vectors of the macroblocks when performing video encoding, and group them according to the number of motion vectors in each macroblock;

[0127] An embedding skip module 20, configured to not embed secret information into the macroblock when the motion vectors of the macroblock do not exceed two;

[0128] A single-layer embedding module 30, for embedding a single-layer secret information into the macroblock when the motion vector of the macroblock is greater than two and less than four;

[0129] A double-layer embedding module 40, for embedding double-layer secret information into the macroblock when the motion vector of the macroblock is greater than four and less than sixteen;

[0130] The decoding module 50 is used to perform an inverse operation of encoding during video decoding to decode the macroblock.

[0131] The single-layer embedded module 30 is specifically used for:

[0132] Sort the motion vectors in the macroblock in ascending order;

[0133] Calculate the maximum motion vector error in the macroblock, where the maximum motion vector error is the prediction error between the maximum motion vector and other motion vectors;

[0134] According to the prediction errors between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram;

[0135] The minimum motion vector error is then calculated and the secret information is embedded.

[0136] In the single-layer embedding module 30, according to the prediction error between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram. Specifically,

[0137] According to the combination of two adjacent prediction errors, a prediction error pair is formed, forming a two-dimensional histogram for two-dimensional embedding; if there is any remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding to complete the embedding of the secret information of the macroblock.

[0138] The double-layer embedded module 40 is specifically used for:

[0139] Calculate the maximum motion vector error for the first n-1 motion vectors of the macroblock and embed the secret information, sort the modified motion vectors in ascending order, calculate the maximum motion vector error and the minimum motion vector error and embed the secret information, and complete the first layer of secret information embedding;

[0140] The maximum motion vector error and the minimum motion vector error are calculated for the last n-1 motion vectors of the macroblock and the secret information is embedded therein to complete the embedding of the second layer of secret information.

[0141] The decoding module 50 is specifically used for:

[0142] Determine the number of motion vectors of the encoded macroblock;

[0143] If the motion vectors of the encoded macroblock do not exceed two, the macroblock is directly decoded to obtain a decoded macroblock;

[0144] If the motion vectors of the encoded macroblock are greater than two and less than four, the minimum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, the secret information is extracted, and the motion vector is restored to obtain a decoded macroblock;

[0145] If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

[0146] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned large-capacity video reversible information hiding device can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0147] The above-mentioned large-capacity video reversible information hiding device can be implemented in the form of a computer program. The computer program can be used in Figure 7 Runs on the computer device shown.

[0148] See also Figure 7 , Figure 7 5 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a terminal or a server, wherein the terminal may be an electronic device with communication functions such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device. The server may be an independent server or a server cluster composed of multiple servers.

[0149] See also Figure 7 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a non-volatile storage medium 503 and an internal memory 504 .

[0150] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions, and when the program instructions are executed, the processor 502 can execute a large-capacity video reversible information hiding method.

[0151] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0152] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a large-capacity video reversible information hiding method.

[0153] The network interface 505 is used to communicate with other devices over the network. Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0154] The processor 502 is used to run a computer program 5032 stored in the memory to implement the above-mentioned large-capacity video reversible information hiding method.

[0155] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0156] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0157] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the above large-capacity video reversible information hiding method.

[0158] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0159] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0160] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0161] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0163] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for reversible information hiding in large-capacity video, characterized by: Including steps, When performing video encoding, the motion vectors of the macroblocks are obtained and grouped according to the number of motion vectors in each macroblock; When there are no more than two motion vectors in a macroblock, no secret information is embedded in the macroblock; When the motion vector of a macroblock is greater than two and less than four, a single layer of secret information is embedded in the macroblock; When the motion vector of a macroblock is greater than four and less than sixteen, a double-layer secret information embedding is performed on the macroblock; When decoding the video, the inverse operation of encoding is performed to decode the macroblocks; The single-layer secret information embedding of macroblocks specifically includes: Sort the motion vectors in the macroblock in ascending order; Calculate the maximum motion vector error in the macroblock, where the maximum motion vector error is the prediction error between the maximum motion vector and other motion vectors; According to the prediction errors between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram; Then the minimum motion vector error is calculated and the secret information is embedded; According to the prediction error between the maximum motion vector and other motion vectors, the secret information is embedded using the two-dimensional histogram and the one-dimensional histogram. Specifically, According to the combination of two adjacent prediction errors, a prediction error pair is formed, and a two-dimensional histogram is formed for two-dimensional embedding; if there is a remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding, thereby completing the embedding of the secret information of the macroblock; The double-layer secret information embedding of macroblocks specifically includes: Calculate the maximum motion vector error for the first n-1 motion vectors of the macroblock and embed the secret information, sort the modified motion vectors in ascending order, calculate the maximum motion vector error and the minimum motion vector error and embed the secret information, completing the first layer of secret information embedding; The maximum motion vector error and the minimum motion vector error are calculated for the last n-1 motion vectors of the macroblock and the secret information is embedded therein to complete the embedding of the second layer of secret information.

2. The method for reversible information hiding in large-capacity video according to claim 1, characterized in that: When decoding a video, the inverse operation of encoding is performed to decode the macroblocks, including: Determine the number of motion vectors of the encoded macroblock; If the motion vectors of the encoded macroblock do not exceed two, the macroblock is directly decoded to obtain a decoded macroblock; If the motion vectors of the encoded macroblock are greater than two and less than four, the minimum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, the secret information is extracted, and the motion vector is restored to obtain a decoded macroblock; If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

3. A large-capacity video reversible information hiding device, characterized in that: include, A grouping module, used for obtaining motion vectors of macroblocks during video encoding, and grouping according to the number of motion vectors in each macroblock; An embedding skip module, used for not embedding secret information into the macroblock when the motion vectors of the macroblock do not exceed two; A single-layer embedding module, used for embedding a single-layer secret information into the macroblock when the motion vector of the macroblock is greater than two and less than four; A double-layer embedding module, used for embedding double-layer secret information into the macroblock when the motion vector of the macroblock is greater than four and less than sixteen; A decoding module, used to perform inverse operation of encoding and decode macroblocks when decoding the video; The single-layer embedded module is specifically used for: Sort the motion vectors in the macroblock in ascending order; Calculate the maximum motion vector error in the macroblock, where the maximum motion vector error is the prediction error between the maximum motion vector and other motion vectors; According to the prediction errors between the maximum motion vector and other motion vectors, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram; Then the minimum motion vector error is calculated and the secret information is embedded; In the single-layer embedding module, the secret information is embedded using a two-dimensional histogram and a one-dimensional histogram according to the prediction error between the maximum motion vector and other motion vectors. Specifically, According to the combination of two adjacent prediction errors, a prediction error pair is formed, and a two-dimensional histogram is formed for two-dimensional embedding; if there is a remaining prediction error, the remaining prediction error forms a one-dimensional histogram for one-dimensional embedding, thereby completing the embedding of the secret information of the macroblock; The double-layer embedded module is specifically used for: Calculate the maximum motion vector error for the first n-1 motion vectors of the macroblock and embed the secret information, sort the modified motion vectors in ascending order, calculate the maximum motion vector error and the minimum motion vector error and embed the secret information, completing the first layer of secret information embedding; The maximum motion vector error and the minimum motion vector error are calculated for the last n-1 motion vectors of the macroblock and the secret information is embedded therein to complete the embedding of the second layer of secret information.

4. The large-capacity video reversible information hiding device as claimed in claim 3, characterized in that: The decoding module is specifically used for: Determine the number of motion vectors of the encoded macroblock; If the motion vectors of the encoded macroblock do not exceed two, the macroblock is directly decoded to obtain a decoded macroblock; If the motion vectors of the encoded macroblock are greater than two and less than four, the minimum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping of the two-dimensional histogram and the one-dimensional histogram, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, the secret information is extracted, and the motion vector is restored to obtain a decoded macroblock; If the motion vectors of the encoded macroblock are greater than four and less than sixteen, the motion vectors of the second layer are sorted in ascending order, and after calculating the minimum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored. Then, the maximum motion vector error in the macroblock is calculated, and the secret information is extracted according to the inverse mapping. Then, the motion vectors of the first layer are sorted in ascending order, and after calculating the minimum motion vector error and the maximum motion vector error in the macroblock, the secret information is extracted according to the inverse mapping, and the motion vector is restored.

Citation Information

Patent Citations

  • STC coding method based on embedding amount dual-layer optical distribution ratio

    CN106169189A

  • Video error concealment method based on histogram translation reversible information concealment

    CN110113605A

  • Video steganography method, system and device based on macro block complexity

    CN111711822A

  • Reversible data hiding image enhancement system with 2d histogram

    IN202041044846A

  • Reversible data hiding method and system based on prediction error

    WO2022088516A1