Resource copyright setting method, verification method, device and electronic equipment

By randomly adjusting the attribute values ​​of pixels in images or videos to generate implicit watermarks, the problem of low security of explicit watermarks is solved, and watermark protection is achieved that improves security while not affecting the visual effect.

CN113822785BActive Publication Date: 2025-09-26WUBA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110989955.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-26
Publication Date
2025-09-26
Estimated Expiration
2041-08-26

AI Technical Summary

Technical Problem

Existing explicit watermarking methods are not very secure and can easily affect the visibility of image or video content.

Method used

By randomly generating coordinate positions and offsets to adjust the attribute values ​​of the pixels of the image, an implicit watermark is generated, and a random number seed dynamic offset is used to process the pixels of the video material or image material to form an implicit watermark.

Benefits of technology

Without affecting the visual effect of the original resource, the security of the watermark is improved, the difficulty of cracking is increased, and the watermark is prevented from being easily identified and replaced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113822785B_ABST
    Figure CN113822785B_ABST
Patent Text Reader

Abstract

The present invention provides a resource copyright setting method, verification method, device, and electronic device. The resource copyright setting method includes: obtaining at least one image in a resource, and for any image, obtaining pixel points at N coordinate positions in the image to obtain N target pixel points; adjusting the attribute value of the target pixel point in the attribute dimension based on the target offset in each attribute dimension, and replacing the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain a target image; replacing the original image in the resource corresponding to the target image with the target image to obtain an implicit watermark resource corresponding to the resource; wherein the value of the coordinate position is randomly generated within a specified coordinate range, the specified coordinate range is less than or equal to the maximum size of the image, and the value of the target offset is randomly generated within a specified range, and the specified range in each attribute dimension is greater than zero and less than or equal to the specified value in the attribute dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resource copyright setting method, a resource copyright verification method, a device, an electronic device and a storage medium. Background Art

[0002] In related technologies, in order to protect the copyright of pictures and videos, watermark technology can be used to embed certain information that can prove copyright ownership or track infringements into the pictures or videos that need to be protected. Moreover, by adding explicit watermarks, the purpose of protecting the copyright of pictures and tracking infringements of pictures can be achieved. At present, the market uses a very simple "explicit" display watermark method to deal with copyright issues. As is common in daily life, when browsing a picture or playing a video, you can see a watermark logo (logo) directly at a certain position in the picture or video, such as "XXX brand", "XXX unit owned", etc., to identify the copyright source of this picture or video.

[0003] However, for this explicit watermarking method, the watermark part can be completely replaced and a new watermark can be added through certain technologies, which is not very secure. Moreover, this explicit watermarking method will cause a certain degree of obstruction to the original content of the image or video, which directly affects the visibility of the image or video content. Summary of the Invention

[0004] Embodiments of the present invention provide a resource copyright setting method, a resource copyright verification method, an apparatus, an electronic device, and a storage medium to address the problem that existing copyright setting methods are not very secure and easily affect the viewability of image or video content.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a resource copyright setting method, comprising:

[0007] Obtain at least one picture from the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer;

[0008] For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a target image;

[0009] For each target image, replace the original image corresponding to the target image in the resource with the target image to obtain an implicit watermark resource corresponding to the resource;

[0010] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0011] In a second aspect, an embodiment of the present invention provides a resource copyright verification method, comprising:

[0012] For any resource to be verified, obtaining at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determining a correspondence between each picture to be verified and each verification reference picture;

[0013] For any image to be verified, obtain the attribute value of the pixel points at the N coordinate positions in the image to be verified under each of the attribute dimensions, and the attribute value of the pixel points at the N coordinate positions in the verification reference image corresponding to the image to be verified under each of the attribute dimensions;

[0014] For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, it is confirmed that the copyright information of the image to be verified is consistent with that of the verification reference image;

[0015] If the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent, it is confirmed that the copyright information of the resource to be verified is consistent with the implicit watermark resource.

[0016] In a third aspect, an embodiment of the present invention provides a resource copyright setting device, comprising:

[0017] A pixel point reading module is used to obtain at least one image in the resource, and for any of the images, obtain pixel points at N coordinate positions in the image to obtain N target pixel points, where N is a positive integer;

[0018] a pixel attribute adjustment module, configured to adjust, for each target pixel point, an attribute value of the target pixel point in the attribute dimension based on a target offset in each attribute dimension, and replace the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain a target image;

[0019] A watermark resource integration module is used to replace the original image corresponding to the target image in the resource with the target image for each target image, so as to obtain the implicit watermark resource corresponding to the resource;

[0020] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0021] In a fourth aspect, an embodiment of the present invention provides a resource copyright verification device, comprising:

[0022] An image extraction module is configured to obtain, for any resource to be verified, at least one image to be verified from the resource to be verified and at least one verification reference image from the implicit watermark resource corresponding to the resource to be verified, and determine a correspondence between each image to be verified and each verification reference image;

[0023] an attribute value acquisition module, configured to acquire, for any image to be verified, the attribute values ​​of the pixels at the N coordinate positions in the image to be verified under each of the attribute dimensions, and the attribute values ​​of the pixels at the N coordinate positions in a verification reference image corresponding to the image to be verified under each of the attribute dimensions;

[0024] An image copyright verification module is configured to, for any pixel at the N coordinate positions, confirm that the copyright information of the image to be verified is consistent with that of the verification reference image if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image under the attribute dimension;

