Data processing method and device, electronic equipment and storage equipment

文档序号:97913 发布日期:2021-10-12 浏览:39次 中文

阅读说明:本技术 数据处理方法、装置、电子设备及存储设备 (Data processing method and device, electronic equipment and storage equipment ) 是由 郑杰骞 邓磊 刘永亮 于 2020-03-19 设计创作,主要内容包括:本申请公开了一种数据处理方法,包括:获得载体对象和目标水印信息;根据所述载体对象的图像特征确定目标水印信息的嵌入区域规格信息;根据所述嵌入区域规格信息,将所述目标水印信息嵌入到所述载体对象的亮度通道和两个色度通道中。采用上述方法,以解决现有技术不能适应不同图像特征的载体对象的水印鲁棒性。(The application discloses a data processing method, which comprises the following steps: obtaining a carrier object and target watermark information; determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object; and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object. By adopting the method, the problem that the prior art cannot adapt to the watermark robustness of the carrier object with different image characteristics is solved.)

1. A data processing method, comprising:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

2. The method of claim 1, further comprising:

determining an embedding addition and subtraction coefficient of the embedding area according to the minimal perceivable difference of the preset embedding area;

the embedding the target watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding region specification information includes:

and embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the embedded region specification information and the embedded addition and subtraction coefficients.

3. The method according to claim 1, wherein determining the embedded region specification information of the target watermark information according to the image features of the carrier object comprises:

and determining the specification information of the embedding area of the target watermark information according to at least one factor of the resolution of the carrier object and the image texture characteristics of the preset embedding area.

4. The method of claim 1, further comprising:

and scrambling the target watermark information, and embedding the scrambled target watermark information into a brightness channel and two chrominance channels of the carrier object.

5. A data processing method, comprising:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

6. The method according to claim 5, wherein the carrier object is a consecutive preset odd number of carrier video frames.

7. The method according to claim 6, wherein the determining the extraction area containing the watermark information in the carrier object by dividing the carrier object into areas in multiple dimensions comprises:

dividing the first brightness channel and the second brightness channel into at least two regions; the first brightness channel refers to the brightness channel of one carrier video frame positioned in the first half selected from continuous carrier video frames with preset odd number; the second brightness channel refers to the brightness channel of one carrier video frame positioned in the second half selected from the continuous carrier video frames with preset odd number;

calculating the energy difference of two areas corresponding to the first brightness channel and the second brightness channel;

determining whether the two corresponding regions are candidate extraction regions of a brightness channel containing watermark information according to the energy difference;

processing the two chrominance channels in a processing mode similar to that of the luminance channel to determine candidate extraction areas of the two chrominance channels containing the watermark information;

and taking the candidate extraction areas of the luminance channel and the candidate extraction areas of the two chrominance channels as extraction areas containing watermark information.

8. The method according to claim 7, wherein the determining whether the corresponding two regions are candidate extraction regions containing watermark information according to the energy difference comprises:

judging whether the energy difference is within a preset energy difference threshold range, and if so, determining the two corresponding regions as candidate extraction regions;

if not, determining that the corresponding two regions are not candidate extraction regions.

9. The method of claim 7, wherein the extracting watermark information from the extraction area comprises:

obtaining an evaluation result for each candidate extraction region according to the energy difference;

accumulating the evaluation results of the plurality of candidate extraction regions divided by the same division mode;

determining the extracted binary information according to a preset extraction mechanism and an accumulated result;

and acquiring watermark information according to the binary information.

10. The method of claim 9, wherein obtaining watermark information from the binary information comprises:

according to the binary information, obtaining binary watermark sequences of a brightness channel and two chrominance channels;

obtaining a plurality of watermark initial positions according to the binary watermark sequence;

and obtaining watermark information according to the binary watermark sequences of the plurality of watermark initial positions.

11. The method of claim 10, wherein obtaining watermark information from a binary watermark sequence of a plurality of watermark start positions comprises:

changing a bit with a value of 0 in the plurality of binary watermark sequence information into a bit with a value of-1 to obtain a plurality of second watermark sequences;

and obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences.

12. The method of claim 11, wherein obtaining watermark information from the binary watermark sequence and a plurality of second watermark sequences comprises:

obtaining a weight corresponding to each second watermark sequence;

obtaining an accumulated value of the weights of the plurality of second watermark sequences according to the weights;

obtaining a third watermark sequence according to the accumulated value;

and obtaining watermark information according to the third watermark sequence.

13. The method according to claim 12, wherein the obtaining the weight corresponding to each second watermark sequence comprises:

obtaining the matching degree of the watermark information heads of the plurality of second watermark sequences;

and obtaining the weight corresponding to each second watermark sequence according to the matching degree.

14. The method according to claim 12, wherein the obtaining the weight corresponding to each second watermark sequence comprises:

obtaining an average value of bits of the binary watermark sequence;

calculating Euclidean distances between the plurality of second watermark sequences and the average value;

and obtaining a weight value corresponding to each second watermark sequence according to the Euclidean distance.

15. The method according to claim 12, wherein the obtaining the weight corresponding to each second watermark sequence comprises:

the weight of each second watermark sequence is set to 1.

16. A data processing apparatus, comprising:

