Video hidden information embedding network construction method and device, equipment and storage medium
By constructing a video hidden information embedding network, embedding watermarks and performing correction extraction in the noise network, the problem of visual quality degradation of video watermarks during transmission is solved, and high robustness and stability of watermarks are achieved.
Patent Information
- Application Number
- CN202410051344.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2024-10-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing video watermarks are prone to compression and attacks during the transmission process, resulting in a decrease in visual quality and making it difficult to ensure the stability and recognizability of the watermark.
By constructing a video hidden information embedding network, the watermark is first embedded in the video frame image, and then the noise during the transmission process is simulated in the noise network to correct and extract the predicted hidden information, and update the embedding network to improve the robustness of the watermark.
It improves the recognizability and visual quality of watermarks in videos under various noise attacks, ensuring the stability and integrity of watermarks.
Smart Images

Figure CN118828136A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video technology, and in particular to a method, device, equipment and storage medium for embedding hidden video information into a network. Background Art
[0002] The purpose of video watermarking is to hide information in a video stream in a way that is difficult to remove or tamper with without changing the quality of the video content.
[0003] Conventional video watermark embedding methods can be roughly divided into three schemes according to the domain in which the watermark is embedded: spatial domain (embedded on the original uncompressed video), transform domain (embedded in the video codec network) and compression domain (embedded in the compressed video stream).
[0004] The above-mentioned methods can all embed watermarks into videos. However, in the process of video transmission, the original video will inevitably be compressed, and there may even be strong attacks on the original video such as screen recording and secret filming. In this process, the watermark embedded by conventional methods will be damaged to a certain extent, and it is difficult to ensure the visual quality of the watermark after the video is attacked. Therefore, how to ensure the visual quality of the watermark in the video has become a problem that needs to be urgently solved in this field. Summary of the invention
[0005] The main purpose of this application is to provide a method, device, equipment and storage medium for embedding hidden information in a video network, aiming to solve the technical problem of how to ensure the visual quality of the watermark in the video.
[0006] To achieve the above-mentioned purpose, the present application provides a method for constructing a network by embedding hidden information in a video, and the method comprises:
[0007] Constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence;
[0008] Inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network to obtain a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network;
[0009] Inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network;
[0010] Inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image;
[0011] The loss data is calculated according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and the initial video hidden information embedding network is updated according to the loss data to obtain an updated target video hidden information embedding network.
[0012] Optionally, in a feasible embodiment, the noise contained in the noisy frame image includes: one or more of perspective transformation noise, Gaussian noise, JPEG compression noise, color attack noise, cropping attack noise, moiré distortion noise and illumination distortion noise.
[0013] Optionally, in a feasible embodiment, the correction extraction network includes: a correction network and a video hidden information extraction network; the step of inputting the noisy frame image into a preset correction extraction network to correct the noisy frame image and extracting the predicted hidden information from the corrected noisy frame image includes:
[0014] Inputting the noise frame image into the preset correction network to obtain a corrected frame image output by the correction network;
[0015] Inputting the corrected frame image into the video hidden information extraction network to obtain a prediction feature vector extracted from the corrected frame image;
[0016] The predicted feature vector is truncated according to a preset decision threshold to obtain predicted hidden information corresponding to the predicted feature vector.
[0017] Optionally, in a feasible embodiment, the loss data includes: video loss data, correction loss data and watermark loss data; the step of calculating the loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information includes:
[0018] Performing mean square error calculation on the original frame image and the watermark frame image to obtain video loss data;
[0019] Generate a first heat map according to the original frame image, and generate a second heat map according to the watermark frame image;
[0020] Performing mean square error calculation on the first heat map and the second heat map to obtain video correction loss data;
[0021] A binary cross entropy loss calculation is performed on the digital hidden information and the predicted hidden information to obtain watermark loss data.
[0022] Optionally, in a feasible embodiment, after the step of performing binary cross entropy loss calculation on the digital hidden information and the predicted hidden information to obtain watermark loss data, the method further includes:
[0023] The correction network and the video hidden information extraction network are updated according to the video loss data, the correction loss data and the watermark loss data to obtain updated target correction network and target video hidden information extraction network.
[0024] Optionally, in a feasible embodiment, the step of constructing hidden information training data according to the digital hidden information to be embedded includes:
[0025] Encoding the digital hidden information to be embedded into a binary bit sequence;
[0026] Generate a BCH error correction code corresponding to the binary bit sequence according to a preset code length;
[0027] The binary bit sequence is concatenated with the BCH error correction code to obtain hidden information training data.
[0028] Optionally, in a feasible embodiment, the step of inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network includes:
[0029] Converting the hidden information training data into two-dimensional data of the same size as the original frame image, wherein the original frame image is a three-channel RGB image;
[0030] Calculating the target correlation between the two-dimensional data and the original frame image;
[0031] Performing weighted calculation on the two-dimensional data and the original frame image according to the target correlation to obtain a single-channel hidden information mask;
[0032] The hidden information mask and the original frame image are spliced to obtain four-channel two-dimensional information data, and the two-dimensional information data is input into the preset initial video hidden information embedding network.
[0033] In addition, to achieve the above-mentioned purpose, the present application also provides a video hidden information embedded network construction device, the video hidden information embedded network construction device is a virtual device, and the video hidden information embedded network construction device includes:
[0034] A data construction module, used for constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence;
[0035] An embedding module, used for inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network, and obtaining a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network;
[0036] A noise module, used for inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network;
[0037] A correction and extraction module, used for inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image;
[0038] An updating module is used to calculate loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and to update the initial video hidden information embedding network according to the loss data to obtain an updated target video hidden information embedding network.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a video hidden information embedded network construction device, and the video hidden information embedded network construction device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the video hidden information embedded network construction method as described above are implemented.
[0040] The present application also provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the above-mentioned method for constructing a network by embedding hidden video information are implemented.
[0041] The present application provides a method, device, equipment and storage medium for constructing a video hidden information embedding network. The method comprises: constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence; inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network to obtain a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network; inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network; inputting the noise frame image into a preset correction extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image; calculating loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and updating the initial video hidden information embedding network according to the loss data to obtain an updated target video hidden information embedding network.
[0042] Compared with the technical means of conventional watermark embedding solutions, the video hidden information embedding network construction method of the present application first embeds the watermark into the frame image that needs to be embedded with the watermark in the original video, and then simulates the noise that may be generated in the transmission process of the original video by setting up a noise network, and then corrects the noise-added frame image and extracts the predicted hidden information in the corrected frame image, and then updates the target video hidden information embedding network based on the final predicted hidden information and the intermediate data of each network as supervision data, thereby improving the recognizability of the watermark embedded in the video by the target video hidden information embedding network under various types of noise attacks, thereby ensuring the visual quality of the watermark in the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description are used to explain the principles of the present application.
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without any creative work.
[0045] Figure 1 A schematic diagram of a device structure for embedding video hidden information into a network for constructing a device in a device hardware operating environment involved in an embodiment of the present application;
[0046] Figure 2 This is a schematic diagram of the implementation process of the first embodiment of the method for constructing a network to embed hidden information in a video of the present application;
[0047] Figure 3 This is a network interaction diagram involved in the second embodiment of the method for constructing a network for embedding hidden information in a video of the present application;
[0048] Figure 4 The scene graph involved in the third embodiment of the method for constructing a network for embedding hidden information in a video of the present application;
[0049] Figure 5 This is a schematic diagram of the functional modules of a device for constructing a network for embedding hidden information in a video according to an embodiment of the present application.
[0050] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0053] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] Please refer to Figure 1 , Figure 1 A schematic diagram of the device structure for embedding video hidden information into a network to build a device in the device hardware operating environment involved in the embodiment of the present application.
[0056] It should be noted that the terminal device involved in the embodiment of the present invention can be a data storage control terminal, a PC or a portable computer or other terminal in the video hidden information embedding network construction device that executes the video hidden information embedding network construction method of the present application.
[0057] like Figure 1 As shown, the video hidden information embedding network construction device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0058] Optionally, the video hidden information embedding network construction device may also include a user interface 1003, a network interface 1004, an audio circuit, a WiFi module, etc. The user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and optionally, the user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WIFI interface).
[0059] Those skilled in the art will understand that Figure 1 The video hidden information embedded network construction device structure shown in does not constitute a limitation of the video hidden information embedded network construction device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0060] like Figure 1 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module and a computer program. The operating system is a program that manages and controls the hardware and software resources of the video hidden information embedded network construction device, and supports the operation of the computer program and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the video hidden information embedded network construction device.
[0061] exist Figure 1 The video hidden information shown is embedded in the network construction device, and the processor 1001 is used to execute the computer program stored in the memory 1005 and perform the following operations:
[0062] Constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence;
[0063] Inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network to obtain a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network;
[0064] Inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network;
[0065] Inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image;
[0066] The loss data is calculated according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and the initial video hidden information embedding network is updated according to the loss data to obtain an updated target video hidden information embedding network.
[0067] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0068] Inputting the noise frame image into the preset correction network to obtain a corrected frame image output by the correction network;
[0069] Inputting the corrected frame image into the video hidden information extraction network to obtain a prediction feature vector extracted from the corrected frame image;
[0070] The predicted feature vector is truncated according to a preset decision threshold to obtain predicted hidden information corresponding to the predicted feature vector.
[0071] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0072] Performing mean square error calculation on the original frame image and the watermark frame image to obtain video loss data;
[0073] Generate a first heat map according to the original frame image, and generate a second heat map according to the watermark frame image;
[0074] Performing mean square error calculation on the first heat map and the second heat map to obtain video correction loss data;
[0075] A binary cross entropy loss calculation is performed on the digital hidden information and the predicted hidden information to obtain watermark loss data.
[0076] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0077] The correction network and the video hidden information extraction network are updated according to the video loss data, the correction loss data and the watermark loss data to obtain updated target correction network and target video hidden information extraction network.
[0078] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0079] Encoding the digital hidden information to be embedded into a binary bit sequence;
[0080] Generate a BCH error correction code corresponding to the binary bit sequence according to a preset code length;
[0081] The binary bit sequence is concatenated with the BCH error correction code to obtain hidden information training data.
[0082] Further, the processor 1001 may call the computer program stored in the memory 1005 and perform the following operations:
[0083] Converting the hidden information training data into two-dimensional data of the same size as the original frame image, wherein the original frame image is a three-channel RGB image;
[0084] Calculating the target correlation between the two-dimensional data and the original frame image;
[0085] Performing weighted calculation on the two-dimensional data and the original frame image according to the target correlation to obtain a single-channel hidden information mask;
[0086] The hidden information mask and the original frame image are spliced to obtain four-channel two-dimensional information data, and the two-dimensional information data is input into the preset initial video hidden information embedding network.
[0087] Based on the above structure, various embodiments of a method for constructing a network for embedding hidden information in a video are proposed.
[0088] In the first embodiment of the method for constructing a network for embedding hidden information in a video of the present application, please refer to Figure 2 , Figure 2 This is a flow chart of the first embodiment of the method for constructing a network to embed hidden information in a video of the present application.
[0089] The embodiment of the present invention provides an embodiment of a method for embedding hidden information in a video network. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than here. In this embodiment, the execution subject of the method for embedding hidden information in a video network is a video hidden information embedding network construction device. For the convenience of description, the following description of each embodiment by the execution subject is omitted. In this embodiment, the method for embedding hidden information in a video network includes:
[0090] Step S10, constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence;
[0091] It should be noted that, in this embodiment, the digital hidden information is a digital video watermark (Digital Video Watermark), which may include a variety of information to achieve functions such as video copyright protection and video fingerprint tracking.
[0092] In this embodiment, before embedding the watermark into the video, the watermark needs to be processed first, and the various types of information contained in the watermark need to be converted into an embeddable binary bit sequence to serve as hidden information training data for the initial video hidden information embedding network. There are many ways to construct hidden information training data. For example, digital information can be converted into a binary bit sequence according to ASCII code (American Standard Code for Information Interchange), or other methods can be used to encrypt and convert digital information, which is not limited here.
[0093] In a feasible embodiment, in the above step S10, the step of constructing hidden information training data according to the digital hidden information to be embedded includes:
[0094] Step S101, encoding the digital hidden information to be embedded into a binary bit sequence;
[0095] In this embodiment, when constructing hidden information training data, it is necessary to first encode the digital hidden information to be embedded, that is, the digital watermark, into a binary bit sequence. There are many encoding methods, which are not limited here.
[0096] Step S102, generating a BCH error correction code corresponding to the binary bit sequence according to a preset code length;
[0097] It should be noted that the BCH code is a coding method commonly used in the field of error correction.
[0098] In this embodiment, when constructing hidden information training data, the technician needs to set a preset code length of the hidden information training data, and then subtract it from the code length obtained by converting the digital hidden information to obtain the code length of the BCH error correction code. Based on the code length of the error correction code, a BCH error correction code corresponding to the binary bit sequence can be generated according to the conventional BCH error correction code encoding method.
[0099] Step S103, concatenating the binary bit sequence with the BCH error correction code to obtain hidden information training data.
[0100] In this embodiment, after generating the BCH error correction code, the binary bit sequence is spliced with the BCH error correction code to obtain hidden information training data of a preset code length. After splicing with the BCH error correction code, by adding redundant check bits to the message data, errors generated during the transmission process can be detected and corrected, thereby further improving the reliability and integrity of the information in the watermark during the transmission process.
[0101] As an example, the digital hidden information to be embedded is usually 7 characters, which can be converted into 56-bit binary code through ASCII encoding. Then, based on the 56-bit binary code, a 40-bit BCH error correction code can be generated relying on the existing BCH error correction code generation method. The BCH error correction code is then concatenated with the digital hidden information to be embedded to construct 96-bit hidden information training data for embedding in the video.
[0102] Step S20, inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network, and obtaining a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network;
[0103] It should be noted that, in this embodiment, the initial video hidden information embedding network can adopt a variety of structures, for example, a structure similar to U-Net can be adopted, and the network only needs to be able to embed a single-channel image into a three-channel RGB image, and no further restrictions are made here. The original frame image is a three-channel RGB image, which can be directly input in its original size or can be scaled down to reduce the size of the input to reduce the amount of calculation.
[0104] In this embodiment, when watermark embedding is performed on a video, the selected original frame image can be a key part of a video that needs to be protected, or the entire video. Before the hidden information training data is input into the initial video hidden information embedding network (hereinafter referred to as the initial embedding network), the binary bit sequence needs to be converted into a single-channel two-dimensional image. There are many ways to convert. For example, the 96-bit information of the hidden information training data can be repeated in space to form the same two-dimensional data as the video frame, which is not limited here. After obtaining the single-channel two-dimensional image, the single-channel two-dimensional image and the original frame image are input into the initial embedding network, and the single-channel two-dimensional image can be embedded into the original frame image through the initial embedding network to obtain the watermark frame image.
[0105] Furthermore, in a feasible embodiment, in the above step S20, the step of inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network includes:
[0106] Step S201, converting the hidden information training data into two-dimensional data of the same size as the original frame image, wherein the original frame image is a three-channel RGB image;
[0107] In this embodiment, before embedding the hidden information training data into the original frame image, the hidden information training data needs to be converted into a two-dimensional image with the same size as the original frame image.
[0108] Step S202, calculating the target correlation between the two-dimensional data and the original frame image;
[0109] In this embodiment, the target correlation between the two-dimensional data and the original frame image can be calculated through the attention network.
[0110] Step S203, performing weighted calculation on the two-dimensional data and the original frame image according to the target correlation to obtain a single-channel hidden information mask;
[0111] In this embodiment, after the target correlation is calculated, a single-channel hidden information mask can be obtained by performing weighted calculation on the two-dimensional data through the correlation.
[0112] Step S204, splicing the hidden information mask with the original frame image to obtain four-channel two-dimensional information data, and inputting the two-dimensional information data into the preset initial video hidden information embedding network.
[0113] In this embodiment, the hidden information mask and the original frame image are spliced to obtain four-channel two-dimensional information data, and then the two-dimensional information data input value is embedded in the network, and the watermark frame image can be obtained by calculation.
[0114] Step S30, inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network;
[0115] It should be noted that, in this embodiment, the preset noise network is a network that can superimpose various types of noise in a three-channel two-dimensional image. The noise network can adopt a variety of existing networks, for example, a convolutional neural network (Convolutional Neural Networks, referred to as CNN) can be adopted. During the training process, CNN can learn to extract useful features from the original image and noise. By performing a convolution operation on the noise and the original image, an image with noise can be obtained.
[0116] In this embodiment, the watermark frame image is input into a preset noise network, and the noise network can perform a convolution operation on the preset random noise and the watermark frame image, thereby obtaining a noise frame image after superimposing the noise.
[0117] Furthermore, in a feasible embodiment, the noise contained in the noisy frame image includes: one or more of perspective transformation noise, Gaussian noise, JPEG compression noise, color attack noise, cropping attack noise, moiré distortion noise and illumination distortion noise.
[0118] In this embodiment, in order to simulate the strong attacks that videos may suffer during transmission in real life, the watermark in the video can resist attacks such as horizontal axis rotation, video transcoding, resolution scaling, rotation, cropping, filtering, aspect ratio change, frame rate change, and video recording. Therefore, the noise added by the noise network needs to include many kinds of noise to cover most of the noise that the video may encounter during the transmission process.
[0119] Step S40, inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image;
[0120] It should be noted that, in this embodiment, the preset correction and extraction network is a network used to correct the noisy image and then extract the watermark from the corrected image, and the form of the network is not limited here.
[0121] In this embodiment, in order to verify the visual quality of the watermark in the frame image after noise is applied, it is also necessary to perform correction extraction on the noisy frame image, input the noisy frame image into a preset correction extraction network, correct the noisy frame image, and then extract the predicted hidden information from the corrected frame image. The higher the overlap between the predicted hidden information and the hidden information training data, the better the visual quality of the watermark.
[0122] Step S50, calculating loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and updating the initial video hidden information embedding network according to the loss data to obtain an updated target video hidden information embedding network.
[0123] In this embodiment, the original frame image and digital hidden information are used as the basis, the watermark frame image is used as a reference for the effect of watermark embedding, and the predicted hidden information is used as one of the measures of the visual quality of the watermark in the image after adding noise. The calculated loss data can be used as supervision data to adjust and update the parameters of the initial embedding network, and the updated target embedding network can be used as an embedding network with high robustness.
[0124] As an example, there are many ways to calculate loss data. By comparing the original frame image with the watermark frame image, the accuracy of the watermark implanted by the original digital video watermark network can be calculated. By comparing the digital hidden information with the predicted hidden information, the accuracy of the watermark after noise and the accuracy of watermark extraction can be calculated. These calculated accuracies are used as supervision data to adjust and update the parameters of the initial embedding network, which can improve the robustness of the initial embedding network in embedding watermarks. After obtaining the target embedding network, the video to be embedded with a watermark and the preprocessed watermark are input into the target embedding network to obtain a video embedded with a watermark.
[0125] Furthermore, based on the first embodiment of the method for constructing a network in which hidden information in a video is embedded in the above-mentioned present application, a second embodiment of the method for constructing a network in which hidden information in a video is embedded in the present application is proposed.
[0126] In the second embodiment of the method for constructing a video hidden information embedding network of the present application, the correction extraction network includes: a correction network and a video hidden information extraction network; the above-mentioned step S30, inputting the noise frame image into a preset correction extraction network to correct the noise frame image and extracting the predicted hidden information from the corrected noise frame image, includes:
[0127] Step S301, inputting the noise frame image into the preset correction network to obtain a corrected frame image output by the correction network;
[0128] It should be noted that, in this embodiment, the correction network may be a network similar to the key point detection network HRNet, which is used to correct the distorted noisy frame image.
[0129] In this embodiment, before extracting the watermark from the noise frame image, the noise frame image needs to be corrected. When the noise network performs perspective transformation on the watermark frame image, the position coordinates of the corner points of the transformed image are recorded to train the video correction network. The video correction network can be used to correct the noise frame image to obtain a corrected frame image.
[0130] Step S302, inputting the corrected frame image into the video hidden information extraction network to obtain a prediction feature vector extracted from the corrected frame image;
[0131] In this embodiment, the video hidden information extraction network (hereinafter referred to as the extraction network) is a network that can extract the watermark in the video, and its structure is a down-sampling feature pyramid network. After the rectified frame image is input into the extraction network, the extraction network will output a predicted feature vector.
[0132] Step S303: truncate the predicted feature vector according to a preset decision threshold to obtain predicted hidden information corresponding to the predicted feature vector.
[0133] In this embodiment, the predicted feature vector output by the extraction network needs to be truncated. The technician can set the decision threshold according to the actual situation to perform stage processing on the predicted feature vector, and the predicted hidden information can be obtained after processing. For example, after passing through the extraction network, a 96-bit feature vector in the same form as the embedded information is obtained, and then the feature vector is stage processed with a decision threshold of 0.5 to obtain the final extracted binary watermark information bits.
[0134] As an example, see Figure 3 , Figure 3 This is a network interaction diagram involved in the second embodiment of the method for constructing a network for embedding hidden information in a video of the present application, such as Figure 3 As shown in the figure, in the process of constructing the embedding network, it is necessary to first extract the original frame image N1 that needs to be embedded with the watermark in the original video. For the digital hidden information M1, it is necessary to first convert M1 into a binary bit sequence, and then generate a BCH error correction code, which is concatenated with the binary bit sequence to construct hidden information training data, and then input N1 and the hidden information training data into the preset video hidden information embedding network to obtain the watermark frame image N2 output by the embedding network, and then input N2 into the preset noise network to obtain the noise frame image N3, and then input N3 into the video frame correction network, that is, the correction network, to obtain the correction frame image N4, and then input N4 into the video hidden information extraction network to obtain the hidden information M2 that is finally roughly predicted by the extraction network.
[0135] Furthermore, based on the first and second embodiments of the method for constructing a network for embedding hidden information in a video of the present application, a third embodiment of the method for constructing a network for embedding hidden information in a video of the present application is proposed.
[0136] In the third embodiment of the method for constructing a network for embedding video hidden information of the present application, the loss data includes: video loss data, correction loss data and watermark loss data; in the above step S50, the step of calculating the loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information includes:
[0137] Step S501, performing mean square error calculation on the original frame image and the watermark frame image to obtain video loss data;
[0138] In this embodiment, the loss data includes loss data in multiple aspects. First, it is necessary to calculate the mean square error between the original frame image and the watermark frame image to obtain the loss data between the original frame image and the watermark frame image to measure the quality of watermark embedding.
[0139] Step S502, generating a first heat map according to the original frame image, and generating a second heat map according to the watermark frame image;
[0140] It should be noted that, in this embodiment, the first heat map refers to the video corner prediction heat map of the original frame image, and the second heat map refers to the video corner prediction heat map of the watermark frame image. There are many existing methods for generating heat maps, which are not limited here.
[0141] In this embodiment, before measuring the video correction effect, it is necessary to generate a video corner prediction heat map of the original frame image and the watermark frame image.
[0142] Step S503, performing mean square error calculation on the first heat map and the second heat map to obtain video correction loss data;
[0143] In this embodiment, after the first heat map and the second heat map are generated, a mean square error calculation is performed on the first heat map and the second heat map to obtain video correction loss data to measure the quality of video correction.
[0144] Step S504, performing binary cross entropy loss calculation on the digital hidden information and the predicted hidden information to obtain watermark loss data.
[0145] In this embodiment, it is also necessary to perform binary cross entropy loss calculation on the digital hidden information and the predicted hidden information to measure the quality of the watermark after being noised and the accuracy of the watermark extraction.
[0146] Furthermore, in a feasible embodiment, after the step S504 above, in which a binary cross entropy loss is calculated on the digital hidden information and the predicted hidden information to obtain watermark loss data, the method further includes:
[0147] Step a: updating the correction network and the video hidden information extraction network according to the video loss data, the correction loss data and the watermark loss data to obtain an updated target correction network and a target video hidden information extraction network.
[0148] In this embodiment, not only the embedding network can be updated according to various loss data, but also the correction network and the extraction network can be updated according to various losses, so as to obtain updated correction network and extraction network. The updated correction network and extraction network can be used to quickly extract the watermark in the video.
[0149] Based on the above correction network and extraction network, the present application also proposes a method for detecting digital hidden information in a video, which is specifically used to detect digital hidden information embedded in a video by the embedding method of the aforementioned implementation. The detection method includes: extracting video frames with hidden information and reshot videos; sending the extracted video frames into a pre-trained watermark frame perspective distortion correction network to obtain predicted video corner coordinates, and then calculating the homography matrix based on the corner coordinates and the actual size of the video, thereby applying perspective transformation to obtain the corrected video frame; inputting the corrected video frame into a pre-trained video hidden information extraction network to extract the corresponding hidden information. The above method can quickly extract the watermark in the video, thereby improving the efficiency of watermark extraction.
[0150] Also, please refer to Figure 4 , Figure 4 The scene graph involved in the third embodiment of the method for constructing a network for embedding hidden information in a video of this application is as follows: Figure 4 As shown in the figure, after the loss data is calculated through the original video, M1, N1, and M2, the correction network, the video hidden information embedding network, and the video hidden information extraction network are updated through the loss data, and the watermark can be re-embedded, denoised, corrected, and extracted, and the above network update steps are repeated until the loss data converges. At this time, the correction network, the embedding network, and the extraction network are the trained networks. The above-mentioned cyclic training method can further improve the performance of the correction network, the embedding network, and the extraction network.
[0151] In addition, please refer to Figure 5 , Figure 5 This is a functional module diagram of the apparatus for constructing a network in which hidden information is embedded in a video of the present application. The present application also provides an apparatus for constructing a network in which hidden information is embedded in a video. The apparatus for constructing a network in which hidden information is embedded in a video comprises:
[0152] A data construction module 10, configured to construct hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence;
[0153] The embedding module 20 is used to input the hidden information training data and the original frame image into a preset initial video hidden information embedding network to obtain a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network;
[0154] A noise module 30, configured to input the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network;
[0155] A correction and extraction module 40, configured to input the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image;
[0156] The updating module 50 is used to calculate the loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and update the initial video hidden information embedding network according to the loss data to obtain an updated target video hidden information embedding network.
[0157] Optionally, the correction extraction network includes: a correction network and a video hidden information extraction network; the correction extraction module is also used for:
[0158] The noise frame image is input into the preset correction network to obtain the corrected frame image output by the correction network; the corrected frame image is input into the video hidden information extraction network to obtain the predicted feature vector extracted from the corrected frame image; the predicted feature vector is truncated according to the preset decision threshold to obtain the predicted hidden information corresponding to the predicted feature vector.
[0159] Optionally, the loss data includes: video loss data, correction loss data and watermark loss data; the update module is further used for:
[0160] A mean square error is calculated for the original frame image and the watermark frame image to obtain video loss data; a first heat map is generated based on the original frame image, and a second heat map is generated based on the watermark frame image; a mean square error is calculated for the first heat map and the second heat map to obtain video correction loss data; a binary cross entropy loss is calculated for the digital hidden information and the predicted hidden information to obtain watermark loss data.
[0161] Optionally, the video hidden information embedding network construction device further includes:
[0162] The correction extraction update module is used to update the correction network and the video hidden information extraction network according to the video loss data, the correction loss data and the watermark loss data to obtain an updated target correction network and a target video hidden information extraction network.
[0163] Optionally, the data building module is also used to:
[0164] The digital hidden information to be embedded is encoded into a binary bit sequence; a BCH error correction code corresponding to the binary bit sequence is generated according to a preset code length; and the binary bit sequence and the BCH error correction code are concatenated to obtain hidden information training data.
[0165] Optionally, the embedding module is also used to:
[0166] The hidden information training data is converted into two-dimensional data of the same size as the original frame image, wherein the original frame image is a three-channel RGB image; the target correlation between the two-dimensional data and the original frame image is calculated; the two-dimensional data and the original frame image are weightedly calculated according to the target correlation to obtain a single-channel hidden information mask; the hidden information mask is spliced with the original frame image to obtain four-channel two-dimensional information data, and the two-dimensional information data is input into the preset initial video hidden information embedding network.
[0167] The specific implementation of the video hidden information embedded network construction device of the present application is basically the same as the various embodiments of the above-mentioned video hidden information embedded network construction method, and will not be repeated here.
[0168] In addition, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for constructing a network by embedding hidden information in a video of the present application are implemented as described above.
[0169] The specific embodiments of the storage medium of the present application are basically the same as the embodiments of the above-mentioned video hidden information embedding network construction method, and will not be described in detail here.
[0170] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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 device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0171] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a computer, server, etc.) to execute the methods described in each embodiment of the present application.
[0173] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for constructing a network for embedding hidden information in a video, characterized in that: The video hidden information embedding network construction method comprises: Constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence; Inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network to obtain a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network; Inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network; Inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image; The loss data is calculated according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and the initial video hidden information embedding network is updated according to the loss data to obtain an updated target video hidden information embedding network.
2. The method for constructing a network for embedding hidden information in a video according to claim 1, characterized in that: The noise contained in the noise frame image includes: one or more of perspective transformation noise, Gaussian noise, JPEG compression noise, color attack noise, cropping attack noise, moiré distortion noise and illumination distortion noise.
3. The method for constructing a network for embedding hidden information in a video according to claim 1, characterized in that: The correction extraction network includes: a correction network and a video hidden information extraction network; the step of inputting the noise frame image into a preset correction extraction network to correct the noise frame image and extracting the predicted hidden information from the corrected noise frame image includes: Inputting the noise frame image into the preset correction network to obtain a corrected frame image output by the correction network; Inputting the corrected frame image into the video hidden information extraction network to obtain a prediction feature vector extracted from the corrected frame image; The predicted feature vector is truncated according to a preset decision threshold to obtain predicted hidden information corresponding to the predicted feature vector.
4. The method for constructing a network for embedding hidden information in a video according to claim 3, characterized in that: The loss data includes: video loss data, correction loss data and watermark loss data; the step of calculating the loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information includes: Performing mean square error calculation on the original frame image and the watermark frame image to obtain video loss data; Generate a first heat map according to the original frame image, and generate a second heat map according to the watermark frame image; Performing mean square error calculation on the first heat map and the second heat map to obtain video correction loss data; A binary cross entropy loss calculation is performed on the digital hidden information and the predicted hidden information to obtain watermark loss data.
5. The method for constructing a network for embedding hidden information in a video according to claim 4, characterized in that: After the step of performing binary cross entropy loss calculation on the digital hidden information and the predicted hidden information to obtain watermark loss data, the method further includes: The correction network and the video hidden information extraction network are updated according to the video loss data, the correction loss data and the watermark loss data to obtain updated target correction network and target video hidden information extraction network.
6. The method for constructing a network for embedding hidden information in a video according to claim 1, characterized in that: The step of constructing hidden information training data according to the digital hidden information to be embedded comprises: Encoding the digital hidden information to be embedded into a binary bit sequence; Generate a BCH error correction code corresponding to the binary bit sequence according to a preset code length; The binary bit sequence is concatenated with the BCH error correction code to obtain hidden information training data.
7. The method for constructing a network for embedding hidden information in a video according to claim 1, characterized in that: The step of inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network comprises: Converting the hidden information training data into two-dimensional data of the same size as the original frame image, wherein the original frame image is a three-channel RGB image; Calculating the target correlation between the two-dimensional data and the original frame image; Performing weighted calculation on the two-dimensional data and the original frame image according to the target correlation to obtain a single-channel hidden information mask; The hidden information mask and the original frame image are spliced to obtain four-channel two-dimensional information data, and the two-dimensional information data is input into the preset initial video hidden information embedding network.
8. A video hidden information embedding network construction device, characterized in that: The video hidden information embedding network construction device comprises: A data construction module, used for constructing hidden information training data according to the digital hidden information to be embedded, wherein the hidden information training data is a binary bit sequence; An embedding module, used for inputting the hidden information training data and the original frame image into a preset initial video hidden information embedding network, and obtaining a watermark frame image containing the digital hidden information output by the initial video hidden information embedding network; A noise module, used for inputting the watermark frame image into a preset noise network to obtain a noise frame image containing noise output by the noise network; A correction and extraction module, used for inputting the noise frame image into a preset correction and extraction network to correct the noise frame image and extract the predicted hidden information from the corrected noise frame image; An updating module is used to calculate loss data according to the original frame image, the digital hidden information, the watermark frame image and the predicted hidden information, and to update the initial video hidden information embedding network according to the loss data to obtain an updated target video hidden information embedding network.
9. A video hidden information embedding network construction device, characterized in that: The video hidden information embedded network construction device includes: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the video hidden information embedded network construction method as described in any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for constructing a video hidden information embedding network are implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Big data ownership protection method based on object local generative adversarial network
CN110084734A
Digital watermark training method and device, equipment and storage medium
CN114445256A
Anti-shooting monitoring video watermarking method combining depth robust watermarking and template synchronization
CN114549270A
Anti-screen-shooting watermark embedding and extracting method based on deep learning
CN116468593A
Digital video watermarking method and device, equipment and storage medium
CN116471362A