[0025] The resource copyright verification module is used to confirm that the copyright information of the resource to be verified is consistent with the copyright information of the implicit watermark resource if the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent.

[0026] In a fifth aspect, an embodiment of the present invention further provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the resource copyright setting method described in the first aspect and / or the resource copyright verification method described in the second aspect are implemented.

[0027] In the sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, it implements the steps of the resource copyright setting method described in the first aspect and / or the resource copyright verification method described in the second aspect.

[0028] In an embodiment of the present invention, by using a random number seed, partial attribute values ​​of pixels within a random range in at least one picture selected from resources such as video materials and picture materials are dynamically offset. In this way, the addition of implicit watermarks to resources can be completed without affecting the overall visual effect of the original resources. At the same time, since the offset, the position of the specific adjusted pixel points in the resource, etc. are random, it has strong security and is very difficult to crack. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a flowchart of a resource copyright setting method according to an embodiment of the present invention;

[0030] Figure 2 is a flowchart of another resource copyright setting method in an embodiment of the present invention;

[0031] Figure 3 is a flowchart of another resource copyright setting method in an embodiment of the present invention;

[0032] Figure 4 is a flowchart of another resource copyright setting method in an embodiment of the present invention;

[0033] Figure 5 This is a flowchart of a resource copyright verification method according to an embodiment of the present invention;

[0034] Figure 6 It is a structural diagram of a resource copyright setting device in an embodiment of the present invention;

[0035] Figure 7 It is a structural diagram of a resource copyright verification device in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0037] Reference Figure 1, shows a flowchart of the steps of a resource copyright setting method in an embodiment of the present invention.

[0038] Step 110: Obtain at least one picture from the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer;

[0039] Step 120: For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a target image;

[0040] Step 130: for each target image, replace the original image corresponding to the target image in the resource with the target image to obtain an implicit watermark resource corresponding to the resource;

[0041] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0042] Taking into account the various problems with explicit watermarks mentioned above, in an embodiment of the present invention, in order to solve the above problems, implicit copyright is dynamically injected into the content of resources such as videos and pictures. Specifically, by using a random number seed, partial attribute values ​​of pixels within a random range in at least one picture selected from resources such as video materials and picture materials can be dynamically offset. This allows the addition of implicit watermarks to resources without affecting the overall visual effect of the original resources. At the same time, due to the randomness of the offset and the specific position of the adjusted pixel points in the resource, it has strong security and is very difficult to crack.

[0043] Specifically, at least one picture can be obtained from the resource to be copyrighted, i.e., the resource to be watermarked, and then for each selected picture, the pixel points at N coordinate positions in the picture are obtained to obtain N target pixel points, where N is a positive integer.

[0044] The number of pictures selected for different resource types, the method of selecting pictures, etc. may be different or completely the same, which is not limited in this embodiment of the present invention.

[0045] For example, for a video, which contains multiple video frames, if each video frame is treated as a picture for copyright injection, it will result in a large workload. Therefore, the copyright processing for the video can be set to have one more step than the copyright processing for the picture, that is, it is necessary to dynamically read the first and last frames of the video, and after obtaining the first and last frames, the two pictures are temporarily saved in the device to execute the relevant copyright injection process. Of course, the middle frame of the video can also be obtained, and this embodiment of the present invention is not limited to this. If the resource is a pure picture, then there is no need for other processing, and it is also temporarily saved in the device for the corresponding copyright setting. So far, whether it is a video or a picture, it can be temporarily saved in the device in the form of a picture. If the resource is a picture, the picture obtained from the resource can be the picture itself as the resource, or it can be a partial area in the picture as the resource, and this embodiment of the present invention is not limited to this.

[0046] For each image, its size is relatively fixed, so N coordinate positions can be randomly generated within its size range. Moreover, for the same resource, the size of each image selected therefrom is generally consistent, so the same N coordinate positions can be used to obtain the pixel points at the corresponding coordinate positions from each image. Of course, for different images in the same resource, N coordinate positions that are not completely consistent can also be used. For example, N coordinate positions can be randomly selected within the range for each image, but this embodiment of the present invention is not limited to this.

[0047] In addition, the specific value of N can be customized according to needs, and the N values ​​of different resources, or even different images in the same resource, can be different, or the same N value can be used, which is not limited in this embodiment of the present invention.

[0048] For example, for any image, the resolution size of the image can be read. Assuming they are MAX_X and MAX_Y respectively, the maximum random range of the random number seed for the N coordinate positions corresponding to the image can be controlled within (MAX_X, MAX_Y). Assuming that the value of N is 2 at this time, the random seed can be used to generate two coordinate points (i.e., coordinate positions) M1 (X1, Y1) and M2 (X2, Y2) and save them.

[0049] Furthermore, when adjusting the attribute values ​​of pixels in each attribute dimension, the specific attribute dimensions that can be adjusted can also be customized as needed. Furthermore, to avoid significant visual differences in the adjusted image, which could affect the display of the resource, it is generally necessary to select attribute dimensions that have less of an impact on the image's visual quality, such as different color channels or an alpha channel representing transparency. Furthermore, the target offset for each attribute dimension can be randomly generated based on the range of attribute values ​​in the corresponding attribute dimension. Different resources, or even different images within the same resource, can have different target offsets in the same attribute dimension, and this is not limited in this embodiment of the present invention.

[0050] When adjusting attribute values, it is generally undesirable to significantly impact the visual effects of the resource. Therefore, a smaller adjustment range can be set. That is, the specified range for each attribute dimension is greater than zero and less than or equal to the specified value for that attribute dimension. The specified value for each attribute dimension can be customized as needed, and this is not limited in this embodiment of the present invention.