a carrier object and information obtaining unit for obtaining the carrier object and target watermark information;

an embedded region specification information determining unit configured to determine embedded region specification information of the target watermark information according to an image feature of the carrier object;

and the target watermark information embedding unit is used for embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the specification information of the embedding area.

17. An electronic device, comprising:

a processor;

a memory for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor: the method comprises the following steps:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

18. A storage device storing a program of a data processing method, the program being executed by a processor, and performing the steps of:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

19. A data processing apparatus, comprising:

a carrier object obtaining unit for obtaining a carrier object containing watermark information;

an extraction area determining unit, configured to determine an extraction area containing watermark information in the carrier object by performing multi-dimensional region division on the carrier object;

and the watermark information extraction unit is used for extracting the watermark information from the extraction area.

20. An electronic device, comprising:

a processor;

a memory for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

21. A storage device storing a program of a data processing method, the program being executed by a processor, and performing the steps of:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

Technical Field

The present application relates to the field of computer technologies, and in particular, to two data processing methods and apparatuses, an electronic device, and a storage device.

Background

With the rapid development of multimedia technology and the popularization of mobile internet, video technology is applied to various fields of people's life. The transmission and acquisition of video information become more and more convenient, but because the internet itself has openness, shareability and the like, the problem that lawbreakers infringe the copyright of the video information often exists. Therefore, copyright protection of video information becomes a hot spot of society, and in this situation, video watermarking technology is applied. The basic principle of video watermarking is to embed information capable of proving copyright identity in a video so as to achieve the purpose of protecting copyright.

In the prior art, when watermark information is embedded into a video frame, the same embedded region specification information is adopted for embedding the watermark information into video files with different image characteristics, so that the watermark robustness of the video files with different image characteristics cannot be adapted.

Disclosure of Invention

The application provides a data processing method to solve the problem that the existing watermark information embedding method cannot adapt to the watermark robustness of different image characteristic video files.

The application provides a data processing method, which comprises the following steps:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

Optionally, the method further includes:

determining an embedding addition and subtraction coefficient of the target watermark information according to the minimal perceivable difference of a preset embedding area;

the embedding the target watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding region specification information includes:

and embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the embedded region specification information and the embedded addition and subtraction coefficients.

Optionally, the determining, according to the image feature of the carrier object, the specification information of the embedding area of the target watermark information includes:

and determining the specification information of the embedding area of the target watermark information according to at least one factor of the resolution of the carrier object and the image texture characteristics of the preset embedding area.

Optionally, the method further includes:

and scrambling the target watermark information, and embedding the scrambled target watermark information into a brightness channel and two chrominance channels of the carrier object.

The present application further provides a data processing method, including:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

Optionally, the carrier object is a continuous preset odd number of carrier video frames.

Optionally, the determining, by using a multi-dimensional region dividing manner for the carrier object, an extraction region containing watermark information in the carrier object includes:

dividing the first brightness channel and the second brightness channel into at least two regions; the first brightness channel refers to the brightness channel of one carrier video frame positioned in the first half selected from continuous carrier video frames with preset odd number; the second brightness channel refers to the brightness channel of one carrier video frame positioned in the second half selected from the continuous carrier video frames with preset odd number;

calculating the energy difference of two areas corresponding to the first brightness channel and the second brightness channel;

determining whether the two corresponding regions are candidate extraction regions of a brightness channel containing watermark information according to the energy difference;

processing the two chrominance channels in a processing mode similar to that of the luminance channel to determine candidate extraction areas of the two chrominance channels containing the watermark information;

and taking the candidate extraction areas of the luminance channel and the candidate extraction areas of the two chrominance channels as extraction areas containing watermark information.

Optionally, the determining, according to the energy difference, whether the two corresponding regions are candidate extraction regions containing watermark information includes:

judging whether the energy difference is within a preset energy difference threshold range, and if so, determining the two corresponding regions as candidate extraction regions;

if not, determining that the corresponding two regions are not candidate extraction regions.

Optionally, the extracting the watermark information from the extraction area includes:

obtaining an evaluation result for each candidate embedding region according to the energy difference;

accumulating the evaluation results of the plurality of candidate extraction regions divided by the same division mode;

determining the extracted binary information according to a preset extraction mechanism and an accumulated result;

and acquiring watermark information according to the binary information.

Optionally, the obtaining watermark information according to the binary information includes:

according to the binary information, obtaining binary watermark sequences of a brightness channel and two chrominance channels;

obtaining a plurality of watermark initial positions according to the binary watermark sequence;

and obtaining watermark information according to the binary watermark sequences of the plurality of watermark initial positions.

Optionally, the obtaining watermark information according to the binary watermark sequences of the multiple watermark start positions includes:

changing a bit with a value of 0 in the plurality of binary watermark sequence information into a bit with a value of-1 to obtain a plurality of second watermark sequences;

and obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences.

Optionally, the obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences includes:

obtaining a weight corresponding to each second watermark sequence;

obtaining an accumulated value of the weights of the plurality of second watermark sequences according to the weights;

obtaining a third watermark sequence according to the accumulated value;

and obtaining watermark information according to the third watermark sequence.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

obtaining the matching degree of the watermark information heads of the plurality of second watermark sequences;

and obtaining the weight corresponding to each second watermark sequence according to the matching degree.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

obtaining an average value of bits of the binary watermark sequence;

calculating Euclidean distances between the plurality of second watermark sequences and the average value;

and obtaining a weight value corresponding to each second watermark sequence according to the Euclidean distance.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

the weight of each second watermark sequence is set to 1.

The present application also provides a data processing apparatus, comprising:

a carrier object and information obtaining unit for obtaining the carrier object and target watermark information;

an embedded region specification information determining unit configured to determine embedded region specification information of the target watermark information according to an image feature of the carrier object;

and the target watermark information embedding unit is used for embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the specification information of the embedding area.

The present application further provides an electronic device, comprising:

a processor;

a memory for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor: the method comprises the following steps:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

The present application also provides a storage device storing a program of a data processing method, the program being executed by a processor to perform the steps of:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

The present application also provides a data processing apparatus, comprising:

a carrier object obtaining unit for obtaining a carrier object containing watermark information;

an extraction area determining unit, configured to determine an extraction area containing watermark information in the carrier object by performing multi-dimensional region division on the carrier object;

and the watermark information extraction unit is used for extracting the watermark information from the extraction area.

The present application further provides an electronic device, comprising:

a processor;

a memory for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

The present application also provides a storage device storing a program of a data processing method, the program being executed by a processor to perform the steps of:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

Compared with the prior art, the method has the following advantages:

the application provides a data processing method, which determines the specification information of an embedding area of target watermark information according to the image characteristics of a carrier object; and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object. The embedded region specification information considers the factors of image characteristics, selects different embedded region specifications for carrier objects with different image characteristics, and better adapts to the watermark robustness of the carrier objects with different image characteristics.

Drawings

Fig. 1A is a schematic diagram of an embodiment of a scenario provided in a first embodiment of the present application.

Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present application.

Fig. 2 is a flowchart of a data processing method according to a second embodiment of the present application.

Fig. 3 is a schematic diagram of a data processing apparatus according to a third embodiment of the present application.

Fig. 4 is a schematic diagram of an electronic device according to a fourth embodiment of the present application.

Fig. 5 is a schematic diagram of a data processing apparatus according to a sixth embodiment of the present application.

Detailed Description

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.

In order to show the present application more clearly, an application scenario of the data processing method provided in the first embodiment of the present application is briefly introduced first.

The data processing method provided by the first embodiment of the present application can be applied to a scene where a client interacts with a server, as shown in fig. 1A, when target watermark information needs to be embedded into a carrier video file, a connection is usually established between the client and the server, after the connection, the client sends the carrier video file and the target watermark information to the server, and after the server receives the carrier video file and the target watermark information, a target carrier video frame to be embedded with the target watermark information in the carrier video file is determined; then, determining the specification information of an embedding area of the target watermark information according to the image characteristics of the video frame of the target carrier; and finally, according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the video frame of the target carrier to generate a watermark video file. And then, the server side provides the watermark video file to the client side, and the client side receives the watermark video file embedded with the target watermark information.

A first embodiment of the present application provides a data processing method, which is described below with reference to fig. 1.

As shown in fig. 1, in step S101, a carrier object and target watermark information are obtained.

The carrier object refers to a carrier image to be embedded with the target watermark information. The carrier image may be a dynamic image or a static image, for example, the image may be a dynamic image in a format of gif (graphics Interchange format), or may also be a static image in a format of jpeg (joint Photographic Experts group). For example, when a copyright owner of an image needs to distribute a content to a plurality of partners, different watermarks need to be embedded so as to trace from which partner the image flows when piracy occurs, and the image is a carrier object. In addition, the carrier image may also be a video frame in a carrier video, and the carrier video may be an entity video file, for example, the carrier video is a video file stored in a remote server and provided for local downloading and playing; the streaming media can also be in a streaming media (streaming media) form, for example, a carrier video is a video stream which is provided by an online video-on-demand platform or an online live platform and can be directly streamed; in addition, the carrier video may be video in AR, VR, etc. form, or stereo video, and of course, as technology advances, the carrier video may also be video in other formats and other forms related to video, and is not limited herein.

The target watermark information refers to extra information added in the carrier object. The target watermark information may be a bit sequence of a predetermined number of bits. For example, copyright information is added to the carrier object as a watermark, which can prevent piracy.

As shown in fig. 1, in step S102, the embedded area specification information of the target watermark information is determined according to the image characteristics of the carrier object.

The embedded region specification information may refer to an embedded block size occupied by embedding a binary bit of watermark information into the carrier object, and may be represented by resolution. For example, the resolution of one carrier object is 1920 × 1080, and the embedded region specification information may be represented by 3 × 3 in resolution.

The determining of the specification information of the embedding area of the target watermark information according to the image characteristics of the carrier object comprises the following steps: and determining the specification information of the embedding area of the target watermark information according to at least one factor of the resolution of the carrier object and the image texture characteristics of the preset embedding area.

Determining the specification size of an embedding area of the target watermark information according to the resolution of the carrier object, wherein the larger the resolution of the carrier object is, the larger the specification size of the determined embedding area is; the smaller the carrier object resolution, the smaller the determined embedding region size. For example, the carrier object resolution is 1280x720, and the embedding area specification can be selected to be 2x 2; the carrier object resolution is 1920x1080, and the embedding area specification can be selected to be 3x 3.