[0051] For example, for a color channel dimension, the specified value can be set to one tenth, one fifth, and so on, of the attribute value of the corresponding pixel point in the color channel dimension.

[0052] After determining the specific picture to be injected with copyright, for each target pixel in each picture, the attribute value of each target pixel in the picture under each corresponding attribute dimension can be adjusted based on the target offset corresponding to the picture under each attribute dimension, and the attribute value of the pixel at the corresponding coordinate position of the corresponding target pixel in the picture is replaced by the adjusted attribute value to obtain the target picture.

[0053] After obtaining the target image corresponding to each image, the original image corresponding to the target image in the resource, ie the image before processing, can be replaced by the target image, thereby obtaining the implicit watermark resource corresponding to the original resource before copyright setting.

[0054] Reference Figure 2 In an embodiment of the present invention, when the attribute dimension includes at least one target color channel, step 120 may further include:

[0055] Step A121: for any target color channel of any target pixel, reduce or increase the color value of the target pixel in the target color channel by a target offset in the target color channel to obtain an adjusted color value of the target pixel;

[0056] Step A122: Replace the color value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted color value of each target pixel.

[0057] The target color channel can be any color channel in any color space (such as RGB, CMY, HSV, HIS, etc.), such as the R (Red) color channel, G (Green) color channel, and B (Blue) color channel in the RGB (Red, Green, and Blue) color space, the H (Hue) color channel, S (Saturation) color channel, and V (Value) color channel in the HSV color space, and so on.

[0058] When adjusting the attribute value under the color channel dimension, that is, the color value at this time, for any of the target color channels of each target pixel point in the image, the color value of the target pixel point under the corresponding target color channel is adjusted by reducing or increasing the target offset under the target color channel, etc., to obtain the adjusted color value of the target pixel point, and then the adjusted color value of each target pixel point in the image can be obtained.

[0059] The adjusted color value of each target pixel can then be used to replace the original color value of the pixel at the coordinate position corresponding to the target pixel in the original image, that is, the color value of each pixel at the N coordinate positions in the original image can be adjusted.

[0060] For any image, taking the above N value of 2 as an example, the process of adjusting the color value of each target pixel in the image under each target color channel can be as follows:

[0061] a) Analyze the image and read out all the pixels of the current image;

[0062] b) extract the two pixels at positions M1 and M2;

[0063] c) Assuming the target offset is the same for each target color channel, the random target offset B can be subtracted from each RGB color value of pixel points M1 and M2. For example, if the RGB value of pixel point X1 is (100, 100, 100) and the current device offset B is 10, the RGB color becomes (90, 90, 90) after processing.

[0064] d) Replace the new RGB color values ​​of M1 and M2 after processing with the color values ​​of the original pixels M1 and M2 in the image.

[0065] Optionally, in this embodiment of the present invention, step A121 may further include:

[0066] A1211, when reducing the color value of the target pixel in the target color channel by the target offset, if the color value after reducing the target offset is less than the minimum value of the color value, using the minimum value as the adjusted color value of the target pixel;

[0067] A1212, when the color value of the target pixel point under the target color channel is increased by the target offset, if the value of the color value after adding the target offset is greater than the maximum value of the color value, the maximum value is used as the adjusted color value of the target pixel point.

[0068] In practical applications, the value ranges of each color channel in different color spaces are limited to certain extent. For example, the value range of each item in the RGB color space is between 0-255. In the HSV color space, the hue H value range is 0°~360°, the saturation S value range is 0%~100%, and the lightness V value range is usually 0%~100%, and so on.

[0069] Therefore, when adjusting the color value of a target pixel under a certain target color channel, if the adjusted color value is not within the value range of the target color channel, it is easy to affect the corresponding target pixel and even the display effect of the resource.

[0070] Therefore, in an embodiment of the present invention, in order to avoid the above-mentioned problem, it can be set that when the color value of a certain target pixel point in a certain target color channel is reduced by the target offset in the corresponding target color channel, if the value of the color value after reducing the target offset is less than the minimum value of the color value in the target color channel, then the minimum value can be used as the adjusted color value of the corresponding target pixel point. If the color value of the target pixel point in the target color channel is increased by the target offset, if the value of the color value after increasing the target offset is greater than the maximum value of the color value, then the maximum value can be used as the adjusted color value of the corresponding target pixel point.

[0071] For example, suppose that the value of a target pixel in the RGB color space is (5, 100, 250), and suppose that the color values ​​of each item need to be adjusted at this time, and suppose that the target offset is 10. If the adjustment method at this time is to increase the target offset by the color value, then the adjusted B value is 260, which exceeds the maximum value. At this time, 255 can be directly used instead of 260 as the adjusted B value; and if the adjustment method at this time is to reduce the target offset by the color value, then the adjusted R value is -5, which is less than the minimum value. At this time, 0 can be directly used instead of -5 as the adjusted B value.

[0072] In addition, it should be noted that if the target offset of each target pixel point in each target color channel is set to a specified ratio of the original value of the target pixel point in the target color channel, and the specified ratio is a value less than or equal to 1 and greater than 0, then at this time, since the specified ratio of the original value must not be greater than the original value, reducing the specified ratio of the original value based on the original value will generally not be less than the minimum value of the color value in the target color channel. Therefore, at this time, it is preferable to set the adjustment method to reduce the target offset of the color value.