In addition to determining the embedding region specification information of the target watermark information according to the resolution of the carrier object, the embedding region specification information may also be determined according to the variance or standard deviation of a preset embedding region. An example of determining the specification information of the embedding region of the target watermark information based on the variance or standard deviation of the preset embedding region is described below.

1. The carrier video is first switched to Y, U, V channels, taking successive T frames, for example, T may be 5 frames. The Y channel of each frame is divided into blocks of size W × H at video resolution, for example, 1920 × 1080 video may be blocked in 24 × 24 size, 960 × 540 video may be blocked in 12 × 12 size, etc.

2. Each block of W × H is divided into 16 (W/4) × (H/4) blocks.

3. According to the texture characteristics of each (W/4) × (H/4) block (the (W/4) × (H/4) block is a preset embedding region), the embedding region specification is adaptively selected, for example, the block can be subjected to high-pass filtering, and the convolution kernel can be f ═ 0, -1, 0; -1, 4, -1; 0, -1,0]/4, then calculating the variance or standard deviation of the filtering result, and selecting the embedding region specification according to the range of the variance or standard deviation. Generally, a larger variance or standard deviation indicates a richer image texture, a larger specification of the selected embedding region, and conversely, indicates a smoother image texture, and a smaller specification of the selected embedding region. For example, the variance is less than 100, the embedding region specification is selected to be 2x 2; the variance is larger than 100 and smaller than 200, and the specification of the embedding area is selected to be 3x 3; the variance is larger than 200, and the specification of the embedding area is selected to be 4x4 and the like.

As shown in fig. 1, in step S104, the target watermark information is embedded into the luminance channel and the two chrominance channels of the carrier object according to the embedding region specification information.

The luminance channel may refer to the Y channel of the YUV color space, and the two chrominance channels may refer to the U channel and the V channel, respectively, of the YUV color space.

The first embodiment of the present application further includes:

determining an embedding addition and subtraction coefficient of the embedding area according to the minimal perceivable difference of the preset embedding area;

the embedding the target watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding region specification information includes:

and embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the embedded region specification information and the embedded addition and subtraction coefficients.

Just Noticeable difference, which is the maximum modification range allowed for each pixel of a preset region without causing Noticeable perception.

The addition and subtraction coefficients may be embedded by multiplying the just noticeable difference by a predefined coefficient β, for example, β ═ 2, and then 2 × JND is the embedded addition and subtraction coefficient.

Specifically, if the carrier object is 5 continuous frames, such as embedded information 1, each pixel value of the embedded area in the previous T/2 frame is subtracted or added with the coefficient, and the coefficient is added or subtracted in the next T/2 frame; embedding information 0 the coefficient is added or subtracted to each pixel value of the embedding region in the previous T/2 frame and the coefficient is added or subtracted in the following T/2 frame.

As an implementation method, the first embodiment of the present application further includes:

and scrambling the target watermark information, and embedding the scrambled target watermark information into a brightness channel and two chrominance channels of the carrier object.

As an implementation method, the first embodiment of the present application further includes:

and adding a check value of the target watermark information in the target watermark information.

In order to improve the security, the actually embedded information may further include a check value of the target watermark information, for example, the check value may be a value calculated by using a hash function, and then error correction and redundant information are added, where the error correction code may use error correction codes such as BCH, RS, TURBO, and the like, and the redundant information may be repeated R times, and then the redundant information is scrambled by using a Logistic chaotic scrambling algorithm, and then a watermark information header is added before the information to form the actually embedded information. The parameters of the Logistic chaotic scrambling algorithm are generated by key information, and the parameters are generated and extracted by corresponding keys during extraction, so that a person without the keys can not extract watermark information and can not forge watermarks.

The first embodiment of the application selects different embedding region specifications for carrier objects with different image characteristics, and better adapts to watermark robustness of the carrier objects with different image characteristics.

A second embodiment of the present application provides a data processing method, which is described below with reference to fig. 2.

As shown in fig. 2, in step S201, a carrier object containing watermark information is obtained.

The carrier object is a carrier image containing watermark information. The carrier image may be a dynamic image or a static image, for example, the image may be a dynamic image in a format of gif (graphics Interchange format), or may also be a static image in a format of jpeg (joint Photographic Experts group). In addition, the carrier image may also be a video frame in a carrier video, and the carrier video may be an entity video file, for example, the carrier video is a video file stored in a remote server and provided for local downloading and playing; the streaming media can also be in a streaming media (streaming media) form, for example, a carrier video is a video stream which is provided by an online video-on-demand platform or an online live platform and can be directly streamed; in addition, the carrier video may be video in AR, VR, etc. form, or stereo video, and of course, as technology advances, the carrier video may also be video in other formats and other forms related to video, and is not limited herein.

The carrier object may be a consecutive preset odd number of carrier video frames.

For example, 5 consecutive carrier video frames are obtained from the video file.

As shown in fig. 2, in step S202, an extraction area containing watermark information in the carrier object is determined by dividing the carrier object into areas in multiple dimensions.

The determining the extraction area containing the watermark information in the carrier object by adopting the mode of carrying out multi-dimensional division on the carrier object comprises the following steps:

dividing the first brightness channel and the second brightness channel into at least two regions; the first brightness channel refers to the brightness channel of one carrier video frame positioned in the first half selected from continuous carrier video frames with preset odd number; the second brightness channel refers to the brightness channel of one carrier video frame positioned in the second half selected from the continuous carrier video frames with preset odd number;

calculating the energy difference of two areas corresponding to the first brightness channel and the second brightness channel;

determining whether the two corresponding regions are candidate extraction regions of a brightness channel containing watermark information according to the energy difference;

processing two chrominance channels (a U channel and a V channel respectively) in a processing mode similar to that of a luminance channel (namely processing a first U channel and a second U channel in a mode of processing a first luminance channel and a second luminance channel and processing a first V channel and a second V channel in a mode of processing the first luminance channel and the second luminance channel), and determining candidate extraction areas of the two chrominance channels containing watermark information;

and taking the candidate extraction areas of the luminance channel and the candidate extraction areas of the two chrominance channels as extraction areas containing watermark information.

Since the actually extracted carrier object may be subjected to various attacks, such as combined attacks of clipping, screen recording, screen shooting, scaling, rotation, brightness, contrast, and the like, for example, some attacks and resolutions may have a better effect in a certain region division, and another attack and resolution may have a better effect in another region division, and it is uncertain which attacks are subjected to the extraction, and it is also uncertain about the relationship between the original resolution and the extraction resolution, so that it is not known which region division method is used better at the time of extraction, and thus the second embodiment of the present application adopts a multi-dimensional region division method. And by combining the extraction of Y, U, V channels, the method can better adapt to various combined attacks and various resolutions, and enhances the robustness of watermark extraction.

The first luminance channel and the second luminance channel may be divided in multiple dimensions, for example, the first luminance channel may be divided into 4 × 4 regions, 5 × 6 regions, and 4 × 7 regions … …, the divided regions may be rectangular, or may be in other shapes, such as a circle, and the second luminance channel is divided in the same manner as the first luminance channel.

The two regions corresponding to the first luminance channel and the second luminance channel refer to two regions at corresponding positions in the regions partitioned by the same dimension, for example, the first luminance channel is partitioned into 4 × 4 regions, the second luminance channel is also partitioned into 4 × 4 regions, and then the first region partitioned by the first luminance channel and the first region partitioned by the second luminance channel are two regions at corresponding positions.

The determining whether the corresponding two regions are candidate extraction regions according to the energy difference includes:

judging whether the energy difference is within a preset energy difference threshold range, and if so, determining the two corresponding regions as candidate extraction regions;

if not, determining that the corresponding two regions are not candidate extraction regions.

The following describes a process of determining that the corresponding two regions are not candidate extraction regions by one scene.

Firstly, selecting a carrier video frame positioned in the first half from the continuous preset odd number of carrier video frames as t1, selecting a carrier video frame positioned in the second half from the continuous preset odd number of carrier video frames as t2, and operating the Y channels of two corresponding regions in the t1 frame and the t2 frame by using a f (tx, ty) function, wherein f (tx, ty) is used for calculating the energy difference between the two corresponding regions, for example, f (tx, ty) is used for calculating the euclidean distance between the two corresponding regions, and the energy difference result of the two corresponding regions is set as d. From the embedding step, if the region is a region in which information is embedded, there should be a certain energy difference between the two regions, which is related to the size and texture characteristics of the region. Since the size of the embedded region actually embedded varies with the video scaling as the video is scaled, the size of the embedded region can be estimated based on the video resolution. The partition area size at embedding is estimated to be W1xH1, i.e., the 16 blocks partitioned at embedding are (W1/4) x (H1/4), according to the extracted video resolution. Then, the embedded region specification is selected for the two corresponding regions according to the method of the first embodiment of the application, the predicted embedded region specification is obtained and recorded as W2xH2, and then the JND threshold of the region is calculated and multiplied by a preset coefficient β, so that an embedded addition and subtraction coefficient can be obtained and recorded as σ. The average embedding intensity per pixel in this region is estimated to be e ═ σ x (W2xH2)/((W1/4) x (H1/4)). And modifying the pixel values in the two regions corresponding to t1 and t2 to be the difference value e x2, namely modifying the region to be the estimated average embedding intensity of the pixels, then calculating the energy difference of the two regions after the difference value is modified according to f (tx, ty), recording the result as k, and setting the threshold range to be k/2-k 2. Therefore, when d is within the threshold range of k/2-k x2, the region is a candidate extraction region and can participate in voting, otherwise, the region does not participate in voting.

As shown in fig. 2, in step S203, watermark information is extracted from the extraction area.

The extracting of the watermark information from the extraction area includes:

obtaining an evaluation result for each candidate extraction region according to the energy difference;

accumulating the evaluation results of the plurality of candidate extraction regions divided by the same division mode;

determining the extracted binary information according to a preset extraction mechanism and an accumulated result;

and acquiring watermark information according to the binary information.