[0073] Reference Figure 3 In an embodiment of the present invention, when the attribute dimension includes an Alpha channel, step 120 may further include:

[0074] Step B121, reducing or increasing the alpha channel value of the target pixel in the alpha channel by a target offset in the alpha channel to obtain an adjusted alpha channel value of the target pixel;

[0075] Step B122: Replace the Alpha channel value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted Alpha channel value of each target pixel.

[0076] The alpha channel is an 8-bit grayscale channel that uses 256 levels of gray to record the transparency information in the image and define transparent, opaque, and semi-transparent areas, where white represents opaque, black represents transparent, and gray represents semi-transparent.

[0077] Therefore, in the embodiment of the present invention, when setting copyright for a resource, the Alpha channel value of the target pixel point may also be adjusted within a certain range.

[0078] Specifically, for any picture, the alpha channel value of each target pixel in the alpha channel is reduced or increased by the target offset under the alpha channel to obtain the adjusted alpha channel value of the target pixel, and then the alpha channel value of the pixel at the coordinate position corresponding to the target pixel in the picture is replaced by the adjusted alpha channel value of each target pixel.

[0079] Among them, as mentioned above, in an embodiment of the present invention, in order to increase the complexity of copyright setting and avoid setting the same copyright for multiple different resources, different resources can be set, or different pictures under the same resource, or the same picture under the same resource can use different randomly generated target offsets in different attribute dimensions. This embodiment of the present invention is not limited to this.

[0080] In addition, in actual applications, if the attribute dimension includes at least one target color channel and an alpha channel at the same time, then for the same target pixel point, the attribute value of the target pixel point in each attribute dimension can be adjusted based on the target offset under each target color channel and alpha channel, and the attribute value of the pixel point at the corresponding coordinate position of the target pixel point in the image under each attribute dimension is replaced by the adjusted attribute value under each attribute dimension. The specific adjustment method of each attribute dimension can refer to the above steps A121-A122 and B121-B122, which will not be repeated here.

[0081] Reference Figure 4 In this embodiment of the present invention, step 120 may further include:

[0082] Step C121: For each target pixel, based on the target offset in each attribute dimension, adjusting the attribute value of the target pixel in the attribute dimension, and replacing the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value, to obtain a first image;

[0083] Step C122: For any of the first images, generate a first Alpha channel value based on a random parameter of the Alpha channel, and perform Alpha transparency processing on global pixels in the first image using the first Alpha channel value to obtain a target image.

[0084] In the embodiment of the present invention, while adjusting each target pixel, all pixels in each image may be re-processed to be transparent.

[0085] At this time, it can be defined that the first image is obtained after adjusting the attribute value of each target pixel point in the image, and then for each first image, a first Alpha channel value can be generated based on the random parameters of the Alpha channel, and the global pixel points in the first image can be Alpha transparent processed through the first Alpha channel value to obtain the target image.

[0086] The value range of the first Alpha channel value may be consistent with or inconsistent with the value range of the target offset under the Alpha channel value dimension, and this is not limited by the embodiment of the present invention. Moreover, the first Alpha channel values ​​of different first images in the same resource can be randomly generated, that is, the first Alpha channel values ​​of different first images in the same resource can be different, or each first image under the same resource can share a randomly generated first Alpha channel value, and this is not limited by the embodiment of the present invention.

[0087] The specific method of adjusting the attribute value of the target pixel in step C121 can be referred to the above content, and will not be described in detail here.

[0088] For example, for any first image, a random seed greater than 0.95 and less than 1 can be generated, and an Alpha channel value can be generated again using the seed, which is the first Alpha channel value. After the channel value is successfully generated, the global pixel point can be Alpha transparent processed again. At this time, the first Alpha channel value is randomly generated between (0.95-1).

[0089] Reference Figure 4 In an embodiment of the present invention, the method may further include:

[0090] Step 140: For any resource to be verified, obtain at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determine the correspondence between each picture to be verified and each verification reference picture;

[0091] Step 150: For any image to be verified, obtain the attribute value of the pixel points at the N coordinate positions in the image to be verified in each of the attribute dimensions, and the attribute value of the pixel points at the N coordinate positions in the verification reference image corresponding to the image to be verified in each of the attribute dimensions;

[0092] Step 160: For any pixel at the N coordinate positions, if the attribute value of the pixel in the image to be verified in each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image in each attribute dimension, confirming that the copyright information of the image to be verified is consistent with that of the verification reference image;

[0093] Step 170: If the copyright information of each corresponding group of to-be-verified pictures and verification reference pictures is consistent, confirm that the copyright information of the to-be-verified resource is consistent with that of the implicit watermark resource.

[0094] After setting the copyright for the resource, each initially generated implicit watermark resource can be saved to facilitate copyright verification for different resources during subsequent resource circulation or use.

[0095] Then, when performing copyright verification, for any resource to be verified, at least one picture to be verified in the resource to be verified can be obtained (that is, from the resource to be verified, obtain the picture with copyright injected in the implicit watermark resource corresponding to the resource to be verified, that is, the picture at the same position as the verification reference picture), and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified (that is, the target picture in the implicit watermark resource with the above copyright setting), and determine the correspondence between each picture to be verified and each verification reference picture.

[0096] For example, assuming that in the implicit watermark resource corresponding to the resource to be verified, the pictures injected with copyright information are the first and last frames, then at this time the first and last frames in the resource to be verified can be obtained accordingly as the pictures to be verified, and the first frame in the resource to be verified corresponds to the first frame in the implicit watermark resource, and the last frame corresponds to the last frame.

[0097] In addition, in actual applications, resources may be clipped during actual use, such as the first frame or the last frame being clipped. In this case, all the corresponding images to be verified and the verification reference images can be obtained for copyright verification.

[0098] For any image to be verified, the attribute values ​​of the pixels at the corresponding N coordinate positions in the image to be verified that have their attribute values ​​adjusted under each attribute dimension can be obtained, as well as the attribute values ​​of the pixels at the corresponding N coordinate positions in the verification reference image corresponding to the image to be verified under each attribute dimension. Then, for each pixel at the current N coordinate positions, if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the corresponding verification reference image under the same attribute dimension, it can be confirmed that the copyright information of the image to be verified is consistent with its corresponding verification reference image. If the copyright information of each group of images to be verified and verification reference images that have a corresponding relationship is consistent, it can be confirmed that the copyright information of the resource to be verified is consistent with the copyright information of the implicit watermark resource.

[0099] In the process of setting copyright for resources, the data generated in each step can be recorded. Then, when obtaining the image to be verified from the resource to be verified, and obtaining the attribute values ​​of the pixel points at N coordinate positions under each of the attribute dimensions from the image to be verified, the copyright setting process can be reversely referenced based on the verification reference resource corresponding to the resource to be verified. This embodiment of the present invention is not limited to this.

[0100] Furthermore, in the embodiments of the present invention, the implicit watermark resource corresponding to the resource to be verified may be obtained by any available method, which is not limited by the embodiments of the present invention. For example, the similarity between the resource to be verified and each implicit watermark resource may be obtained, and the implicit watermark resource with the highest similarity may be obtained as the implicit watermark resource corresponding to the resource to be verified, and so on.

[0101] Optionally, in an embodiment of the present invention, the resource includes at least one of pictures and videos. When the resource is a video, the step of obtaining at least one picture in the resource may specifically include: obtaining at least the first frame picture and the last frame picture in the video.

[0102] Reference Figure 5 , shows a flowchart of the steps of a resource copyright verification method in an embodiment of the present invention.

[0103] Step 210: For any resource to be verified, obtain at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determine the correspondence between each picture to be verified and each verification reference picture;

[0104] Step 220: For any image to be verified, obtain the attribute value of the pixel points at the N coordinate positions in the image to be verified in each of the attribute dimensions, and the attribute value of the pixel points at the N coordinate positions in the verification reference image corresponding to the image to be verified in each of the attribute dimensions;

[0105] Step 230: For any pixel at the N coordinate positions, if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image under the attribute dimension, confirming that the copyright information of the image to be verified is consistent with that of the verification reference image;

[0106] Step 240: If the copyright information of each corresponding group of pictures to be verified and the verification reference pictures is consistent, it is confirmed that the copyright information of the resource to be verified is consistent with the implicit watermark resource.

[0107] Optionally, in this embodiment of the present invention, before step 210, the following steps may also be included:

[0108] Step 310: Obtain at least one picture from the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer;

[0109] Step 320: For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain the target image;

[0110] Step 330: For each target image, replace the original image corresponding to the target image in the resource with the target image to obtain an implicit watermark resource corresponding to the resource;

[0111] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0112] Optionally, in this embodiment of the present invention, step 320 may further include:

[0113] Step 321: For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a first image.

[0114] Step 322: For any of the first images, generate a first Alpha channel value based on a random parameter of the Alpha channel, and perform Alpha transparency processing on global pixels in the first image using the first Alpha channel value to obtain a target image.

[0115] Optionally, in an embodiment of the present invention, step 230 may further include: for any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, and the Alpha channel value of the image to be verified is consistent with the Alpha channel value of the verification reference image, confirming that the copyright information of the image to be verified is consistent with the verification reference image.

[0116] In addition, in an embodiment of the present invention, if the alpha channel values ​​of the global pixels in the image to be verified are all adjusted, then when performing copyright verification, it is necessary to ensure that there is a corresponding relationship between a group of images to be verified and verification reference images. For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each of the attribute dimensions is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, and the alpha channel value of the image to be verified is consistent with the alpha channel value of the verification reference image, then it can be confirmed that the copyright information of the image to be verified is consistent with the verification reference image.

[0117] For example, assuming N is 2, and all images in the same resource use the same N random coordinate positions, the copyright verification process can be described as follows:

[0118] g) Upload the video or image to be verified and wait for the verification resource, parse and read all the pixel information of the resource to be verified;

[0119] h) If the file format of the uploaded resource to be verified is a video, first read the first and last frames of the video and save them;

[0120] i) Read the pixel information A1 and B1 at the M1 position and the M2 position in all images;

[0121] j) Read the pixel information A2 and B2 at the M1 position and the M2 position in each verification reference picture obtained from the implicit watermark resource corresponding to the resource to be verified

[0122] k) If for each set of corresponding images to be verified and reference images, A1=A2, B1=B2 and the alpha channel values ​​are the same, then the copyright information of the resource to be verified is consistent with that of the corresponding implicit watermark resource, that is, the resource to be verified is the resource of the implicit watermark resource. If they are not completely equal, then they are not.

[0123] By combining the use of random number seeds and Alpha channels, the color values ​​of pixels within a random range in video and image materials are dynamically offset. After processing, the Alpha channel is configured for the global content. This allows the addition of image watermarks without affecting the visual effects of the original images. At the same time, it has strong security and can effectively solve the risk of reduced image usage and watermark replacement caused by easy recognition of watermarks. It also supports processing of multiple file formats of videos and images.