For example, when the result of f (tx, ty) function operation of different partitions of the t1 frame and the t2 frame is 1 for regular voting, minus 1 for negative voting, and 0 for invalid, the voting results of W × H regions are accumulated, and if the result is negative, the extracted binary information is 0, otherwise, the extracted binary information is 1.

The obtaining watermark information according to the binary information includes:

according to the binary information, obtaining binary watermark sequences of a brightness channel and two chrominance channels;

obtaining a plurality of watermark initial positions according to the binary watermark sequence;

and obtaining watermark information according to the binary watermark sequences of the plurality of watermark initial positions.

In specific implementation, a plurality of watermark initial positions are obtained according to the binary watermark sequence, including; and respectively matching the binary watermark sequences of the Y channel, the U channel and the V channel with the sequence of the watermark information header. Since the watermark header is preset known information, the degree of matching can be calculated using cross-correlation. Taking the maximum matching degree value as E1, and if E1 is greater than a threshold value Q1, determining the watermark starting position; otherwise, taking the sum of the two maximum values in the three channels as E2, and if E2 is greater than a threshold value Q2, determining the watermark starting position; otherwise, the sum of the three channel values is taken as E3 again, and if E3 is larger than the threshold Q3, the watermark starting position is determined. The judgment of the watermark information header, namely the judgment of the initial position of the watermark, can be enhanced by combining any two channels or three channels, so that the judgment accuracy is improved, and the robustness of the watermark is further improved.

The obtaining of watermark information according to the binary watermark sequences of the plurality of watermark start positions includes:

changing a bit with a value of 0 in the plurality of binary watermark sequence information into a bit with a value of-1 to obtain a plurality of second watermark sequences;

and obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences.

The obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences includes:

obtaining a weight corresponding to each second watermark sequence;

obtaining an accumulated value of the weights of the plurality of second watermark sequences according to the weights;

obtaining a third watermark sequence according to the accumulated value;

and obtaining watermark information according to the third watermark sequence.

The obtaining of the weight corresponding to each second watermark sequence includes:

obtaining the matching degree of the watermark information heads of the plurality of second watermark sequences;

and obtaining the weight corresponding to each second watermark sequence according to the matching degree.

The obtaining of the weight corresponding to each second watermark sequence includes:

obtaining an average value of bits of the binary watermark sequence;

calculating Euclidean distances between the plurality of second watermark sequences and the average value;

and obtaining a weight value corresponding to each second watermark sequence according to the Euclidean distance.

The obtaining of the weight corresponding to each second watermark sequence includes:

the weight of each second watermark sequence is set to 1.

If the watermark is embedded, a redundant multi-round embedding mode is adopted, such as embedding K rounds. Therefore, according to the binary watermark sequence, the watermark starting position of the K 'section of watermark can be obtained, and then the effect of extracting the watermark from each section of information is not ideal because of attack, and the K' section of information is needed to be jointly used for extracting the watermark. For example, the operation of the U, V channel is performed in conjunction with the Y channel, i.e., three channels can be extracted separately. It is assumed that the binary watermark sequence corresponding to the first watermark start position is k1, and the binary watermark sequence corresponding to the second watermark start position is k2 …, where k1 and k2 represent the extracted 0 and 1 information sequences. The 0 in each piece of information is changed to-1, that is, to-1, 1 information sequence (second watermark sequence), to be k1 ', k 2' …. The following three combined extraction methods can be used.

a. Because the watermark header is preset known information, a weight can be calculated according to the matching degree of the watermark header of the K' segment information, for example, the weight is set to be equal to the matching degree, the weight of the first segment is a1, and the weight of the second segment is a2 …. And then, calculating an accumulated value sumA of the information weight value a1 k1 '+ a2 k 2' + …, obtaining a new 0 and 1 sequence (third watermark sequence) according to the positive and negative of the accumulated value, and obtaining watermark information according to the third watermark sequence.

b. Calculating the average value of the information, i.e. the average value of each bit of information, according to K1 and K2 …, then calculating the euclidean distance between the K' segment of information and the average value, and then calculating the weights b1, b2 and b3 …, for example, setting the weight bi to be one tenth of the reciprocal of the ki euclidean distance. And then, calculating an accumulated value sumB of the information weight value b1 k1 '+ b2 k 2' + …, obtaining a new 0 and 1 sequence (a third watermark sequence) according to the positive and negative of the accumulated value, and obtaining watermark information according to the third watermark sequence.

c. It is also possible to directly calculate the sum of each piece of information, that is, make the weight equal to 1, then calculate the accumulated value sumC ═ k1 '+ k 2' + …, obtain a new 0, 1 sequence (third watermark sequence) according to the positive and negative of the accumulated value, and obtain the watermark information according to the third watermark sequence.

The second embodiment of the present application has been introduced, and the data processing method provided in the second embodiment of the present application adopts a multidimensional partition-based different channel voting extraction method when extracting a watermark, thereby improving the adaptability of carrier object extraction under various attack situations; meanwhile, the range of the energy difference threshold value is determined according to the size of the preset area and the texture characteristics, and the non-conforming area is eliminated according to the energy difference threshold value, so that the robustness of watermark extraction is improved; in addition, the weight is calculated in different ways through multiple rounds of watermark information, and the robustness of watermark extraction is improved.

A third embodiment of the present application provides a data processing apparatus corresponding to the data processing method provided in the first embodiment of the present application.