[0124] Reference Figure 6 , shows a structural diagram of a resource copyright setting device in an embodiment of the present invention.

[0125] The resource copyright setting device of the embodiment of the present invention includes: a pixel point reading module 410 , a pixel attribute adjustment module 420 and a watermark resource integration module 430 .

[0126] The functions of each module and the interactions between them are introduced in detail below.

[0127] The pixel point reading module 410 is used to obtain at least one picture in the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer;

[0128] a pixel attribute adjustment module 420 configured to adjust, for each target pixel, the attribute value of the target pixel in each attribute dimension based on the target offset in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a target image;

[0129] The watermark resource integration module 430 is configured to replace the original image corresponding to the target image in the resource with the target image for each target image, thereby obtaining an implicit watermark resource corresponding to the resource;

[0130] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0131] Optionally, in this embodiment of the present invention, when the attribute dimension includes at least one target color channel, the pixel attribute adjustment module includes:

[0132] A color value adjustment submodule is configured to, for any target color channel of any target pixel point, reduce or increase the color value of the target pixel point in the target color channel by a target offset in the target color channel to obtain an adjusted color value of the target pixel point;

[0133] The color value replacement submodule is used to replace the color value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted color value of each target pixel.

[0134] Optionally, in this embodiment of the present invention, the color value adjustment submodule is specifically configured to:

[0135] When the color value of the target pixel in the target color channel is reduced by the target offset, if the color value after reducing the target offset is less than the minimum value of the color value, the minimum value is used as the adjusted color value of the target pixel;

[0136] When the target offset is increased by the color value of the target pixel in the target color channel, if the color value after increasing the target offset is greater than the maximum value of the color value, the maximum value is used as the adjusted color value of the target pixel.

[0137] Optionally, in this embodiment of the present invention, when the attribute dimension includes an Alpha channel, the pixel attribute adjustment module includes:

[0138] An alpha channel value adjustment submodule is configured to reduce or increase the alpha channel value of the target pixel in the alpha channel by a target offset in the alpha channel to obtain an adjusted alpha channel value of the target pixel;

[0139] The alpha channel value replacement submodule is used to replace the alpha channel value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted alpha channel value of each target pixel point.

[0140] Optionally, in an embodiment of the present invention, the pixel attribute adjustment module is specifically configured to:

[0141] For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a first image;

[0142] For any of the first images, a first alpha channel value is generated based on a random parameter of the alpha channel, and alpha transparency processing is performed on global pixels in the first image using the first alpha channel value to obtain a target image.

[0143] Optionally, in an embodiment of the present invention, the device further includes:

[0144] An image extraction module is configured to obtain, for any resource to be verified, at least one image to be verified from the resource to be verified and at least one verification reference image from the implicit watermark resource corresponding to the resource to be verified, and determine a correspondence between each image to be verified and each verification reference image;

[0145] an attribute value acquisition module, configured to acquire, for any image to be verified, the attribute values ​​of the pixels at the N coordinate positions in the image to be verified under each of the attribute dimensions, and the attribute values ​​of the pixels at the N coordinate positions in a verification reference image corresponding to the image to be verified under each of the attribute dimensions;

[0146] An image copyright verification module is configured to, for any pixel at the N coordinate positions, confirm that the copyright information of the image to be verified is consistent with that of the verification reference image if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image under the attribute dimension;

[0147] The resource copyright verification module is used to confirm that the copyright information of the resource to be verified is consistent with the copyright information of the implicit watermark resource if the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent.

[0148] Optionally, in an embodiment of the present invention, the resource includes at least one of a picture and a video. When the resource is a video, the pixel reading module can be used to obtain at least the first frame picture and the last frame picture in the video.

[0149] The resource copyright setting device provided by the embodiment of the present invention can achieve Figures 1 to 4 To avoid repetition, the various processes implemented in the method embodiment will not be described again here.

[0150] Reference Figure 7 , shows a structural diagram of a resource copyright verification device in an embodiment of the present invention.

[0151] The resource copyright verification device of the embodiment of the present invention includes: an image extraction module 510 , an attribute value acquisition module 520 , an image copyright verification module 530 and a resource copyright verification module 540 .

[0152] The functions of each module and the interactions between them are introduced in detail below.

[0153] The image extraction module 510 is configured to obtain, for any resource to be verified, at least one image to be verified from the resource to be verified and at least one verification reference image from the implicit watermark resource corresponding to the resource to be verified, and determine a correspondence between each image to be verified and each verification reference image;

[0154] The attribute value acquisition module 520 is configured to acquire, for any image to be verified, the attribute values ​​of the pixels at the N coordinate positions in the image to be verified under each attribute dimension, and the attribute values ​​of the pixels at the N coordinate positions in the verification reference image corresponding to the image to be verified under each attribute dimension;

[0155] The image copyright verification module 530 is configured to, for any pixel at the N coordinate positions, confirm that the copyright information of the image to be verified is consistent with that of the verification reference image if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image under the attribute dimension;

[0156] The resource copyright verification module 540 is configured to confirm that the copyright information of the resource to be verified is consistent with the copyright information of the implicit watermark resource if the copyright information of each corresponding group of images to be verified and the reference images to be verified are consistent.

[0157] Optionally, in an embodiment of the present invention, the device further includes:

[0158] A pixel point reading module is used to obtain at least one image in the resource, and for any of the images, obtain pixel points at N coordinate positions in the image to obtain N target pixel points, where N is a positive integer;

[0159] a pixel attribute adjustment module, configured to adjust, for each target pixel point, an attribute value of the target pixel point in the attribute dimension based on a target offset in each attribute dimension, and replace the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain a target image;

[0160] A watermark resource integration module is used to replace the original image corresponding to the target image in the resource with the target image for each target image, so as to obtain the implicit watermark resource corresponding to the resource;

[0161] Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

[0162] Optionally, in an embodiment of the present invention, the pixel attribute adjustment module is specifically configured to:

[0163] For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a first image;

[0164] For any of the first images, a first alpha channel value is generated based on a random parameter of the alpha channel, and alpha transparency processing is performed on global pixels in the first image using the first alpha channel value to obtain a target image.

[0165] Optionally, in this embodiment of the present invention, the image copyright verification module 530 is specifically configured to:

[0166] For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, and the Alpha channel value of the image to be verified is consistent with the Alpha channel value of the verification reference image, it is confirmed that the copyright information of the image to be verified is consistent with the verification reference image.

[0167] The resource copyright verification device provided by the embodiment of the present invention can achieve Figure 5 To avoid repetition, the various processes implemented in the method embodiment will not be described again here.

[0168] Preferably, an embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned resource copyright setting method and / or resource copyright verification method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0169] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the aforementioned resource copyright setting method and / or resource copyright verification method embodiments, and can achieve the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0170] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0171] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, 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 (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0172] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

[0173] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0174] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0176] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0177] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, ROM, RAM, a magnetic disk, or an optical disk.

[0179] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A resource copyright setting method, characterized in that: include: Obtain at least one picture from the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer; For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a target image; For each target image, replace the original image corresponding to the target image in the resource with the target image to obtain an implicit watermark resource corresponding to the resource; The coordinate position values ​​are randomly generated within a specified coordinate range, and the coordinate positions within the same image are different. The specified coordinate range is less than or equal to the maximum size of the image. The target offset value is randomly generated within the specified range, and the specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension. In a case where the attribute dimension includes at least one target color channel, the step of adjusting, for each target pixel point, the attribute value of the target pixel point in the attribute dimension based on the target offset in each attribute dimension, and replacing the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value includes: For any target color channel of any target pixel, reduce or increase the color value of the target pixel in the target color channel by the target offset in the target color channel to obtain the adjusted color value of the target pixel; Replace the color value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted color value of each target pixel; In a case where the attribute dimension includes an alpha channel, the step of adjusting, for each target pixel point, the attribute value of the target pixel point in the attribute dimension based on the target offset in each attribute dimension, and replacing the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value includes: The alpha channel value of the target pixel point in the alpha channel is reduced or increased by the target offset in the alpha channel to obtain the adjusted alpha channel value of the target pixel point; The alpha channel value of each target pixel is adjusted to replace the alpha channel value of the pixel at the coordinate position corresponding to the target pixel in the image.

2. The method according to claim 1, characterized in that The step of reducing or increasing the color value of the target pixel in the target color channel by the target offset to obtain the adjusted color value of the target pixel includes: When the color value of the target pixel in the target color channel is reduced by the target offset, if the color value after reducing the target offset is less than the minimum value of the color value, the minimum value is used as the adjusted color value of the target pixel; When the target offset is increased by the color value of the target pixel in the target color channel, if the color value after increasing the target offset is greater than the maximum value of the color value, the maximum value is used as the adjusted color value of the target pixel.

3. The method according to claim 1 or 2, characterized in that The step of adjusting, for each target pixel point, the attribute value of the target pixel point in the attribute dimension based on the target offset in each attribute dimension, and replacing the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain the target image includes: For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a first image; For any of the first images, a first alpha channel value is generated based on a random parameter of the alpha channel, and alpha transparency processing is performed on global pixels in the first image using the first alpha channel value to obtain a target image.

4. The method according to claim 1, wherein The method further comprises: For any resource to be verified, obtaining at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determining a correspondence between each picture to be verified and each verification reference picture; For any image to be verified, obtain the attribute value of the pixel points at the N coordinate positions in the image to be verified under each of the attribute dimensions, and the attribute value of the pixel points at the N coordinate positions in the verification reference image corresponding to the image to be verified under each of the attribute dimensions; For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, it is confirmed that the copyright information of the image to be verified is consistent with that of the verification reference image; If the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent, it is confirmed that the copyright information of the resource to be verified is consistent with the implicit watermark resource.

5. The method according to claim 1, wherein The resource includes at least one of a picture and a video. When the resource is a video, the step of obtaining at least one picture from the resource includes: At least the first frame image and the last frame image in the video are obtained.

6. A resource copyright verification method, characterized in that: Used to perform copyright verification on different resources after copyright setting is performed on the resources by the resource copyright setting method according to any one of claims 1 to 5, comprising: For any resource to be verified, obtaining at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determining a correspondence between each picture to be verified and each verification reference picture; For any image to be verified, obtain the attribute values ​​of the pixels at the N coordinate positions in the image to be verified under each attribute dimension, and the attribute values ​​of the pixels at the N coordinate positions in the verification reference image corresponding to the image to be verified under each attribute dimension; the attribute dimensions include an alpha channel and at least one target color channel; For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, it is confirmed that the copyright information of the image to be verified is consistent with that of the verification reference image; If the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent, it is confirmed that the copyright information of the resource to be verified is consistent with the implicit watermark resource.

7. The method according to claim 6, characterized in that Before the step of obtaining, for any resource to be verified, at least one picture to be verified in the resource to be verified and at least one verification reference picture in the implicit watermark resource corresponding to the resource to be verified, and determining the correspondence between each picture to be verified and each verification reference picture, the method further includes: Obtain at least one picture from the resource, and for any of the pictures, obtain pixel points at N coordinate positions in the picture to obtain N target pixel points, where N is a positive integer; For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a target image; For each target image, replace the original image corresponding to the target image in the resource with the target image to obtain an implicit watermark resource corresponding to the resource; Among them, the value of the coordinate position is randomly generated within the specified coordinate range, and the coordinate positions in the same picture are different. The specified coordinate range is less than or equal to the maximum size of the picture. The value of the target offset is randomly generated within the specified range. The specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension.

8. The method according to claim 7, characterized in that The step of adjusting, for each target pixel point, the attribute value of the target pixel point in the attribute dimension based on the target offset in each attribute dimension, and replacing the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain the target image includes: For each target pixel, based on the target offset in each attribute dimension, adjust the attribute value of the target pixel in the attribute dimension, and replace the attribute value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted attribute value to obtain a first image; For any of the first images, a first alpha channel value is generated based on a random parameter of the alpha channel, and alpha transparency processing is performed on global pixels in the first image using the first alpha channel value to obtain a target image.

9. The method according to claim 8, characterized in that The step of confirming that the copyright information of the image to be verified is consistent with that of the verification reference image if, for any pixel point at the N coordinate positions, the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, includes: For any pixel point at the N coordinate positions, if the attribute value of the pixel point in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel point at the same coordinate position in the verification reference image under the attribute dimension, and the Alpha channel value of the image to be verified is consistent with the Alpha channel value of the verification reference image, it is confirmed that the copyright information of the image to be verified is consistent with the verification reference image.

10. A resource copyright setting device, characterized in that: include: A pixel point reading module is used to obtain at least one image in the resource, and for any of the images, obtain pixel points at N coordinate positions in the image to obtain N target pixel points, where N is a positive integer; a pixel attribute adjustment module, configured to adjust, for each target pixel point, an attribute value of the target pixel point in the attribute dimension based on a target offset in each attribute dimension, and replace the attribute value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted attribute value to obtain a target image; A watermark resource integration module is used to replace the original image corresponding to the target image in the resource with the target image for each target image, so as to obtain the implicit watermark resource corresponding to the resource; The coordinate position values ​​are randomly generated within a specified coordinate range, and the coordinate positions within the same image are different. The specified coordinate range is less than or equal to the maximum size of the image. The target offset value is randomly generated within the specified range, and the specified range under each attribute dimension is greater than zero and less than or equal to the specified value under the attribute dimension. In the case where the attribute dimension includes at least one target color channel, the pixel attribute adjustment module includes: A color value adjustment submodule is configured to, for any target color channel of any target pixel point, reduce or increase the color value of the target pixel point in the target color channel by a target offset in the target color channel to obtain an adjusted color value of the target pixel point; A color value replacement submodule is used to replace the color value of the pixel at the coordinate position corresponding to the target pixel in the image with the adjusted color value of each target pixel; In the case where the attribute dimension includes an Alpha channel, the pixel attribute adjustment module includes: An alpha channel value adjustment submodule is configured to reduce or increase the alpha channel value of the target pixel in the alpha channel by a target offset in the alpha channel to obtain an adjusted alpha channel value of the target pixel; The alpha channel value replacement submodule is used to replace the alpha channel value of the pixel point at the coordinate position corresponding to the target pixel point in the image with the adjusted alpha channel value of each target pixel point.

11. A resource copyright verification device, characterized in that: Used to perform copyright verification on different resources after copyright setting is performed on the resources by the resource copyright setting method according to any one of claims 1 to 5, comprising: An image extraction module is configured to obtain, for any resource to be verified, at least one image to be verified from the resource to be verified and at least one verification reference image from the implicit watermark resource corresponding to the resource to be verified, and determine a correspondence between each image to be verified and each verification reference image; an attribute value acquisition module, configured to acquire, for any image to be verified, attribute values ​​of pixels at the N coordinate positions in the image to be verified under each attribute dimension, and attribute values ​​of pixels at the N coordinate positions in a verification reference image corresponding to the image to be verified under each attribute dimension; the attribute dimensions include an alpha channel and at least one target color channel; An image copyright verification module is configured to, for any pixel at the N coordinate positions, confirm that the copyright information of the image to be verified is consistent with that of the verification reference image if the attribute value of the pixel in the image to be verified under each attribute dimension is consistent with the attribute value of the pixel at the same coordinate position in the verification reference image under the attribute dimension; The resource copyright verification module is used to confirm that the copyright information of the resource to be verified is consistent with the copyright information of the implicit watermark resource if the copyright information of each group of corresponding pictures to be verified and the verification reference pictures are consistent.

12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the resource copyright setting method according to any one of claims 1 to 5, and / or the resource copyright verification method according to any one of claims 6 to 9.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the resource copyright setting method according to any one of claims 1 to 5, and / or the resource copyright verification method according to any one of claims 6 to 9.

Citation Information

Patent Citations

  • Dynamic watermark of vehicle camera images

    CN110084732A

  • Protecting images with an image watermark

    US20020090110A1