As shown in fig. 3, the apparatus includes:

a carrier object and information obtaining unit 301 for obtaining a carrier object and target watermark information;

an embedded region specification information determining unit 302 configured to determine embedded region specification information of the target watermark information according to an image feature of the carrier object;

and an object watermark information embedding unit 303, configured to embed the object watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding area specification information.

Optionally, the apparatus further comprises: an embedded addition and subtraction coefficient determining unit, configured to determine an embedded addition and subtraction coefficient of the target watermark information according to a minimum perceivable difference of a preset embedded region;

the embedding the target watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding region specification information includes:

and embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the embedded region specification information and the embedded addition and subtraction coefficients.

Optionally, the embedded region specification information determining unit is specifically configured to:

and determining the specification information of the embedding area of the target watermark information according to at least one factor of the resolution of the carrier object and the image texture characteristics of the preset embedding area.

Optionally, the apparatus further comprises: a scrambling unit for scrambling the received data and the data,

and the target watermark information is used for scrambling the target watermark information, and the scrambled target watermark information is embedded into the brightness channel and the two chrominance channels of the carrier object.

It should be noted that, for the detailed description of the apparatus provided in the third embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not described here again.

A fourth embodiment of the present application provides an electronic device corresponding to the data processing method provided in the first embodiment of the present application.

As shown in fig. 4, the electronic device:

a processor 401;

a memory 402 for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor: the method comprises the following steps:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

Optionally, the electronic device further performs the following steps:

determining an embedding addition and subtraction coefficient of the embedding area according to the minimum perceivable difference of the preset embedding area;

the embedding the target watermark information into a luminance channel and two chrominance channels of the carrier object according to the embedding region specification information includes:

and embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object according to the embedded region specification information and the embedded addition and subtraction coefficients.

Optionally, the determining, according to the image feature of the carrier object, the specification information of the embedding area of the target watermark information includes:

and determining the specification information of the embedding area of the target watermark information according to at least one factor of the resolution of the carrier object and the image texture characteristics of the preset embedding area.

Optionally, the electronic device further performs the following steps:

and scrambling the target watermark information, and embedding the scrambled target watermark information into a brightness channel and two chrominance channels of the carrier object.

It should be noted that, for the detailed description of the electronic device provided in the fourth embodiment of the present application, reference may be made to the related description of the first embodiment of the present application, and details are not repeated here.

In correspondence with a data processing method provided in the first embodiment of the present application, a fourth embodiment of the present application provides a storage device storing a program of the data processing method, the program being executed by a processor to execute the steps of:

obtaining a carrier object and target watermark information;

determining the specification information of an embedding area of the target watermark information according to the image characteristics of the carrier object;

and according to the specification information of the embedding area, embedding the target watermark information into a brightness channel and two chrominance channels of the carrier object.

It should be noted that, for providing a detailed description of the storage device according to the fifth embodiment of the present application, reference may be made to the description of the first embodiment of the present application, and details are not described here again.

A sixth embodiment of the present application provides an apparatus corresponding to a data processing method provided in the second embodiment of the present application.

As shown in fig. 5, the apparatus includes:

a carrier object obtaining unit 501, configured to obtain a carrier object containing watermark information;

an extraction area determining unit 502, configured to determine an extraction area containing watermark information in the carrier object by performing multi-dimensional region division on the carrier object;

a watermark information extracting unit 503, configured to extract watermark information from the extraction area.

Optionally, the carrier object is a continuous preset odd number of carrier video frames.

Optionally, the extraction area determining unit is specifically configured to:

dividing the first brightness channel and the second brightness channel into at least two regions; the first brightness channel refers to the brightness channel of one carrier video frame positioned in the first half selected from continuous carrier video frames with preset odd number; the second brightness channel refers to the brightness channel of one carrier video frame positioned in the second half selected from the continuous carrier video frames with preset odd number;

calculating the energy difference of two areas corresponding to the first brightness channel and the second brightness channel;

determining whether the two corresponding regions are candidate extraction regions of a brightness channel containing watermark information according to the energy difference;

processing the two chrominance channels in a processing mode similar to that of the luminance channel to determine candidate extraction areas of the two chrominance channels containing the watermark information;

and taking the candidate extraction areas of the luminance channel and the candidate extraction areas of the two chrominance channels as extraction areas containing watermark information.

Optionally, the extraction area determining unit is specifically configured to:

judging whether the energy difference is within a preset energy difference threshold range, and if so, determining the two corresponding regions as candidate extraction regions;

if not, determining that the corresponding two regions are not candidate extraction regions.

Optionally, the watermark information extracting unit is specifically configured to:

obtaining an evaluation result for each candidate extraction region according to the energy difference;

accumulating the evaluation results of the plurality of candidate extraction regions divided by the same division mode;

determining the extracted binary information according to a preset extraction mechanism and an accumulated result;

and acquiring watermark information according to the binary information.

Optionally, the watermark information extracting unit is specifically configured to:

according to the binary information, obtaining binary watermark sequences of a brightness channel and two chrominance channels;

obtaining a plurality of watermark initial positions according to the binary watermark sequence;

and obtaining watermark information according to the binary watermark sequences of the plurality of watermark initial positions.

Optionally, the watermark information extracting unit is specifically configured to:

changing a bit with a value of 0 in the plurality of binary watermark sequence information into a bit with a value of-1 to obtain a plurality of second watermark sequences;

and obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences.

Optionally, the watermark information extracting unit is specifically configured to:

obtaining a weight corresponding to each second watermark sequence;

obtaining an accumulated value of the weights of the plurality of second watermark sequences according to the weights;

obtaining a third watermark sequence according to the accumulated value;

and obtaining watermark information according to the third watermark sequence.

Optionally, the watermark information extracting unit is specifically configured to:

obtaining the matching degree of the watermark information heads of the plurality of second watermark sequences;

and obtaining the weight corresponding to each second watermark sequence according to the matching degree.

Optionally, the watermark information extracting unit is specifically configured to:

obtaining an average value of bits of the binary watermark sequence;

calculating Euclidean distances between the plurality of second watermark sequences and the average value;

and obtaining a weight value corresponding to each second watermark sequence according to the Euclidean distance.

Optionally, the watermark information extracting unit is specifically configured to:

the weight of each second watermark sequence is set to 1.

It should be noted that, for the detailed description of the apparatus provided in the sixth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.

A seventh embodiment of the present application provides an electronic device corresponding to the data processing method provided in the second embodiment of the present application, including:

a processor;

a memory for storing a program of a data processing method, the apparatus performing the following steps after being powered on and running the program of the data processing method by the processor:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

Optionally, the carrier object is a continuous preset odd number of carrier video frames.

Optionally, the determining, by using a multi-dimensional region dividing manner for the carrier object, an extraction region containing watermark information in the carrier object includes:

dividing the first brightness channel and the second brightness channel into at least two regions; the first brightness channel refers to the brightness channel of one carrier video frame positioned in the first half selected from continuous carrier video frames with preset odd number; the second brightness channel refers to the brightness channel of one carrier video frame positioned in the second half selected from the continuous carrier video frames with preset odd number;

calculating the energy difference of two areas corresponding to the first brightness channel and the second brightness channel;

determining whether the two corresponding regions are candidate extraction regions of a brightness channel containing watermark information according to the energy difference;

processing the two chrominance channels in a processing mode similar to that of the luminance channel to determine candidate extraction areas of the two chrominance channels containing the watermark information;

and taking the candidate extraction areas of the luminance channel and the candidate extraction areas of the two chrominance channels as extraction areas containing watermark information.

Optionally, the determining, according to the energy difference, whether the two corresponding regions are candidate extraction regions containing watermark information includes:

judging whether the energy difference is within a preset energy difference threshold range, and if so, determining the two corresponding regions as candidate extraction regions;

if not, determining that the corresponding two regions are not candidate extraction regions.

Optionally, the extracting the watermark information from the extraction area includes:

obtaining an evaluation result for each candidate extraction region according to the energy difference;

accumulating the evaluation results of the plurality of candidate extraction regions divided by the same division mode;

determining the extracted binary information according to a preset extraction mechanism and an accumulated result;

and acquiring watermark information according to the binary information.

Optionally, the obtaining watermark information according to the binary information includes:

according to the binary information, obtaining binary watermark sequences of a brightness channel and two chrominance channels;

obtaining a plurality of watermark initial positions according to the binary watermark sequence;

and obtaining watermark information according to the binary watermark sequences of the plurality of watermark initial positions.

Optionally, the obtaining watermark information according to the binary watermark sequences of the multiple watermark start positions includes:

changing a bit with a value of 0 in the plurality of binary watermark sequence information into a bit with a value of-1 to obtain a plurality of second watermark sequences;

and obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences.

Optionally, the obtaining watermark information according to the binary watermark sequence and the plurality of second watermark sequences includes:

obtaining a weight corresponding to each second watermark sequence;

obtaining an accumulated value of the weights of the plurality of second watermark sequences according to the weights;

obtaining a third watermark sequence according to the accumulated value;

and obtaining watermark information according to the third watermark sequence.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

obtaining the matching degree of the watermark information heads of the plurality of second watermark sequences;

and obtaining the weight corresponding to each second watermark sequence according to the matching degree.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

obtaining an average value of bits of the binary watermark sequence;

calculating Euclidean distances between the plurality of second watermark sequences and the average value;

and obtaining a weight value corresponding to each second watermark sequence according to the Euclidean distance.

Optionally, the obtaining a weight corresponding to each second watermark sequence includes:

the weight of each second watermark sequence is set to 1.

It should be noted that, for the detailed description of the electronic device provided in the seventh embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.

In accordance with a data processing method provided in the second embodiment of the present application, an eighth embodiment of the present application provides a storage device storing a program of the data processing method, the program being executed by a processor to perform the steps of:

obtaining a carrier object containing watermark information;

determining an extraction area containing watermark information in the carrier object by adopting a mode of carrying out multi-dimensional division on the carrier object;

and extracting watermark information from the extraction area.

It should be noted that, for the detailed description of the storage device provided in the eighth embodiment of the present application, reference may be made to the related description of the second embodiment of the present application, and details are not described here again.

Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.

In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

20页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种设备交互的方法和电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类